Topic: Visual C# 2005 beta  (Read 3048 times)

0 Members and 1 Guest are viewing this topic.

Offline toasty0

  • Application.Quit();
  • Captain
  • *
  • Posts: 8045
  • Gender: Male
Visual C# 2005 beta
« on: January 29, 2005, 10:43:00 am »
MCTS: SQL Server 2005 | MCP: Windows Server 2003 | MCTS: Microsoft Certified Technology Specialist | MCT: Microsoft Certified Trainer | MOS: Microsoft Office Specialist 2003 | VSP: VMware Sales Professional | MCTS: Vista

Offline Sirgod

  • Whooot Master Cattle Baron
  • Global Moderator
  • Vice Admiral
  • *
  • Posts: 27831
  • Gender: Male
Re: Visual C# 2005 beta
« Reply #1 on: January 29, 2005, 10:49:17 am »
Thanks Jerry. Many well wishes to you Bro.

Stephen
"You cannot exaggerate about the Marines. They are convinced to the point of arrogance, that they are the most ferocious fighters on earth - and the amusing thing about it is that they are."- Father Kevin Keaney, Chaplain, Korean War

Offline Sirgod

  • Whooot Master Cattle Baron
  • Global Moderator
  • Vice Admiral
  • *
  • Posts: 27831
  • Gender: Male
Re: Visual C# 2005 beta
« Reply #2 on: January 29, 2005, 12:18:29 pm »
If you are interested in Programming skills, I Say Please Download this. the C sharp Beta is very very good, and I can't think Jerry enough for It.

Stephen
"You cannot exaggerate about the Marines. They are convinced to the point of arrogance, that they are the most ferocious fighters on earth - and the amusing thing about it is that they are."- Father Kevin Keaney, Chaplain, Korean War

Offline toasty0

  • Application.Quit();
  • Captain
  • *
  • Posts: 8045
  • Gender: Male
Re: Visual C# 2005 beta
« Reply #3 on: January 29, 2005, 09:05:30 pm »
If you are interested in Programming skills, I Say Please Download this. the C sharp Beta is very very good, and I can't think Jerry enough for It.

Stephen

Let me know when you're ready to play around with databases and I'll whip you up an access db to play with for your front end programming skills.

Hey, keep this in mind. I can convert the ship list file to an Access DB for you just kicks and giggles...

Jerry
MCTS: SQL Server 2005 | MCP: Windows Server 2003 | MCTS: Microsoft Certified Technology Specialist | MCT: Microsoft Certified Trainer | MOS: Microsoft Office Specialist 2003 | VSP: VMware Sales Professional | MCTS: Vista

Offline toasty0

  • Application.Quit();
  • Captain
  • *
  • Posts: 8045
  • Gender: Male
Re: Visual C# 2005 beta
« Reply #4 on: January 30, 2005, 01:09:03 am »
Ok, so call me enthusiastic.

Here's that shiplistDB coverted to access and an access viewer for you to to look at the db.

Parctice on 2005 making winForms and programming controls. As soon as I get time these next couple weeks I'll post some code for you to use to display and manipulate the shiplist data.

http://www.toasty0.com/SFC/SteveShipList.zip

Anyone else wanna join in you're more than welcome.

Jerry
MCTS: SQL Server 2005 | MCP: Windows Server 2003 | MCTS: Microsoft Certified Technology Specialist | MCT: Microsoft Certified Trainer | MOS: Microsoft Office Specialist 2003 | VSP: VMware Sales Professional | MCTS: Vista

Offline toasty0

  • Application.Quit();
  • Captain
  • *
  • Posts: 8045
  • Gender: Male
Re: Visual C# 2005 beta
« Reply #5 on: January 31, 2005, 01:09:03 am »
Code: [Select]
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;


