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


C# Form.ResumeLayout方法代码示例

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


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

示例1: Init

        public static void Init()
        {
            Settings.FULLSCREEN = !Settings.DevMode;

            var frm = new Form() {
                Text = "Tob Broadcast",
                Size = new Size (480, 320),
                Padding = new Padding (2),
                Font = new Font ("Consolas", 10.0f),
                FormBorderStyle = FormBorderStyle.FixedToolWindow,
                MaximizeBox = false,
            };

            frm.SuspendLayout();

            if (Settings.DevMode)
                InitLocal (frm);

            InitRemote (frm);

            InitGeneral (frm);

            frm.ResumeLayout();
            _frm = frm;

            Application.Run (frm);
        }
开发者ID:ming4883,项目名称:TOB,代码行数:27,代码来源:UI.cs

示例2: InitializeComponent

		/// <summary>
		/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
		/// le contenu de cette méthode avec l'éditeur de code.
		/// </summary>
		protected void InitializeComponent()
		{
			this._elementHost1 = new System.Windows.Forms.Integration.ElementHost();
			this._spatialViewerControl = new SpatialViewer_GDIHost();
			_form = new System.Windows.Forms.Form();
			_form.SuspendLayout();
			// 
			// elementHost1
			// 
			this._elementHost1.Dock = System.Windows.Forms.DockStyle.Fill;
			this._elementHost1.Location = new System.Drawing.Point(0, 0);
			this._elementHost1.Name = "elementHost1";
			this._elementHost1.Size = new System.Drawing.Size(824, 581);
			this._elementHost1.TabIndex = 0;
			this._elementHost1.Text = "elementHost1";
			this._elementHost1.Child = (UIElement)this._spatialViewerControl;
			// 
			// Form1
			// 
			_form.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
			_form.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
			_form.ClientSize = new System.Drawing.Size(824, 581);
			_form.Controls.Add(this._elementHost1);
			_form.Name = "Spatial Toolkit";
			_form.Text = "Spatial Toolkit";
			_form.ResumeLayout(false);

		}
开发者ID:xfischer,项目名称:SqlServerSpatial.Toolkit,代码行数:32,代码来源:DebuggerSideBase.cs

示例3: SetFontAndScaling

 public static void SetFontAndScaling(Form form)
 {
     form.SuspendLayout();
     form.Font = new Font("Tahoma", 8.25f);
     if (form.Font.Name != "Tahoma") form.Font = new Font("Arial", 8.25f);
     form.AutoScaleMode = AutoScaleMode.Font;
     form.AutoScaleDimensions = new SizeF(6f, 13f);
     form.ResumeLayout(false);
 }
开发者ID:houzhenggang,项目名称:flv-extraxct,代码行数:9,代码来源:Program.cs

示例4: AskForPassword

        public static string AskForPassword()
        {
            Form dialog = new Form();
            dialog.FormBorderStyle = FormBorderStyle.FixedDialog;

            System.Windows.Forms.Label label1;
            MarkJohansen.Forms.MSJTextBox msjTextBox1;
            MarkJohansen.Forms.MSJButton msjButton1;

            label1 = new System.Windows.Forms.Label();
            msjTextBox1 = new MarkJohansen.Forms.MSJTextBox();
            msjButton1 = new MarkJohansen.Forms.MSJButton();
            dialog.SuspendLayout();
            //
            // label1
            //
            label1.AutoSize = true;
            label1.Location = new System.Drawing.Point(2, 8);
            label1.Name = "label1";
            label1.Size = new System.Drawing.Size(160, 13);
            label1.TabIndex = 0;
            label1.Text = "Please enter your DM password.";
            //
            // msjTextBox1
            //
            msjTextBox1.Location = new System.Drawing.Point(5, 25);
            msjTextBox1.Name = "msjTextBox1";
            msjTextBox1.Size = new System.Drawing.Size(285, 20);
            msjTextBox1.TabIndex = 1;
            //
            // msjButton1
            //
            msjButton1.Location = new System.Drawing.Point(5, 51);
            msjButton1.Name = "msjButton1";
            msjButton1.Size = new System.Drawing.Size(285, 28);
            msjButton1.TabIndex = 2;
            msjButton1.Text = "OK";
            msjButton1.Click += (sender, e) => { dialog.Close(); };
            msjButton1.UseVisualStyleBackColor = true;
            //
            // Form1
            //
            dialog.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            dialog.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            dialog.ClientSize = new System.Drawing.Size(292, 84);
            dialog.Controls.Add(msjButton1);
            dialog.Controls.Add(msjTextBox1);
            dialog.Controls.Add(label1);
            dialog.Name = "Form1";
            dialog.Text = "Form1";
            dialog.ResumeLayout(false);
            dialog.PerformLayout();

            dialog.ShowDialog();

            return msjTextBox1.Text;
        }
