Adding Design tab.
authorsl
Wed, 20 Aug 2014 18:02:30 +0200
changeset 38babab407f2bb
parent 37 405a2590eda4
child 39 083f4935aae4
Adding Design tab.
Server/MainForm.Designer.cs
Server/MainForm.cs
     1.1 --- a/Server/MainForm.Designer.cs	Tue Aug 19 21:26:17 2014 +0200
     1.2 +++ b/Server/MainForm.Designer.cs	Wed Aug 20 18:02:30 2014 +0200
     1.3 @@ -31,8 +31,6 @@
     1.4              this.components = new System.ComponentModel.Container();
     1.5              this.panelDisplay = new System.Windows.Forms.Panel();
     1.6              this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
     1.7 -            this.marqueeLabelTop = new SharpDisplayManager.MarqueeLabel();
     1.8 -            this.marqueeLabelBottom = new SharpDisplayManager.MarqueeLabel();
     1.9              this.fontDialog = new System.Windows.Forms.FontDialog();
    1.10              this.timer = new System.Windows.Forms.Timer(this.components);
    1.11              this.statusStrip = new System.Windows.Forms.StatusStrip();
    1.12 @@ -59,6 +57,13 @@
    1.13              this.buttonCapture = new System.Windows.Forms.Button();
    1.14              this.buttonFont = new System.Windows.Forms.Button();
    1.15              this.tabControl = new System.Windows.Forms.TabControl();
    1.16 +            this.tabPageDesign = new System.Windows.Forms.TabPage();
    1.17 +            this.buttonAddRow = new System.Windows.Forms.Button();
    1.18 +            this.buttonRemoveRow = new System.Windows.Forms.Button();
    1.19 +            this.buttonAddColumn = new System.Windows.Forms.Button();
    1.20 +            this.buttonRemoveColumn = new System.Windows.Forms.Button();
    1.21 +            this.marqueeLabelTop = new SharpDisplayManager.MarqueeLabel();
    1.22 +            this.marqueeLabelBottom = new SharpDisplayManager.MarqueeLabel();
    1.23              this.panelDisplay.SuspendLayout();
    1.24              this.tableLayoutPanel.SuspendLayout();
    1.25              this.statusStrip.SuspendLayout();
    1.26 @@ -66,6 +71,7 @@
    1.27              this.tabPageDisplay.SuspendLayout();
    1.28              ((System.ComponentModel.ISupportInitialize)(this.trackBarBrightness)).BeginInit();
    1.29              this.tabControl.SuspendLayout();
    1.30 +            this.tabPageDesign.SuspendLayout();
    1.31              this.SuspendLayout();
    1.32              // 
    1.33              // panelDisplay
    1.34 @@ -154,39 +160,6 @@
    1.35              this.tableLayoutPanel.Size = new System.Drawing.Size(256, 64);
    1.36              this.tableLayoutPanel.TabIndex = 5;
    1.37              // 
    1.38 -            // marqueeLabelTop
    1.39 -            // 
    1.40 -            this.marqueeLabelTop.AutoEllipsis = true;
    1.41 -            this.marqueeLabelTop.BackColor = System.Drawing.Color.Transparent;
    1.42 -            this.marqueeLabelTop.Dock = System.Windows.Forms.DockStyle.Fill;
    1.43 -            this.marqueeLabelTop.Location = new System.Drawing.Point(1, 1);
    1.44 -            this.marqueeLabelTop.Margin = new System.Windows.Forms.Padding(0);
    1.45 -            this.marqueeLabelTop.Name = "marqueeLabelTop";
    1.46 -            this.marqueeLabelTop.OwnTimer = false;
    1.47 -            this.marqueeLabelTop.PixelsPerSecond = 64;
    1.48 -            this.marqueeLabelTop.Separator = "|";
    1.49 -            this.marqueeLabelTop.Size = new System.Drawing.Size(254, 30);
    1.50 -            this.marqueeLabelTop.TabIndex = 2;
    1.51 -            this.marqueeLabelTop.Text = "ABCDEFGHIJKLMNOPQRST-0123456789";
    1.52 -            this.marqueeLabelTop.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    1.53 -            this.marqueeLabelTop.UseCompatibleTextRendering = true;
    1.54 -            // 
    1.55 -            // marqueeLabelBottom
    1.56 -            // 
    1.57 -            this.marqueeLabelBottom.AutoEllipsis = true;
    1.58 -            this.marqueeLabelBottom.Dock = System.Windows.Forms.DockStyle.Fill;
    1.59 -            this.marqueeLabelBottom.Location = new System.Drawing.Point(1, 32);
    1.60 -            this.marqueeLabelBottom.Margin = new System.Windows.Forms.Padding(0);
    1.61 -            this.marqueeLabelBottom.Name = "marqueeLabelBottom";
    1.62 -            this.marqueeLabelBottom.OwnTimer = false;
    1.63 -            this.marqueeLabelBottom.PixelsPerSecond = 64;
    1.64 -            this.marqueeLabelBottom.Separator = "|";
    1.65 -            this.marqueeLabelBottom.Size = new System.Drawing.Size(254, 31);
    1.66 -            this.marqueeLabelBottom.TabIndex = 3;
    1.67 -            this.marqueeLabelBottom.Text = "abcdefghijklmnopqrst-0123456789";
    1.68 -            this.marqueeLabelBottom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    1.69 -            this.marqueeLabelBottom.UseCompatibleTextRendering = true;
    1.70 -            // 
    1.71              // timer
    1.72              // 
    1.73              this.timer.Enabled = true;
    1.74 @@ -279,19 +252,15 @@
    1.75              // 
    1.76              // tabPageDisplay
    1.77              // 
    1.78 -            this.tabPageDisplay.Controls.Add(this.labelWarning);
    1.79 -            this.tabPageDisplay.Controls.Add(this.checkBoxFixedPitchFontOnly);
    1.80              this.tabPageDisplay.Controls.Add(this.buttonSuspend);
    1.81              this.tabPageDisplay.Controls.Add(this.checkBoxReverseScreen);
    1.82              this.tabPageDisplay.Controls.Add(this.checkBoxConnectOnStartup);
    1.83 -            this.tabPageDisplay.Controls.Add(this.checkBoxShowBorders);
    1.84              this.tabPageDisplay.Controls.Add(this.trackBarBrightness);
    1.85              this.tabPageDisplay.Controls.Add(this.buttonFill);
    1.86              this.tabPageDisplay.Controls.Add(this.buttonClear);
    1.87              this.tabPageDisplay.Controls.Add(this.buttonClose);
    1.88              this.tabPageDisplay.Controls.Add(this.buttonOpen);
    1.89              this.tabPageDisplay.Controls.Add(this.buttonCapture);
    1.90 -            this.tabPageDisplay.Controls.Add(this.buttonFont);
    1.91              this.tabPageDisplay.Location = new System.Drawing.Point(4, 22);
    1.92              this.tabPageDisplay.Name = "tabPageDisplay";
    1.93              this.tabPageDisplay.Padding = new System.Windows.Forms.Padding(3);
    1.94 @@ -305,7 +274,7 @@
    1.95              this.labelWarning.AutoSize = true;
    1.96              this.labelWarning.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    1.97              this.labelWarning.ForeColor = System.Drawing.Color.Red;
    1.98 -            this.labelWarning.Location = new System.Drawing.Point(87, 9);
    1.99 +            this.labelWarning.Location = new System.Drawing.Point(9, 9);
   1.100              this.labelWarning.Name = "labelWarning";
   1.101              this.labelWarning.Size = new System.Drawing.Size(80, 16);
   1.102              this.labelWarning.TabIndex = 18;
   1.103 @@ -317,7 +286,7 @@
   1.104              // 
   1.105              this.checkBoxFixedPitchFontOnly.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
   1.106              this.checkBoxFixedPitchFontOnly.AutoSize = true;
   1.107 -            this.checkBoxFixedPitchFontOnly.Location = new System.Drawing.Point(113, 223);
   1.108 +            this.checkBoxFixedPitchFontOnly.Location = new System.Drawing.Point(84, 294);
   1.109              this.checkBoxFixedPitchFontOnly.Name = "checkBoxFixedPitchFontOnly";
   1.110              this.checkBoxFixedPitchFontOnly.Size = new System.Drawing.Size(120, 17);
   1.111              this.checkBoxFixedPitchFontOnly.TabIndex = 17;
   1.112 @@ -327,7 +296,7 @@
   1.113              // buttonSuspend
   1.114              // 
   1.115              this.buttonSuspend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
   1.116 -            this.buttonSuspend.Location = new System.Drawing.Point(6, 230);
   1.117 +            this.buttonSuspend.Location = new System.Drawing.Point(6, 259);
   1.118              this.buttonSuspend.Name = "buttonSuspend";
   1.119              this.buttonSuspend.Size = new System.Drawing.Size(75, 23);
   1.120              this.buttonSuspend.TabIndex = 16;
   1.121 @@ -339,7 +308,7 @@
   1.122              // 
   1.123              this.checkBoxReverseScreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
   1.124              this.checkBoxReverseScreen.AutoSize = true;
   1.125 -            this.checkBoxReverseScreen.Location = new System.Drawing.Point(113, 246);
   1.126 +            this.checkBoxReverseScreen.Location = new System.Drawing.Point(113, 271);
   1.127              this.checkBoxReverseScreen.Name = "checkBoxReverseScreen";
   1.128              this.checkBoxReverseScreen.Size = new System.Drawing.Size(101, 17);
   1.129              this.checkBoxReverseScreen.TabIndex = 14;
   1.130 @@ -351,7 +320,7 @@
   1.131              // 
   1.132              this.checkBoxConnectOnStartup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
   1.133              this.checkBoxConnectOnStartup.AutoSize = true;
   1.134 -            this.checkBoxConnectOnStartup.Location = new System.Drawing.Point(113, 269);
   1.135 +            this.checkBoxConnectOnStartup.Location = new System.Drawing.Point(113, 294);
   1.136              this.checkBoxConnectOnStartup.Name = "checkBoxConnectOnStartup";
   1.137              this.checkBoxConnectOnStartup.Size = new System.Drawing.Size(119, 17);
   1.138              this.checkBoxConnectOnStartup.TabIndex = 13;
   1.139 @@ -363,7 +332,7 @@
   1.140              // 
   1.141              this.checkBoxShowBorders.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
   1.142              this.checkBoxShowBorders.AutoSize = true;
   1.143 -            this.checkBoxShowBorders.Location = new System.Drawing.Point(113, 292);
   1.144 +            this.checkBoxShowBorders.Location = new System.Drawing.Point(84, 271);
   1.145              this.checkBoxShowBorders.Name = "checkBoxShowBorders";
   1.146              this.checkBoxShowBorders.Size = new System.Drawing.Size(91, 17);
   1.147              this.checkBoxShowBorders.TabIndex = 11;
   1.148 @@ -427,7 +396,7 @@
   1.149              // buttonCapture
   1.150              // 
   1.151              this.buttonCapture.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
   1.152 -            this.buttonCapture.Location = new System.Drawing.Point(6, 259);
   1.153 +            this.buttonCapture.Location = new System.Drawing.Point(6, 288);
   1.154              this.buttonCapture.Name = "buttonCapture";
   1.155              this.buttonCapture.Size = new System.Drawing.Size(75, 23);
   1.156              this.buttonCapture.TabIndex = 5;
   1.157 @@ -438,7 +407,7 @@
   1.158              // buttonFont
   1.159              // 
   1.160              this.buttonFont.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
   1.161 -            this.buttonFont.Location = new System.Drawing.Point(6, 288);
   1.162 +            this.buttonFont.Location = new System.Drawing.Point(3, 288);
   1.163              this.buttonFont.Name = "buttonFont";
   1.164              this.buttonFont.Size = new System.Drawing.Size(75, 23);
   1.165              this.buttonFont.TabIndex = 0;
   1.166 @@ -453,17 +422,109 @@
   1.167              | System.Windows.Forms.AnchorStyles.Right)));
   1.168              this.tabControl.Controls.Add(this.tabPageDisplay);
   1.169              this.tabControl.Controls.Add(this.tabPageClients);
   1.170 +            this.tabControl.Controls.Add(this.tabPageDesign);
   1.171              this.tabControl.Location = new System.Drawing.Point(12, 139);
   1.172              this.tabControl.Name = "tabControl";
   1.173              this.tabControl.SelectedIndex = 0;
   1.174              this.tabControl.Size = new System.Drawing.Size(600, 343);
   1.175              this.tabControl.TabIndex = 0;
   1.176              // 
   1.177 +            // tabPageDesign
   1.178 +            // 
   1.179 +            this.tabPageDesign.Controls.Add(this.buttonRemoveColumn);
   1.180 +            this.tabPageDesign.Controls.Add(this.checkBoxFixedPitchFontOnly);
   1.181 +            this.tabPageDesign.Controls.Add(this.buttonAddColumn);
   1.182 +            this.tabPageDesign.Controls.Add(this.buttonFont);
   1.183 +            this.tabPageDesign.Controls.Add(this.buttonRemoveRow);
   1.184 +            this.tabPageDesign.Controls.Add(this.buttonAddRow);
   1.185 +            this.tabPageDesign.Controls.Add(this.checkBoxShowBorders);
   1.186 +            this.tabPageDesign.Location = new System.Drawing.Point(4, 22);
   1.187 +            this.tabPageDesign.Name = "tabPageDesign";
   1.188 +            this.tabPageDesign.Padding = new System.Windows.Forms.Padding(3);
   1.189 +            this.tabPageDesign.Size = new System.Drawing.Size(592, 317);
   1.190 +            this.tabPageDesign.TabIndex = 3;
   1.191 +            this.tabPageDesign.Text = "Design";
   1.192 +            this.tabPageDesign.UseVisualStyleBackColor = true;
   1.193 +            // 
   1.194 +            // buttonAddRow
   1.195 +            // 
   1.196 +            this.buttonAddRow.Location = new System.Drawing.Point(7, 7);
   1.197 +            this.buttonAddRow.Name = "buttonAddRow";
   1.198 +            this.buttonAddRow.Size = new System.Drawing.Size(75, 23);
   1.199 +            this.buttonAddRow.TabIndex = 0;
   1.200 +            this.buttonAddRow.Text = "Add row";
   1.201 +            this.buttonAddRow.UseVisualStyleBackColor = true;
   1.202 +            this.buttonAddRow.Click += new System.EventHandler(this.buttonAddRow_Click);
   1.203 +            // 
   1.204 +            // buttonRemoveRow
   1.205 +            // 
   1.206 +            this.buttonRemoveRow.Location = new System.Drawing.Point(7, 37);
   1.207 +            this.buttonRemoveRow.Name = "buttonRemoveRow";
   1.208 +            this.buttonRemoveRow.Size = new System.Drawing.Size(75, 23);
   1.209 +            this.buttonRemoveRow.TabIndex = 1;
   1.210 +            this.buttonRemoveRow.Text = "Remove row";
   1.211 +            this.buttonRemoveRow.UseVisualStyleBackColor = true;
   1.212 +            this.buttonRemoveRow.Click += new System.EventHandler(this.buttonRemoveRow_Click);
   1.213 +            // 
   1.214 +            // buttonAddColumn
   1.215 +            // 
   1.216 +            this.buttonAddColumn.Location = new System.Drawing.Point(89, 7);
   1.217 +            this.buttonAddColumn.Name = "buttonAddColumn";
   1.218 +            this.buttonAddColumn.Size = new System.Drawing.Size(75, 23);
   1.219 +            this.buttonAddColumn.TabIndex = 2;
   1.220 +            this.buttonAddColumn.Text = "Add column";
   1.221 +            this.buttonAddColumn.UseVisualStyleBackColor = true;
   1.222 +            this.buttonAddColumn.Click += new System.EventHandler(this.buttonAddColumn_Click);
   1.223 +            // 
   1.224 +            // buttonRemoveColumn
   1.225 +            // 
   1.226 +            this.buttonRemoveColumn.Location = new System.Drawing.Point(89, 37);
   1.227 +            this.buttonRemoveColumn.Name = "buttonRemoveColumn";
   1.228 +            this.buttonRemoveColumn.Size = new System.Drawing.Size(75, 23);
   1.229 +            this.buttonRemoveColumn.TabIndex = 3;
   1.230 +            this.buttonRemoveColumn.Text = "Remove col.";
   1.231 +            this.buttonRemoveColumn.UseVisualStyleBackColor = true;
   1.232 +            this.buttonRemoveColumn.Click += new System.EventHandler(this.buttonRemoveColumn_Click);
   1.233 +            // 
   1.234 +            // marqueeLabelTop
   1.235 +            // 
   1.236 +            this.marqueeLabelTop.AutoEllipsis = true;
   1.237 +            this.marqueeLabelTop.BackColor = System.Drawing.Color.Transparent;
   1.238 +            this.marqueeLabelTop.Dock = System.Windows.Forms.DockStyle.Fill;
   1.239 +            this.marqueeLabelTop.Location = new System.Drawing.Point(1, 1);
   1.240 +            this.marqueeLabelTop.Margin = new System.Windows.Forms.Padding(0);
   1.241 +            this.marqueeLabelTop.Name = "marqueeLabelTop";
   1.242 +            this.marqueeLabelTop.OwnTimer = false;
   1.243 +            this.marqueeLabelTop.PixelsPerSecond = 64;
   1.244 +            this.marqueeLabelTop.Separator = "|";
   1.245 +            this.marqueeLabelTop.Size = new System.Drawing.Size(254, 1);
   1.246 +            this.marqueeLabelTop.TabIndex = 2;
   1.247 +            this.marqueeLabelTop.Text = "ABCDEFGHIJKLMNOPQRST-0123456789";
   1.248 +            this.marqueeLabelTop.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
   1.249 +            this.marqueeLabelTop.UseCompatibleTextRendering = true;
   1.250 +            // 
   1.251 +            // marqueeLabelBottom
   1.252 +            // 
   1.253 +            this.marqueeLabelBottom.AutoEllipsis = true;
   1.254 +            this.marqueeLabelBottom.Dock = System.Windows.Forms.DockStyle.Fill;
   1.255 +            this.marqueeLabelBottom.Location = new System.Drawing.Point(1, -19);
   1.256 +            this.marqueeLabelBottom.Margin = new System.Windows.Forms.Padding(0);
   1.257 +            this.marqueeLabelBottom.Name = "marqueeLabelBottom";
   1.258 +            this.marqueeLabelBottom.OwnTimer = false;
   1.259 +            this.marqueeLabelBottom.PixelsPerSecond = 64;
   1.260 +            this.marqueeLabelBottom.Separator = "|";
   1.261 +            this.marqueeLabelBottom.Size = new System.Drawing.Size(254, 20);
   1.262 +            this.marqueeLabelBottom.TabIndex = 3;
   1.263 +            this.marqueeLabelBottom.Text = "abcdefghijklmnopqrst-0123456789";
   1.264 +            this.marqueeLabelBottom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
   1.265 +            this.marqueeLabelBottom.UseCompatibleTextRendering = true;
   1.266 +            // 
   1.267              // MainForm
   1.268              // 
   1.269              this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
   1.270              this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
   1.271              this.ClientSize = new System.Drawing.Size(624, 517);
   1.272 +            this.Controls.Add(this.labelWarning);
   1.273              this.Controls.Add(this.statusStrip);
   1.274              this.Controls.Add(this.tabControl);
   1.275              this.Controls.Add(this.panelDisplay);
   1.276 @@ -482,6 +543,8 @@
   1.277              this.tabPageDisplay.PerformLayout();
   1.278              ((System.ComponentModel.ISupportInitialize)(this.trackBarBrightness)).EndInit();
   1.279              this.tabControl.ResumeLayout(false);
   1.280 +            this.tabPageDesign.ResumeLayout(false);
   1.281 +            this.tabPageDesign.PerformLayout();
   1.282              this.ResumeLayout(false);
   1.283              this.PerformLayout();
   1.284  
   1.285 @@ -519,6 +582,11 @@
   1.286          private System.Windows.Forms.Button buttonCloseClients;
   1.287          private System.Windows.Forms.Button buttonStartClient;
   1.288          private System.Windows.Forms.Label labelWarning;
   1.289 +        private System.Windows.Forms.TabPage tabPageDesign;
   1.290 +        private System.Windows.Forms.Button buttonRemoveColumn;
   1.291 +        private System.Windows.Forms.Button buttonAddColumn;
   1.292 +        private System.Windows.Forms.Button buttonRemoveRow;
   1.293 +        private System.Windows.Forms.Button buttonAddRow;
   1.294      }
   1.295  }
   1.296  
     2.1 --- a/Server/MainForm.cs	Tue Aug 19 21:26:17 2014 +0200
     2.2 +++ b/Server/MainForm.cs	Wed Aug 20 18:02:30 2014 +0200
     2.3 @@ -108,7 +108,7 @@
     2.4          }
     2.5  
     2.6          /// <summary>
     2.7 -        /// 
     2.8 +        ///
     2.9          /// </summary>
    2.10          void CheckFontHeight()
    2.11          {
    2.12 @@ -724,6 +724,42 @@
    2.13              }
    2.14          }
    2.15  
    2.16 +        private void buttonAddRow_Click(object sender, EventArgs e)
    2.17 +        {
    2.18 +            if (tableLayoutPanel.RowCount < 6)
    2.19 +            {
    2.20 +                tableLayoutPanel.RowCount++;
    2.21 +                CheckFontHeight();
    2.22 +            }
    2.23 +        }
    2.24 +
    2.25 +        private void buttonRemoveRow_Click(object sender, EventArgs e)
    2.26 +        {
    2.27 +            if (tableLayoutPanel.RowCount > 1)
    2.28 +            {
    2.29 +                tableLayoutPanel.RowCount--;
    2.30 +                CheckFontHeight();
    2.31 +            }
    2.32 +        }
    2.33 +
    2.34 +        private void buttonAddColumn_Click(object sender, EventArgs e)
    2.35 +        {
    2.36 +            if (tableLayoutPanel.ColumnCount < 8)
    2.37 +            {
    2.38 +                tableLayoutPanel.ColumnCount++;
    2.39 +                //CheckFontHeight();
    2.40 +            }
    2.41 +        }
    2.42 +
    2.43 +        private void buttonRemoveColumn_Click(object sender, EventArgs e)
    2.44 +        {
    2.45 +            if (tableLayoutPanel.ColumnCount > 1)
    2.46 +            {
    2.47 +                tableLayoutPanel.ColumnCount--;
    2.48 +                //CheckFontHeight();
    2.49 +            }
    2.50 +        }
    2.51 +
    2.52  
    2.53      }
    2.54