Saturday, December 31, 2005
.NET 2 Links
They are as follows
Visual Studio 2005 and .NET Framework 2.0 Setup Troubleshooting Guide
ASP.NET jumpstarted: Establishing the Application and Page Framework
Visual Studio 2005 Class DesignerNew dataset Features in Visual Studio 2005
http://www.c-sharpcorner.com/vs2005.asp
Brian Goldberg Blog
Now there is a page for ASP.NET UI Designers as well. You can find info on how to design your page according to web standards, Themes master pager etc. So Asela (Who is our UI designer at office) be ready, I'm going to bug you to implement them.
ASP.NET for Designers
Thursday, December 29, 2005
UK government gateway runs totally on Microsoft software
More @ http://www.ciber-uk.com/casestudies/search_results_single.cfm?id=ukonline
Tuesday, December 13, 2005
.NET Localization
[ C#, .NET 1.1, 2.0 ]
We can do this by using resource files. A default resource file is generated for every form and text, images etc will be stored in this file and they are complied in to a satellite assembly. Custom text which you need to display as messages etc can be embedded in to custom resource file. You have to create this file manually.To create multi language form first you have to set the Localize property to true;
Then you can add controls to the form. These controls will be added in the default language. Then you can change the language property to the language that you want and enter text in the form. This will result creating two resource file for the Form by the designer with there culture-name. At the compile time multiple assemblies are created for each culture. When you change the current culture form the Regional Settings the form will load with the specific language text that you added to the form.Custom resource files will act as the same way, but you have to manually name them accordingly. Ex. Messages.resx , Meesages.fr-FR.resx
You have to load them in the following wayprivate void button1_Click(object sender, EventArgs e)
{
ResourceManager localResMgr = new ResourceManager("GraphicsTest.messages", typeof(TestWinControls).Assembly);
string welcomeMsg = localResMgr.GetString("strWelcomeMessage");
MessageBox.Show(welcomeMsg);
}
To check this you have to manually change the UI Culture of the form. You have to change the current threads’ UI culture in the Constructor of the Form before the Initializecomponent method is called.
public TestWinControls()
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");InitializeComponent();
}
Note: When you deploy the application the OS should be Win2k , Win3K or WinXP Multi-Language version and you should be able to change the UI Culture from the control panel.
Friday, December 09, 2005
.NET Graphics
I saw some enhanced controls created using the “Owner Drawn” feature of Winforms.NET 2.0. So I open the MSDN and start studying System.Drawing form the scratch. I found out that you have to get the Graphics object from the current control to draw graphics in the form and there are 3 methods to do that.
1. Graphic property of the PaintEventArgs, of the Paint event of the control2. Calling CreateGraphics() method of the control
3. Getting the Graphic object a image using Graphics.FromImage(<class derived from image class>)To check this I used the onPaint event of the PictureBox control as follows
I saw some enhanced controls created using the “Owner Drawn” feature of Winforms.NET 2.0. So I open the MSDN and start studying System.Drawing form the scratch. I found out that you have to get the Graphics object from the current control to draw graphics in the form and there are 3 methods to do that.
1. Graphic property of the PaintEventArgs, of the Paint event of the control
2. Calling CreateGraphics() method of the control
3. Getting the Graphic object a image using Graphics.FromImage(
To check this I used the onPaint event of the PictureBox control as follows
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
//Get a graphic object of the picturebox
Graphics graphicsRef = e.Graphics;
//Create a brush
System.Drawing.Brush brush = System.Drawing.Brushes.DarkOrange;
//Draw some text
graphicsRef.DrawString("This is a Sample Text", new Font("Forte", 14), brush, new Point(30, 30));
//Draw a line
graphicsRef.DrawLine(System.Drawing.Pens.BurlyWood, new Point(30, 60), new Point(100, 60));
}
Which generate a output like…
Furhter to add a Liner gradient to the text drawn in the screen I replaced the follwing line
//Create a brush
System.Drawing.Brush brush = System.Drawing.Brushes.DarkOrange;
With the
//Create a linear for the string
System.Drawing.Brush brush = new System.Drawing.Drawing2D.LinearGradientBrush(
new Point(30, 30),
new Point(200, 30),
Color.FromArgb(255, 0, 255, 0), // Opaque Green
Color.FromArgb(255, 0, 0, 255)); // Opaque blue
To generate an output like…