开发者ID:msjohansen,项目名称:RavenloftLauncher,代码行数:57,代码来源:Pompt.cs

示例5: InputBox

        public static string InputBox(string Prompt = "", string Title = "", string DefaultResponse = "")
        {
            var textBox = new TextBox();
            textBox.Location = new Point(12, 84);
            textBox.Size = new Size(329, 19);
            textBox.Text = DefaultResponse;

            var okButton = new Button();
            okButton.DialogResult = DialogResult.OK;
            okButton.Location = new Point(266, 9);
            okButton.Size = new Size(75, 23);
            okButton.Text = "OK";
            okButton.UseVisualStyleBackColor = true;

            var cancelButton = new Button();
            cancelButton.DialogResult = DialogResult.Cancel;
            cancelButton.Location = new Point(266, 38);
            cancelButton.Size = new Size(75, 23);
            cancelButton.Text = "キャンセル";
            cancelButton.UseVisualStyleBackColor = true;

            var label = new Label();
            label.AutoSize = true;
            label.Location = new Point(12, 9);
            label.Size = new Size(0, 12);
            label.Text = Prompt;

            var form = new Form();
            form.SuspendLayout();
            form.AcceptButton = okButton;
            form.CancelButton = cancelButton;
            form.AutoScaleDimensions = new SizeF(6F, 12F);
            form.AutoScaleMode = AutoScaleMode.Font;
            form.ClientSize = new Size(353, 120);
            form.ControlBox = false;
            form.Controls.Add(textBox);
            form.Controls.Add(okButton);
            form.Controls.Add(cancelButton);
            form.Controls.Add(label);
            form.FormBorderStyle = FormBorderStyle.FixedDialog;
            form.ShowInTaskbar = false;
            form.StartPosition = FormStartPosition.CenterParent;
            form.ResumeLayout(false);
            form.PerformLayout();
            form.Text = Title;

            if (form.ShowDialog() == DialogResult.OK) return textBox.Text;
            else return null;
        }
开发者ID:1995hnagamin,项目名称:Pidet,代码行数:49,代码来源:main.cs

示例6: InitTitle

        /// <summary>
        /// Init title all the control in form
        /// </summary>
        /// <param name="frm"></param>
        /// <remarks>
        /// Author:			PhatLT. FPTSS.
        /// Created date:	14/02/2011
        /// </remarks>
        public static void InitTitle(Form frm)
        {
            if(frm == null)
                return;

            frm.SuspendLayout();

            frm.Text = clsResources.GetTitle(frm.Name + ".Title");
            foreach(Control control in frm.Controls)
            {
                InitTitle(frm, control);
            }

            frm.ResumeLayout(false);
        }
开发者ID:hieu292,项目名称:project-dms,代码行数:23,代码来源:clsTitleManager.cs

示例7: LoadFromRegistry

        /// <summary>
        /// Loads the position and size of a form.
        /// Best placed in the Form's constructor.
        /// </summary>
        /// <param name="form">The control to be loaded.</param>
        public static void LoadFromRegistry(
                    Form form)
        {
            if (form == null)
            {
                throw new ArgumentNullException("form");
            }

            // open key
            using (RegistryKey key = Registry.CurrentUser.OpenSubKey(SUBKEY))
            {
                try
                {
                    // check that screen res is the same
                    // if not or can't be found revert to origional.
                    if ((Screen.PrimaryScreen.Bounds.Height != (int)key.GetValue(form.Name + "_screenHeight"))
                        || (Screen.PrimaryScreen.Bounds.Width != (int)key.GetValue(form.Name + "_screenWidth")))
                    {
                        return;
                    }

                    form.SuspendLayout();
                    try
                    {
                        form.WindowState = (FormWindowState)key.GetValue(form.Name + "_windowState");
                        form.StartPosition = FormStartPosition.Manual;
                        form.Top = (int)key.GetValue(form.Name + "_top");
                        form.Left = (int)key.GetValue(form.Name + "_left");
                        form.Width = (int)key.GetValue(form.Name + "_width");
                        form.Height = (int)key.GetValue(form.Name + "_height");
                    }
                    finally
                    {
                        form.ResumeLayout();
                    }
                }
                catch (Exception)
                {
                    // Nothing to do.
                }
            }
        }
开发者ID:configit-open-source,项目名称:csmerge,代码行数:47,代码来源:FormPosition.cs

示例8: CreateForm

 public static Form CreateForm(GViewer gviewer) {
     GViewer=gviewer;
     var form = new Form();
     form.SuspendLayout();
     form.Controls.Add(gviewer);
     gviewer.Dock = DockStyle.Fill;
     gviewer.SendToBack();
     form.StartPosition = FormStartPosition.CenterScreen;
     form.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width,
                       Screen.PrimaryScreen.WorkingArea.Height);
     var statusStrip = new StatusStrip();
     var toolStribLbl = new ToolStripStatusLabel("test");
     statusStrip.Items.Add(toolStribLbl);
     form.Controls.Add(statusStrip);
     form.MainMenuStrip = GetMainMenuStrip();
     form.Controls.Add(form.MainMenuStrip);
     form.ResumeLayout();
     form.Load += form_Load;
     return form;
 }
开发者ID:WenzCao,项目名称:automatic-graph-layout,代码行数:20,代码来源:FormStuff.cs

示例9: Show

 /// <summary>
 /// Opens a new modeless dialog box with a grid
 /// </summary>
 /// <param name="node">the node to display</param>
 /// <param name="owner">the parent form to attach to, can be null</param>
 /// <returns>the form containing the grid</returns>
 public static Form Show(NsNode node, Form owner)
 {
     Form f = new Form();
     f.Owner = owner;
     f.SuspendLayout();
     NsNodeGridView flow = new NsNodeGridView();
     flow.Dock = DockStyle.Fill;
     f.Controls.Add(flow);
     f.ResumeLayout();
     flow.Node = node;
     f.StartPosition = FormStartPosition.CenterParent;
     f.FormBorderStyle = FormBorderStyle.SizableToolWindow;
     f.Width = 600;
     f.Height = 300;
     f.Text = node.Label;
     f.Show();
     f.BringToFront();
     flow.ReadNode();
     return f;
 }
开发者ID:GMTurbo,项目名称:Free-Form-Matcher,代码行数:26,代码来源:NsNodeGridView.cs

示例10: LabelManager

 public LabelManager(Form p, int m)
 {
     maxNumItems = m;
     items = new List<ResultItem>(0);
     labels = new Label[maxNumItems];
     p.SuspendLayout();
     for (int i = 0; i < maxNumItems; i++)
     {
         labels[i] = new Label();
         labels[i].AutoEllipsis = true;
         labels[i].BackColor = Color.White;
         labels[i].Font = new Font("Microsoft Sans Serif", 18F, FontStyle.Regular, GraphicsUnit.Point, 0);
         labels[i].Location = new Point(100, 110 + (i * 50));
         labels[i].Size = new Size(1050, 30);
         labels[i].TextAlign = ContentAlignment.MiddleCenter;
         p.Controls.Add(labels[i]);
     }
     p.ResumeLayout();
     p.PerformLayout();
 }
开发者ID:henderea,项目名称:PopupMultibox,代码行数:20,代码来源:LabelManager.cs

示例11: GenreSelectorDialog

        public GenreSelectorDialog(TrackDatabase db)
        {
            mDatabase = db;
            mGenres = mDatabase.GetGenres();
            mSelectedGenres = new string[0];

            mForm = new Form();
            mForm.SuspendLayout();

            mForm.Text = "Genre Selection";
            mForm.MinimizeBox = false;
            mForm.MaximizeBox = false;
            mForm.FormBorderStyle = FormBorderStyle.FixedDialog;
            mForm.StartPosition = FormStartPosition.CenterScreen;
            mForm.Size = new Size(200, 250);

            mGenreCheckList = new CheckedListBox();
            mGenreCheckList.CheckOnClick = true;
            mGenreCheckList.IntegralHeight = false;
            mGenreCheckList.Location = new Point(3, 3);
            mGenreCheckList.Size = new Size(mForm.ClientSize.Width - 6, mForm.ClientSize.Height - 32);
            mGenreCheckList.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;

            foreach (string genre in mGenres)
                mGenreCheckList.Items.Add(String.Format("{0} ({1})", genre, mDatabase.GetGenreTrackCount(genre)), true);

            mForm.Controls.Add(mGenreCheckList);

            mOKButton = new Button();
            //mOKButton.DialogResult = DialogResult.OK;
            mOKButton.Text = "OK";
            mOKButton.Location = new Point(mForm.ClientSize.Width - 78, mForm.ClientSize.Height - 26);
            mOKButton.Size = new Size(75, 23);
            mOKButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            mOKButton.Click += new EventHandler(mOKButton_Click);
            mForm.Controls.Add(mOKButton);

            mForm.AcceptButton = mOKButton;

            mForm.ResumeLayout();
        }
开发者ID:Dashboard-X,项目名称:theme-tune-quiz,代码行数:41,代码来源:GenreSelectorDialog.cs

示例12: Show

        public static Form Show(ILogger log, Form owner)
        {
            Form f = new Form();
            f.Owner = owner;
            f.SuspendLayout();
            LogTextBox box = new LogTextBox();
            box.Dock = DockStyle.Fill;
            box.SetLogText(log);
            box.AttachLog(log);
            f.Controls.Add(box);
            f.ResumeLayout();
            f.StartPosition = FormStartPosition.CenterParent;
            f.FormBorderStyle = FormBorderStyle.SizableToolWindow;
            f.Width = 500;
            f.Height = 300;
            f.Text = "";
            f.Show();
            f.BringToFront();

            return f;
        }
开发者ID:GMTurbo,项目名称:Free-Form-Matcher,代码行数:21,代码来源:LogTextBox.cs

