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


C# Forms.LabelEditEventArgs类代码示例

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


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

示例1: categories_AfterLabelEdit

 private void categories_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {                       
     if (categories.Items[e.Item].Text != "" && e.Label == null) return;
     string label = null;
     if (e.Label != null) label = e.Label.Trim();
     if (e.Label == null || e.Label == "")
     {
         if (add_mode)
         {
             source.RemoveAt(selected_cat);
             categories.Items.RemoveAt(categories.Items.Count - 1);
             add_mode = false;
         }
         else
         {
             MessageBox.Show("Name can not be Empty!");
             e.CancelEdit = true;
         }
     }
     else
     {
         source[selected_cat].name = label;
         if (add_mode)
         {
             add_mode = false;
             selected_cat = -1;
             categories.SelectedIndices.Clear();
             categories.SelectedIndices.Add(categories.Items.Count - 1);
             select_category();
         }
     }
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:32,代码来源:FilterTagsCollection.cs

示例2: ArgumentsList_BeforeLabelEdit

		private void ArgumentsList_BeforeLabelEdit(object sender, LabelEditEventArgs e)
		{
			if(e.Item == ArgumentsList.Items.Count - 1)
			{
				e.CancelEdit = true;
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:7,代码来源:ArgumentsWindow.cs

示例3: ArgumentsList_AfterLabelEdit

		private void ArgumentsList_AfterLabelEdit(object sender, LabelEditEventArgs e)
		{
			if((e.Label == null && ArgumentsList.Items[e.Item].Text.Length == 0) || (e.Label != null && e.Label.Trim().Length == 0))
			{
				e.CancelEdit = true;
				ArgumentsList.Items.RemoveAt(e.Item);
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:8,代码来源:ArgumentsWindow.cs

示例4: listView_AfterLabelEdit

 void listView_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     if (e.Label != null)
     {
         assemblyListManager.Rename(listView.Items[e.Item].Text, e.Label);
         assemblyListManager.CurrentListName = e.Label;
     }
 }
开发者ID:larsw,项目名称:dotPeek.AssemblyLists,代码行数:8,代码来源:AssemblyListForm.cs

示例5: listView_AfterLabelEdit

 private void listView_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     if (treeView.SelectedNode.Level == 0)
     {
         //SelectedAlbum[e.Item].Name = e.Label;
         //FillTreeView();//TODO: Mejorar esto
     }
 }
开发者ID:ryuzakyl,项目名称:DirectoryImage,代码行数:8,代码来源:AlbumControl.cs

示例6: lvwCategories_AfterLabelEdit

 private void lvwCategories_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     if (e.Label == string.Empty)
     {
         e.CancelEdit = true;
     }
     PopulateListView();
 }
开发者ID:DanScottNI,项目名称:csharp-romdatatool,代码行数:8,代码来源:frmCategories.cs

示例7: OnUIASubItemTextChanged

		internal void OnUIASubItemTextChanged (LabelEditEventArgs args)
		{
			//If our index is 0 we also generate TextChanged for the ListViewItem
			//because ListViewItem.Text is the same as ListViewItem.SubItems [0].Text
			if (args.Item == 0)
				OnUIATextChanged ();

			if (UIASubItemTextChanged != null)
				UIASubItemTextChanged (this, args);
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:10,代码来源:ListViewItem.cs

示例8: lvConnects_AfterLabelEdit

 void lvConnects_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     //throw new NotImplementedException();
     Data.Connect c=(Data.Connect)(lvConnects.Items[e.Item].Tag);
     if (e.Label != null)
     {
         c.Name = e.Label;
         propertyGrid1.SelectedObject = c;
     }
 }
开发者ID:dingxinbei,项目名称:BMongoDB,代码行数:10,代码来源:main.cs

示例9: lvUserGroup_AfterLabelEdit

		//结束编辑组
		void lvUserGroup_AfterLabelEdit(object sender, LabelEditEventArgs e)
		{
			ListViewItem lvt = lvUserGroup.Items[e.Item];
			if (string.IsNullOrEmpty(e.Label) || e.Label == lvt.Text) { e.CancelEdit = true; return; }

			//编辑
			Cache.ControlCache.RemoveUserGroup(lvt.Text);
			Cache.ControlCache.UserGroupList.Add(e.Label);
			Env.ClientConfig.HostGroupConfig.Where(m => m.Value == lvt.Text).ToList().ForEach(m => Env.ClientConfig.HostGroupConfig[m.Key] = e.Label);
			lvt.Text = e.Label;
		}
开发者ID:iraychen,项目名称:IpMsg.Net,代码行数:12,代码来源:HostConfigPanel.cs

示例10: algoListView_AfterLabelEdit

        private void algoListView_AfterLabelEdit(object sender, LabelEditEventArgs e)
        {
            if (e.Label == null)
                //edit was canceled
                return;

            string algorithmName = SelectedAlgorithmName();
            CoinAlgorithm algorithm = MinerFactory.Instance.GetAlgorithm(algorithmName);
            algorithm.Name = e.Label;
            algorithm.FullName = e.Label;
        }
开发者ID:janusmalone,项目名称:MultiMiner,代码行数:11,代码来源:GPUMinerSettingsForm.cs

示例11: listView1_AfterLabelEdit

 private void listView1_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     SqlConnection conn = new SqlConnection(login.sqlName);
     conn.Open();
     SqlCommand cmd = conn.CreateCommand();
     cmd.CommandText = "new_教师课程_课时修改名称";
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.Parameters.Add("newName", SqlDbType.NVarChar).Value = e.Label.ToString();
     cmd.Parameters.Add("keshiID", SqlDbType.Int).Value = listView1.FocusedItem.Tag;
     cmd.ExecuteNonQuery();
     conn.Close();
     listView1.LabelEdit = false;
 }
开发者ID:hank87,项目名称:testTeacher,代码行数:13,代码来源:课程.cs

示例12: ProfilesListViewAfterLabelEdit

        private void ProfilesListViewAfterLabelEdit(object sender, LabelEditEventArgs e)
        {
            _renameInProcess = false;

            // If we cancel rename operation by hitting 'Esc' then label is null
            if (!string.IsNullOrEmpty(e.Label))
            {
                _settingsManager.RenameProfile(_originalProfileName, e.Label);

                // Reload profiles information
                PopulateProfilesList();
            }
        }
开发者ID:kolomiets,项目名称:solutionloadmanager,代码行数:13,代码来源:EditProfilesForm.cs

示例13: listCategories_AfterLabelEdit

 private void listCategories_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     if (listCategories.SelectedItems != null && listCategories.SelectedItems.Count > 0 && e.Label.Trim() != null)
     {
         if (Categories.Local.FirstOrDefault(c => c.Title == textAddCategory.Text.Trim()) == null)
             (listCategories.SelectedItems[0].Tag as Category).Title = e.Label.Trim();
         else
         {
             MessageBox.Show("Category name exist");
             e.CancelEdit = true;
         }
     }
 }