namespace MyPages
{
/// <summary>
/// Summary description for teststuff.
///
/// How to have fun coding and testing different controls
///
/// J. Hammond 2005 and beyond
/// </summary>
public class teststuff : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button btnVB;
protected System.Web.UI.WebControls.Button btnGameProgramming;
protected System.Web.UI.WebControls.Button btnDirectX;
protected System.Web.UI.WebControls.Button btnCplusplus;
protected System.Web.UI.WebControls.Button btnCSharp;
protected System.Web.UI.WebControls.Button btnASP;
protected System.Web.UI.WebControls.Button btnAll;
protected System.Web.UI.WebControls.Button btnSQL;
protected System.Web.UI.WebControls.Label lblLibrary;
protected System.Web.UI.WebControls.DataGrid dgTestIt;

private void Page_Load(object sender, System.EventArgs e)
{

// Put user code to initialize the page here


/*string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM ASPNET";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close(); */



}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);

//Set the properties of dgTestIt datagrid control
dgTestIt.AlternatingItemStyle.BackColor=System.Drawing.Color.LightBlue;
dgTestIt.ItemStyle.BackColor=System.Drawing.Color.LightGreen;
dgTestIt.AllowSorting=true;
dgTestIt.ShowFooter=true;
dgTestIt.ShowHeader=true;
dgTestIt.Width=800;
dgTestIt.BackColor=System.Drawing.Color.LightGray;
dgTestIt.BorderColor=System.Drawing.Color.Green;
dgTestIt.BorderStyle=BorderStyle.Solid;
dgTestIt.BorderWidth=3;

btnSQL.BackColor=System.Drawing.Color.LightGreen;
btnSQL.BorderColor=System.Drawing.Color.ForestGreen;
btnSQL.BorderStyle=BorderStyle.Ridge;

btnAll.BackColor=System.Drawing.Color.LightGreen;
btnAll.BorderColor=System.Drawing.Color.ForestGreen;
btnAll.BorderStyle=BorderStyle.Ridge;

btnASP.BackColor=System.Drawing.Color.LightGreen;
btnASP.BorderColor=System.Drawing.Color.ForestGreen;
btnASP.BorderStyle=BorderStyle.Ridge;

btnCSharp.BackColor=System.Drawing.Color.LightGreen;
btnCSharp.BorderColor=System.Drawing.Color.ForestGreen;
btnCSharp.BorderStyle=BorderStyle.Ridge;

btnVB.BackColor=System.Drawing.Color.LightGreen;
btnVB.BorderColor=System.Drawing.Color.ForestGreen;
btnVB.BorderStyle=BorderStyle.Ridge;

btnGameProgramming.BackColor=System.Drawing.Color.LightGreen;
btnGameProgramming.BorderColor=System.Drawing.Color.ForestGreen;
btnGameProgramming.BorderStyle=BorderStyle.Ridge;

btnDirectX.BackColor=System.Drawing.Color.LightGreen;
btnDirectX.BorderColor=System.Drawing.Color.ForestGreen;
btnDirectX.BorderStyle=BorderStyle.Ridge;

btnCplusplus.BackColor=System.Drawing.Color.LightGreen;
btnCplusplus.BorderColor=System.Drawing.Color.ForestGreen;
btnCplusplus.BorderStyle=BorderStyle.Ridge;

