Esempio n. 1
0
 public void RemoveChild(string key, dynamic item)
 {
     //table.SuspendLayout();
     base.RemoveChildren(views[key]);
     RemoveFromTable(views[key].Control, () => -- table.RowCount, table.GetRow, table.SetRow);
     views.Remove(key);
     //table.ResumeLayout();
     table.PerformLayout();
 }
Esempio n. 2
0
 public void AddChild(string key, dynamic model)
 {
     //table.SuspendLayout();
     Framework.View control = LuadicrousApplication.ViewFactory.CreateView(LuadicrousApplication.SourceManager.GetView(LuadicrousApplication.GetFileInfo(Template)), key, model);
     views.Add(key, control);
     AddToTable(control.Control);
     base.AddChildren(control);
     //table.ResumeLayout();
     table.PerformLayout();
 }
Esempio n. 3
0
        public void ItemSelect(List <Elem> selected, bool refocus)
        {
            m_selected = selected;

            try
            {
                updating       = true;
                alreadyChanged = false;
                tableLayoutPanel.SuspendLayout();

                labelEditRichEditBox.Reset();
                lexEditRichEditBox.Reset();

                ItemSelectLexEdit();
                ItemSelectNodeEdit(refocus);
                ItemSelectNodeActions();
                ItemSelectTracePane();
            }
            finally
            {
                updating = false;
                tableLayoutPanel.ResumeLayout(true);
                tableLayoutPanel.PerformLayout();
            }
        }
Esempio n. 4
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="FormProcessDisplay" /> class.
        /// </summary>
        /// <param name="windowTitle">The description / form title</param>
        /// <param name="withLoggerDisplay">True if a debug logging windows should be shown</param>
        /// <param name="cancellationToken">The cancellation token.</param>
        public FormProcessDisplay(string windowTitle, bool withLoggerDisplay, CancellationToken cancellationToken)
        {
            CancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
            m_ProcessDisplay        = new ProcessDisplayTime(CancellationTokenSource.Token);
            InitializeComponent();

            m_Title   = windowTitle;
            base.Text = windowTitle;

            Maximum = 0;
            SuspendLayout();
            m_TableLayoutPanel.SuspendLayout();
            if (withLoggerDisplay)
            {
                Height += 100;

                m_LoggerDisplay = new LoggerDisplay {
                    MinLevel = Logger.Level.Debug, Dock = DockStyle.Fill, Multiline = true, TabIndex = 8
                };
                m_TableLayoutPanel.Controls.Add(m_LoggerDisplay, 0, 3);
                m_LoggerDisplay.Dock = DockStyle.Fill;
            }

            m_TableLayoutPanel.ResumeLayout(false);
            m_TableLayoutPanel.PerformLayout();
            ResumeLayout(false);
            PerformLayout();
        }
Esempio n. 5
0
        private void addTimerRow(ref TableLayoutPanel TLP, string boxText, bool relayout)
        {
            if (TLP.RowCount - StaticUtility.visualNonTimerRows >= StaticUtility.maximumRows) //don't let rows add past limit. Minus 1 is for zero index.
            {
                DialogResult result = MessageBox.Show(
                    "Maximum number of timers have been added. Modify the application config file and restart the application to change the maximum rows."
                    , ""
                    , MessageBoxButtons.OK
                    , MessageBoxIcon.Information
                    , MessageBoxDefaultButton.Button1);
                return;
            }

            TLP.SuspendLayout();
            addRow(TLP);
            int cntIx = TLP.RowCount - 1;

            StaticUtility.addLabel(ref TLP, ref tempLabel, theme.defStartBackColor, theme.defStartForeColor, 1, starts_Click, true, true, 0, cntIx);
            tempLabel.Text = "u";
            StaticUtility.addTextBox(ref TLP, ref tempTextBox, theme.defTxtBxBackColor, theme.defTxtBxForeColor, 0, false, false, 2, cntIx);
            tempTextBox.Text = boxText;
            StaticUtility.addLabel(ref TLP, ref tempLabel, theme.defStartBackColor, theme.defStartForeColor, 0, null, true, false, 3, cntIx);
            tempLabel.Text = "00:00:00";
            TLP.ResumeLayout(false);
            if (relayout)
            {
                TLP.PerformLayout();
            }
        }
Esempio n. 6
0
        /// <summary>
        /// <see cref="TableLayoutPanel"/> の内容をクリアする
        /// </summary>
        public void Clear()
        {
            // 対象のTableLayoutPanelコントロール取得
            TableLayoutPanel tablePanel = PlListTable;

            // 描画処理を一時中断
            tablePanel.SuspendLayout();

            try
            {
                // 全てのコントロールをクリア
                // (下からクリアしていく)
                for (int row = tablePanel.RowCount - 1; row > -1; row--)
                {
                    RemoveRow(row, true);
                }

                // 最初の1行目を生成(TableLayoutPanelは0行を認めていないため1行目を生成する)
                tablePanel.RowCount = 1;

                // 行のスタイル設定を初期化(引数にNULLを指定することで初期化を行わせる)
                SetRowStyle(null);
            }
            finally
            {
                // 描画処理を再開
                tablePanel.ResumeLayout(false);
                tablePanel.PerformLayout();
            }
        }
Esempio n. 7
0
        private void removeRow(ref TableLayoutPanel TLP, bool relayout)
        {
            int bottomTimerIndex = returnTmrCnt() - 1;// -1 is to get to active's zero index.

            if (!timerCanBeRemoved())
            {
                return;
            }
            if (bottomTimerIndex == TIMEENGINE.getActiveRow())
            {
                TIMEENGINE.changeActive(-1);              // If the active row is to be removed stop.
            }
            TIMEENGINE.resetTimerValue(bottomTimerIndex); // make sure the removed value is zero. It might not be.
            disUpdTotal(TIMEENGINE.engCalcArrayTotal());  // if you removed an existing row you want to reset the total.

            int bottomRowIndex = baseTLP.RowCount - 1;

            TLP.SuspendLayout();
            Control c = TLP.GetControlFromPosition(0, bottomRowIndex);

            TLP.Controls.Remove(c);
            c.Dispose();
            Control d = TLP.GetControlFromPosition(2, bottomRowIndex);

            TLP.Controls.Remove(d);
            d.Dispose();
            Control e = TLP.GetControlFromPosition(3, bottomRowIndex);

            TLP.Controls.Remove(e);
            e.Dispose();
            TLP.RowStyles.RemoveAt(bottomRowIndex);
            TLP.RowCount--;
            TLP.ResumeLayout(false);
            TLP.PerformLayout();
        }
        public override object CreateControl()
        {
            ParameterPanel panelFalse = new ParameterPanel();
            ParameterPanel panelTrue  = new ParameterPanel();

            panelFalse.Init(SubParamsFalse, ParamNameWidth, (int)TotalWidth);
            panelTrue.Init(SubParamsTrue, ParamNameWidth, (int)TotalWidth);
            CheckBox cb = new CheckBox {
                Checked = Value
            };

            cb.CheckedChanged += (sender, e) => ValueHasChanged();
            TableLayoutPanel tlp = new TableLayoutPanel();

            tlp.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100));
            tlp.RowStyles.Add(new RowStyle(SizeType.Absolute, paramHeight));
            tlp.RowStyles.Add(new RowStyle(SizeType.AutoSize, 100));
            tlp.Controls.Add(cb, 0, 0);
            panelFalse.Visible = !Value;
            panelTrue.Visible  = Value;
            tlp.Controls.Add(panelFalse, 0, 1);
            tlp.Controls.Add(panelTrue, 0, 1);
            cb.CheckedChanged += (sender, e) => {
                panelFalse.Visible = !cb.Checked;
                panelTrue.Visible  = cb.Checked;
                Value = cb.Checked;
            };
            tlp.PerformLayout();
            control = tlp;
            return(control);
        }
