本文整理汇总了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();
}
示例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();
}
示例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();
}
示例4: AddEntry
public void AddEntry()
{
ListViewItem item = new ListViewItem();
EntryList.Items.Add(item);
item.EnsureVisible();
EntryList.LabelEdit = true;
item.BeginEdit();
}
示例5: AddVariable
private void AddVariable()
{
ListViewItem item = new ListViewItem();
VarList.Items.Add(item);
item.Selected = true;
item.EnsureVisible();
VarList.LabelEdit = true;
item.BeginEdit();
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
}
示例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();
}
示例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();
}
示例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();
}
}
}
}
示例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();
}
示例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;
}
}
}
示例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;
}
}