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


C# Control.ResumeLayout方法代码示例

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


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

示例1: ResumeDrawing

        private static void ResumeDrawing(Control parent)
        {
            parent.ResumeLayout();
            SendMessage(parent.Handle, WM_SETREDRAW, true, 0);

            // Force redraw of control now
            parent.Refresh();
        }
开发者ID:rjch-au,项目名称:WSUSAdminAssistant,代码行数:8,代码来源:frmMain.cs

示例2: AddToContainer

        // INTERFACE FUNCTIONS
        public void AddToContainer(Control container)
        {
            container.SuspendLayout();

            AddControlsToContainer(container);

            container.ResumeLayout(false);
            container.PerformLayout();
        }
开发者ID:Rabadash8820,项目名称:HardyWeinberg,代码行数:10,代码来源:ControlPrefab.cs

示例3: SuspendLayout

 public static void SuspendLayout(Control control, Action action)
 {
     control.SuspendLayout();
     try
     {
         action();
     } 
     finally
     {
         control.ResumeLayout();
     }
 }
开发者ID:dirkrombauts,项目名称:SirenOfShame,代码行数:12,代码来源:ControlHelpers.cs

示例4: CreateLayout

 public int CreateLayout(string LayoutFileName, Control rootPanel)
 {
     int height = 0;
     List<Control> controlList = new List<Control>();
     XmlReaderSettings settings = new XmlReaderSettings {
         IgnoreComments = true,
         IgnoreWhitespace = true
     };
     XmlReader xReader = null;
     try
     {
         xReader = XmlReader.Create(LayoutFileName, settings);
         rootPanel.SuspendLayout();
         bool flag = false;
         while (xReader.Read())
         {
             if ((xReader.NodeType == XmlNodeType.Element) & (xReader.LocalName == "layout"))
             {
                 flag = true;
                 if (xReader.GetAttribute("UseDefaultSize") == "True")
                 {
                     Size size = new Size(xReader.GetAttribute("Size"));
                     height = size.Height;
                 }
             }
             else if (flag)
             {
                 this.doCreateLayout(xReader, controlList);
             }
         }
     }
     catch (XmlException exception)
     {
         NaccsException exception2 = new NaccsException(MessageKind.Error, 0x1f8, exception.Message);
         throw exception2;
     }
     catch (Exception exception3)
     {
         NaccsException exception4 = new NaccsException(MessageKind.Error, 510, exception3.Message);
         throw exception4;
     }
     finally
     {
         rootPanel.Controls.AddRange(controlList.ToArray());
         rootPanel.ResumeLayout(true);
         if (xReader != null)
         {
             xReader.Close();
         }
     }
     return height;
 }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:52,代码来源:LayoutGenerator.cs

示例5: InitBorderTitle

        public static void InitBorderTitle(this Control ctrl, Window window, Control child)
        {
            if (window is ActiveWindow)
            {
                ActiveWindow wnd = (ActiveWindow)window;
                if (ctrl.Controls.ContainsKey("LabelTitle")) ctrl.Controls.RemoveByKey("LabelTitle");
                if (wnd.BorderVisible)
                {
                    ctrl.SuspendLayout();
                    child.SuspendLayout();
                    child.Left += wnd.BorderWidth;
                    child.Width -= wnd.BorderWidth << 1;
                    child.Height -= wnd.BorderWidth;

                    System.Windows.Forms.Label title = new System.Windows.Forms.Label();
                    title.AutoSize = false;
                    title.Name = "LabelTitle";
                    title.BackColor = wnd.BorderColorFrienly;
                    title.Font = new Font(wnd.TitleFont, wnd.TitleSize);
                    title.ForeColor = wnd.TitleColorFrienly;
                    title.Text = wnd.TitleText;
                    title.Left = wnd.BorderWidth;
                    title.Top = 0;
                    using (Graphics g = title.CreateGraphics())
                    {
                        title.Size = g.MeasureString(wnd.TitleText, title.Font).ToSize();
                    }
                    title.Width = child.Width;
                    title.AutoEllipsis = true;
                    title.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

                    ctrl.Controls.Add(title);
                    if (title.Height == 0)
                    {
                        child.Top += wnd.BorderWidth;
                        child.Height -= wnd.BorderWidth;
                    }
                    else
                    {
                        child.Top += title.Height;
                        child.Height -= title.Height;
                    }

                    ctrl.BackColor = wnd.BorderColorFrienly;
                    child.ResumeLayout();
                    ctrl.ResumeLayout();
                    title.Invalidate();
                }
                ctrl.Text = wnd.TitleText;
            }
        }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:51,代码来源:ControlExt.cs

