c# - menustrip 项目消失了,但在我的 Designer.cs 上仍然可用
问题描述
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.okumaHızıToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem9 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem10 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem12 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem13 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem14 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
this.okunacakMetinToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.kırmızıBaşlıklıKızToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.kaşağıToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.satrançStefanZweigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.metroPanel3 = new MetroFramework.Controls.MetroPanel();
this.button2 = new FontAwesome.Sharp.IconButton();
this.buttondurdur = new FontAwesome.Sharp.IconButton();
this.button1 = new FontAwesome.Sharp.IconButton();
this.metroPanel1 = new MetroFramework.Controls.MetroPanel();
this.metroPanel2 = new MetroFramework.Controls.MetroPanel();
this.ıconButton8 = new FontAwesome.Sharp.IconButton();
this.vahşetinÇağrısıToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm1ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm2ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm3ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm4ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm1ToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm2ToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.bölüm3ToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.metroPanel3.SuspendLayout();
this.metroPanel2.SuspendLayout();
this.SuspendLayout();
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// richTextBox1
//
this.richTextBox1.BackColor = System.Drawing.SystemColors.ButtonFace;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.richTextBox1.Font = new System.Drawing.Font("Calibri", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.richTextBox1.Location = new System.Drawing.Point(412, 245);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(620, 649);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.TabStop = false;
this.richTextBox1.Text = "";
//
// menuStrip1
//
this.menuStrip1.AutoSize = false;
this.menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(56)))));
this.menuStrip1.Font = new System.Drawing.Font("Calibri", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.menuStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(598, 42);
this.menuStrip1.Stretch = false;
this.menuStrip1.TabIndex = 1;
//
// okumaHızıToolStripMenuItem1
//
this.okumaHızıToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem2,
this.toolStripMenuItem3,
this.toolStripMenuItem4,
this.toolStripMenuItem5,
this.toolStripMenuItem6,
this.toolStripMenuItem7,
this.toolStripMenuItem8,
this.toolStripMenuItem9,
this.toolStripMenuItem10,
this.toolStripMenuItem11,
this.toolStripMenuItem12,
this.toolStripMenuItem13,
this.toolStripMenuItem14,
this.toolStripMenuItem15});
this.okumaHızıToolStripMenuItem1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.okumaHızıToolStripMenuItem1.Name = "okumaHızıToolStripMenuItem1";
this.okumaHızıToolStripMenuItem1.Size = new System.Drawing.Size(122, 38);
this.okumaHızıToolStripMenuItem1.Text = "Okuma Hızı";
//
// toolStripMenuItem2 (Missing item)
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem2.Text = "130-";
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem3.Text = "150-";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem4.Text = "170-";
this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem5.Text = "190-";
this.toolStripMenuItem5.Click += new System.EventHandler(this.toolStripMenuItem5_Click);
//
// toolStripMenuItem6
//
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem6.Text = "230-";
this.toolStripMenuItem6.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
//
// toolStripMenuItem7
//
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
this.toolStripMenuItem7.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem7.Text = "280-";
this.toolStripMenuItem7.Click += new System.EventHandler(this.toolStripMenuItem7_Click);
//
// toolStripMenuItem8
//
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
this.toolStripMenuItem8.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem8.Text = "330-";
this.toolStripMenuItem8.Click += new System.EventHandler(this.toolStripMenuItem8_Click);
//
// toolStripMenuItem9
//
this.toolStripMenuItem9.Name = "toolStripMenuItem9";
this.toolStripMenuItem9.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem9.Text = "380-";
this.toolStripMenuItem9.Click += new System.EventHandler(this.toolStripMenuItem9_Click);
//
// toolStripMenuItem10
//
this.toolStripMenuItem10.Name = "toolStripMenuItem10";
this.toolStripMenuItem10.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem10.Text = "470-";
this.toolStripMenuItem10.Click += new System.EventHandler(this.toolStripMenuItem10_Click);
//
// toolStripMenuItem11
//
this.toolStripMenuItem11.Name = "toolStripMenuItem11";
this.toolStripMenuItem11.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem11.Text = "600-";
this.toolStripMenuItem11.Click += new System.EventHandler(this.toolStripMenuItem11_Click);
//
// toolStripMenuItem12
//
this.toolStripMenuItem12.Name = "toolStripMenuItem12";
this.toolStripMenuItem12.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem12.Text = "700-";
this.toolStripMenuItem12.Click += new System.EventHandler(this.toolStripMenuItem12_Click);
//
// toolStripMenuItem13
//
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
this.toolStripMenuItem13.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem13.Text = "850-";
this.toolStripMenuItem13.Click += new System.EventHandler(this.toolStripMenuItem13_Click);
//
// toolStripMenuItem14
//
this.toolStripMenuItem14.Name = "toolStripMenuItem14";
this.toolStripMenuItem14.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem14.Text = "1050-";
this.toolStripMenuItem14.Click += new System.EventHandler(this.toolStripMenuItem14_Click);
//
// toolStripMenuItem15
//
this.toolStripMenuItem15.Name = "toolStripMenuItem15";
this.toolStripMenuItem15.Size = new System.Drawing.Size(103, 22);
this.toolStripMenuItem15.Text = "1400-";
this.toolStripMenuItem15.Click += new System.EventHandler(this.toolStripMenuItem15_Click);
当我设计我的winform时,menustrip中的项目突然消失了,然后我检查了designer.cs,它们仍然在那里,但我无法在我的表单上找到它们。缺少的是toolStripMenuItem15之间的那些toolStripMenuItem1。看起来他们缺少位置和其他属性,但我不确定这个问题。
我的表单现在有 menustrip 但缺少项目它是空的。
解决方案
推荐阅读
- linux - 从泡菜文件中读取列表时,pynput 出现问题
- python - Tkinter 和井字游戏的问题
- python - 如何在 Python 3 中将类从一个子文件夹导入到另一个子文件夹中?
- angular - 角路线。两个视图之间的路线问题
- c# - C# 将密钥发送到应用程序
- ios - 最新的 Firebase 升级后文件 MobileCoreServices-3PK2VQ0R2SYLI.pcm 丢失
- javascript - 如何在 Laravel 中使用 jQuery ajax 请求自动添加 X-CSRF-TOKEN
- sql - 根据另一个表中的销售数据拉伸点图层
- xml - 在 XSLT 中嵌套的 foreach 循环输出计数是两倍且相同
- matlab - 如何使用 Matlab eig 函数仅输出特征向量