Esempio n. 9
0
        //System.Threading.Thread runThis = new System.Threading.Thread(
        //    System.Threading.ThreadStart( Animate ) );

        /*
         * protected void Animate( )
         * {
         *
         * System.Drawing.Image gif = System.Drawing.Image.FromFile( picToDisplay );
         * pixt = System.Drawing.Image.FromFile( picToDisplay );
         * System.IO.MemoryStream ms = null;
         *  try{
         *  while( next < pix.FrameDimensionsList.Length )
         *  {
         *          ms = new System.IO.MemoryStream();
         *          System.Guid imgGuid = pix.FrameDimensionsList[0];
         *          framed = new FrameDimension( imgGuid );
         *          pixt.SelectActiveFrame( framed, next );
         *          pixt.Save( ms, ImageFormat.Gif );
         *          gif = Image.FromStream( ms );
         *          rectangle = ScaleToFit( this.pictureBox.ClientRectangle, gif );
         *          this.pictureBox.Image = new Bitmap( gif, rectangle.Width, rectangle.Height );
         *          next += 1;
         *      }
         *      next = 0;
         * }
         * catch
         * {
         *  ms.Close();
         * }
         * }
         */

        public void _MakePanel()
        {
            this.panel.SuspendLayout();


            //table layout

            this.panel.ColumnCount = 3;
            this.panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 15F));
            this.panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 30F));
            this.panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 30F));
            this.panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 15F));


            this.panel.RowCount = 4;
            this.panel.RowStyles.Add(new RowStyle(SizeType.Percent, 10F));
            this.panel.RowStyles.Add(new RowStyle(SizeType.Percent, 70F));
            this.panel.RowStyles.Add(new RowStyle(SizeType.Percent, 10F));
            this.panel.RowStyles.Add(new RowStyle(SizeType.Percent, 10F));

            //this.panel.Controls.Add( (System.Windows.Forms.TabControl)TabbedView.tabs, 1, 1 );
            this.panel.Controls.Add(this.closeButton, 2, 3);
            //this.panel.Controls.Add( this.tabs, 0, 0 );

            //this.panel.Controls.Add( this.nextButton, 1, 2 );
            //this.panel.Controls.Add( this.prevButton, 1, 2 );

            this.panel.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.panel.Location = new Point(50, 50);
            this.panel.Size     = new Size(800, 650);
            panel.BorderStyle   = (System.Windows.Forms.BorderStyle.Fixed3D);

            panel.ResumeLayout();
            panel.PerformLayout();
        }
Esempio n. 10
0
        public static void RemoveRow(this TableLayoutPanel tableLayoutPanel, int rowNumber)
        {
            ArrayList controls = new ArrayList(tableLayoutPanel.Controls);

            foreach (Control control in controls)
            {
                int row = tableLayoutPanel.GetRow(control);
                if (row == rowNumber)
                {
                    tableLayoutPanel.Controls.Remove(control);
                }
            }
            tableLayoutPanel.RowStyles.RemoveAt(rowNumber);
            foreach (Control control in tableLayoutPanel.Controls)
            {
                int row = tableLayoutPanel.GetRow(control);
                if (row > rowNumber)
                {
                    tableLayoutPanel.SetRow(control, row - 1);
                }
            }
            tableLayoutPanel.PerformLayout();
            tableLayoutPanel.ResumeLayout(true);
            tableLayoutPanel.Refresh();
        }
Esempio n. 11
0
        private void Initialize()
        {
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);

            _tlpMain  = new TableLayoutPanel();
            _ckbHex   = new CheckBox();
            _txtColor = new TextBox();

            _tlpMain.SuspendLayout();
            SuspendLayout();

            //
            // _tlpMain
            //
            _tlpMain.ColumnCount = 2;
            _tlpMain.ColumnStyles.Add(new ColumnStyle());
            _tlpMain.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            _tlpMain.Controls.Add(_ckbHex, 0, 0);
            _tlpMain.Controls.Add(_txtColor, 1, 0);
            _tlpMain.Dock     = DockStyle.Fill;
            _tlpMain.Location = new Point(3, 147);
            _tlpMain.Name     = "_tlpColorInput";
            _tlpMain.RowCount = 1;
            _tlpMain.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
            _tlpMain.Size     = new Size(198, 34);
            _tlpMain.TabIndex = 1;
            //
            // _ckbHex
            //
            _ckbHex.AutoSize = true;
            _ckbHex.Location = new Point(3, 3);
            _ckbHex.Name     = "_ckbHex";
            _ckbHex.Size     = new Size(48, 21);
            _ckbHex.TabIndex = 0;
            _ckbHex.Text     = @"Hex";
            _ckbHex.UseVisualStyleBackColor = true;
            //
            // _txtColor
            //
            _txtColor.Dock         = DockStyle.Fill;
            _txtColor.Location     = new Point(57, 3);
            _txtColor.Name         = "_txtColor";
            _txtColor.Size         = new Size(138, 25);
            _txtColor.TabIndex     = 1;
            _txtColor.TextChanged += TxtColor_TextChanged;

            //
            // This Control
            //
            BackColor = Color.Transparent;
            Controls.Add(_tlpMain);
            Font   = new Font("Segoe UI Light", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 0);
            Margin = new Padding(3, 4, 3, 4);
            Name   = "ColorEditor";

            _tlpMain.ResumeLayout(false);
            _tlpMain.PerformLayout();
            ResumeLayout(false);
        }
            private void InitializeComponent()
            {
                var manager = new ComponentResourceManager(Type.GetType("System.Windows.Forms.Design.StringCollectionEditor, System.Design"));

                instruction              = new KryptonLabel();
                textEntry                = new KryptonTextBox();
                okButton                 = new KryptonButton();
                cancelButton             = new KryptonButton();
                okCancelTableLayoutPanel = new TableLayoutPanel();
                okCancelTableLayoutPanel.SuspendLayout();
                SuspendLayout();
                manager.ApplyResources(instruction, "instruction");
                instruction.Margin = new Padding(3, 1, 3, 0);
                instruction.Name   = "instruction";
                if (editor.InstructionText != null)
                {
                    instruction.Text = editor.InstructionText;
                }
                textEntry.AcceptsTab    = true;
                textEntry.AcceptsReturn = true;
                manager.ApplyResources(textEntry, "textEntry");
                textEntry.Name = "textEntry";
                manager.ApplyResources(okButton, "okButton");
                okButton.DialogResult = DialogResult.OK;
                okButton.Margin       = new Padding(0, 0, 3, 0);
                okButton.Name         = "okButton";
                manager.ApplyResources(cancelButton, "cancelButton");
                cancelButton.DialogResult = DialogResult.Cancel;
                cancelButton.Margin       = new Padding(3, 0, 0, 0);
                cancelButton.Name         = "cancelButton";
                manager.ApplyResources(okCancelTableLayoutPanel, "okCancelTableLayoutPanel");
                okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
                okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
                okCancelTableLayoutPanel.Controls.Add(okButton, 0, 0);
                okCancelTableLayoutPanel.Controls.Add(cancelButton, 1, 0);
                okCancelTableLayoutPanel.Name = "okCancelTableLayoutPanel";
                okCancelTableLayoutPanel.RowStyles.Add(new RowStyle());
                manager.ApplyResources(this, "$this");
                AutoScaleMode = AutoScaleMode.Font;
                Controls.Add(okCancelTableLayoutPanel);
                Controls.Add(instruction);
                Controls.Add(textEntry);
                HelpButton    = true;
                MaximizeBox   = false;
                MinimizeBox   = false;
                Name          = "StringCollectionEditor";
                ShowIcon      = false;
                ShowInTaskbar = false;
                if (editor.FormTitle != null)
                {
                    Text = editor.FormTitle;
                }
                okCancelTableLayoutPanel.ResumeLayout(false);
                okCancelTableLayoutPanel.PerformLayout();
                HelpRequested += Form_HelpRequested;
                ResumeLayout(false);
                PerformLayout();
            }