lblLibrary.BackColor=System.Drawing.Color.LightGreen;
lblLibrary.BorderColor=System.Drawing.Color.ForestGreen;
lblLibrary.BorderStyle=BorderStyle.Ridge;
lblLibrary.Font.Size=12;
lblLibrary.Text="Welcome to My Programming Library. Please click one of the buttons below to choose which library you would like to view.";

}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{   
this.btnSQL.Click += new System.EventHandler(this.btnSQL_Click);
this.btnAll.Click += new System.EventHandler(this.btnAll_Click);
this.btnASP.Click += new System.EventHandler(this.btnASP_Click);
this.btnCSharp.Click += new System.EventHandler(this.btnCSharp_Click);
this.btnCplusplus.Click += new System.EventHandler(this.btnCplusplus_Click);
this.btnDirectX.Click += new System.EventHandler(this.btnDirectX_Click);
this.btnGameProgramming.Click += new System.EventHandler(this.btnGameProgramming_Click);
this.btnVB.Click += new System.EventHandler(this.btnVB_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void Button1_Click(object sender, System.EventArgs e)
{
//Response.Redirect("http://www.toasty0.net");
Response.Close();

}

private void btnAll_Click(object sender, System.EventArgs e)
{
string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM ASPNET UNION SELECT * FROM VB UNION SELECT * FROM Cpp UNION SELECT * FROM Game UNION SELECT * FROM CSharp UNION SELECT * FROM SeQuil UNION SELECT * FROM DX ORDER BY Title ";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close();
}

private void btnASP_Click(object sender, System.EventArgs e)
{
string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM ASPNET ORDER BY Title";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close();
}

private void btnCSharp_Click(object sender, System.EventArgs e)
{
string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM CSharp ORDER BY Title";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close();
}

private void btnCplusplus_Click(object sender, System.EventArgs e)
{
string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM Cpp ORDER BY Title";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close();
}

private void btnDirectX_Click(object sender, System.EventArgs e)
{
string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM DX ORDER BY Title";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close();
}

private void btnGameProgramming_Click(object sender, System.EventArgs e)
{
string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM Game";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close();
}

private void btnVB_Click(object sender, System.EventArgs e)
{
string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM VB ORDER BY Title";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close();
}

private void btnSQL_Click(object sender, System.EventArgs e)
{
string DbPath = Server.MapPath("bin/LibBooksProg.mdb");
//string ConnStr;
string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+
@"Data Source="+DbPath+";";
OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr);
string SQL= "SELECT * FROM SeQuil ORDER BY Title";
OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn);
MyOleDbConn.Open();
dgTestIt.DataSource= Commandobj.ExecuteReader();
dgTestIt.DataBind();
MyOleDbConn.Close();
}

/*private void dgTestIt_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
private void dgTestIt_SortCommand(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e)
{
dataView1.sort=e.SortExpression;
dgTestIt.DataBind();
}*/
}
}

Get busy...

And to see the code in action, Steve, go to http://www.toasty0.com/library.aspx

This should give you an idea of how some of this works. FWIW, this code is not optimal, but it is functunal. ;)

Jerry
« Last Edit: January 31, 2005, 01:22:34 am by toasty0 »
MCTS: SQL Server 2005 | MCP: Windows Server 2003 | MCTS: Microsoft Certified Technology Specialist | MCT: Microsoft Certified Trainer | MOS: Microsoft Office Specialist 2003 | VSP: VMware Sales Professional | MCTS: Vista

Offline toasty0

  • Application.Quit();
  • Captain
  • *
  • Posts: 8045
  • Gender: Male
Re: Visual C# 2005 beta
« Reply #6 on: January 31, 2005, 12:09:05 pm »
Ok, Stephen, with the exception of the books that my brother barrowed and a few odd ball catagory books being left out I have completeed the database. Since last night I added my C++ and Visual Basic titles.

http://www.toasty0.com/library.aspx

Jerry
MCTS: SQL Server 2005 | MCP: Windows Server 2003 | MCTS: Microsoft Certified Technology Specialist | MCT: Microsoft Certified Trainer | MOS: Microsoft Office Specialist 2003 | VSP: VMware Sales Professional | MCTS: Vista

Offline Sirgod

  • Whooot Master Cattle Baron
  • Global Moderator
  • Vice Admiral
  • *
  • Posts: 27831
  • Gender: Male
Re: Visual C# 2005 beta
« Reply #7 on: January 31, 2005, 12:53:56 pm »
Thanks Jerry. I like how you have the Rating thing with your books. I also appreciated you taking the time with me, and helping me to learn more about this.

Stephen
"You cannot exaggerate about the Marines. They are convinced to the point of arrogance, that they are the most ferocious fighters on earth - and the amusing thing about it is that they are."- Father Kevin Keaney, Chaplain, Korean War