• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.ItemCheckEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: chklbLayers_ItemCheck

        private void chklbLayers_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            MapEditor.EditLayer layerType = MapEditor.EditLayer.Data;
            int layerNum = -1;
            GetLayerInfoFromIndex(e.Index, ref layerType, ref layerNum);

            switch (layerType)
            {
                case MapEditor.EditLayer.Data:
                    {
                        MapEditor.showDataLayer = (e.NewValue == CheckState.Checked);
                        break;
                    }
                case MapEditor.EditLayer.Ground:
                    {
                        MapEditor.showGroundLayer[layerNum] = (e.NewValue == CheckState.Checked);
                        break;
                    }
                case MapEditor.EditLayer.PropBack:
                    {
                        MapEditor.showPropBackLayer[layerNum] = (e.NewValue == CheckState.Checked);
                        break;
                    }
                case MapEditor.EditLayer.PropFront:
                    {
                        MapEditor.showPropFrontLayer[layerNum] = (e.NewValue == CheckState.Checked);
                        break;
                    }
                case MapEditor.EditLayer.Fringe:
                    {
                        MapEditor.showFringeLayer[layerNum] = (e.NewValue == CheckState.Checked);
                        break;
                    }
            }
        }
开发者ID:blastboy,项目名称:PMD-Toolkit,代码行数:35,代码来源:MapLayerEditor.cs


示例17: FlagsCheckedListBox_ItemCheck

 private void FlagsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     switch (e.Index)
     {
         case 0:
             z80.F ^= FlagMask.C;
             break;
         case 1:
             z80.F ^= FlagMask.N;
             break;
         case 2:
             z80.F ^= FlagMask.P;
             break;
         case 3:
             z80.F ^= FlagMask.B3;
             break;
         case 4:
             z80.F ^= FlagMask.H;
             break;
         case 5:
             z80.F ^= FlagMask.B5;
             break;
         case 6:
             z80.F ^= FlagMask.Z;
             break;
         case 7:
             z80.F ^= FlagMask.S;
             break;
     }
 }
开发者ID:damieng,项目名称:ZXmorphic,代码行数:30,代码来源:CPUForm.cs


示例18: checkedListBoxMovies_ItemCheck

        void checkedListBoxMovies_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            int index = e.Index;
            MovieSelectItem item = (MovieSelectItem)checkedListBoxMovies.Items[index];
            if (item != null)
            {
                // Item state before item was clicked
                if (checkedListBoxMovies.GetItemChecked(index))
                {

                    // Store items changes
                    if (!unCheckedMovies.Contains(item))
                    {
                        unCheckedMovies.Add(item);
                    }
                    if (checkedMovies.Contains(item))
                    {
                        checkedMovies.Remove(item);
                    }

                }
                else
                {
                    // Store items changes
                    if (!checkedMovies.Contains(item))
                    {
                        checkedMovies.Add(item);
                    }
                    if (unCheckedMovies.Contains(item))
                    {
                        unCheckedMovies.Remove(item);
                    }
                }
            }
        }
开发者ID:Thorsten1982,项目名称:Trakt-for-Mediaportal,代码行数:35,代码来源:MovieSelect.cs


示例19: checkedListBox1_ItemCheck

 private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     if (e.NewValue == CheckState.Checked)
     {
         checkeditems.Add(e.Index);
         if (("," + textBox1.Text + ",").Contains("," + checkedListBox1.Items[e.Index].ToString() + ","))
             return;
         if (string.IsNullOrEmpty(textBox1.Text))
         {
             textBox1.Text += checkedListBox1.Items[e.Index].ToString();
         }
         else
         {
             textBox1.Text += "," + checkedListBox1.Items[e.Index].ToString();
         }
     }
     else
     {
         checkeditems.Remove(e.Index);
         string s = textBox1.Text;
         s = "," + s + ",";
         s = s.Replace("," + checkedListBox1.Items[e.Index].ToString() + ",", ",");
         if (s.StartsWith(","))
             s = s.Substring(1, s.Length - 1);
         if (s.EndsWith(","))
             s = s.Substring(0, s.Length - 1);
         textBox1.Text = s;
     }
 }
开发者ID:LiuFu2014,项目名称:CommonComponent,代码行数:29,代码来源:UCListSelect.cs


示例20: chkListDates_ItemCheck

        private void chkListDates_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            string date = this.chkListDates.Items[e.Index].ToString();
            if (e.NewValue == CheckState.Checked)
            {
                if (myDateList.Count == 5)
                {
                    e.NewValue = CheckState.Unchecked;
                    MessageBox.Show("对不起,你最多只能选择5个备选日期!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    if (!myDateList.Contains(date))
                    {
                        myDateList.Add(date);
                    }
                }
            }
            else
            {
                myDateList.Remove(date);
            }
            mf.myDateList = myDateList;
            mf.LoadDates();

        }
开发者ID:MetSystem,项目名称:Ticket12306,代码行数:26,代码来源:SelectDateForm.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.ItemCheckedEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Forms.InvalidateEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap