Cleaning up design tab by removing layout debug buttons.
Separator changes now reflected instantly.
1.1 --- a/Server/MainForm.Designer.cs Sat Feb 07 13:51:30 2015 +0100
1.2 +++ b/Server/MainForm.Designer.cs Sat Feb 07 14:39:03 2015 +0100
1.3 @@ -76,20 +76,15 @@
1.4 this.buttonFont = new System.Windows.Forms.Button();
1.5 this.tabControl = new System.Windows.Forms.TabControl();
1.6 this.tabPageDesign = new System.Windows.Forms.TabPage();
1.7 + this.labelScrollingSpeed = new System.Windows.Forms.Label();
1.8 + this.maskedTextBoxScrollingSpeed = new System.Windows.Forms.MaskedTextBox();
1.9 this.labelScrollLoopSeparator = new System.Windows.Forms.Label();
1.10 this.textBoxScrollLoopSeparator = new System.Windows.Forms.TextBox();
1.11 this.labelMinFontSize = new System.Windows.Forms.Label();
1.12 this.maskedTextBoxMinFontSize = new System.Windows.Forms.MaskedTextBox();
1.13 this.checkBoxScaleToFit = new System.Windows.Forms.CheckBox();
1.14 this.checkBoxInverseColors = new System.Windows.Forms.CheckBox();
1.15 - this.buttonAlignRight = new System.Windows.Forms.Button();
1.16 - this.buttonAlignCenter = new System.Windows.Forms.Button();
1.17 - this.buttonAlignLeft = new System.Windows.Forms.Button();
1.18 - this.buttonRemoveColumn = new System.Windows.Forms.Button();
1.19 - this.buttonAddColumn = new System.Windows.Forms.Button();
1.20 this.checkBoxReverseScreen = new System.Windows.Forms.CheckBox();
1.21 - this.buttonRemoveRow = new System.Windows.Forms.Button();
1.22 - this.buttonAddRow = new System.Windows.Forms.Button();
1.23 this.tabPageApp = new System.Windows.Forms.TabPage();
1.24 this.checkBoxStartMinimized = new System.Windows.Forms.CheckBox();
1.25 this.checkBoxMinimizeToTray = new System.Windows.Forms.CheckBox();
1.26 @@ -98,8 +93,7 @@
1.27 this.labelFontWidth = new System.Windows.Forms.Label();
1.28 this.labelFontHeight = new System.Windows.Forms.Label();
1.29 this.pictureBoxDemo = new System.Windows.Forms.PictureBox();
1.30 - this.maskedTextBoxScrollingSpeed = new System.Windows.Forms.MaskedTextBox();
1.31 - this.labelScrollingSpeed = new System.Windows.Forms.Label();
1.32 + this.toolTip = new System.Windows.Forms.ToolTip(this.components);
1.33 this.panelDisplay.SuspendLayout();
1.34 this.tableLayoutPanel.SuspendLayout();
1.35 this.statusStrip.SuspendLayout();
1.36 @@ -400,6 +394,7 @@
1.37 this.trackBarBrightness.Size = new System.Drawing.Size(45, 225);
1.38 this.trackBarBrightness.TabIndex = 10;
1.39 this.trackBarBrightness.TickStyle = System.Windows.Forms.TickStyle.Both;
1.40 + this.toolTip.SetToolTip(this.trackBarBrightness, "Brightness adjustment");
1.41 this.trackBarBrightness.Scroll += new System.EventHandler(this.trackBarBrightness_Scroll);
1.42 //
1.43 // buttonFill
1.44 @@ -525,16 +520,9 @@
1.45 this.tabPageDesign.Controls.Add(this.maskedTextBoxMinFontSize);
1.46 this.tabPageDesign.Controls.Add(this.checkBoxScaleToFit);
1.47 this.tabPageDesign.Controls.Add(this.checkBoxInverseColors);
1.48 - this.tabPageDesign.Controls.Add(this.buttonAlignRight);
1.49 - this.tabPageDesign.Controls.Add(this.buttonAlignCenter);
1.50 - this.tabPageDesign.Controls.Add(this.buttonAlignLeft);
1.51 - this.tabPageDesign.Controls.Add(this.buttonRemoveColumn);
1.52 this.tabPageDesign.Controls.Add(this.checkBoxFixedPitchFontOnly);
1.53 - this.tabPageDesign.Controls.Add(this.buttonAddColumn);
1.54 this.tabPageDesign.Controls.Add(this.buttonFont);
1.55 this.tabPageDesign.Controls.Add(this.checkBoxReverseScreen);
1.56 - this.tabPageDesign.Controls.Add(this.buttonRemoveRow);
1.57 - this.tabPageDesign.Controls.Add(this.buttonAddRow);
1.58 this.tabPageDesign.Controls.Add(this.checkBoxShowBorders);
1.59 this.tabPageDesign.Location = new System.Drawing.Point(4, 22);
1.60 this.tabPageDesign.Name = "tabPageDesign";
1.61 @@ -544,6 +532,25 @@
1.62 this.tabPageDesign.Text = "Design";
1.63 this.tabPageDesign.UseVisualStyleBackColor = true;
1.64 //
1.65 + // labelScrollingSpeed
1.66 + //
1.67 + this.labelScrollingSpeed.AutoSize = true;
1.68 + this.labelScrollingSpeed.Location = new System.Drawing.Point(84, 119);
1.69 + this.labelScrollingSpeed.Name = "labelScrollingSpeed";
1.70 + this.labelScrollingSpeed.Size = new System.Drawing.Size(115, 13);
1.71 + this.labelScrollingSpeed.TabIndex = 28;
1.72 + this.labelScrollingSpeed.Text = "Scrolling speed (px/s) :";
1.73 + //
1.74 + // maskedTextBoxScrollingSpeed
1.75 + //
1.76 + this.maskedTextBoxScrollingSpeed.Location = new System.Drawing.Point(205, 116);
1.77 + this.maskedTextBoxScrollingSpeed.Mask = "000";
1.78 + this.maskedTextBoxScrollingSpeed.Name = "maskedTextBoxScrollingSpeed";
1.79 + this.maskedTextBoxScrollingSpeed.PromptChar = ' ';
1.80 + this.maskedTextBoxScrollingSpeed.Size = new System.Drawing.Size(24, 20);
1.81 + this.maskedTextBoxScrollingSpeed.TabIndex = 27;
1.82 + this.maskedTextBoxScrollingSpeed.TextChanged += new System.EventHandler(this.maskedTextBoxScrollingSpeed_TextChanged);
1.83 + //
1.84 // labelScrollLoopSeparator
1.85 //
1.86 this.labelScrollLoopSeparator.AutoSize = true;
1.87 @@ -564,7 +571,7 @@
1.88 // labelMinFontSize
1.89 //
1.90 this.labelMinFontSize.AutoSize = true;
1.91 - this.labelMinFontSize.Location = new System.Drawing.Point(84, 194);
1.92 + this.labelMinFontSize.Location = new System.Drawing.Point(80, 194);
1.93 this.labelMinFontSize.Name = "labelMinFontSize";
1.94 this.labelMinFontSize.Size = new System.Drawing.Size(119, 13);
1.95 this.labelMinFontSize.TabIndex = 24;
1.96 @@ -604,56 +611,6 @@
1.97 this.checkBoxInverseColors.UseVisualStyleBackColor = true;
1.98 this.checkBoxInverseColors.CheckedChanged += new System.EventHandler(this.checkBoxInverseColors_CheckedChanged);
1.99 //
1.100 - // buttonAlignRight
1.101 - //
1.102 - this.buttonAlignRight.Location = new System.Drawing.Point(170, 81);
1.103 - this.buttonAlignRight.Name = "buttonAlignRight";
1.104 - this.buttonAlignRight.Size = new System.Drawing.Size(75, 23);
1.105 - this.buttonAlignRight.TabIndex = 20;
1.106 - this.buttonAlignRight.Text = "Align Right";
1.107 - this.buttonAlignRight.UseVisualStyleBackColor = true;
1.108 - this.buttonAlignRight.Click += new System.EventHandler(this.buttonAlignRight_Click);
1.109 - //
1.110 - // buttonAlignCenter
1.111 - //
1.112 - this.buttonAlignCenter.Location = new System.Drawing.Point(89, 81);
1.113 - this.buttonAlignCenter.Name = "buttonAlignCenter";
1.114 - this.buttonAlignCenter.Size = new System.Drawing.Size(75, 23);
1.115 - this.buttonAlignCenter.TabIndex = 19;
1.116 - this.buttonAlignCenter.Text = "Align Center";
1.117 - this.buttonAlignCenter.UseVisualStyleBackColor = true;
1.118 - this.buttonAlignCenter.Click += new System.EventHandler(this.buttonAlignCenter_Click);
1.119 - //
1.120 - // buttonAlignLeft
1.121 - //
1.122 - this.buttonAlignLeft.Location = new System.Drawing.Point(7, 81);
1.123 - this.buttonAlignLeft.Name = "buttonAlignLeft";
1.124 - this.buttonAlignLeft.Size = new System.Drawing.Size(75, 23);
1.125 - this.buttonAlignLeft.TabIndex = 18;
1.126 - this.buttonAlignLeft.Text = "Align Left";
1.127 - this.buttonAlignLeft.UseVisualStyleBackColor = true;
1.128 - this.buttonAlignLeft.Click += new System.EventHandler(this.buttonAlignLeft_Click);
1.129 - //
1.130 - // buttonRemoveColumn
1.131 - //
1.132 - this.buttonRemoveColumn.Location = new System.Drawing.Point(88, 37);
1.133 - this.buttonRemoveColumn.Name = "buttonRemoveColumn";
1.134 - this.buttonRemoveColumn.Size = new System.Drawing.Size(75, 23);
1.135 - this.buttonRemoveColumn.TabIndex = 3;
1.136 - this.buttonRemoveColumn.Text = "Remove col.";
1.137 - this.buttonRemoveColumn.UseVisualStyleBackColor = true;
1.138 - this.buttonRemoveColumn.Click += new System.EventHandler(this.buttonRemoveColumn_Click);
1.139 - //
1.140 - // buttonAddColumn
1.141 - //
1.142 - this.buttonAddColumn.Location = new System.Drawing.Point(89, 7);
1.143 - this.buttonAddColumn.Name = "buttonAddColumn";
1.144 - this.buttonAddColumn.Size = new System.Drawing.Size(75, 23);
1.145 - this.buttonAddColumn.TabIndex = 2;
1.146 - this.buttonAddColumn.Text = "Add column";
1.147 - this.buttonAddColumn.UseVisualStyleBackColor = true;
1.148 - this.buttonAddColumn.Click += new System.EventHandler(this.buttonAddColumn_Click);
1.149 - //
1.150 // checkBoxReverseScreen
1.151 //
1.152 this.checkBoxReverseScreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
1.153 @@ -666,26 +623,6 @@
1.154 this.checkBoxReverseScreen.UseVisualStyleBackColor = true;
1.155 this.checkBoxReverseScreen.CheckedChanged += new System.EventHandler(this.checkBoxReverseScreen_CheckedChanged);
1.156 //
1.157 - // buttonRemoveRow
1.158 - //
1.159 - this.buttonRemoveRow.Location = new System.Drawing.Point(7, 37);
1.160 - this.buttonRemoveRow.Name = "buttonRemoveRow";
1.161 - this.buttonRemoveRow.Size = new System.Drawing.Size(75, 23);
1.162 - this.buttonRemoveRow.TabIndex = 1;
1.163 - this.buttonRemoveRow.Text = "Remove row";
1.164 - this.buttonRemoveRow.UseVisualStyleBackColor = true;
1.165 - this.buttonRemoveRow.Click += new System.EventHandler(this.buttonRemoveRow_Click);
1.166 - //
1.167 - // buttonAddRow
1.168 - //
1.169 - this.buttonAddRow.Location = new System.Drawing.Point(7, 7);
1.170 - this.buttonAddRow.Name = "buttonAddRow";
1.171 - this.buttonAddRow.Size = new System.Drawing.Size(75, 23);
1.172 - this.buttonAddRow.TabIndex = 0;
1.173 - this.buttonAddRow.Text = "Add row";
1.174 - this.buttonAddRow.UseVisualStyleBackColor = true;
1.175 - this.buttonAddRow.Click += new System.EventHandler(this.buttonAddRow_Click);
1.176 - //
1.177 // tabPageApp
1.178 //
1.179 this.tabPageApp.Controls.Add(this.checkBoxStartMinimized);
1.180 @@ -772,25 +709,6 @@
1.181 this.pictureBoxDemo.TabIndex = 21;
1.182 this.pictureBoxDemo.TabStop = false;
1.183 //
1.184 - // maskedTextBoxScrollingSpeed
1.185 - //
1.186 - this.maskedTextBoxScrollingSpeed.Location = new System.Drawing.Point(205, 116);
1.187 - this.maskedTextBoxScrollingSpeed.Mask = "000";
1.188 - this.maskedTextBoxScrollingSpeed.Name = "maskedTextBoxScrollingSpeed";
1.189 - this.maskedTextBoxScrollingSpeed.PromptChar = ' ';
1.190 - this.maskedTextBoxScrollingSpeed.Size = new System.Drawing.Size(24, 20);
1.191 - this.maskedTextBoxScrollingSpeed.TabIndex = 27;
1.192 - this.maskedTextBoxScrollingSpeed.TextChanged += new System.EventHandler(this.maskedTextBoxScrollingSpeed_TextChanged);
1.193 - //
1.194 - // labelScrollingSpeed
1.195 - //
1.196 - this.labelScrollingSpeed.AutoSize = true;
1.197 - this.labelScrollingSpeed.Location = new System.Drawing.Point(84, 119);
1.198 - this.labelScrollingSpeed.Name = "labelScrollingSpeed";
1.199 - this.labelScrollingSpeed.Size = new System.Drawing.Size(115, 13);
1.200 - this.labelScrollingSpeed.TabIndex = 28;
1.201 - this.labelScrollingSpeed.Text = "Scrolling speed (px/s) :";
1.202 - //
1.203 // MainForm
1.204 //
1.205 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
1.206 @@ -862,15 +780,8 @@
1.207 private System.Windows.Forms.Button buttonCloseClients;
1.208 private System.Windows.Forms.Button buttonStartClient;
1.209 private System.Windows.Forms.Label labelWarning;
1.210 - private System.Windows.Forms.TabPage tabPageDesign;
1.211 - private System.Windows.Forms.Button buttonRemoveColumn;
1.212 - private System.Windows.Forms.Button buttonAddColumn;
1.213 - private System.Windows.Forms.Button buttonRemoveRow;
1.214 - private System.Windows.Forms.Button buttonAddRow;
1.215 - private System.Windows.Forms.CheckBox checkBoxReverseScreen;
1.216 - private System.Windows.Forms.Button buttonAlignRight;
1.217 - private System.Windows.Forms.Button buttonAlignCenter;
1.218 - private System.Windows.Forms.Button buttonAlignLeft;
1.219 + private System.Windows.Forms.TabPage tabPageDesign;
1.220 + private System.Windows.Forms.CheckBox checkBoxReverseScreen;
1.221 private System.Windows.Forms.ComboBox comboBoxDisplayType;
1.222 private System.Windows.Forms.MaskedTextBox maskedTextBoxTimerInterval;
1.223 private System.Windows.Forms.Label labelTimerInterval;
1.224 @@ -894,6 +805,7 @@
1.225 private System.Windows.Forms.TextBox textBoxScrollLoopSeparator;
1.226 private System.Windows.Forms.Label labelScrollingSpeed;
1.227 private System.Windows.Forms.MaskedTextBox maskedTextBoxScrollingSpeed;
1.228 + private System.Windows.Forms.ToolTip toolTip;
1.229 }
1.230 }
1.231
2.1 --- a/Server/MainForm.cs Sat Feb 07 13:51:30 2015 +0100
2.2 +++ b/Server/MainForm.cs Sat Feb 07 14:39:03 2015 +0100
2.3 @@ -170,7 +170,7 @@
2.4 #if DEBUG
2.5 //Testing icon in debug, no arm done if icon not supported
2.6 //iDisplay.SetIconStatus(Display.TMiniDisplayIconType.EMiniDisplayIconRecording, 0, 1);
2.7 - iDisplay.SetAllIconsStatus(1);
2.8 + iDisplay.SetAllIconsStatus(2);
2.9 #endif
2.10
2.11 }
2.12 @@ -1283,41 +1283,6 @@
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 - UpdateTableLayoutPanel(tableLayoutPanel.ColumnCount, tableLayoutPanel.RowCount + 1);
2.21 - }
2.22 - }
2.23 -
2.24 - private void buttonRemoveRow_Click(object sender, EventArgs e)
2.25 - {
2.26 - if (tableLayoutPanel.RowCount > 1)
2.27 - {
2.28 - UpdateTableLayoutPanel(tableLayoutPanel.ColumnCount, tableLayoutPanel.RowCount - 1);
2.29 - }
2.30 -
2.31 - UpdateTableLayoutRowStyles();
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 - UpdateTableLayoutPanel(tableLayoutPanel.ColumnCount + 1, tableLayoutPanel.RowCount);
2.39 - }
2.40 - }
2.41 -
2.42 - private void buttonRemoveColumn_Click(object sender, EventArgs e)
2.43 - {
2.44 - if (tableLayoutPanel.ColumnCount > 1)
2.45 - {
2.46 - UpdateTableLayoutPanel(tableLayoutPanel.ColumnCount - 1, tableLayoutPanel.RowCount);
2.47 - }
2.48 - }
2.49 -
2.50 -
2.51 /// <summary>
2.52 /// Update our table layout row styles to make sure each rows have similar height
2.53 /// </summary>
2.54 @@ -1533,31 +1498,6 @@
2.55 return control;
2.56 }
2.57
2.58 -
2.59 - private void buttonAlignLeft_Click(object sender, EventArgs e)
2.60 - {
2.61 - foreach (MarqueeLabel ctrl in tableLayoutPanel.Controls)
2.62 - {
2.63 - ctrl.TextAlign = ContentAlignment.MiddleLeft;
2.64 - }
2.65 - }
2.66 -
2.67 - private void buttonAlignCenter_Click(object sender, EventArgs e)
2.68 - {
2.69 - foreach (MarqueeLabel ctrl in tableLayoutPanel.Controls)
2.70 - {
2.71 - ctrl.TextAlign = ContentAlignment.MiddleCenter;
2.72 - }
2.73 - }
2.74 -
2.75 - private void buttonAlignRight_Click(object sender, EventArgs e)
2.76 - {
2.77 - foreach (MarqueeLabel ctrl in tableLayoutPanel.Controls)
2.78 - {
2.79 - ctrl.TextAlign = ContentAlignment.MiddleRight;
2.80 - }
2.81 - }
2.82 -
2.83 /// <summary>
2.84 /// Called when the user selected a new display type.
2.85 /// </summary>
2.86 @@ -1632,9 +1572,15 @@
2.87
2.88 private void textBoxScrollLoopSeparator_TextChanged(object sender, EventArgs e)
2.89 {
2.90 - //TODO: re-create layout? update our fields?
2.91 cds.Separator = textBoxScrollLoopSeparator.Text;
2.92 Properties.Settings.Default.Save();
2.93 +
2.94 + //Update our text fields
2.95 + foreach (MarqueeLabel ctrl in tableLayoutPanel.Controls)
2.96 + {
2.97 + ctrl.Separator = cds.Separator;
2.98 + }
2.99 +
2.100 }
2.101
2.102 private void buttonPowerOn_Click(object sender, EventArgs e)
3.1 --- a/Server/MainForm.resx Sat Feb 07 13:51:30 2015 +0100
3.2 +++ b/Server/MainForm.resx Sat Feb 07 14:39:03 2015 +0100
3.3 @@ -126,6 +126,9 @@
3.4 <metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
3.5 <value>206, 17</value>
3.6 </metadata>
3.7 + <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
3.8 + <value>315, 17</value>
3.9 + </metadata>
3.10 <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
3.11 <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
3.12 <value>
4.1 --- a/Server/MarqueeLabel.cs Sat Feb 07 13:51:30 2015 +0100
4.2 +++ b/Server/MarqueeLabel.cs Sat Feb 07 14:39:03 2015 +0100
4.3 @@ -21,13 +21,28 @@
4.4 private SizeF iSeparatorSize;
4.5 private SizeF iScrollSize;
4.6 private Font iFontInUse;
4.7 + private string iSeparator;
4.8
4.9 [Category("Appearance")]
4.10 [Description("Separator in our scrolling loop.")]
4.11 [DefaultValue(" | ")]
4.12 [Browsable(true), EditorBrowsable(EditorBrowsableState.Always)]
4.13 [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
4.14 - public string Separator { get; set; }
4.15 + public string Separator
4.16 + {
4.17 + get
4.18 + {
4.19 + return iSeparator;
4.20 + }
4.21 + set
4.22 + {
4.23 + if (value != Separator)
4.24 + {
4.25 + iSeparator = value;
4.26 + OnTextChanged(EventArgs.Empty);
4.27 + }
4.28 + }
4.29 + }
4.30
4.31 [Category("Behavior")]
4.32 [Description("How fast is our text scrolling, in pixels per second.")]