当前位置: 首页>>代码示例>>C#>>正文


C# Forms.ItemCheckEventArgs类代码示例

本文整理汇总了C#中System.Windows.Forms.ItemCheckEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ItemCheckEventArgs类的具体用法?C# ItemCheckEventArgs怎么用?C# ItemCheckEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ItemCheckEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ItemCheckEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AssessmentCheckBox_ItemCheck

 private void AssessmentCheckBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (!updating)
     {
         String value = this.Items[e.Index].Text;
         foreach (String key in additionalText.Keys)
         {
             if (value.Contains(key))
             {
                 value = key;
                 break;
             }
         }
         if (e.CurrentValue == CheckState.Unchecked && e.NewValue == CheckState.Checked)
         {
             if (!selectedItems.Contains(value))
             {
                 selectedItems.Add(value);
             }
         }
         else if (e.CurrentValue == CheckState.Checked && e.NewValue == CheckState.Unchecked)
         {
             if (selectedItems.Contains(value))
             {
                 selectedItems.Remove(value);
             }
         }
     }
 }
开发者ID:wshanshan,项目名称:DDD,代码行数:29,代码来源:AssessmentXmlCheckBox.cs

示例2: checkedListBox_ItemCheck

 private void checkedListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     Engine.SettingsProvider.Set(
         checkedListBox.Items[e.Index],
         (e.NewValue == CheckState.Unchecked ? false : true),
         PersistHint.AcrossSessions);
 }
开发者ID:Doozie7,项目名称:TaskClerkDesktop,代码行数:7,代码来源:LookAndFeel.cs

示例3: expectedWordsListBox_ItemCheck

 private void expectedWordsListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (!this.allowExpectedWordsCheck)
     {
         e.NewValue = e.NewValue == CheckState.Checked ? CheckState.Unchecked : CheckState.Checked;
     }
 }
开发者ID:nickmeldrum,项目名称:WordSearch,代码行数:7,代码来源:MainForm.cs

示例4: checkedFrames_ItemCheck

		private void checkedFrames_ItemCheck(object sender, ItemCheckEventArgs e) {
			if (e.NewValue != CheckState.Checked) {
				btnExtract.Enabled = (checkedFrames.CheckedItems.Count > 0 && textBox1.Text.Length > 0);
				return;
			}
			btnExtract.Enabled = (textBox1.Text.Length > 0);
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:7,代码来源:frmSpriteExtract.cs

示例5: processList_ItemCheck

        private void processList_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            if (e.NewValue == CheckState.Checked)
            {

                string[] spliters = { "-" };

                string value = processList.Items[e.Index].ToString();

                string instanceName = value.Split(spliters, StringSplitOptions.None).FirstOrDefault();

                this.createperfcounter(instanceName);

                Series series = new Series(instanceName);

                series.ChartType = SeriesChartType.FastLine;

                series.BorderWidth = 5;

                Series cpuseries = new Series(instanceName);

                cpuseries.ChartType = SeriesChartType.FastLine;

                cpuseries.BorderWidth = 5;

                chart1.Series.Add(series);

                chart2.Series.Add(cpuseries);

            }
        }
开发者ID:No9,项目名称:nodejsdublin-28-06-2012,代码行数:31,代码来源:Form1.cs

示例6: ColumnFirstText_ItemCheck

 void ColumnFirstText_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (e.NewValue == CheckState.Checked)
         InvokeCheckStatusSwitched(this, new ColumnItemEventArgs((int)lstText.SelectedValue, Title, true));
     else if (e.NewValue == CheckState.Unchecked)
         InvokeCheckStatusSwitched(this, new ColumnItemEventArgs((int)lstText.SelectedValue, Title, false));
 }
开发者ID:jordymeow,项目名称:rincevent,代码行数:7,代码来源:ColumnFirstText.cs

