10.Links For Programmer

   This is several programming language references and resources websites.I hope you can get something from it effectively. Please go and visit to there .


PHP & Joomla
----------------------

http://www.tuxradar.com/practicalphp/
http://wampserver.blogspot.com/
http://www.phpbuilder.com/
http://www.php.net/download-docs.php
http://www.joomla24.com
http://www.joomlahut.com
http://help.joomla.org/
http://www.joomla.org/
http://joomlacode.org/
http://forum.joomla.org/
http://joomlacode.org
http://www.cmsextensions.org/

.NET
-----------
http://www.codeproject.com/
http://www.learn-programming.za.net/
http://www.sourcecodeonline.com/
http://www.csharphelp.com
http://www.programminglearn.com
http://www.learnvisualstudio.net
http://www.c-sharpcorner.com
http://www.csharphelp.com/
http://www.codeguru.com/
http://www.dotnetspider.com/
http://www.devexpress.com/
http://www.dotnetgoodies.com/
http://www.aspnetdating.com/
http://www.dotnetgoodies.com/

Ebooks
------------
http://www.freebooksclub.net/
http://www.free-ebooks-download.org/
http://www.onlinecomputerbooks.com/free-programming-books.php
http://www.downloadfreepdf.com/
http://www.free-ebook-download.net/


Free Download Software
------------------------------


9.Filtering DataGridVeiw for Myanmar Font

က်ေနာ္ေရးဖူးတဲ့ program တစ္ခုမွာ ၿမန္မာfont(ေဇာ္ဂ်ီ)သံုးထားပါတယ္။
က်န္တာအကုန္အဆင္ေၿပပါတယ္။ဒါေပမဲ့ Datagridview မွာ Search ကို filter
လုပ္ေတာ့ search textbox ကစာနဲ႕တိုက္စစ္တာမွာ filter မၿဖစ္ပဲအကုန္ၿပေနပါတယ္။
အဲဒါနဲ႕ သူငယ္ခ်င္းအမတစ္ေယာက္ကို ေမးၾကည္႕ေတာ့ ဒီလုိေရးလို႕ရတယ္ေၿပာလို႕
စမး္ၾကည္႕တာအဆင္ေၿပသြားပါတယ္။
အဓိကသံုးသြားတာေတာ့ CultureInfo.InvariantCulture.CompareInfo ဆိုတဲ့
namespace ေလးပါ။
 private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            CompareInfo ci = CultureInfo.InvariantCulture.CompareInfo;
            String txt;
            txt = txtSearch.Text.ToLower().Normalize();
            DataTable dtfilter;//filter rows ကိုထည္႕ဖို႕ပါ။
            dtfilter = dtSource.Copy();//Original datasource ပါ။သူ႕႔ရဲ႕ config အတိုင္း dtfilter ကိုၿဖစ္ေအာင္ copy ကူးလိုက္တာပါ။
            dtfilter.Clear();

            try
            {
             
                    foreach (DataRow dr in dtSource.Rows)
                    {
                        //StartWith option
                        if (cboSearchType.Text == "Start With")
                        {
                            if (ci.IndexOf(dr[Column_Name].ToString().ToLower(), txt, CompareOptions.Ordinal) == 0)
                            {
                                dtfilter.ImportRow(dr);
                            }
                        }
                        else//Contain option
                        {
                            if (ci.IndexOf(dr[Column_Name].ToString().ToLower(), txt, CompareOptions.Ordinal) >= 0)
                            {
                                dtfilter.ImportRow(dr);
                            }
                        }

                  
                    dgvChoose.DataSource = dtfilter;
                }
            }
            catch (Exception ex)
            {
                 MessageBox.Show("Please,Try again", ex.Message);
            }
                  
        }



8.IDE Tools 

  • Programmer's Notepad

        Go to Link:http://www.pnotepad.org/

  • LINQ Pad

       Go to Link:http://www.linqpad.net/

  • Regular Expression Pad

      Download Link:here

  • C# IDE(open source)
       C# ေရးဖို႔အတြက္ Visual Studio လိုအသံုး၀င္တဲ့ IDE ကို SharpDevelop website မွ free ေပးထားပါတယ္
Software ကို free download လုပ္လို႔ရတဲ့အျပင္ Software ရဲ႕ source code ကိုလည္း download ေပးထားပါတယ္
ကိုယ့္ဆီမွာ ရွိတဲ့ DotNet Framework version နဲ႔ကိုက္ညီတဲ့ Software ကိုလည္း download လုပ္လို႔ရပါတယ္
Simple & Powerful ျဖစ္တဲ့အတြက္ သံုးရတာ အဆင္ေျပပါတယ္
တကယ္လို႔ ေနာက္ပိုင္း ျမန္မာျပည္မွာ copyright law ေတြလာေတာ့မယ္ ဆိုရင္ Visual Studio လိုဟာမ်ိဳးကို ေစ်းၾကီးၾကီး ေပး၀ယ္ ျပီး သံုးမယ့္ အစား ဒါမ်ိဳး free ေပးတဲ့ software ေလးေတြ သံုးရင္ ပိုျပီးအဆင္ေျပႏိုင္မယ္လို႔ထင္ပါတယ္
Go to Link:http://www.icsharpcode.net/opensource/sd/
Source:problemclean.ning.com AZT post မွကူးယူေဖာ္ၿပပါသည္။