示例13: treeLog_MouseDown

        private void treeLog_MouseDown(object sender, MouseEventArgs e)
        {
            if (ModelingForm ==null)
            {
                if (e.Button == MouseButtons.Middle)
                {
                    TreeNode node = treeLog.GetNodeAt(e.X, e.Y);
                    if (node != null && node.Parent == null)
                    {
                        treeLog.SelectedNode = node;
                        CSMEvent tag = (CSMEvent)node.Tag;
                        ModelingForm = new Form();
                        ModelingForm.SuspendLayout();
                        ModelingForm.StartPosition = FormStartPosition.Manual;
                        ModelingForm.Left = Cursor.Position.X + 5;
                        ModelingForm.Top = Cursor.Position.Y + 5;
                        ModelingForm.Width = 0;
                        ModelingForm.Height = 0;
                        ModelingForm.FormBorderStyle = FormBorderStyle.None;
                        ModelingForm.Name = "frmModeling";
                        ModelingForm.BackColor = System.Drawing.Color.LightGray;
                        RichTextBox eee = new RichTextBox();
                        eee.Margin = new System.Windows.Forms.Padding(0);
                        eee.Font = new System.Drawing.Font("Calibri", 10);
                        eee.Multiline = true;
                        eee.ReadOnly = true;
                        eee.Text = tag.eventInfo.Modeling;
                        int globalindex = 0;
                        foreach (string line in eee.Lines)
                        {
                            int index = line.IndexOf(" = ", 0);
                            if (index > -1)
                            {
                                eee.SelectionStart = globalindex + index + 3;
                                eee.SelectionLength = line.Length - index-3;
                                eee.SelectionFont = new System.Drawing.Font(eee.Font, FontStyle.Bold);
                            }
                            globalindex += line.Length+1;
                        }
                        if (tag.eventInfo.SGCID != default(string))
                        {
                            eee.SelectionStart = 0;
                            eee.SelectionLength = 0;
                            eee.SelectionFont = new System.Drawing.Font(eee.Font, FontStyle.Bold);
                            eee.SelectedText = String.Format("SGCID: {0}{1}", tag.eventInfo.SGCID, Environment.NewLine);
                        }
                        if (tag.eventInfo.PGCID != default(string))
                        {
                            eee.SelectionStart = 0;
                            eee.SelectionLength = 0;
                            eee.SelectionFont = new System.Drawing.Font(eee.Font, FontStyle.Bold);
                            eee.SelectedText = String.Format("PGCID: {0}{1}", tag.eventInfo.PGCID, Environment.NewLine);
                        }
                        if (tag.eventInfo.CGCID != default(string))
                        {
                            eee.SelectionStart = 0;
                            eee.SelectionLength = 0;
                            eee.SelectionFont = new System.Drawing.Font(eee.Font, FontStyle.Bold);
                            eee.SelectedText = String.Format("CGCID: {0}{1}", tag.eventInfo.CGCID, Environment.NewLine);
                        }
                        //Monitor
                        eee.SelectionStart = 0;
                        eee.SelectionLength = 0;
                        eee.SelectionFont = new System.Drawing.Font(eee.Font, FontStyle.Bold);
                        eee.SelectedText = String.Format("Monitor: {0}{1}", tag.Monitor, Environment.NewLine);
                        //Event
                        eee.SelectionStart = 0;
                        eee.SelectionLength = 0;
                        eee.SelectionFont = new System.Drawing.Font(eee.Font, FontStyle.Bold);
                        eee.SelectedText = String.Format("Event: {0}{1}", tag.eventInfo.Type, Environment.NewLine);

                        eee.Size = eee.PreferredSize;
                        ModelingForm.Controls.AddRange(new Control[] {eee});
                        ModelingForm.AutoSize = true;
                        ModelingForm.Show(this);
                        ModelingForm.ResumeLayout();
                    }
                }
                else if (e.Button == MouseButtons.Right)
                {
                    TreeNode node = treeLog.GetNodeAt(e.X, e.Y);
                    if (node != null && node.Parent == null)
                    {
                        treeLog.SelectedNode = node;
                        string result = (node.Text + Environment.NewLine).TrimStart();
                        foreach (TreeNode inode in node.Nodes)
                        {
                            result += "    " + inode.Text + Environment.NewLine;
                        }
                        Clipboard.SetText(result);
                    }
                }
            }
            else
            {
                ModelingForm.Close();
                ModelingForm = null;
            }
        }
开发者ID:sshishov,项目名称:CSMDevHelper,代码行数:99,代码来源:frmCSMDH.cs

