本文整理汇总了C#中System.Windows.Forms.ListViewItem类的典型用法代码示例。如果您正苦于以下问题:C# System.Windows.Forms.ListViewItem类的具体用法?C# System.Windows.Forms.ListViewItem怎么用?C# System.Windows.Forms.ListViewItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
System.Windows.Forms.ListViewItem类属于命名空间,在下文中一共展示了System.Windows.Forms.ListViewItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem();
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menu = new System.Windows.Forms.ListView();
this.mainMenu2 = new System.Windows.Forms.MainMenu();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.Add(this.menuItem1);
this.mainMenu1.MenuItems.Add(this.menuItem2);
//
// menuItem1
//
this.menuItem1.Text = "Exit";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// menuItem2
//
this.menuItem2.Text = "Select";
//
// menu
//
listViewItem1.Text = "- Notrufe weltweit -";
listViewItem2.Text = "Allgemeines";
this.menu.Items.Add(listViewItem1);
this.menu.Items.Add(listViewItem2);
this.menu.Location = new System.Drawing.Point(0, 0);
this.menu.Name = "menu";
this.menu.Size = new System.Drawing.Size(240, 320);
this.menu.TabIndex = 0;
this.menu.View = System.Windows.Forms.View.List;
this.menu.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
//
// mainMenu2
//
this.mainMenu2.MenuItems.Add(this.menuItem3);
//
// menuItem3
//
this.menuItem3.Text = "";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(131F, 131F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(230, 256);
this.Controls.Add(this.menu);
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
示例2: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("hi");
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Hello");
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("jlk");
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.SuspendLayout();
//
// listView1
//
this.listView1.Alignment = System.Windows.Forms.ListViewAlignment.Left;
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1});
this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2,
listViewItem3});
this.listView1.Location = new System.Drawing.Point(0, 0);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(1249, 436);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
//
// CustomListView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.listView1);
this.Name = "CustomListView";
this.Size = new System.Drawing.Size(1249, 436);
this.ResumeLayout(false);
}
示例3: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("sdfsadfadsf");
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("sdfsdf");
this.listViewEx1 = new DevComponents.DotNetBar.Controls.ListViewEx();
this.SuspendLayout();
//
// listViewEx1
//
//
//
//
this.listViewEx1.Border.Class = "ListViewBorder";
listViewItem2.ToolTipText = "ddf";
this.listViewEx1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2});
this.listViewEx1.Location = new System.Drawing.Point(31, 22);
this.listViewEx1.Name = "listViewEx1";
this.listViewEx1.Size = new System.Drawing.Size(371, 343);
this.listViewEx1.TabIndex = 0;
this.listViewEx1.UseCompatibleStateImageBehavior = false;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(581, 457);
this.Controls.Add(this.listViewEx1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
示例4: InitializeAssemblies
private void InitializeAssemblies()
{
string FileName;
string[] AssemblyProperties;
string NameSpace;
string Version;
string Culture;
string Key;
System.Windows.Forms.ListViewItem listViewItem;
foreach (Assembly AssemblyObject in AppDomain.CurrentDomain.GetAssemblies())
{
//FileName = QIT.Common.Assemblies.AssemblyManager.GetFileName(i);
//NameSpace = QIT.Common.Assemblies.AssemblyManager.GetNameSpace(i);
FileName = AssemblyObject.Location.ToString();
AssemblyProperties = AssemblyObject.FullName.Split(',');
NameSpace = AssemblyProperties[0];
Version = AssemblyProperties[1].Split('=')[1];
Culture = AssemblyProperties[2].Split('=')[1];
Key = AssemblyProperties[3].Split('=')[1];
listViewItem = new System.Windows.Forms.ListViewItem(
new string[] { FileName, NameSpace, Version, Culture, Key },
-1);
this.listViewComponents.Items.Add(listViewItem);
}
}
示例5: BodyElementPropertyConverter
public BodyElementPropertyConverter(BodyElement bodyElement, System.Windows.Forms.ListViewItem viewItem,CoronaObject objectParent,Form1 mainForm)
{
this.bodyElement = bodyElement;
this.viewItem = viewItem;
this.selectedObject = objectParent;
this.mainForm = mainForm;
}
示例6: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("Node");
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Leaf");
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Connect");
System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("Repository");
this.listView1 = new System.Windows.Forms.ListView();
this.SuspendLayout();
//
// listView1
//
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2,
listViewItem3,
listViewItem4});
this.listView1.Location = new System.Drawing.Point(0, 0);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(309, 386);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Tile;
this.listView1.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.listView1_ItemDrag);
//
// ToolBoxControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.listView1);
this.Name = "ToolBoxControl";
this.Size = new System.Drawing.Size(309, 386);
this.ResumeLayout(false);
}
示例7: addButton_Click
private void addButton_Click(object sender, EventArgs e)
{
CommandMode mode = (CommandMode)comboBox1.SelectedIndex;
System.Windows.Forms.ListViewItem item =
new System.Windows.Forms.ListViewItem(new string[] { nameTextBox.Text, CommandModeString.GetText(mode), commandControl.Text });
item.Tag = mode;
listView1.Items.Add(item);
}
示例8: getListViewItem
internal System.Windows.Forms.ListViewItem getListViewItem()
{
if (li == null)
{
li = new System.Windows.Forms.ListViewItem(Process.MainWindowTitle, IconIndex);
}
return li;
}
示例9: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem("1)");
System.Windows.Forms.ListViewItem listViewItem11 = new System.Windows.Forms.ListViewItem("2)");
System.Windows.Forms.ListViewItem listViewItem12 = new System.Windows.Forms.ListViewItem("3)");
System.Windows.Forms.ListViewItem listViewItem13 = new System.Windows.Forms.ListViewItem("4)");
System.Windows.Forms.ListViewItem listViewItem14 = new System.Windows.Forms.ListViewItem("5)");
System.Windows.Forms.ListViewItem listViewItem15 = new System.Windows.Forms.ListViewItem("6)");
System.Windows.Forms.ListViewItem listViewItem16 = new System.Windows.Forms.ListViewItem("7)");
System.Windows.Forms.ListViewItem listViewItem17 = new System.Windows.Forms.ListViewItem("8)");
System.Windows.Forms.ListViewItem listViewItem18 = new System.Windows.Forms.ListViewItem("9)");
this.highScoreList = new System.Windows.Forms.ListView();
this.highScoreLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// highScoreList
//
this.highScoreList.Alignment = System.Windows.Forms.ListViewAlignment.Left;
this.highScoreList.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem10,
listViewItem11,
listViewItem12,
listViewItem13,
listViewItem14,
listViewItem15,
listViewItem16,
listViewItem17,
listViewItem18});
this.highScoreList.Location = new System.Drawing.Point(12, 82);
this.highScoreList.Name = "highScoreList";
this.highScoreList.Size = new System.Drawing.Size(599, 396);
this.highScoreList.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.highScoreList.TabIndex = 0;
this.highScoreList.UseCompatibleStateImageBehavior = false;
//
// highScoreLabel
//
this.highScoreLabel.AutoSize = true;
this.highScoreLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.highScoreLabel.Location = new System.Drawing.Point(167, 9);
this.highScoreLabel.Name = "highScoreLabel";
this.highScoreLabel.Size = new System.Drawing.Size(297, 55);
this.highScoreLabel.TabIndex = 1;
this.highScoreLabel.Text = "High Scores";
//
// HighScores
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(624, 483);
this.Controls.Add(this.highScoreLabel);
this.Controls.Add(this.highScoreList);
this.Name = "HighScores";
this.Text = "HighScores";
this.ResumeLayout(false);
this.PerformLayout();
}
示例10: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
"FolderContent"}, -1, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))));
this.treeView1 = new System.Windows.Forms.TreeView();
this.button1 = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.SuspendLayout();
//
// treeView1
//
this.treeView1.Location = new System.Drawing.Point(-2, 56);
this.treeView1.Name = "treeView1";
this.treeView1.Size = new System.Drawing.Size(173, 307);
this.treeView1.TabIndex = 0;
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.treeView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.treeView1_MouseDoubleClick);
//
// button1
//
this.button1.Location = new System.Drawing.Point(12, 12);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "Open";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// listView1
//
this.listView1.GridLines = true;
listViewItem1.Checked = true;
listViewItem1.StateImageIndex = 1;
this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1});
this.listView1.Location = new System.Drawing.Point(192, 56);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(393, 307);
this.listView1.TabIndex = 2;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.List;
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
this.listView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseDoubleClick);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(621, 363);
this.Controls.Add(this.listView1);
this.Controls.Add(this.button1);
this.Controls.Add(this.treeView1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
示例11: Subreach_Excel_OnSubreachCompleted
void Subreach_Excel_OnSubreachCompleted(string worksheet_name, string subreach_name, string elapsed)
{
//if (_worksheet_name == worksheet_name)
//{
System.Windows.Forms.ListViewItem item = new System.Windows.Forms.ListViewItem(worksheet_name + " " + subreach_name);
item.SubItems.Add(elapsed);
Items.Add(item);
//}
}
示例12: InitializeComponent
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("是伏伽", "temp");
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("换个方式的话", "temp");
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.panel1 = new System.Windows.Forms.Panel();
this.listView1 = new System.Windows.Forms.ListView();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.listView1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(771, 342);
this.panel1.TabIndex = 0;
//
// listView1
//
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
listViewItem1.StateImageIndex = 0;
listViewItem2.StateImageIndex = 0;
this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2});
this.listView1.LargeImageList = this.imageList1;
this.listView1.Location = new System.Drawing.Point(0, 0);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(771, 342);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Tile;
//
// imageList1
//
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "temp");
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(771, 342);
this.Controls.Add(this.panel1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
示例13: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("Unsinged Short");
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmVariablePreview));
this.LstValues = new System.Windows.Forms.ListView();
this.ColType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ColValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.SuspendLayout();
//
// LstValues
//
this.LstValues.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.LstValues.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.ColType,
this.ColValue});
this.LstValues.Dock = System.Windows.Forms.DockStyle.Fill;
this.LstValues.FullRowSelect = true;
this.LstValues.GridLines = true;
this.LstValues.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1});
this.LstValues.Location = new System.Drawing.Point(0, 0);
this.LstValues.Name = "LstValues";
this.LstValues.Size = new System.Drawing.Size(262, 253);
this.LstValues.TabIndex = 0;
this.LstValues.UseCompatibleStateImageBehavior = false;
this.LstValues.View = System.Windows.Forms.View.Details;
//
// ColType
//
this.ColType.Text = "Type";
this.ColType.Width = 100;
//
// ColValue
//
this.ColValue.Text = "Value";
this.ColValue.Width = 150;
//
// FrmVariablePreview
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(262, 253);
this.Controls.Add(this.LstValues);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "FrmVariablePreview";
this.Text = "Variable Preview";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmVariablePreview_FormClosing);
this.Load += new System.EventHandler(this.FrmVariablePreview_Load);
this.ResumeLayout(false);
}
示例14: GenerarListViewItem
public System.Windows.Forms.ListViewItem GenerarListViewItem(object Objeto)
{
System.Windows.Forms.ListViewItem item = new System.Windows.Forms.ListViewItem();
item.Text = ((GI.BR.InmobiliariaExterna)Objeto).Nombre;
item.SubItems.Add(((GI.BR.InmobiliariaExterna)Objeto).PersonaResponsable);
item.SubItems.Add(((GI.BR.InmobiliariaExterna)Objeto).Telefono);
item.Tag = ((GI.BR.InmobiliariaExterna)Objeto);
return item;
}
示例15: Set
public override void Set(DeanCCCore.Core.Options.OptionItems source)
{
foreach (Command command in source.CommandOptions.CommandList)
{
System.Windows.Forms.ListViewItem item =
new System.Windows.Forms.ListViewItem(new string[] { command.Name, CommandModeString.GetText(command.CommandMode), command.Value });
item.Tag = command.CommandMode;
listView1.Items.Add(item);
}
base.Set(source);
}