7.Move Cursor to next control when Enter key press

   

  C# Windows Form မွာ Enter ေခါက္တဲ့အခါ ေနာက္ control တစ္ခုကို cursor ေရာက္သြားခ်င္တယ္ဆိုရင္ Key Down event   မွာဒီလိုေရးလို႕ရပါတယ္။သူ႕ရဲ႕ TabIndex ကိုေတာ့ အစဥ္အတိုင္းထည္႕ပါ။Form ရဲ႕ keypreview ကိုလည္း true ေပးရပါမယ္။

  

     if (e.KeyCode == Keys.Enter)
     {
                    if (SelectNextControl(ActiveControl, true, true, false, true)) e.Handled = true;
                    else e.Handled = false;
    }



Visual Studio မွာ ကိုယ္ပိုင္ addin ထည္႕ခ်င္ရင္ ဒီလုိထည္႕လို႕ရပါတယ္။ဖတ္ၾကည္႕ပါ။အခ်ိန္မရလို႕ copy paste ပဲလုပ္လိုက္ပါတယ္။


6.My Crude Little Add-In for Visual Studio .Net

Abey George Peter (Software Engineer) posted 3/8/2006 | Comments (8)
Have you ever created and loaded Add-ins in Visual Studio .Net by using Visual c# .Net.
In this blog I will outline how to create a simple, compiled add-in that inserts the current date and time at the insertion point. This function is pretty simple (as it does only printing of the current date and time), but we can build upon this technique to do any new task of a complex nature.

Let's get into business of creating this little add-in

Start your Visual Studio .Net. On File Menu, point to New, and then click Project.
Under Project Types, expand Other Projects, and click Extensibility Projects.
Under
Templates
, click Visual Studio .NET Add-in or Visual Studio Add-in
You will get a Name textbox, type InsertDateTime.
In the Location textbox type c:\ and then click Ok. You will get an Extensibility Wizard.

On the first page of the Wizard click Next. On the Select a Programming Language page, click Create an Add-in using Visual C#, and then click Next. On the Select a Application Host page, clear the Microsoft VSMacros IDE check box, and then click next. (Note that in Visual Studio 2005 this will be unchecked). You will be now on the Enter a Name and Description page, type Insert Date and Time in the Name text box. In the Description text box, type Inserts the current date and time, and then click Next. On the Choose Add-in Options page, click to select the following two check box to create an item on the Tools menu:
1) Yes, create a 'Tools' menu item. By default this will cause the Add-in to load when the button is clicked unless the Add-in is set to load on startup of the host application.
2) I would like my Add-in to load when the host application starts.

Click Next … On the Choosing 'Help About' Information page, click Next. On the next page click on finish. Now check out your solution explorer you will see two projects one is add-in project and add-in setup project.
Go to your connect.cs file. By default, Visual Studio .NET and Visual Studio 2005 insert the necessary code templates. For our little add-in we just need to add a method that writes date and time and modify a bit in Exec method.

Add this code after the Exec method

public bool InsertDateTime()
{
if(applicationObject.ActiveDocument != null)
((TextSelection)applicationObject.ActiveDocument.Selection).Text = DateTime.Now.ToString();
return true;
}

Now in the Exec Method change the following code

handled = true; to handled = InsertDateTime();

Your Exec method will look like this

public void Exec(string commandName, EnvDTE.vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled)
{
handled = false;
if(executeOption == EnvDTE.vsCommandExecOption.vsCommandExecOptionDoDefault)
{
if(commandName == "InsertDateTime.Connect.InsertDateTime")
{
handled = InsertDateTime();
return;
}
}
}

You have almost done.

In Solution Explorer, right-click InsertDateTimeSetup, point to View, and then click Custom Actions. Right click on Custom Actions and then click on Add Custom action.
Click Application folder and click ok. Click Primary output from InsertDateTime(Active) , and then click OK. Notice that primary output appears in the Install, the Commit, the Rollback, and the Uninstall nodes under the Custom Actions node.
Building the solution. To build the whole solution at once, click Configuration Manager on the Build menu. Click to select the Build check box for InsertDateTimeSetup. So both the check box will be checked. Now build the solution.
A complete installation package will be there in C:\InsertDateTime\InsertDateTimeSetup\Debug. Close all instances of .Net Right click on .msi file and click install. Click on next until you get a progress bar. After installation restart Visual Studio .Net. The add-in will be always loaded until you remove it.

To make your add-in more interactive add an icon to the tool bar and link the add-in with keyboard shortcut.

