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


C# ListViewItem.BeginEdit方法代码示例

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


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

示例1: Run

		public override void Run()
		{
			ResourceEditorControl editor = ((ResourceEditWrapper)SD.Workbench.ActiveViewContent).ResourceEditor;
			
			if(editor.ResourceList.WriteProtected) {
				return;
			}
			
			int count = 1;
			string newNameBase = " new string entry ";
			string newName = newNameBase + count.ToString();
			string type = "System.String";
			
			while(editor.ResourceList.Resources.ContainsKey(newName)) {
				count++;
				newName = newNameBase + count.ToString();
			}
			
			ResourceItem item = new ResourceItem(newName, "");
			editor.ResourceList.Resources.Add(newName, item);
			ListViewItem lv = new ListViewItem(new string[] { newName, type, "" }, item.ImageIndex);
			editor.ResourceList.Items.Add(lv);
			editor.ResourceList.OnChanged();
			lv.BeginEdit();
		}
开发者ID:Rpinski,项目名称:SharpDevelop,代码行数:25,代码来源:AddStringEntryCommand.cs

示例2: btnAdd_Click

 private void btnAdd_Click(object sender, EventArgs e)
 {
     ListViewItem Lvi = new ListViewItem("");
     Lvi.Tag = new MobileInfo("");
     Lvi.SubItems.Add("尚未发送");
     this.listView1.Items.Add(Lvi);
     Lvi.BeginEdit();
 }
开发者ID:dalinhuang,项目名称:qqhelp-heimu360,代码行数:8,代码来源:frmMain.cs

示例3: addButton_Click

        private void addButton_Click(object sender, EventArgs e)
        {
            var newName = GetNewListName();
            assemblyListManager.Add(newName);

            var listViewItem = new ListViewItem(newName);
            listView.Items.Add(listViewItem);
            listViewItem.BeginEdit();
        }
开发者ID:larsw,项目名称:dotPeek.AssemblyLists,代码行数:9,代码来源:AssemblyListForm.cs

示例4: AddEntry

        public void AddEntry()
        {
            ListViewItem item = new ListViewItem();
            EntryList.Items.Add(item);
            item.EnsureVisible();

            EntryList.LabelEdit = true;
            item.BeginEdit();
        }
开发者ID:gemerson,项目名称:EEdit,代码行数:9,代码来源:ValueEditor.cs

示例5: AddVariable

        private void AddVariable()
        {
            ListViewItem item = new ListViewItem();
            VarList.Items.Add(item);
            item.Selected = true;
            item.EnsureVisible();

            VarList.LabelEdit = true;
            item.BeginEdit();
        }
开发者ID:gemerson,项目名称:EEdit,代码行数:10,代码来源:EnvEditor.cs

示例6: OnAddLoginClick

 private void OnAddLoginClick(object sender, EventArgs e)
 {
     string loginName;
     Color color;
     _component.AddLoginNameMarkupColor(out loginName, out color);
     var item = new ListViewItem(loginName);
     item.UseItemStyleForSubItems = false;
     item.SubItems.Add(new ListViewItem.ListViewSubItem(item, string.Empty, Color.Black, color, item.Font));
     _listViewLoginNameMarkupColor.Items.Add(item);
     item.BeginEdit();
 }
开发者ID:CuriousX,项目名称:annotation-and-image-markup,代码行数:11,代码来源:AimMarkupColorComponentControl.cs