示例14: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     if (ModelingForm == null)
     {
         ModelingForm = new Form();
         ModelingForm.StartPosition = FormStartPosition.Manual;
         ModelingForm.Left = Cursor.Position.X + 5;
         ModelingForm.Top = Cursor.Position.Y + 5;
         ModelingForm.FormBorderStyle = FormBorderStyle.Sizable;
         ModelingForm.Name = "frmModeling";
         ModelingForm.BackColor = System.Drawing.Color.LightGray;
         RichTextBox eee = new RichTextBox();
         eee.Margin = new System.Windows.Forms.Padding(0);
         eee.Font = new System.Drawing.Font("Calibri", 10);
         eee.Multiline = true;
         eee.ReadOnly = true;
         TabControl tbc = new TabControl();
         SplitContainer sc = new SplitContainer();
         TableLayoutPanel tbl = new TableLayoutPanel();
         Button b = new Button();
         b.Text = "Hello";
         b.Dock = DockStyle.Fill;
         tbl.Controls.Add(b, 0, 0);
         tbl.Controls.Add(new Button(), 0, 1);
         tbl.Controls.Add(new Button(), 0, 2);
         tbl.Controls.Add(new Button(), 0, 3);
         tbl.AutoSize = true;
         TableLayoutPanel tbl2 = new TableLayoutPanel();
         b = new Button();
         b.Text = "Hello";
         tbl2.Controls.Add(b, 0, 0);
         tbl2.Controls.Add(new Button(), 0, 1);
         tbl2.Controls.Add(new Button(), 0, 2);
         tbl2.Controls.Add(new Button(), 0, 3);
         tbl2.AutoSize = true;
         tbl2.SuspendLayout();
         tbl.SuspendLayout();
         sc.Panel2.Controls.Add(tbl2);
         sc.Panel1.Controls.Add(tbl);
         sc.Panel1.AutoSize = true;
         sc.AutoSize = true;
         tbl2.ResumeLayout();
         tbl.ResumeLayout();
         sc.BorderStyle = BorderStyle.Fixed3D;
         sc.AutoSize = true;
         string aaa = @"
     ================================================================
     MainCallEndByExtension - sCallIDTelSys = 9D1CE0BF47B8039EDB48 :
      byCallType = INTERNAL
      sDeviceExtension = 3312
      sDeviceDistantOptional =
      sDeviceExtLst =
      bIncludeDistConnectnsFromToDevIfInternal = True
      bSearchConnctnsForwards = False
      bOnlyConsiderNonAnsweredGroupCalls = False
      ppMainCallIDsDeleted =
     ================================================================
     DevCallConnctnDelete - sCallIDTelSys = 9D1CE0BF47B8039EDB48 :
      sDevice = [CONF]
      sCallIDTelSys = 9D1CE0BF47B8039EDB48
      sDeviceDistantEnd = 3312
      bUseDistantEndAlsoIfUsingCallID = True
      bCallInInfoOverride = False
      sCallInInfoGrp =
      sCallInInfoDDIDigits =
      bIgnoreNonCallConnections = True
      bSearchForwards = False
      bSearchAllCallConnections = True
      bClearByDevFirstRung = False
      bClearDistantEndConnectionIfFlagsMatch = False
      iClearDistantEndConnectionIfFlagsMatch = 0
      bDoNotAttemptOnHookCalculation = False
     ================================================================
     DevCallConnctnDelete - sCallIDTelSys = 9D1CE0BF47B8039EDB48 :
      sDevice = 3312
      sCallIDTelSys = 9D1CE0BF47B8039EDB48
      sDeviceDistantEnd =
      bUseDistantEndAlsoIfUsingCallID = False
      bCallInInfoOverride = False
      sCallInInfoGrp =
      sCallInInfoDDIDigits =
      bIgnoreNonCallConnections = True
      bSearchForwards = False
      bSearchAllCallConnections = True
      bClearByDevFirstRung = False
      bClearDistantEndConnectionIfFlagsMatch = False
      iClearDistantEndConnectionIfFlagsMatch = 0
      bDoNotAttemptOnHookCalculation = False
     ================================================================
     MainCallEndByExtension - sCallIDTelSys = 9D1CE0BF47B8039EDB48 :
      byCallType = INTERNAL
      sDeviceExtension = 3321
      sDeviceDistantOptional =
      sDeviceExtLst =
      bIncludeDistConnectnsFromToDevIfInternal = True
      bSearchConnctnsForwards = False
      bOnlyConsiderNonAnsweredGroupCalls = False
      ppMainCallIDsDeleted =
     ================================================================
     DevCallConnctnDelete - sCallIDTelSys = 9D1CE0BF47B8039EDB48 :
//.........这里部分代码省略.........
开发者ID:sshishov,项目名称:CSMDevHelper,代码行数:101,代码来源:frmCSMDH.cs

示例15: bug_82326

		public void bug_82326 ()
		{
			using (Form f = new Form ()) {
				DataGridView _dataGrid;
				DataGridViewTextBoxColumn _column;

				_dataGrid = new DataGridView ();
				_column = new DataGridViewTextBoxColumn ();
				f.SuspendLayout ();
				((ISupportInitialize)(_dataGrid)).BeginInit ();
				// 
				// _dataGrid
				// 
				_dataGrid.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
				_dataGrid.Columns.Add (_column);
				_dataGrid.RowTemplate.Height = 21;
				_dataGrid.Location = new Point (12, 115);
				_dataGrid.Size = new Size (268, 146);
				_dataGrid.TabIndex = 0;
				// 
				// _column
				// 
				_column.HeaderText = "Column";
				// 
				// MainForm
				// 
				f.ClientSize = new Size (292, 273);
				f.Controls.Add (_dataGrid);
				((ISupportInitialize)(_dataGrid)).EndInit ();
				f.ResumeLayout (false);
				f.Load += delegate (object sender, EventArgs e) { ((Control)sender).FindForm ().Close (); };

				Application.Run (f);
			}
		}
开发者ID:vnan122,项目名称:mono,代码行数:35,代码来源:DataGridViewTest.cs


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