To do that go to Tools, click Customize. On the Commands tab, click Addins in the Categories list. Drag InsertDateTime to the active toolbar, and then click Keyboard.
In the Show commands containing text box, type insertdatetime. Notice that your add-in (InsertDateTime.Connect.InsertDateTime) appears in the list. In the Press shortcut key(s) text box, Press the CTRL+SHIFT+BACKSPACE key combination, because no other command uses this keyboard shortcut, click Assign. In Options dialog box click ok and then close. To verify that it works add a text file to your application and press the shortcut (CTRL+SHIFT+BACKSPACE) or go to tools and click InsertDateTime. Your little add-in is set.

Cheers,
God Bless

 


 5.Run Sql Query From Batch File

Database က Table ေတြကို Query နဲ႕ၿပင္တဲ့အခါ end users ေတြကို အလြယ္တကူၿပင္ခိုင္းလို႕ရေအာင္ batch file နဲ႕ Query run တဲ့ code ပါ။

GOTO START


/* Begin of SQL comment, this makes the BATCH script invisible for SQL
:: BATCH starts below here
:START
@echo off
CLS

OSQL.EXE -n -E -w 65536 -d Database_Name -i "%~f0"

PAUSE&GOTO:EOF
*/

-- SQL starts below here
START:
GO
ွSelect * From Table_Name

GO


ဒီ file ကို .bat နဲ႕ သိမ္းၿပီး run ရံုပါပဲ။

user name&ps ပါရင္ေတာ့

OSQL.EXE -S .\SQLEXPRESS -U sa -P sa-d Database_Name -n -w 65536 -i "%~f0"

ဒီလုိေၿပာင္းေရးလိုက္ေပါ့။


Code.cs Code.cs
Size : 0.002 Kb
Type : cs
  • 4.Custom DataGridView

.Net DataGridView က Enter ေခါက္ၿပီးသြားရင္ ေနာက္ cell ကိုေရႊ႕ဖို႕ကအဆင္မေၿပပါဘူး။

အဲဒီအတြက္ က်ေနာ္ codeproject site  က download ခ်ထားတဲ့ control ေလးကိုတင္ေပးထားပါတယ္။customer ေတြကလည္း ဒီပံုစံမွ ၾကိဳက္ပါသတဲ့။


 


3.10 Must have Developers should know.

 Developer တေယာက္မသိမၿဖစ္သိထားရမယ့္ Tools ေတြတဲ့။MSDN ကတင္ထားတာပါ။ဒီေနရာကသြားၾကည္႔ပါ။



2.DataGridView AutoComplete Column.

DataGridView Text Column မွာ AutoComplete feature ရခ်င္ရင္ EditingControlShowing ဆိုတဲ့ Event ေလးကိုသံုးၿပီးေရးလို႕ရပါတယ္။

Example:

private AutoCompleteStringCollection ac;

 public frmForm()
        {
            InitializeComponent();
         
            ac = new AutoCompleteStringCollection();

        }

   private void frmForm_Load(object sender, EventArgs e)
        {
          
            AutoComplete();
        }

   public void AutoComplete()
        {
            DataTable dtP = dsOrder.Tables["Product"];
            foreach (DataRow dr in dtP.Rows)
            {
                ac.Add(dr["ProductCode"].ToString());
            }
           
        }


  private void dgvOrder_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
        {
            //TO DO:to AutoComplete Cell

            DataGridView dgv = (DataGridView)sender;
            int col = dgv.CurrentCell.ColumnIndex;

            DataTable dtP = dsOrder.Tables["Product"];

            if (dgvOrderDetail.CurrentCell.ColumnIndex == 3)
            {
                if (e.Control is DataGridViewTextBoxEditingControl)
                {
                    DataGridViewTextBoxEditingControl te =
                   (DataGridViewTextBoxEditingControl)e.Control;
                    te.AutoCompleteMode = AutoCompleteMode.Suggest;
                    te.AutoCompleteSource = AutoCompleteSource.CustomSource;

                   te.AutoCompleteCustomSource=ac;               

                }

            }
            else
            {
                if (e.Control is DataGridViewTextBoxEditingControl)
                {
                    DataGridViewTextBoxEditingControl te =
                    (DataGridViewTextBoxEditingControl)e.Control;
             
                    te.AutoCompleteMode = AutoCompleteMode.None;
                }
            }
        }


1.DataBase Backup/Restore Tool

SQL server  Database Backup Restore လုပ္ဖို႕ Program ေလးပါ။Customer ေတြလြယ္လြယ္ကူကူလုပ္လို႕ရေအာင္ေပါ့့။ 

ဒီေနရာက download ခ်လို႕ရပါတယ္။ၿပီးရင္ prj folder ထဲမွာပါတဲ့ config file မွာကိုယ့္စက္ရဲ႕ config အတိုင္းေၿပာင္းေပးပါ။

Mirror:http://www.codeproject.com/KB/database/SqlServer_Backup_Restore.aspx


Make a Free Website with Yola.