當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.LayoutEventArgs類代碼示例

本文整理匯總了C#中System.Windows.Forms.LayoutEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# LayoutEventArgs類的具體用法?C# LayoutEventArgs怎麽用?C# LayoutEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LayoutEventArgs類屬於System.Windows.Forms命名空間,在下文中一共展示了LayoutEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CGFX_Layout

 private void CGFX_Layout(object sender, LayoutEventArgs e)
 {
     if (ModViewer != null)
     {
         ModViewer.Render();
     }
 }
開發者ID:Ermelber,項目名稱:EveryFileExplorer,代碼行數:7,代碼來源:CGFXViewer.cs

示例2: ValidateForm_Layout

        private void ValidateForm_Layout(object sender, LayoutEventArgs e)
        {
            switch (activeState)
            {
                case "InputFile":
                    xslRadioButton.Enabled = false;
                    break;
                case "XsdFile":
                    xslRadioButton.Enabled = false;
                    againstXSDRadioButton.Enabled = false;
                    break;
            }

            switch (selectedValidationType)
            {
                case "XSL":
                    xslRadioButton.Checked = true;
                    break;
                case "XSD":
                    againstXSDRadioButton.Checked = true;
                    break;
                default:
                    xmlRadioButton.Checked = true;
                    selectedValidationType = "Xml";
                    break;
            }
        }
開發者ID:zippy1981,項目名稱:XmlVisualizerv2,代碼行數:27,代碼來源:ValidateForm.cs

示例3: OnLayout

      protected override void OnLayout(LayoutEventArgs levent)
      {
        try
        {
          DataGridCell currentCell = Grid.CurrentCell;

          if (currentCell.ColumnNumber == Cell)
          {
            DataTable ds = Grid.DataSource as DataTable;
            if (ds != null)
            {
              foreach (string item in Items)
              {
                if (currentCell.RowNumber < ds.Rows.Count)
                {
                  DataRow row = ds.Rows[currentCell.RowNumber];
                  string currentValue = (string)row.ItemArray[Cell];
                  if (currentValue == item)
                  {
                    SelectedItem = item;
                    break;
                  }
                }
              }
            }
          }
          base.OnLayout(levent);
        }
        catch (Exception) {}
      }
開發者ID:arangas,項目名稱:MediaPortal-1,代碼行數:30,代碼來源:GeneralCDSpeed.cs

示例4: InfoForm_Layout

        private void InfoForm_Layout(object sender, LayoutEventArgs e)
        {
            textBoxInfo.Location = new Point(2, 2);
            textBoxInfo.Size = new Size(ClientRectangle.Width - 4, ClientRectangle.Height - buttonOK.Size.Height*2);
            buttonOK.Location = new Point(ClientRectangle.Width - 100, ClientRectangle.Height - buttonOK.Size.Height*3/2);

        }
開發者ID:amatos,項目名稱:EDDiscovery,代碼行數:7,代碼來源:InfoForm.cs

示例5: VKAuth_Layout

 private void VKAuth_Layout(object sender, LayoutEventArgs e)
 {
     webBrowser1.Url = new System.Uri(
         "https://oauth.vk.com/authorize?client_id=5159394&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=friends&response_type=token&v=5.40&scope="
         + Settings.VKscope, System.UriKind.Absolute
     );
 }
開發者ID:skynetxxx,項目名稱:MitroshinVK,代碼行數:7,代碼來源:VKAuth.cs

示例6: AddressTextBox_Layout

 private void AddressTextBox_Layout(object sender, LayoutEventArgs e)
 {
     comboBoxHistory.Parent = this.Parent;
     comboBoxHistory.Location = this.Location;
     comboBoxHistory.Width = this.Width;
     comboBoxHistory.DropDownWidth = comboBoxHistory.Width + 15;
 }
開發者ID:PokeAcer549,項目名稱:geckowii,代碼行數:7,代碼來源:AddressTextBox.cs

示例7: MarathonLayout

        void MarathonLayout(object sender, LayoutEventArgs e)
        {
            scorePanel.SetBounds(5, 5, Width - 10, 40);

            questionPanel.SetBounds(5, 50, (Width - 10) / 2, Height - 50);
            gamePanel.SetBounds((Width / 2)+5, 50, (Width / 2) -10, Height-100);
        }
開發者ID:wichtounet,項目名稱:MarathonMillions,代碼行數:7,代碼來源:Form1.cs