Esempio n. 13
0
        /// <summary>
        /// <see cref="TableLayoutPanel"/> の指定の行を削除する
        /// </summary>
        /// <param name="removeRowIndex">
        /// 削除対象の行インデックス
        /// (引数の削除対象行の指定が0未満 または、
        ///  最大行数を超えている場合、削除対象なしとして処理を終了する)
        /// </param>
        public void Remove(int removeRowIndex)
        {
            // 対象のTableLayoutPanelコントロール取得
            TableLayoutPanel tablePanel = PlListTable;

            // 引数の削除対象行の指定が0未満 又は、最大行数を超えている場合、
            // 削除対象なしとして処理を終了する
            if (removeRowIndex < 0 || removeRowIndex >= tablePanel.RowCount)
            {
                return;
            }

            // 描画処理を一時中断
            tablePanel.SuspendLayout();

            try
            {
                // 現状の行数とカラム数を取得
                int beforeRowCount = tablePanel.RowCount;

                // 削除対象行のコントロールを削除
                RemoveRow(removeRowIndex, true);

                // 削除対象行より先の行のコントロールを一つ上に移動させる
                for (int row = removeRowIndex + 1; row < beforeRowCount; row++)
                {
                    MoveRow(
                        toRowIndex: row - 1,
                        getControl: (column) => tablePanel.GetControlFromPosition(column, row));
                }

                // 行カウントを減らす
                // (TableLayoutPanelの仕様上、1未満にはならないよう制御する)
                tablePanel.RowCount = beforeRowCount <= 1 ? 1 : beforeRowCount - 1;

                // 行スタイルを削除する
                // (TableLayoutPanelの仕様上、1未満にはならないよう制御する)
                if (removeRowIndex < tablePanel.RowStyles.Count)
                {
                    tablePanel.RowStyles.RemoveAt(removeRowIndex);
                    if (tablePanel.RowStyles.Count == 0)
                    {
                        tablePanel.RowStyles.Add(new RowStyle());
                    }
                }

                // Tabインデックスの再設定を行う
                SetTabIndex();
            }
            finally
            {
                // 描画処理を再開
                tablePanel.ResumeLayout(false);
                tablePanel.PerformLayout();
            }
        }
Esempio n. 14
0
        private void InitializeComponent()
        {
            int i = -1;

            m_container      = new TableLayoutPanel();
            m_container.Dock = DockStyle.Fill;

            this.SuspendLayout();

            m_container.SuspendLayout();

            m_container.ColumnCount = 1;
            m_container.RowCount    = ROW_COUNT;

            for (i = 0; i < m_container.ColumnCount; i++)
            {
                m_container.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));
            }

            for (i = 0; i < m_container.RowCount; i++)
            {
                m_container.RowStyles.Add(new RowStyle(SizeType.Percent, 100 / ROW_COUNT));
            }

            if (!(m_label == null))
            {
                m_label.ForeColor = Color.Red;
                m_label.TextAlign = ContentAlignment.MiddleCenter;
                m_label.Padding   = new System.Windows.Forms.Padding(1, 1, 1, 1);
                m_label.Dock      = DockStyle.Fill;

                m_container.Controls.Add(m_label, 0, 0);
                this.m_container.SetColumnSpan(m_label, 1); this.m_container.SetRowSpan(m_label, 1);
            }
            else
            {
                ;
            }

            m_container.ResumeLayout(false);
            m_container.PerformLayout();

            m_container.Location  = new Point(1, 1);
            this.m_container.Size = new System.Drawing.Size(this.Width - 6, this.Height - this.m_statusStripMain.Height - 26); //26 - высота главного меню
            m_container.Anchor    = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                           | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
            this.Controls.Add(m_container);

            this.ResumeLayout(false);
            this.PerformLayout();

            this.Load        += new EventHandler(FormMainFloat_Load);
            this.FormClosing += new FormClosingEventHandler(FormMainFloat_FormClosing);
        }
Esempio n. 15
0
        private void InitializeComponent()
        {
            tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            label1            = new System.Windows.Forms.Label();
            button1           = new System.Windows.Forms.Button();
            tableLayoutPanel1.SuspendLayout();
            SuspendLayout();
            tableLayoutPanel1.ColumnCount = 3;
            tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15f));
            tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 70f));
            tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15f));
            tableLayoutPanel1.Controls.Add(label1, 1, 1);
            tableLayoutPanel1.Controls.Add(button1, 1, 2);
            tableLayoutPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            tableLayoutPanel1.Name     = "tableLayoutPanel1";
            tableLayoutPanel1.RowCount = 3;
            tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15f));
            tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 35f));
            tableLayoutPanel1.Size     = new System.Drawing.Size(332, 155);
            tableLayoutPanel1.TabIndex = 0;
            label1.Anchor    = (System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            label1.AutoSize  = true;
            label1.Location  = new System.Drawing.Point(52, 23);
            label1.Name      = "label1";
            label1.Size      = new System.Drawing.Size(226, 77);
            label1.TabIndex  = 0;
            label1.Text      = "";
            button1.Dock     = System.Windows.Forms.DockStyle.Fill;
            button1.Location = new System.Drawing.Point(79, 110);
            button1.Margin   = new System.Windows.Forms.Padding(30, 11, 30, 11);
            button1.Name     = "button1";
            button1.Size     = new System.Drawing.Size(172, 35);
            button1.TabIndex = 1;
            button1.Text     = "确定";
            button1.UseVisualStyleBackColor = true;
            button1.Click           += new System.EventHandler(button1_Click);
            base.AutoScaleDimensions = new System.Drawing.SizeF(8f, 15f);
            base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            base.ClientSize          = new System.Drawing.Size(200, 130);
            base.ControlBox          = false;
            base.Controls.Add(tableLayoutPanel1);
            base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
            base.Name            = "MessageBox";
            base.ShowIcon        = false;
            base.ShowInTaskbar   = false;
            base.StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
            Text = "";

            tableLayoutPanel1.ResumeLayout(false);
            tableLayoutPanel1.PerformLayout();
            ResumeLayout(false);
        }