示例7: boxFilters_ItemCheck

 private void boxFilters_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (ignoreCheck)
         e.NewValue = e.CurrentValue;
     else
         Settings.filters[e.Index].Enabled = e.NewValue == CheckState.Checked;
 }
开发者ID:jujum4n,项目名称:D3CRYPTGOLDFARM,代码行数:7,代码来源:LootAlert.cs

示例8: checkedListBoxSeries_ItemCheck

		private void checkedListBoxSeries_ItemCheck(object sender, ItemCheckEventArgs e) {			
            int index = e.Index;
            DBSeries item = (DBSeries)checkedListBoxSeries.Items[index];

            // Add/Remove items from list
            if (item != null) {                
                // Item state before item was clicked 
                if (checkedListBoxSeries.GetItemChecked(index)) {

                    // Store items changes
                    if (!UnCheckedItems.Contains(item)) {
                        UnCheckedItems.Add(item);
                    }
                    if (CheckedItems.Contains(item)) {
                        CheckedItems.Remove(item);
                    }
                                        
                    CheckedCount -= 1;
                    labelSeriesSelected.Text = (CheckedCount).ToString() + " Series Selected";
                }
                else {
                    // Store items changes
                    if (!CheckedItems.Contains(item)) {
                        CheckedItems.Add(item);
                    }
                    if (UnCheckedItems.Contains(item)) {
                        UnCheckedItems.Remove(item);
                    }
                    
                    CheckedCount += 1;
                    labelSeriesSelected.Text = (CheckedCount).ToString() + " Series Selected";
                }
            }

		}
开发者ID:barneh,项目名称:mptvseries,代码行数:35,代码来源:SeriesSelect.cs

示例9: trapsCheckedListBox_ItemCheck

 void trapsCheckedListBox_ItemCheck( object sender, ItemCheckEventArgs e )
 {
     if ( !ignoreChanges )
     {
         switch ( e.Index )
         {
             case 0:
                 moveFindItem.Unknown1 = e.NewValue == CheckState.Checked;
                 break;
             case 1:
                 moveFindItem.Unknown2 = e.NewValue == CheckState.Checked;
                 break;
             case 2:
                 moveFindItem.Unknown3 = e.NewValue == CheckState.Checked;
                 break;
             case 3:
                 moveFindItem.Unknown4 = e.NewValue == CheckState.Checked;
                 break;
             case 4:
                 moveFindItem.SteelNeedle = e.NewValue == CheckState.Checked;
                 break;
             case 5:
                 moveFindItem.SleepingGas = e.NewValue == CheckState.Checked;
                 break;
             case 6:
                 moveFindItem.Deathtrap = e.NewValue == CheckState.Checked;
                 break;
             case 7:
                 moveFindItem.Degenerator = e.NewValue == CheckState.Checked;
                 break;
         }
         OnDataChanged( this, EventArgs.Empty );
     }
 }
开发者ID:Wi150nZ,项目名称:lioneditor,代码行数:34,代码来源:MoveFindItemEditor.cs

示例10: AssemblySelected

        private void AssemblySelected(object sender, ItemCheckEventArgs e)
        {
            // When an assembly gets changed, find all classes that belong to it
            Type[] Classes;
#if USENAMESPACES
            Classes = mAssemblies
                .Select(name => Assembly.Load(name))
                .SelectMany(assem => assem.GetTypes())
                .Where(type => type.Namespace == mNamespaces[e.Index])
                .ToArray();
#else
            Classes = Assembly.Load(mAssemblies[e.Index].FullName).GetTypes().ToArray();
#endif

            // If it got unchecked, then remove its classes from the Classes list
            if (e.NewValue != CheckState.Checked)
                foreach (Type t in Classes)
                    mAvailableClasses.Remove(t);
            // Else, put them on the Classes list
            else
                foreach (Type t in Classes)
                    mAvailableClasses.Add(t);

            // Display a sorted list of all available classes
            mAvailableClasses = mAvailableClasses.OrderBy(l => l.Name).ToList();
            lstClasses.Items.Clear();
            lstClasses.Items.AddRange(mAvailableClasses.Select(t => new ListViewItem(t.Name)).ToArray());

            // Clear the display of available methods
            mAvailableMethods = new MethodInfo[0];
            if (cmbSelectionPicker.SelectedIndex == METHODS)
            {
                lstMethods.Clear();
            }
        }