示例6: PluginTabPage

        public PluginTabPage(PluginInfo pluginInfo, Control plugin, PluginTabPage parentTab)
            : base(pluginInfo.Name)
        {
            plugin.SuspendLayout();
            plugin.Dock = DockStyle.Fill;

            Info = pluginInfo;
            Plugin = plugin;
            FromTab = parentTab;

            Controls.Add(plugin);
            Name = pluginInfo.Name;
            plugin.ResumeLayout();
        }
开发者ID:beyastard,项目名称:XTools,代码行数:14,代码来源:PluginTabPage.cs

示例7: Sinalizar

        public static void Sinalizar(Control hospedeiro)
        {
            SinalizaçãoAcertado sinalização = new SinalizaçãoAcertado();

            sinalização.Location = new Point((hospedeiro.ClientSize.Width - sinalização.Width) / 2, (hospedeiro.ClientSize.Height - sinalização.Height) / 2);

            hospedeiro.SuspendLayout();
            hospedeiro.Controls.Add(sinalização);
            hospedeiro.Visible = true;
            sinalização.BringToFront();
            hospedeiro.ResumeLayout();

            hospedeiro.Resize += new EventHandler(sinalização.Reposicionar);
        }
开发者ID:andrepontesmelo,项目名称:imjoias,代码行数:14,代码来源:SinalizaçãoAcertado.cs

示例8: TKWindow

        public TKWindow(Size displayDimensions, GlyphPalette palette, Control context)
            : base(displayDimensions, palette)
        {
            if (context == null)
            {
                form = new TKForm();
                form.ClientSize = displayDimensions;
                form.FormClosing += new FormClosingEventHandler(Form_FormClosing);
                form.Show();

                context = form;
            }

            context.SuspendLayout();
            Control.Dock = DockStyle.Fill;
            Control.BackColor = Color.Blue;
            Control.VSync = false;
            Control.Resize += new EventHandler(Control_Resize);
            Control.Paint += new PaintEventHandler(Control_Paint);

            Control.Location = new Point(0, 0);
            Control.Size = context.ClientSize;

            context.Controls.Add(Control);
            context.ResumeLayout(false);

            paletteId = GL.GenTexture();
            Bitmap bmp = palette.SourceBitmap;
            GL.BindTexture(TextureTarget.Texture2D, paletteId);
            BitmapData bmp_data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);

            GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, bmp_data.Width, bmp_data.Height, 0,
                OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, bmp_data.Scan0);

            bmp.UnlockBits(bmp_data);

            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);

            base.Resize += new EmptyDelegate(TKWindow_Resize);
            this.WindowSize = Control.Size;

            GL.ClearColor(0.1f, 0.2f, 0.5f, 0.0f);
            GL.Disable(EnableCap.DepthTest);
            GL.Disable(EnableCap.CullFace);
        }
开发者ID:eropple,项目名称:sharplike,代码行数:46,代码来源:TKWindow.cs

