Sunday, January 2, 2011

LinsMenuStrip class of LinsUI Layout Manager 2.1

It is a customized MenuStrip object; it owns all MenuStrip’s features. The visibility of a LineMenuStrip object can be turned on/off.
§      Members
1)  public long ID { get; set; }               
Remarks
Every LinsMenuStrip object should have a unique ID. If its value is between FlexConstants.m_nUserDefinedControlStartID and FlexConstants.m_nUserDefinedControlStartID, then its layout will be persistent; otherwise, its layout will not be saved.

§      Methods
1)  public void ShowMenuStrip()                
Remarks
This make the LinsMenuStrip object visible.

2)  public virtual void HideMenuStrip()
Remarks
This make the LinsMenuStrip object invisible.

LinsListBox class of LinsUI Layout Manager 2.1

It is a customized ListBox object; it owns all ListBox features. This listbox allow users to associate an icon or image with any listed item.
Examples
The following example shows how to create a LinsListBox object.

// lsImageList is an extend reference
ImageList lsImageList;

// Create a listbox object
LinsListBox listbox = new LinsListBox();
// Set the listbox’s image list to an existed image list
listbox.ImageList = lsImageList;

listbox.Items.Clear();

// Create a list item
LinsListItem item1 = new LinsListItem();
Item1.ID = 1;
// item text
Item1.Text = “Red”;
// the icon associated with this item will be the first image in lsImageList                  
Item1.ImageIndex = 0;                    
listbox.Items.Add( item1 );
           
// Create second list item
LinsListItem item2 = new LinsListItem();
Item2.ID = 2;
// item text
Item2.Text = “Gold”;   
// the icon associated with this item will be the second image in lsImageList            
Item2.ImageIndex = 1;                    
listbox.Items.Add( item1 );

//set the first one as default selected
listbox.SelectedIndex = 0;

§      Members
1)  public bool ShowIcon { get; set; }               
Remarks
Get or set the flag which controls whether to show the icon for each item.

§      Methods
1)  public void UpdateImage(
int nImageIndex,
ref Image newImage )             
Parameters
nImageIndex
Type: int
The index of the image which is going to be replaced.

newImage
Type: Image
The new image.

Remarks
Replace the image with newImage.

2)  public void ResetImageList()               
Remarks
Clear the image list.

3)  public void SetImageList(
ref ImageList lsImageList )              
Remarks
Set the image list that contains the image displayed on this listbox. If user uses this call to set the image list, then user should free the resource allocated in lsImageList themself

4)  public ImageList GetImageList()            
Remarks
Get the image list that contains the image displayed on this listbox.

5)  public int AddImage(
Icon icon)             
Parameters
icon
Type: Icon
The icon which is going to be added into the image list.

Return
It returns the index of icon.

Remarks
Add icon into the image list that contains the image displayed on this listbox. It returns the index of icon.

6)  public int AddImage(
Image image)                 
Parameters
image
Type: Image
The image which is going to be added into the image list.

Return
It returns the index of image.

Remarks
Add image into the image list that contains the image displayed on this listbox. It returns the index of image.

7)  public virtual void SelecteThisOneOnly(
int nIndex)                 
Parameters
nIndex
Type: int
The index of the item which will be the only selected item.

Remarks
Make sure that the nIndex item is the only one selected.


Download Free Trial,

LinsFontComboBox class of LinsUI Layout Manager 2.1

It is a customized ComboBox object; it owns all ComboBox features. This combobox will automatically load all the FontFamily members into the list.
Examples

§      Methods
1)  public void SetSelection(
object fontname )            
Parameters
fontname
Type: object
The font which will be selected.

Remarks
Set the fontname as the selected item.

LinsColorComboBox class of LinsUI Layout Manager 2.1

It is a customized ComboBox object; it owns all ComboBox features. This combobox will automatically load all the KnownColor into the list.
Examples

§      Members
1)  public KnownColor SelectedColor { get; }               
Remarks
Get the selected known color.

§      Methods
1)  public void SetSelection(
KnownColor color )                 
Parameters
color
Type: KnownColor
The color which will be selected.

Remarks
Set the color as the selected item.

LinsCheckedListBox class of LinsUI Layout Manager 2.1

It is a customized ListBox object with a check box beside the selected item; it owns all ListBox features.
Examples
The following example shows how to create a LinsCheckedListBox object.

// lsImageList is an extend reference
ImageList lsImageList;

// Create a listbox object
LinsCheckedListBox listbox = new LinsCheckedListBox();
// Set the listbox’s image list to an existed image list
listbox.ImageList = lsImageList;

listbox.Items.Clear();

// Create a list item
LinsCheckedListItem item1 = new LinsCheckedListItem();
// This item is checked
Item1.CheckState = CheckState.Checked;   
Item1.ID = 1;
// item text
Item1.Text = “Red”;
// the icon associated with this item will be the first image in lsImageList                  
Item1.ImageIndex = 0;                    
listbox.Items.Add( item1 );
           
// Create second list item
LinsCheckedListItem item2 = new LinsCheckedListItem();
// This item is unchecked
Item2.CheckState = CheckState.Unchecked; 
Item2.ID = 2;
// item text
Item2.Text = “Gold”;                     
// the icon associated with this item will be the second image in lsImageList
Item2.ImageIndex = 1;                    
listbox.Items.Add( item1 );

//set the first one as default selected
listbox.SelectedIndex = 0;

§      Members
1)  public ImageList ImageList { get; set; }               
Remarks
Get or set the image list that contains the image displayed on this listbox.

§      Methods
1)  public virtual int InsertBySort(
ref LinsCheckedListItem item )            
Parameters
item
Type: LinsCheckedListItem
The item which is going to be inserted into the listbox.

Return
It returns the index of item.

Remarks
Insert item into the listbox. It will be sorted automatically.

2)  public void Select(
int nStartIndex,
int nEndIndex )
Parameters
nStartIndex
Type: int
The start index of the items which will be selected.

nEndIndex
Type: int
The end index of the items which will be selected.

Remarks
Select all items between nStartIndex and nEndIndex.

LinsCheckedComboBox class of LinsUI Layout Manager 2.1

It is a customized ComboBox object with a check box beside the selected item; it owns all ComboBox features.
Examples

FlexUISettings class of LinsUI Layout Manager 2.1

It is a static class which store all User Interface settings.
§      Members
1)  public static string AppSettingPath{ get; set; }       
Remarks
Get or set the default path for saving the workspace layout file.

2)  public static string DefaultHelpFilePath{ get; set; }        
Remarks
Get or set the default path for store the help file.