开发者ID:scnerd,项目名称:Visual_Coder,代码行数:35,代码来源:Form1.cs

示例11: pluginsCLB_ItemCheck

 private void pluginsCLB_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (e.NewValue == CheckState.Checked)
     {
         var plugin = (pluginsCLB.Items[e.Index] as PluginInfo).CreateInstance(true);
         if (plugin is ParsedPacketsPlugin)
             (plugin as ParsedPacketsPlugin).OnClientPacketAdd += OnClientPacketAdd;
         if (plugin is L2ObjectsPlugin)
             (plugin as L2ObjectsPlugin).World = AccData.World;
         plugin.UserStopped += plugin_UserStopped;
         plugin.Run();
         AccData.LoadedPlugins.Add(plugin);
     }
     if (e.NewValue == CheckState.Unchecked && !uncheckFromCode)
     {
         var pluginInfo = pluginsCLB.Items[e.Index] as PluginInfo;
         Plugins.BasePlugin selectedPlugin = null;
         foreach (var plugin in AccData.LoadedPlugins)
             if (plugin.GetType().FullName == pluginInfo.Type.FullName)
             {
                 selectedPlugin = plugin;
                 break;
             }
         selectedPlugin.Stop();
         AccData.LoadedPlugins.Remove(selectedPlugin);
     }
 }
开发者ID:Zergatul,项目名称:ulHelper,代码行数:27,代码来源:AccountSettingsForm.cs

示例12: chkListPassenger_ItemCheck

 private void chkListPassenger_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     PassengerDTOs p = ((PassengerDTOs)this.chkListPassenger.Items[e.Index]);
     if (e.NewValue == CheckState.Checked)
     {
         if (myList.Count == 5)
         {
             e.NewValue = CheckState.Unchecked;
             MessageBox.Show("对不起,你最多只能选择5位联系人!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             if (!myList.Contains(p))
             {
                 myList.Add(p);
             }
         }
     }
     else
     {
         myList.Remove(p);
     }
     mf.myList = myList;
     mf.LoadPassenger();
 }
开发者ID:MetSystem,项目名称:Ticket12306,代码行数:25,代码来源:SelectPassengerForm.cs

示例13: PersonalitiesListBox_ItemCheck

		private void PersonalitiesListBox_ItemCheck(object sender, ItemCheckEventArgs e)
		{
			var p = PersonalitiesListBox.SelectedItem as Personality;
			if (p == null)
				return;
			p.EnabledUser = e.NewValue == CheckState.Checked;
		}
开发者ID:TeaseAI,项目名称:TeaseAI-CE,代码行数:7,代码来源:frmSettings.cs

示例14: checkedListBox1_ItemCheck

 private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     //since event fires before event change, we can assume that if some value is changing and all values are currently
     //all TRUE, then 1 must be changing to FALSE, so uncheck.
     if (checkedListBox1.CheckedItems.Count == checkedListBox1.Items.Count)
         checkBox3.Checked = false;
 }
开发者ID:EmperorShmoo,项目名称:Project,代码行数:7,代码来源:Dataset_Source_Selection.cs

示例15: filters_ItemCheck

 private void filters_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     for (int i = 0; i < checkBoxLFilter.Items.Count; i++)
     {
         if (i != e.Index) checkBoxLFilter.SetItemChecked(i, false);
     } 
 }
开发者ID:MaximilianoFelice,项目名称:gdd-2014,代码行数:7,代码来源:Statistics.cs


注:本文中的System.Windows.Forms.ItemCheckEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。