示例9: AddFilterControl

 private void AddFilterControl(Control filterControl)
 {
     filterControl.SuspendLayout();
     UserControl userControl = filterControl as UserControl;
     if (userControl != null)
     {
         BasicFormLocalizer argument = SettingsManager.GetArgument<BasicFormLocalizer>(ArgumentKey.FormLocalizer);
         if (argument != null)
         {
             argument.Localize(userControl);
         }
     }
     filterControl.Margin = new Padding(0);
     if (filterControl is IFilterControl)
     {
         this.InitializeFilterControl((IFilterControl) filterControl);
     }
     filterControl.ResumeLayout();
     this.flpFilters.Controls.Add(filterControl);
     this.flpFilters.Controls.SetChildIndex(this.tsNewCondition, this.flpFilters.Controls.Count);
     this.tsNewCondition.TabIndex = this.flpFilters.Controls.Count - 1;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:22,代码来源:ContainerFilterControl.cs

示例10: Bug82805

		public void Bug82805 ()
		{
			Control c1 = new Control ();
			c1.Size = new Size (100, 100);
			Control c2 = new Control ();
			c2.Size = new Size (100, 100);

			c2.SuspendLayout ();
			c1.Anchor = AnchorStyles.Left | AnchorStyles.Right;
			c2.Controls.Add (c1);
			c2.Size = new Size (200, 200);
			c2.ResumeLayout ();

			Assert.AreEqual (200, c1.Width, "A1");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:15,代码来源:DefaultLayoutTest.cs

示例11: DeserializeWindowXML


//.........这里部分代码省略.........
                    currentXmlNode = doc.FirstChild;
                }
                else
                {
                    currentXmlNode = parentXMLNode;
                }
                baseFrame.Controls.Clear();
                if (currentXmlNode.Name == FormDesignerConstants.BaseWindow)
                {
                    // loading node attributes
                    UpdateControlProperties(baseFrame, currentXmlNode);
                }
                //Iterate all nodes

                foreach (XmlNode xmlNode in currentXmlNode.ChildNodes)
                {
                    if (xmlNode.NodeType == XmlNodeType.Element)
                    {
                        if (xmlNode.Name == FormDesignerConstants.NodeControl)
                        {
                            EIBNode.counter++;

                            EIBNode eibNode = new EIBNode();
                            UpdateControlProperties(eibNode, xmlNode);
                            eibNode.nodeIdText.Text = xmlNode.Attributes["id"].Value.ToString();
                            eibNode.startNodeCheck.Checked = (xmlNode.Attributes["isstart"].Value.ToLower().Equals("true"));
                           // baseFrame.Controls.Add(eibNode);
                            listNode.Add(eibNode.nodeIdText.Text, eibNode);
                            //EIBNode newNode = new EIBNode();
                           // UpdateControlProperties(newNode, xmlNode);
                           // newNode.nodeIdText.Text = xmlNode["workflownode"].Attributes["id"].Value.ToString();
                           // newNode.startNodeCheck.Checked = (xmlNode["workflownode"].Attributes["isstart"].Value.ToLower().Equals("true"));
                            //XmlNode xmlWorkFlowNode = getXMLNodeWithName(xmlNode,"workflownode")
                            //xmlNode[
                            eibNode.WorkFlowNode= Desearializeworkflownodexml(xmlNode);
                            eibNode.workflowNode.WorkFlowNodeId = eibNode.nodeIdText.Text;
                            eibNode.nodeIdText.Enabled = false;
                            ((BaseWindow)baseFrame.Parent).WorkflowNodes.Add(eibNode.workflowNode.WorkFlowNodeId, eibNode);
                            baseFrame.Controls.Add(eibNode);

                        }
                        if (xmlNode.Name == "connector")
                        {
                            try
                            {
                                //EIBNodeConnector.counter++;
                                EIBNodeConnector newNode = new EIBNodeConnector();
                                XmlNode xmlNodeconnector = xmlNode;
                                UpdateControlProperties(newNode, xmlNodeconnector);
                                XmlNode connectorNode = xmlNodeconnector;
                                //XmlNode fromNodeName = connectorNode["from"].Attributes["id"];
                                //XmlNode toNodeName = connectorNode["to"].Attributes["id"];
                                string fromNodeName = connectorNode["from"].Attributes["id"].Value;
                                string toNodeName = connectorNode["to"].Attributes["id"].Value;
                                EIBNode fromNode = listNode[fromNodeName];
                                EIBNode toNode = listNode[toNodeName];
                                Graphics g = null;
                                Bitmap bmpBack = new Bitmap(baseFrame.Width, baseFrame.Height);
                                Graphics.FromImage(bmpBack).Clear(baseFrame.BackColor);
                                baseFrame.BackgroundImage = (Bitmap)bmpBack.Clone();
                                g = Graphics.FromImage(baseFrame.BackgroundImage);
                                int centerMarkX = (fromNode.Center.X + toNode.Center.X) / 2;
                                int centerMarkY = (fromNode.Center.Y + toNode.Center.Y) / 2;
                                newNode.centerMark.Location = new Point(centerMarkX - 4, centerMarkY - 4);
                                newNode.InitiateSettings((EIBPanel)baseFrame);
                                newNode.Mark1 = fromNode;
                                newNode.Mark2 = toNode;
                                newNode.createLine();
                                baseFrame.Controls.Add(newNode.centerMark);
                                g.DrawLine(new Pen(Color.RoyalBlue, (float)2), fromNode.Center.X, fromNode.Center.Y, centerMarkX, centerMarkY);
                                g.DrawLine(new Pen(Color.RoyalBlue, (float)2), toNode.Center.X, toNode.Center.Y, centerMarkX, centerMarkY);
                                baseFrame.Controls.Add(newNode);
                            }
                            catch (Exception ex)
                            {
                                MessageBox.Show("Connector xml Modified.");
                            }
                        }
                     }
                }
                //Iterate all nodes connector
                /*foreach (XmlNode xmlNodeconnector in currentXmlNode.ChildNodes)
                {
                    if (xmlNodeconnector.NodeType == XmlNodeType.Element)
                    {

                    }
                 }*/
            }
            catch (FileNotFoundException)
            {
                MessageBox.Show("Basewindow.xml not Found");
            }
            finally
            {
                baseFrame.ResumeLayout();
                // enabling redrawing of treeview after all nodes are added
                baseFrame.Invalidate();
            }
        }