Esempio n. 16
0
 private void InitializeComponent()
 {
     tableLayoutPanel1  = new System.Windows.Forms.TableLayoutPanel();
     SpinningWheelPanel = new System.Windows.Forms.Panel();
     PictSpinningWheel  = new System.Windows.Forms.PictureBox();
     LblLoading         = new System.Windows.Forms.Label();
     tableLayoutPanel1.SuspendLayout();
     SpinningWheelPanel.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)PictSpinningWheel).BeginInit();
     SuspendLayout();
     tableLayoutPanel1.AutoSize    = true;
     tableLayoutPanel1.ColumnCount = 2;
     tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 52f));
     tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100f));
     tableLayoutPanel1.Controls.Add(SpinningWheelPanel, 0, 0);
     tableLayoutPanel1.Controls.Add(LblLoading, 1, 0);
     tableLayoutPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
     tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
     tableLayoutPanel1.Name     = "tableLayoutPanel1";
     tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20f));
     tableLayoutPanel1.Size     = new System.Drawing.Size(241, 134);
     tableLayoutPanel1.TabIndex = 0;
     SpinningWheelPanel.Controls.Add(PictSpinningWheel);
     SpinningWheelPanel.Dock     = System.Windows.Forms.DockStyle.Fill;
     SpinningWheelPanel.Location = new System.Drawing.Point(3, 3);
     SpinningWheelPanel.Name     = "SpinningWheelPanel";
     SpinningWheelPanel.Size     = new System.Drawing.Size(46, 128);
     SpinningWheelPanel.TabIndex = 1;
     PictSpinningWheel.Location  = new System.Drawing.Point(3, 49);
     PictSpinningWheel.Name      = "PictSpinningWheel";
     PictSpinningWheel.Size      = new System.Drawing.Size(32, 32);
     PictSpinningWheel.TabIndex  = 0;
     PictSpinningWheel.TabStop   = false;
     LblLoading.AutoSize         = true;
     LblLoading.Dock             = System.Windows.Forms.DockStyle.Fill;
     LblLoading.Font             = new System.Drawing.Font("Microsoft Sans Serif", 14f);
     LblLoading.Location         = new System.Drawing.Point(55, 0);
     LblLoading.Name             = "LblLoading";
     LblLoading.Size             = new System.Drawing.Size(183, 134);
     LblLoading.TabIndex         = 2;
     LblLoading.Text             = "Loading...";
     LblLoading.TextAlign        = System.Drawing.ContentAlignment.MiddleLeft;
     base.Controls.Add(tableLayoutPanel1);
     base.Name = "AsyncWaitMessage";
     base.Size = new System.Drawing.Size(200, 80);
     tableLayoutPanel1.ResumeLayout(false);
     tableLayoutPanel1.PerformLayout();
     SpinningWheelPanel.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)PictSpinningWheel).EndInit();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 17