示例8: OnLayout

 protected override void OnLayout(LayoutEventArgs e)
 {
     if ((this.ParentToolStrip != null) && this.ParentToolStrip.IsInDesignMode)
     {
         if (FlowLayout.GetFlowDirection(this) != FlowDirection.TopDown)
         {
             FlowLayout.SetFlowDirection(this, FlowDirection.TopDown);
         }
         if (FlowLayout.GetWrapContents(this))
         {
             FlowLayout.SetWrapContents(this, false);
         }
     }
     else
     {
         if (FlowLayout.GetFlowDirection(this) != FlowDirection.LeftToRight)
         {
             FlowLayout.SetFlowDirection(this, FlowDirection.LeftToRight);
         }
         if (!FlowLayout.GetWrapContents(this))
         {
             FlowLayout.SetWrapContents(this, true);
         }
     }
     base.OnLayout(e);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:26,代碼來源:ToolStripOverflow.cs

示例9: Layout

        /// <summary>
        /// 布局
        /// </summary>
        /// <param name="container">容器</param>
        /// <param name="layoutEventArgs">Layout事件數據</param>
        /// <returns>是否成功 true-是 false-否</returns>
        public override bool Layout(object container, LayoutEventArgs layoutEventArgs)
        {
            Control parent = container as Control;

            Rectangle parentClientRectangle = parent.ClientRectangle;
            Point nextControlLocation = parentClientRectangle.Location;
            int parentWidth = parentClientRectangle.Width;

            foreach (Control c in parent.Controls)
            {
                if (!c.Visible)
                {
                    continue;
                }

                nextControlLocation.Offset(c.Margin.Left, 0);

                c.Location = nextControlLocation;

                if (c.Location.X + c.Width * 2 > parentWidth)
                {
                    nextControlLocation.X = parentClientRectangle.X;
                    nextControlLocation.Y += c.Height;
                }
                else
                {
                    nextControlLocation.X += c.Width;
                }
            }

            return false;
        }
開發者ID:JackWangCUMT,項目名稱:winform-control-lib,代碼行數:38,代碼來源:WSNItemLayoutPanel.cs

示例10: Form1_Layout

 private void Form1_Layout(object sender, LayoutEventArgs e)
 {
     Rect = ClientRectangle;
     Rect.Inflate(-10, -10);
     StrSize = string.Format("폭 = {0}, 높이 = {1}", Rect.Width, Rect.Height);
     Invalidate();
 }
開發者ID:gawallsibya,項目名稱:BIT_MFC-CShap-DotNet,代碼行數:7,代碼來源:Form1.cs

示例11: OnLayout

        protected override void OnLayout(LayoutEventArgs e)
        {
            int offset = AutoScrollPosition.Y;

            foreach (Control control in Controls)
            {
                var size = control.GetPreferredSize(new Size(ClientSize.Width, int.MaxValue));

                control.SetBounds(
                    0,
                    offset,
                    ClientSize.Width,
                    size.Height
                );

                offset += size.Height;
            }

            bool vScroll = VScroll;

            AdjustFormScrollbars(AutoScroll);

            if (vScroll != VScroll)
                BeginInvoke(new Action(PerformLayout));
        }
開發者ID:netide,項目名稱:netide,代碼行數:25,代碼來源:PackageListContainer.cs

示例12: OnLayout

        protected override void OnLayout(LayoutEventArgs levent)
        {
            base.OnLayout(levent);

            // calculate the rectangle we will paint within
            _controlRectangle = new Rectangle(0, 1, Width, Height - 1);

            // calculate the image rectanagle (if we have an image)
            _imageRectangle = Rectangle.Empty;
            if (_image != null)
            {
                int IMAGE_TOP_OFFSET = 3;
                int IMAGE_LEFT_OFFSET = 2;
                _imageRectangle = new Rectangle(IMAGE_LEFT_OFFSET, IMAGE_TOP_OFFSET, _image.Width, _image.Height);
            }

            //calculate the text rectangle
            int TEXT_TOP_OFFSET = 4;
            int TEXT_LEFT_MARGIN = 2;
            int TEXT_LEFT_OFFSET = _imageRectangle.Right + TEXT_LEFT_MARGIN;

            _textRectangle = new Rectangle(TEXT_LEFT_OFFSET, TEXT_TOP_OFFSET, _controlRectangle.Width - TEXT_LEFT_OFFSET, _controlRectangle.Height - TEXT_TOP_OFFSET);

            // make sure the control is repainted
            Invalidate();
        }
開發者ID:gmilazzoitag,項目名稱:OpenLiveWriter,代碼行數:26,代碼來源:HtmlEditorSidebarStatus.cs

示例13: OnLayout

		/// <summary>
		/// See <see cref="Control.OnLayout"/>
		/// </summary>
		protected override void OnLayout(LayoutEventArgs e)
		{
			base.OnLayout(e);
			_caption.Width = Width - 2;
			Padding = new Padding(1, _caption.Height + 2, 1, 1);
			_caption.Top = 1;
		}
開發者ID:rsdn,項目名稱:janus,代碼行數:10,代碼來源:Pane.cs

示例14: SettingsLayout_Layout

 private void SettingsLayout_Layout(object sender, LayoutEventArgs e)
 {
     foreach (UserControl ctrl in SettingsLayout.Controls)
     {
         ctrl.Width = SettingsLayout.Width - 25;
     }
 }
開發者ID:webba,項目名稱:WurmAssistant2,代碼行數:7,代碼來源:EditTrigger.cs

示例15: OnLayout

 protected override void OnLayout(LayoutEventArgs levent)
 {
     labelControl.Location = new Point(WIDTH_PADDING, 8);
     labelControl.Width = Width - WIDTH_PADDING * 2;
     labelControl.Height = Height;
     base.OnLayout(levent);
 }
開發者ID:gmilazzoitag,項目名稱:OpenLiveWriter,代碼行數:7,代碼來源:MessageSidebarControl.cs


注:本文中的System.Windows.Forms.LayoutEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。