示例7: AddDictContent

        private void AddDictContent()
        {
            if (this.treeDict.SelectedNode.Name =="nodDict")
            {
                MessageBox.Show(rm.GetString("Info77"), rm.GetString ("MessageboxInfo"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            this.listDict.LabelEdit = true;
            ListViewItem item = new ListViewItem();
            item.Text = rm.GetString ("Label20");
            this.listDict.Items.Add(item);
            item.BeginEdit();
            item = null;
            //this.listDict.Items[this.listDict.Items.Count - 1].BeginEdit();
        }
开发者ID:zhushengwen,项目名称:example-zhushengwen,代码行数:16,代码来源:frmDict.cs

示例8: AddTeam_Click

        private void AddTeam_Click(object sender, EventArgs e)
        {
            if (this.rounds.Count == 0)
            {
                var id = ++this.teamIdentity;

                var team = new TournamentTeam(id, 100);
                this.teams.Add(team);
                this.teamNames.Add(id, "New Team");

                var item = new ListViewItem(new string[] { this.teamNames[team.TeamId], team.Rating.ToString() });
                item.Tag = team;
                this.TeamsList.Items.Add(item);

                this.UpdateState();

                this.TeamsList.SelectedIndices.Clear();
                item.BeginEdit();
            }
        }
开发者ID:Rychard,项目名称:TournamentApi,代码行数:20,代码来源:TournamentView.cs

示例9: AddButton_Click

        private void AddButton_Click(object sender, EventArgs e)
        {
            String key;
            int num = 1;
            bool found;
            do
            {
                key = "VAR" + num.ToString();
                found = false;
                num++;
                foreach (ListViewItem item in EnvVarList.Items)
                {
                    if (string.Compare(item.Text, key, true) == 0 && item.SubItems[2].Text == USER_STRING)
                    {
                        found = true;
                        break;
                    }
                }
            } while (found);

            {
                var item = new ListViewItem(new String[] { key, "", USER_STRING });
                item.Tag = key;
                if (EnvVarList.SelectedItems.Count == 0)
                {
                    EnvVarList.Items.Add(item);
                }
                else
                {
                    EnvVarList.Items.Insert(EnvVarList.SelectedIndices[0], item);
                }
                Modify();
                EnvVarList.SelectedIndices.Clear();
                item.BeginEdit();
            }
        }
开发者ID:komoku174,项目名称:EnvVar,代码行数:36,代码来源:MainForm.cs

示例10: btnAdd_Click

        private void btnAdd_Click(object sender, EventArgs e)
        {
            PosShape org = GetSelected();

            int i = 1;
            while (m_Copies.Exists(p => p.Name.ToUpperInvariant() == "SHAPE" + i.ToString()))
            {
                i++;
            }

            PosShape copy = new PosShape();

            copy.Name = "Shape" + i.ToString();

            copy.Fields = org != null ? org.Fields : 1;
            copy.Formula = org != null ? org.Formula : "A";
            copy.FormulaBending = org != null ? org.FormulaBending : "A";
            copy.Priority = org != null ? org.Priority : 0;

            if (org != null)
            {
                for (int k = 0; k < org.Items.Count; k++)
                {
                    PosShape.Shape draw = org.Items[k];
                    copy.Items.Add(draw.Clone());
                }
            }

            m_Copies.Add(copy);

            ListViewItem lv = new ListViewItem(copy.Name);
            lv.SubItems.Add(copy.Fields.ToString());
            lv.SubItems.Add(copy.Formula);
            lv.SubItems.Add(copy.FormulaBending);
            lv.ImageIndex = 1;
            lbShapes.Items.Add(lv);
            lbShapes.SelectedIndices.Clear();
            lbShapes.SelectedIndices.Add(lbShapes.Items.Count - 1);
            lv.BeginEdit();
        }
开发者ID:oozcitak,项目名称:RebarPos,代码行数:40,代码来源:PosShapesForm.cs

示例11: btnAdd_Click

        private void btnAdd_Click(object sender, EventArgs e)
        {
            TableStyleCopy org = GetSelected();
            if (org == null) return;

            int i = 1;
            while (m_Copies.Exists(p => p.Name.ToUpperInvariant() == "TABLESTYLE" + i.ToString()))
            {
                i++;
            }

            TableStyleCopy copy = new TableStyleCopy();

            copy.Name = "TableStyle" + i.ToString();

            copy.IsBuiltin = false;

            copy.Columns = org.Columns;

            copy.PosColumn = org.PosColumn;
            copy.CountColumn = org.CountColumn;
            copy.DiameterColumn = org.DiameterColumn;
            copy.LengthColumn = org.LengthColumn;
            copy.ShapeColumn = org.ShapeColumn;
            copy.TotalLengthColumn = org.TotalLengthColumn;
            copy.DiameterListColumn = org.DiameterListColumn;

            copy.TotalLengthRow = org.TotalLengthRow;
            copy.UnitWeightRow = org.UnitWeightRow;
            copy.WeightRow = org.WeightRow;
            copy.GrossWeightRow = org.GrossWeightRow;

            copy.MultiplierHeadingLabel = org.MultiplierHeadingLabel;

            copy.TextStyleId = org.TextStyleId;
            copy.HeadingStyleId = org.HeadingStyleId;
            copy.FootingStyleId = org.FootingStyleId;

            m_Copies.Add(copy);

            ListViewItem lv = new ListViewItem(copy.Name);
            lv.ImageIndex = 1;
            lbStyles.Items.Add(lv);
            lbStyles.SelectedIndices.Clear();
            lbStyles.SelectedIndices.Add(lbStyles.Items.Count - 1);
            lv.BeginEdit();
        }
开发者ID:oozcitak,项目名称:RebarPos,代码行数:47,代码来源:TableStyleForm.cs

示例12: ArgumentsList_MouseClick

		private void ArgumentsList_MouseClick(object sender, MouseEventArgs e)
		{
			ListViewHitTestInfo Info = ArgumentsList.HitTest(e.Location);
			if(Info.Item.Index == ArgumentsList.Items.Count - 1)
			{
				ListViewItem NewItem = new ListViewItem();
				NewItem.Checked = true;
				NewItem = ArgumentsList.Items.Insert(ArgumentsList.Items.Count - 1, NewItem);
				NewItem.BeginEdit();
			}
			else
			{
				using(Graphics Graphics = ArgumentsList.CreateGraphics())
				{
					int LabelOffset = e.X - CheckBoxPadding - CheckBoxRenderer.GetGlyphSize(Graphics, CheckBoxState.CheckedNormal).Width - CheckBoxPadding;
					if(LabelOffset >= 0 && LabelOffset < TextRenderer.MeasureText(Info.Item.Text, ArgumentsList.Font).Width)
					{
						Info.Item.BeginEdit();
					}
				}
			}
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:22,代码来源:ArgumentsWindow.cs

示例13: btnInvite_Click

        private void btnInvite_Click(object sender, EventArgs e)
        {
            ListViewItem dynItem = new ListViewItem("[email protected]");
            lstUsers.Items.Add(dynItem);

            // Ignore the selection of the new flag.
            m_ignoreSelectFlag = true;

            dynItem.BeginEdit();
        }
开发者ID:tmbx,项目名称:kwm-release,代码行数:10,代码来源:frmMain.cs

示例14: listViewScripts_KeyDown

		private void listViewScripts_KeyDown(object sender, KeyEventArgs e)
		{
			switch (e.KeyCode)
			{
				case Keys.Insert:
					{
						CUEToolsScript script;
						if (_config.scripts.TryGetValue("new", out script))
							return;
						script = new CUEToolsScript("new", false, new CUEAction[] {}, "");
						_config.scripts.Add("new", script);
						ListViewItem item = new ListViewItem(script.name);
						item.Tag = script;
						listViewScripts.Items.Add(item);
						item.BeginEdit();
						break;
					}
				case Keys.Delete:
					{
						if (listViewScripts.SelectedItems.Count <= 0)
							return;
						CUEToolsScript script = (CUEToolsScript)listViewScripts.SelectedItems[0].Tag;
						if (script.builtin)
							return;
						_config.scripts.Remove(script.name);
						listViewScripts.Items.Remove(listViewScripts.SelectedItems[0]);
						break;
					}
			}
		}
开发者ID:androidhacker,项目名称:DotNetProjs,代码行数:30,代码来源:frmSettings.cs

示例15: while

        private void 新建文件夹ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Cursor old = Cursor.Current;
            try
            {
                string name = "新建文件夹";
                bool found = true;
                int i = 1;
                while (found)
                {
                    found = false;
                    foreach (ListViewItem target in this.listView_fileDirectory.Items)
                    {
                        if (!((FileOrDirectoryTag)target.Tag).IsFile && name == target.Text)
                        {
                            found = true;
                        }
                    }

                    if (found)
                    {
                        name = "新建文件夹" + i.ToString();
                        i++;
                    }
                }

                Cursor.Current = Cursors.WaitCursor;
                this.fileDirectoryOutter.CreateDirectory(this.ownerID, this.netDiskID, this.currentDirPath, name);

                ListViewItem item = new ListViewItem(new string[] { name, DateTime.Now.ToString(), "" }, 0);
                item.Tag = new FileOrDirectoryTag(name, 0, DateTime.Now, false);
                this.listView_fileDirectory.Items.Add(item);
                item.BeginEdit();
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
            }
            finally
            {
                this.isLableEditing = false;
                Cursor.Current = old;
            }
        }
开发者ID:GamesDesignArt,项目名称:GGTalk,代码行数:44,代码来源:NDiskBrowser.cs


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