本文整理汇总了C#中System.Windows.Forms.CheckedListBox.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# CheckedListBox.BringToFront方法的具体用法?C# CheckedListBox.BringToFront怎么用?C# CheckedListBox.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.CheckedListBox
的用法示例。
在下文中一共展示了CheckedListBox.BringToFront方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetConfigPanel
/// <summary>
/// Gets the config panel for AddIns
/// </summary>
/// <returns>
/// The config panel.
/// </returns>
public Panel GetConfigPanel()
{
// if panel made then leave it alone\
//February 27 2013 -- I removed this because it would not notice addins added
// at runtime, which was one of the main points for this (i.e., once panel was open it never refreshed)
// if (PanelWasMade == true)
// return configPanel;
PanelWasMade = true;
configPanel = new Panel ();
configPanel.BackColor = Color.Blue;
checkers = new CheckedListBox ();
checkers.Parent = configPanel;
checkers.Dock = DockStyle.Fill;
checkers.BringToFront ();
BuildListOfAddins ();
if (null == AddInsList) {
lg.Instance.Line ("Addins.GetConfigPanel", ProblemType.MESSAGE, "No AddIns discovered.");
}
//checkers.DataSource = AddInsList;
//checkers.DisplayMember = "CalledFrom.MyMenuName";
//#STEP #1 : Load the previous preferences (go back into GetConfigPanel)
List<string> myList = GetListOfInstalledPlugs ();
/*List<string>Guids = new List<string>();
if (myList != null && myList.Count > 0) {
foreach (object[] o in myList) {
string GUIDOfAPlugIn = o [0].ToString ();
Guids.Add (GUIDOfAPlugIn);
}
}*/
foreach (MefAddIns.Extensibility.mef_IBase plug in AddInsList) {
ListViewItem item = new ListViewItem (plug.CalledFrom.MyMenuName);
item.Text = String.Format ("{0} ({1}) ", plug.Name, plug.Version.ToString ());
if (plug.IsCopy) {
// a copy of this GUID was present
item.Text = item.Text + Loc.Instance.GetString (" (COPY) ");
}
item.Tag = plug.CalledFrom;
bool IsChecked = false;
bool IsDisabled = false;
if (plug.dependencyguid != Constants.BLANK) {
IsDisabled = true;
}
bool IsVersionDisabled = false;
if (plug.dependencymainapplicationversion != Constants.BLANK)
{
// NewMessage.Show(String.Format ("Comparing {0} with Application {1}",plug.dependencymainapplicationversion, Application.ProductVersion));
Version plugNeedsVersion = new Version(plug.dependencymainapplicationversion);
Version appVersion = new Version(Application.ProductVersion);
if (plugNeedsVersion > appVersion)
{
IsVersionDisabled = true;
}
}
foreach (string guid in myList) {
if (guid == plug.CalledFrom.GUID) {
IsChecked = true;
}
if (IsDisabled == true)
{
// check to see if the GUID is enabled for my dependency
if (guid == plug.dependencyguid)
{
IsDisabled = false;
}
}
}
// we do not add Disabled Items
if (true != IsDisabled ) {
if (true != IsVersionDisabled)
{
if (plug.CalledFrom.IsANote)
{
item.Text = String.Format ("{0} ({1})",item.Text,Loc.Instance.GetString("Deactivating requires application exit."));
}
checkers.Items.Add (item, IsChecked);
}
else
{
//.........这里部分代码省略.........