开发者ID:ArusSoft,项目名称:dotNet-Application-BookLibrary,代码行数:13,代码来源:CategoriesForm.cs

示例14: paramListView_AfterLabelEdit

 private void paramListView_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     if (this.ViewableItem == null || e.Label == null) return;
      ListViewItem item = this.paramListView.Items[e.Item];
      string type = item.SubItems[2].Text;
      switch (type)
      {
     case "Single":
        float floatResult;
        if (float.TryParse(e.Label, NumberStyles.Any, CultureInfo.CurrentCulture, out floatResult))
        {
           ViewableItem.Parameters[e.Item] = floatResult;
           e.CancelEdit = false;
        }
        else
        {
           MessageBox.Show("Invalid entry, expecting a " + type, "Invalid input", MessageBoxButtons.OK, MessageBoxIcon.Error);
           e.CancelEdit = true;
        }
        break;
     case "Int32":
        int intResult;
        if (int.TryParse(e.Label, out intResult))
        {
           ViewableItem.Parameters[e.Item] = intResult;
           e.CancelEdit = false;
        }
        else
        {
           MessageBox.Show("Invalid entry, expecting a " + type, "Invalid input", MessageBoxButtons.OK, MessageBoxIcon.Error);
           e.CancelEdit = true;
        }
        break;
     case "Boolean":
        bool boolResult;
        if (bool.TryParse(e.Label, out boolResult))
        {
           ViewableItem.Parameters[e.Item] = boolResult;
           e.CancelEdit = false;
        }
        else
        {
           MessageBox.Show("Invalid entry, expecting a " + type, "Invalid input", MessageBoxButtons.OK, MessageBoxIcon.Error);
           e.CancelEdit = true;
        }
        break;
     default:
        break;
      }
 }
开发者ID:dadelcarbo,项目名称:StockAnalyzer,代码行数:50,代码来源:ParametrizableControl.cs

示例15: lstNPCNames_AfterLabelEdit

 private void lstNPCNames_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     if (e.Label == null) // User made no changes to the label text
     return;
     NPCInfo NI = this.lstNPCNames.Items[e.Item].Tag as NPCInfo;
       if (NI != null) {
       string NewName = e.Label;
     if (NewName.Length > 0x18) {
       NewName = NewName.Substring(0, 0x18);
       this.lstNPCNames.Items[e.Item].Text = NewName;
     }
     NameChange.Add(NI.ID, NI.Name, NewName);
     NI.Name = NewName;
       }
 }
开发者ID:Zastai,项目名称:POLUtils,代码行数:15,代码来源:MainWindow.cs


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