开发者ID:harpreetoxyent,项目名称:pnl,代码行数:101,代码来源:WorkflowDeserializeServices.cs

示例12: DoLayout

 /**
  * Copy Visual Studio's layout semantics.
  */
 public static void DoLayout(Control parent)
 {
     DoDeepLayout(parent);
     parent.ResumeLayout(false);
 }
开发者ID:numerodix,项目名称:solarbeam,代码行数:8,代码来源:Layouting.cs

示例13: ResumeAllLayout

 private void ResumeAllLayout(Control start, bool performLayout)
 {
     Control.ControlCollection controls = start.Controls;
     for (int i = 0; i < controls.Count; i++)
     {
         this.ResumeAllLayout(controls[i], performLayout);
     }
     start.ResumeLayout(performLayout);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:ToolStripSettingsManager.cs

示例14: ApplyControlResources

		/// <summary>
		/// Convenience helper method to apply component resources for a top-level <see cref="UserControl"/>
		/// or <see cref="Form"/> and its descendants using the current application UI culture.
		/// </summary>
		/// <param name="control">A top-level <see cref="Control"/> that has an associated resource (RESX) file.</param>
		public static void ApplyControlResources(Control control)
		{
			Platform.CheckForNullReference(control, "control");
			control.SuspendLayout();
			try
			{
				// use the resource manager associated with the control class
				var resourceManager = new ComponentResourceManager(control.GetType());
				var cultureInfo = Application.CurrentUICulture;

				// apply any resources to child controls first
				ApplyChildControlResources(resourceManager, cultureInfo, control);

				// apply the resources associated with ourself using the special key "$this"
				resourceManager.ApplyResources(control, "$this", cultureInfo);
			}
			finally
			{
				control.ResumeLayout(true);
			}
		}
开发者ID:nhannd,项目名称:Xian,代码行数:26,代码来源:LocalizableUserControl.cs

示例15: CallControlResumeLayout

		public static void CallControlResumeLayout(Control c, object[] obj)
		{
			c.ResumeLayout((bool)obj[0]);
		}
开发者ID:HosokawaKenchi,项目名称:powersdr-if-stage,代码行数:4,代码来源:invoke.cs


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