0
 internal void ResumeComponentLayout()
 {
     leftTableLayoutPanel.ResumeLayout(false);
     leftTableLayoutPanel.PerformLayout();
     rightTableLayoutPanel.ResumeLayout(false);
     rightTableLayoutPanel.PerformLayout();
     splitContainer.ResumeLayout(false);
     splitContainer.PerformLayout();
     outerTableLayoutPanel.ResumeLayout(false);
     outerTableLayoutPanel.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 18
0
        public DrawOvercuts drawOvercuts(Overcuts overcut)
        {
            try
            {
                overcut.removePanel(this.form);

                if (!overcut.hasRows())
                {
                    return(this);
                }

                overcut.drawTableLabel(this.form, this.xPos, this.yPos);
                this.yPos += 40;

                TableLayoutPanel tableLayoutPanel1 = new TableLayoutPanel();

                tableLayoutPanel1.SuspendLayout();


                this.createColumns(tableLayoutPanel1);

                this.addHeader(tableLayoutPanel1);

                overcut.incrementRowCount();
                overcut.setTableLayoutSizes(tableLayoutPanel1);

                overcut.incrementRowCount();
                overcut.setTableLayoutEstimateSizes(tableLayoutPanel1);

                tableLayoutPanel1.Location = new System.Drawing.Point(xPos, yPos);
                tableLayoutPanel1.Name     = overcut.getTableName();
                this.createRows(tableLayoutPanel1);

                tableLayoutPanel1.Size       = new System.Drawing.Size(this.tableWidth, this.tableHeight);
                tableLayoutPanel1.TabIndex   = 0;
                tableLayoutPanel1.CellPaint += this.tableLayoutPanel1_CellPaint;

                this.form.Controls.Add(tableLayoutPanel1);
                tableLayoutPanel1.ResumeLayout(false);
                tableLayoutPanel1.PerformLayout();

                this.yPos += this.getNextTableYPosition();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
            return(this);
        }
Esempio n. 19
0
        protected DialogResult RunDialog()
        {
            this.StartPosition = FormStartPosition.CenterScreen;

            InitSize();

            table.ResumeLayout(false);
            table.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

            this.ShowDialog();

            return(this.DialogResult);
        }
Esempio n. 20
0
 private void DeleteAllRow(TableLayoutPanel panel)
 {
     while (panel.RowCount > 1)
     {
         int row = panel.RowCount - 1;
         for (int i = 0; i < panel.ColumnCount; i++)
         {
             Control c = panel.GetControlFromPosition(i, row);
             panel.Controls.Remove(c);
         }
         panel.RowStyles.RemoveAt(row);
         panel.RowCount--;
     }
     panel.ResumeLayout(false);
     panel.PerformLayout();
 }
Esempio n. 21
0
        // 重新调整所有 TextBox 的高度
        public static void ResetAllTextBoxHeight(this TableLayoutPanel panel)
        {
            // 如果没有这一句,在不断宽/窄变换 tablelayoutpanel 宽度的时候,内容区下面的空白区域会逐渐变大
            panel.Height = 0;
            panel.SuspendLayout();

            foreach (Control control in panel.Controls)
            {
                if (control is AutoHeightTextBox && control.Visible == true)
                {
                    (control as AutoHeightTextBox).SetHeight();
                }
            }

            panel.ResumeLayout(false);
            panel.PerformLayout();
        }
Esempio n. 22
0
        private void ShowZoomButton(ref Button btnZoom, Font font, TableLayoutPanel ZoomButtonParent,
                                    SendToEditorForms eOutputForm, bool bIsLegacy, DataGridViewCell aCell)
        {
            if (aCell.Value == null)
            {
                return;
            }

            ZoomButtonParent.SuspendLayout();
            if (btnZoom == null)
            {
                btnZoom = new Button();
                Font fontLarge = Program.GetSafeFont(font.Name, font.SizeInPoints * 3);
                btnZoom.Font       = fontLarge;
                btnZoom.Anchor     = AnchorStyles.None;
                btnZoom.BackColor  = System.Drawing.SystemColors.Menu;
                btnZoom.MouseDown += new MouseEventHandler(btnZoom_MouseDown);
                btnZoom.Tag        = eOutputForm;
                ZoomButtonParent.Controls.Add(btnZoom, 2, 0);
                ZoomButtonParent.SetRowSpan(btnZoom, 2);
            }

            // initialize it with the space padded character and then get the preferred size
            //  (pad with a space on the left to correctly display 'zero forward offset' glyphs
            //  and on the right, so it's centered and looks nicer).
            btnZoom.Text = String.Format("{0}", aCell.Value.ToString());
            Size sz = btnZoom.GetPreferredSize(btnZoom.Size);

            btnZoom.Size = new Size(sz.Width, sz.Height);
            ZoomButtonParent.ResumeLayout();
            ZoomButtonParent.PerformLayout();

            // then fill it with the details from the clicked character
            string strTooltip      = aCell.ToolTipText;
            int    nIndexDelimiter = strTooltip.LastIndexOf(';');

            strTooltip = GetCellToolTip(aCell, eOutputForm, bIsLegacy) + "; Click to insert in map";
            toolTip.SetToolTip(btnZoom, strTooltip);
            return;
        }
Esempio n. 23
0
 private void displayResoults(List <Result> resoultsList, Shop shop)
 {
     //Create TableLayoutPanel for resoults
     if (resoultsList.Count > 0)
     {
         TableLayoutPanel resoultTable = new TableLayoutPanel();
         resoultTable.SuspendLayout();
         resoultTable.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
         resoultTable.ColumnCount     = 2;
         resoultTable.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100F));
         resoultTable.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 55F));
         resoultTable.Location = new Point(3, 3);
         resoultTable.Name     = "tableLayoutPanel3";
         resoultTable.TabIndex = 4;
         flowLayoutPanel1.Controls.Add(resoultTable);
         //Label resoultLabel = new Label();
         //resoultLabel.Anchor = (((((AnchorStyles.Top | AnchorStyles.Bottom) | AnchorStyles.Left) | AnchorStyles.Right)));
         //resoultTable.SetColumnSpan(resoultLabel, 2);
         //resoultLabel.Location = new Point(4, 1);
         //resoultLabel.Name = shop.Name+"Label";
         ////resoultLabel.Size = new Size(192, 98);
         //resoultLabel.TextAlign = ContentAlignment.MiddleCenter;
         //resoultLabel.Text = shop.Name;
         addShopLabel(shop, resoultTable);
         var rows = resoultsList.Count + 1;
         resoultTable.RowCount = rows;
         resoultTable.RowStyles.Add(new RowStyle(SizeType.Absolute, 30));
         for (int i = 0; i < rows - 1; i++)
         {
             resoultTable.RowStyles.Add(new RowStyle(SizeType.Absolute, 40));
             addLabels(resoultsList[i], shop.Name, i + 1, resoultTable);
         }
         resoultTable.Size = new Size(155, (rows - 1) * 40 + rows + 1 + 30);
         resoultTable.ResumeLayout(false);
         resoultTable.PerformLayout();
         //resoultTable.Controls.Add(resoultLabel, 0, 0);
     }
 }
        /// <summary>
        /// Removes the custom criterion
        /// </summary>
        private void RemoveButton_Click(object sender, EventArgs e)
        {
            try {
                int rowIndex = (int)(sender as Button).Tag;

                customCriteriaTable.SuspendLayout();
                tablePanel.AutoScroll = false;

                customCriteriaTable.Controls.Remove(customCriteriaTable.GetControlFromPosition(0, rowIndex));

                for (int i = rowIndex; i < customCriteriaTable.RowCount - 1; i++)
                {
                    if (i != customCriteriaTable.RowCount - 2)
                    {
                        TableLayoutPanel p = (TableLayoutPanel)customCriteriaTable.GetControlFromPosition(0, i + 1);
                        p.GetControlFromPosition(3, 1).Tag = i;
                        customCriteriaTable.SetRow(p, i);
                    }
                    else
                    {
                        customCriteriaTable.SetRow(customCriteriaTable.GetControlFromPosition(0, i + 1), i);
                    }
                }

                customCriteriaTable.RowStyles.RemoveAt(customCriteriaTable.RowCount - 1);
                customCriteriaTable.RowCount--;

                tablePanel.AutoScroll = true;
                tablePanel.PerformLayout();
                tablePanel.ScrollControlIntoView(customCriteriaBox);

                customCriteriaTable.ResumeLayout(true);
            } catch (Exception ex) {
                VLOutputWindow.VisualLocalizerPane.WriteException(ex);
                VisualLocalizer.Library.Components.MessageBox.ShowException(ex);
            }
        }
Esempio n. 25
0
 /// <summary>
 /// Does the visual changes
 /// </summary>
 /// <param name="TLP"></param>
 /// <param name="running"></param>
 /// <param name="active"></param>
 public static void setRunningRow(ref TableLayoutPanel TLP, bool running, int active, xColors thm)
 {
     TLP.SuspendLayout();
     if (running)
     {
         getLabelYX(TLP, active + visualNonTimerRows, 0).BackColor   = getLabelYX(TLP, active + visualNonTimerRows, 3).BackColor = thm.STARTEDBackColor;
         getLabelYX(TLP, active + visualNonTimerRows, 0).ForeColor   = getLabelYX(TLP, active + visualNonTimerRows, 3).ForeColor = thm.STARTEDForeColor;
         getLabelYX(TLP, active + visualNonTimerRows, 0).Text        = "Running";
         getLabelYX(TLP, active + visualNonTimerRows, 0).Font        = new Font("Calibri", 12F, FontStyle.Regular, GraphicsUnit.Point, 0);
         getTextBoxYX(TLP, active + visualNonTimerRows, 2).ForeColor = thm.ACTIVETxtBxForeColor;
         getTextBoxYX(TLP, active + visualNonTimerRows, 2).BackColor = thm.ACTIVETxtBxBackColor;
     }
     else
     {
         getLabelYX(TLP, active + visualNonTimerRows, 0).BackColor   = getLabelYX(TLP, active + visualNonTimerRows, 3).BackColor = thm.defStartBackColor;
         getLabelYX(TLP, active + visualNonTimerRows, 0).ForeColor   = getLabelYX(TLP, active + visualNonTimerRows, 3).ForeColor = thm.defStartForeColor;
         getLabelYX(TLP, active + visualNonTimerRows, 0).Text        = "u";
         getLabelYX(TLP, active + visualNonTimerRows, 0).Font        = new Font("Wingdings 3", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 2);
         getTextBoxYX(TLP, active + visualNonTimerRows, 2).ForeColor = thm.defTxtBxForeColor;
         getTextBoxYX(TLP, active + visualNonTimerRows, 2).BackColor = thm.defTxtBxBackColor;
     }
     TLP.ResumeLayout(false);
     TLP.PerformLayout();
 }
