Archive for the ‘Uncategorized’ Category

Introduction to Windows Workstation Foundation (WF)

April 23rd, 2006 by koolb | No Comments | Filed in Uncategorized

[SDK, Up Coming Tools]

Consider a process like “Complain Management System”, where you need to get the customer complains through a Web site or a published for Phone no. Internal employer should be appointed to act upon complains and take the necessary actions. A Manager should review the employer actions and then get back to the customer.

Typical organization wants to implement many processors like this and monitor the progress of them.

Some elements are human processes and some are System process if you take a look at the above ( e.g Customer needs to enter the complain through a website is Human responsibility and authenticate customer in to the system is System responsibility.)

You can find hundreds of processes like this in your day to day work environment. Do you have a facility to setup something like this using MS Office or other available software?This is where the up coming Windows Work Flow (WF) comes in to place. WF will be an Application development framework to design applications to setup work flow in your organization and a user friendly integrated set of tools with next
Office Suite (V12).

More @ http://www.codeproject.com/dotnet/UnderstandWWF.asp

Mapping Data Provider Data Types

April 23rd, 2006 by koolb | No Comments | Filed in Uncategorized

[.NET 2.0 Data Access]

We recommend that you use the typed accessor methods of the DataReader when you know the specific type of the value being returned. Typed accessor methods result in better performance by returning a value as a specific .NET Framework type, eliminating the need for additional type conversion. The SqlDataReader exposes SQL Server–specific typed accessor methods if a .NET Framework type does not meet the needs of the application. SQL Server–specific typed accessor methods return objects of System.Data.SqlTypes.”local MSDN

Above lines are extracted from MSDN which confirms that you should use accessors to read the data out of data readers and it will result better performance since it eliminates type casting. Further MSDN describes the getter names which you should use in SQL and Oracle provides for specific data type. So better to read section “Mapping Data Provider Data Types to .NET Framework Data Types” before reading values from datareaders.

.NET 2 Links

December 31st, 2005 by koolb | No Comments | Filed in Uncategorized

Found some good reference material for .NET 2.0 today.
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

    

UK government gateway runs totally on Microsoft software

December 29th, 2005 by koolb | No Comments | Filed in Uncategorized

I just found that UK government gateway runs totally on Microsoft software. It runs on top of Windows 2000 Advanced Server using BizTalk Server 2000, SQL Server 2000, Internet Security and Acceleration Server 2000, Application Center 2000, and Commerce Server 2000. According to Microsoft, this was there largest BizTalk server implementation. Even though the Linux community criticize this, It has proven that the Stability and Practicality of Microsoft solutions. This would be a good reference for me to convince customers for .NET Framework based applications.

More @ http://www.ciber-uk.com/casestudies/search_results_single.cfm?id=ukonline

.NET Localization

December 13th, 2005 by koolb | No Comments | Filed in Uncategorized

[ 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 way

private 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.

.NET Graphics

December 9th, 2005 by koolb | No Comments | Filed in Uncategorized

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(<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…

August 8th, 2005 by koolb | No Comments | Filed in Uncategorized

I have came across following when I was looking for .NET Persistance object
pattens

    <a
    href=”http://www.awprofessional.com/articles/article.asp?p=30298&seqNum=8″
    target=_blank>
  • Implimentation of Facade Pattern
  • <span class=Article_Title
    id=_ctl0__ctl0__ctl0_Title1><a
    href=”http://developerland.com/CSharpGeneral/Database/372.aspx”
    target=_blank>Domain
    Objects Persistence Pattern for .NET
    by 
    <a class=Article_AuthorLink id=_ctl0__ctl0__ctl0_Author1
    href=”http://developerland.com/CSharpGeneral/Database/Users_ShowProfile.aspx?user=sarah”>Iqbal
    Khan

Laptop for $230 ( LKR 23,000)?

May 20th, 2005 by koolb | No Comments | Filed in Uncategorized

What do you think if u can get a laptop for $230 ( LKR 23,000)? Indian company called Encore has developed a laptop and a desktop for that price range. It comes with a Linux version and it is capable enough to do normal day to day work. more >>


more images >>

May 16th, 2005 by koolb | No Comments | Filed in Uncategorized

HACK IIS 6.0 and Win a XBOX.

   If you can hack IIS 6 and prove that it is not secure, here is your chance to show it to the world and same time win a XBOX.

Hack http://www.hackiis6.com/

"Double meaning"

May 15th, 2005 by koolb | No Comments | Filed in Uncategorized


If you look at things with a dirty mind you will see things differently. Advertising companies has used this to send their messages as “double meaning images”. You can some of those image in this web site. Posted by Hello