Esempio n. 26
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        public NameForm()
        {
            var buttonNext = new Button
            {
                Dock      = DockStyle.Fill,
                BackColor = Color.DarkGray,
                FlatStyle = FlatStyle.Flat,
                Location  = new Point(142, 52),
                Margin    = new Padding(8),
                Name      = "buttonNext",
                Size      = new Size(100, 28),
                TabIndex  = 1,
                Text      = "Next",
                UseVisualStyleBackColor = false
            };

            var labelText = new Label
            {
                Anchor    = AnchorStyles.Top | AnchorStyles.Bottom,
                AutoSize  = true,
                Font      = new Font("Microsoft Sans Serif", 10.25F, FontStyle.Regular, GraphicsUnit.Point, 0),
                Location  = new Point(173, 0),
                Margin    = new Padding(4, 0, 4, 0),
                Name      = "labelText",
                Size      = new Size(37, 44),
                TabIndex  = 0,
                Text      = Next(),
                TextAlign = ContentAlignment.MiddleCenter
            };

            var tableLayoutPanel = new TableLayoutPanel
            {
                BackColor   = Color.LightGray,
                ColumnCount = 1,
                Dock        = DockStyle.Fill,
                Location    = new Point(0, 0),
                Name        = "tableLayoutPanel",
                RowCount    = 2,
                Size        = new Size(384, 88),
                TabIndex    = 2
            };

            SuspendLayout();
            tableLayoutPanel.SuspendLayout();
            buttonNext.Click += (sender, arguments) => labelText.Text = Next();
            tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
            tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
            tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
            tableLayoutPanel.Controls.Add(labelText, 0, 0);
            tableLayoutPanel.Controls.Add(buttonNext, 0, 1);
            AutoScaleDimensions = new SizeF(8F, 16F);
            AutoScaleMode       = AutoScaleMode.Font;
            ClientSize          = new Size(384, 88);
            Controls.Add(tableLayoutPanel);
            FormBorderStyle = FormBorderStyle.FixedToolWindow;
            Margin          = new Padding(4, 4, 4, 4);
            Name            = "NameForm";
            StartPosition   = FormStartPosition.CenterParent;
            Text            = "NameGenerator";
            tableLayoutPanel.ResumeLayout(false);
            tableLayoutPanel.PerformLayout();
            ResumeLayout(false);
        }
Esempio n. 27
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     pictureBox       = new System.Windows.Forms.PictureBox();
     label            = new Label();
     tableLayoutPanel = new TableLayoutPanel();
     ((System.ComponentModel.ISupportInitialize)(pictureBox)).BeginInit();
     tableLayoutPanel.SuspendLayout();
     SuspendLayout();
     //
     // pictureBox
     //
     pictureBox.Location    = new System.Drawing.Point(0, 0);
     pictureBox.Margin      = new System.Windows.Forms.Padding(0);
     pictureBox.Name        = "pictureBox";
     pictureBox.Size        = new System.Drawing.Size(20, 20);
     pictureBox.TabIndex    = 2;
     pictureBox.TabStop     = false;
     pictureBox.Click      += new EventHandler(EmulateExpInfoButton_Click);
     pictureBox.MouseDown  += new MouseEventHandler(EmulateExpInfoButton_MouseDown);
     pictureBox.MouseEnter += new EventHandler(EmulateExpInfoButton_MouseEnter);
     pictureBox.MouseLeave += new EventHandler(EmulateExpInfoButton_MouseLeave);
     pictureBox.MouseUp    += new MouseEventHandler(EmulateExpInfoButton_MouseUp);
     //
     // label
     //
     label.AutoSize    = true;
     label.Dock        = System.Windows.Forms.DockStyle.Fill;
     label.Location    = new System.Drawing.Point(20, 0);
     label.Margin      = new System.Windows.Forms.Padding(0);
     label.MaximumSize = new System.Drawing.Size(130, 0);
     label.Name        = "label";
     label.Padding     = new System.Windows.Forms.Padding(0, 2, 0, 0);
     label.Size        = new System.Drawing.Size(70, 20);
     label.TabIndex    = 3;
     label.Text        = "label";
     label.Click      += new EventHandler(EmulateExpInfoButton_Click);
     label.MouseDown  += new MouseEventHandler(EmulateExpInfoButton_MouseDown);
     label.MouseEnter += new EventHandler(EmulateExpInfoButton_MouseEnter);
     label.MouseLeave += new EventHandler(EmulateExpInfoButton_MouseLeave);
     label.MouseUp    += new MouseEventHandler(EmulateExpInfoButton_MouseUp);
     //
     // tableLayoutPanel
     //
     tableLayoutPanel.AutoSize    = true;
     tableLayoutPanel.ColumnCount = 2;
     tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
     tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     tableLayoutPanel.Controls.Add(pictureBox, 0, 0);
     tableLayoutPanel.Controls.Add(label, 1, 0);
     tableLayoutPanel.Dock     = System.Windows.Forms.DockStyle.Fill;
     tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
     tableLayoutPanel.Margin   = new System.Windows.Forms.Padding(0);
     tableLayoutPanel.Name     = "tableLayoutPanel";
     tableLayoutPanel.RowCount = 1;
     tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     tableLayoutPanel.Size        = new System.Drawing.Size(90, 20);
     tableLayoutPanel.TabIndex    = 4;
     tableLayoutPanel.Click      += new EventHandler(EmulateExpInfoButton_Click);
     tableLayoutPanel.MouseDown  += new MouseEventHandler(EmulateExpInfoButton_MouseDown);
     tableLayoutPanel.MouseEnter += new EventHandler(EmulateExpInfoButton_MouseEnter);
     tableLayoutPanel.MouseLeave += new EventHandler(EmulateExpInfoButton_MouseLeave);
     tableLayoutPanel.MouseUp    += new MouseEventHandler(EmulateExpInfoButton_MouseUp);
     //
     // EmulateExpInfoButton
     //
     AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     AutoSize            = true;
     Controls.Add(tableLayoutPanel);
     Margin      = new System.Windows.Forms.Padding(0);
     MinimumSize = new System.Drawing.Size(0, 20);
     Name        = "EmulateExpInfoButton";
     Size        = new System.Drawing.Size(90, 20);
     Enter      += new System.EventHandler(EmulateExpInfoButton_Enter);
     Leave      += new System.EventHandler(EmulateExpInfoButton_Leave);
     ((System.ComponentModel.ISupportInitialize)(pictureBox)).EndInit();
     tableLayoutPanel.ResumeLayout(false);
     tableLayoutPanel.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 28
0
            private void InitializeComponent()
            {
                ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(BorderSidesEditor));

                Height              = 163;
                tableLayoutPanel1   = new TableLayoutPanel();
                noneCheckBox        = new CheckBox();
                allCheckBox         = new CheckBox();
                leftTopCheckBox     = new CheckBox();
                rightTopCheckBox    = new CheckBox();
                leftBottomCheckBox  = new CheckBox();
                rightBottomCheckBox = new CheckBox();
                splitterLabel       = new Label();
                tableLayoutPanel1.SuspendLayout();
                SuspendLayout();
                componentResourceManager.ApplyResources(tableLayoutPanel1, "tableLayoutPanel1");
                tableLayoutPanel1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                tableLayoutPanel1.BackColor    = SystemColors.Window;
                tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle());
                tableLayoutPanel1.Controls.Add(noneCheckBox, 0, 0);
                tableLayoutPanel1.Controls.Add(allCheckBox, 0, 2);
                tableLayoutPanel1.Controls.Add(leftTopCheckBox, 0, 3);
                tableLayoutPanel1.Controls.Add(rightTopCheckBox, 0, 4);
                tableLayoutPanel1.Controls.Add(leftBottomCheckBox, 0, 5);
                tableLayoutPanel1.Controls.Add(rightBottomCheckBox, 0, 6);
                tableLayoutPanel1.Controls.Add(splitterLabel, 0, 1);
                tableLayoutPanel1.Name = "tableLayoutPanel1";
                tableLayoutPanel1.RowStyles.Add(new RowStyle());
                tableLayoutPanel1.RowStyles.Add(new RowStyle());
                tableLayoutPanel1.RowStyles.Add(new RowStyle());
                tableLayoutPanel1.RowStyles.Add(new RowStyle());
                tableLayoutPanel1.RowStyles.Add(new RowStyle());
                tableLayoutPanel1.RowStyles.Add(new RowStyle());
                tableLayoutPanel1.RowStyles.Add(new RowStyle());
                tableLayoutPanel1.Margin = new Padding(0);

                noneCheckBox.Name   = "noneCheckBox";
                noneCheckBox.Margin = new Padding(3, 3, 3, 1);
                noneCheckBox.Text   = "无(&N)";
                noneCheckBox.Height = 20;

                allCheckBox.Name   = "allCheckBox";
                allCheckBox.Margin = new Padding(3, 3, 3, 1);
                allCheckBox.Text   = "全部(&A)";
                allCheckBox.Height = 20;

                leftTopCheckBox.Margin = new Padding(20, 1, 3, 1);
                leftTopCheckBox.Name   = "leftTopCheckBox";
                leftTopCheckBox.Text   = "左上角(&LT)";
                leftTopCheckBox.Height = 20;

                rightTopCheckBox.Margin = new Padding(20, 1, 3, 1);
                rightTopCheckBox.Name   = "rightTopCheckBox";
                rightTopCheckBox.Text   = "右上角(&RT)";
                rightTopCheckBox.Height = 20;

                leftBottomCheckBox.Margin = new Padding(20, 1, 3, 1);
                leftBottomCheckBox.Name   = "leftBottomCheckBox";
                leftBottomCheckBox.Text   = "左下角(&LB)";
                leftBottomCheckBox.Height = 20;

                rightBottomCheckBox.Margin = new Padding(20, 1, 3, 1);
                rightBottomCheckBox.Name   = "rightBottomCheckBox";
                rightBottomCheckBox.Text   = "右下角(&RB)";
                rightBottomCheckBox.Height = 20;

                splitterLabel.BackColor = SystemColors.ControlDark;
                splitterLabel.Name      = "splitterLabel";
                splitterLabel.Height    = 1;

                Controls.Add(tableLayoutPanel1);
                Padding             = new Padding(1, 1, 1, 1);
                AutoSizeMode        = AutoSizeMode.GrowAndShrink;
                AutoScaleMode       = AutoScaleMode.None;
                AutoScaleDimensions = new SizeF(6f, 13f);
                tableLayoutPanel1.ResumeLayout(false);
                tableLayoutPanel1.PerformLayout();
                ResumeLayout(false);
                PerformLayout();
                leftBottomCheckBox.CheckedChanged  += leftBottomCheckBox_CheckedChanged;
                rightBottomCheckBox.CheckedChanged += rightBottomCheckBox_CheckedChanged;
                rightTopCheckBox.CheckedChanged    += rightTopCheckBox_CheckedChanged;
                leftTopCheckBox.CheckedChanged     += leftTopBox_CheckedChanged;
                noneCheckBox.CheckedChanged        += noneCheckBox_CheckedChanged;
                allCheckBox.CheckedChanged         += allCheckBox_CheckedChanged;
                noneCheckBox.Click += noneCheckBoxClicked;
                allCheckBox.Click  += allCheckBoxClicked;
            }
Esempio n. 29
0
        public MainWindow()
        {
            WindowState = FormWindowState.Maximized;

            tableLayoutPanel2 = new TableLayoutPanel();
            NotifySection     = new NotifySection();
            navigationControl = new NavigationControl();
            tableLayoutPanel2.SuspendLayout();
            SuspendLayout();
            //
            // tableLayoutPanel2
            //
            tableLayoutPanel2.ColumnCount = 1;
            tableLayoutPanel2.RowCount    = 2;
            tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            tableLayoutPanel2.Controls.Add(NotifySection, 0, 1);
            tableLayoutPanel2.Controls.Add(navigationControl, 0, 0);
            tableLayoutPanel2.Dock = DockStyle.Fill;
            tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
            tableLayoutPanel2.RowStyles.Add(new RowStyle());
            //
            // notifySection1
            //
            NotifySection.AutoSize     = true;
            NotifySection.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            NotifySection.BackColor    = Color.Transparent;
            NotifySection.Dock         = DockStyle.Fill;
            //
            // navigationControl1
            //
            navigationControl.BackColor = Color.Black;
            navigationControl.Dock      = DockStyle.Fill;
            //
            // MainWindow
            //
            Controls.Add(tableLayoutPanel2);
            MinimumSize = new Size(1024, 700);


            FormClosing += MainWindow_FormClosing;
            Load        += MainWindow_Load;
            SizeChanged += Window_StateChanged;
            tableLayoutPanel2.ResumeLayout(false);
            tableLayoutPanel2.PerformLayout();
            ResumeLayout(false);

            Instance = this;

            btnExit = new ToolStripMenuItem {
                Name = "btnExit", Size = new Size(92, 22), Text = "Exit"
            };
            btnExit.Click += btnExit_Click;

            trayStrip = new ContextMenuStrip();
            trayStrip.Items.AddRange(new ToolStripItem[] { btnExit });
            trayStrip.Name = "trayStrip";
            trayStrip.Size = new Size(93, 26);

            systrayIcon = new NotifyIcon {
                ContextMenuStrip = trayStrip, Text = "Zero-K", Visible = true
            };
            systrayIcon.MouseDown         += systrayIcon_MouseDown;
            systrayIcon.BalloonTipClicked += systrayIcon_BalloonTipClicked;

            if (!Program.Conf.StartMaximized)
            {
                SwitchFullscreenState(false);
            }

            Spring.AnySpringStarted += (sender, args) =>
            {
                if (lastTopMostState == null)
                {
                    lastTopMostState = TopMost;
                }
                if (TopMost)
                {
                    InvokeFunc(() => { TopMost = false; });
                }
            };
            Spring.AnySpringExited += (sender, args) =>
            {
                if (lastTopMostState == true)
                {
                    InvokeFunc(() => { TopMost = true; });
                }
                lastTopMostState = null;
            };
        }
Esempio n. 30
0
            private void InitializeComponent()
            {
                ComponentResourceManager resources = new ComponentResourceManager(typeof(LinkAreaEditor));

                _caption                  = new Label();
                _sampleEdit               = new TextBox();
                _okButton                 = new Button();
                _cancelButton             = new Button();
                _okCancelTableLayoutPanel = new TableLayoutPanel();
                _okCancelTableLayoutPanel.SuspendLayout();
                SuspendLayout();
                _okButton.Click += new EventHandler(okButton_click);
                //
                // caption
                //
                resources.ApplyResources(_caption, "caption");
                _caption.Margin = new Padding(3, 1, 3, 0);
                _caption.Name   = "caption";
                //
                // sampleEdit
                //
                resources.ApplyResources(_sampleEdit, "sampleEdit");
                _sampleEdit.Margin        = new Padding(3, 2, 3, 3);
                _sampleEdit.Name          = "sampleEdit";
                _sampleEdit.HideSelection = false;
                _sampleEdit.ScrollBars    = ScrollBars.Vertical;
                //
                // okButton
                //
                resources.ApplyResources(_okButton, "okButton");
                _okButton.DialogResult = DialogResult.OK;
                _okButton.Margin       = new Padding(0, 0, 2, 0);
                _okButton.Name         = "okButton";
                //
                // cancelButton
                //
                resources.ApplyResources(_cancelButton, "cancelButton");
                _cancelButton.DialogResult = DialogResult.Cancel;
                _cancelButton.Margin       = new Padding(3, 0, 0, 0);
                _cancelButton.Name         = "cancelButton";
                //
                // okCancelTableLayoutPanel
                //
                resources.ApplyResources(_okCancelTableLayoutPanel, "okCancelTableLayoutPanel");
                _okCancelTableLayoutPanel.ColumnCount = 2;
                _okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
                _okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
                _okCancelTableLayoutPanel.Controls.Add(_okButton, 0, 0);
                _okCancelTableLayoutPanel.Controls.Add(_cancelButton, 1, 0);
                _okCancelTableLayoutPanel.Margin   = new Padding(3, 1, 3, 3);
                _okCancelTableLayoutPanel.Name     = "okCancelTableLayoutPanel";
                _okCancelTableLayoutPanel.RowCount = 1;
                _okCancelTableLayoutPanel.RowStyles.Add(new RowStyle());
                _okCancelTableLayoutPanel.RowStyles.Add(new RowStyle());
                //
                // LinkAreaEditor
                //
                resources.ApplyResources(this, "$this");
                AutoScaleMode = AutoScaleMode.Font;
                CancelButton  = _cancelButton;
                Controls.Add(_okCancelTableLayoutPanel);
                Controls.Add(_sampleEdit);
                Controls.Add(_caption);
                HelpButton         = true;
                MaximizeBox        = false;
                MinimizeBox        = false;
                Name               = "LinkAreaEditor";
                ShowIcon           = false;
                ShowInTaskbar      = false;
                HelpButtonClicked += new CancelEventHandler(LinkAreaEditor_HelpButtonClicked);
                _okCancelTableLayoutPanel.ResumeLayout(false);
                _okCancelTableLayoutPanel.PerformLayout();
                ResumeLayout(false);
                PerformLayout();
            }
Esempio n. 31
0
	public MainForm ()
	{
		tableLayoutPanel1 = new TableLayoutPanel ();
		tableLayoutPanel2 = new TableLayoutPanel ();
		label1 = new Label ();
		label2 = new Label ();
		textBox1 = new TextBox ();
		textBox2 = new TextBox ();
		label3 = new Label ();
		tableLayoutPanel1.SuspendLayout ();
		tableLayoutPanel2.SuspendLayout ();
		SuspendLayout ();
		// 
		// tableLayoutPanel1
		// 
		tableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
		tableLayoutPanel1.ColumnCount = 2;
		tableLayoutPanel1.ColumnStyles.Add (new ColumnStyle ());
		tableLayoutPanel1.ColumnStyles.Add (new ColumnStyle ());
		tableLayoutPanel1.Controls.Add (tableLayoutPanel2, 1, 0);
		tableLayoutPanel1.Controls.Add (label3, 0, 0);
		tableLayoutPanel1.Location = new Point (20, 30);
		tableLayoutPanel1.RowCount = 2;
		tableLayoutPanel1.RowStyles.Add (new RowStyle (SizeType.Percent, 50F));
		tableLayoutPanel1.RowStyles.Add (new RowStyle (SizeType.Percent, 50F));
		tableLayoutPanel1.Size = new Size (250, 145);
		tableLayoutPanel1.TabIndex = 0;
		// 
		// tableLayoutPanel2
		// 
		tableLayoutPanel2.AutoSize = true;
		tableLayoutPanel2.ColumnCount = 2;
		tableLayoutPanel2.ColumnStyles.Add (new ColumnStyle ());
		tableLayoutPanel2.ColumnStyles.Add (new ColumnStyle (SizeType.Percent, 50F));
		tableLayoutPanel2.Controls.Add (label1, 0, 0);
		tableLayoutPanel2.Controls.Add (label2, 0, 1);
		tableLayoutPanel2.Controls.Add (textBox1, 1, 0);
		tableLayoutPanel2.Controls.Add (textBox2, 1, 1);
		tableLayoutPanel2.Location = new Point (68, 3);
		tableLayoutPanel2.RowCount = 2;
		tableLayoutPanel2.RowStyles.Add (new RowStyle (SizeType.Percent, 50F));
		tableLayoutPanel2.RowStyles.Add (new RowStyle (SizeType.Percent, 50F));
		tableLayoutPanel2.Size = new Size (131, 39);
		tableLayoutPanel2.TabIndex = 0;
		// 
		// label1
		// 
		label1.AutoSize = true;
		label1.Location = new Point (3, 0);
		label1.Size = new Size (19, 13);
		label1.TabIndex = 0;
		label1.Text = "en";
		// 
		// label2
		// 
		label2.AutoSize = true;
		label2.Location = new Point (3, 19);
		label2.Size = new Size (18, 13);
		label2.TabIndex = 1;
		label2.Text = "es";
		// 
		// textBox1
		// 
		textBox1.Dock = DockStyle.Fill;
		textBox1.Location = new Point (28, 3);
		textBox1.Size = new Size (100, 20);
		textBox1.TabIndex = 2;
		// 
		// textBox2
		// 
		textBox2.Dock = DockStyle.Fill;
		textBox2.Location = new Point (28, 22);
		textBox2.Size = new Size (100, 20);
		textBox2.TabIndex = 3;
		// 
		// label3
		// 
		label3.AutoSize = true;
		label3.Location = new Point (3, 0);
		label3.Size = new Size (59, 13);
		label3.TabIndex = 1;
		label3.Text = "Head word";
		// 
		// MainForm
		// 
		AutoScaleDimensions = new SizeF (6F, 13F);
		AutoScaleMode = AutoScaleMode.Font;
		ClientSize = new Size (292, 200);
		Controls.Add (tableLayoutPanel1);
		tableLayoutPanel1.ResumeLayout (false);
		tableLayoutPanel1.PerformLayout ();
		tableLayoutPanel2.ResumeLayout (false);
		tableLayoutPanel2.PerformLayout ();
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #354672";
		ResumeLayout (false);
		Load += new EventHandler (MainForm_Load);
	}