Adding option to connect display on startup.
Better show border implementation.
Now having an external container for our display to show an external border.
1.1 --- a/App.config Thu Jul 10 22:03:29 2014 +0200
1.2 +++ b/App.config Sat Jul 12 13:13:17 2014 +0200
1.3 @@ -19,6 +19,9 @@
1.4 <setting name="DisplayShowBorders" serializeAs="String">
1.5 <value>False</value>
1.6 </setting>
1.7 + <setting name="DisplayConnectOnStartup" serializeAs="String">
1.8 + <value>False</value>
1.9 + </setting>
1.10 </SharpDisplayManager.Properties.Settings>
1.11 </userSettings>
1.12 </configuration>
1.13 \ No newline at end of file
2.1 --- a/MainForm.Designer.cs Thu Jul 10 22:03:29 2014 +0200
2.2 +++ b/MainForm.Designer.cs Sat Jul 12 13:13:17 2014 +0200
2.3 @@ -38,9 +38,6 @@
2.4 this.buttonClose = new System.Windows.Forms.Button();
2.5 this.buttonOpen = new System.Windows.Forms.Button();
2.6 this.buttonCapture = new System.Windows.Forms.Button();
2.7 - this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
2.8 - this.marqueeLabelTop = new SharpDisplayManager.MarqueeLabel();
2.9 - this.marqueeLabelBottom = new SharpDisplayManager.MarqueeLabel();
2.10 this.buttonFont = new System.Windows.Forms.Button();
2.11 this.tabPageTests = new System.Windows.Forms.TabPage();
2.12 this.fontDialog = new System.Windows.Forms.FontDialog();
2.13 @@ -48,13 +45,19 @@
2.14 this.statusStrip = new System.Windows.Forms.StatusStrip();
2.15 this.toolStripStatusLabelConnect = new System.Windows.Forms.ToolStripStatusLabel();
2.16 this.toolStripStatusLabelSpring = new System.Windows.Forms.ToolStripStatusLabel();
2.17 + this.toolStripStatusLabelPower = new System.Windows.Forms.ToolStripStatusLabel();
2.18 this.toolStripStatusLabelFps = new System.Windows.Forms.ToolStripStatusLabel();
2.19 - this.toolStripStatusLabelPower = new System.Windows.Forms.ToolStripStatusLabel();
2.20 + this.panelDisplay = new System.Windows.Forms.Panel();
2.21 + this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
2.22 + this.marqueeLabelTop = new SharpDisplayManager.MarqueeLabel();
2.23 + this.marqueeLabelBottom = new SharpDisplayManager.MarqueeLabel();
2.24 + this.checkBoxConnectOnStartup = new System.Windows.Forms.CheckBox();
2.25 this.tabControl.SuspendLayout();
2.26 this.tabPageDisplay.SuspendLayout();
2.27 ((System.ComponentModel.ISupportInitialize)(this.trackBarBrightness)).BeginInit();
2.28 + this.statusStrip.SuspendLayout();
2.29 + this.panelDisplay.SuspendLayout();
2.30 this.tableLayoutPanel.SuspendLayout();
2.31 - this.statusStrip.SuspendLayout();
2.32 this.SuspendLayout();
2.33 //
2.34 // tabControl
2.35 @@ -72,6 +75,8 @@
2.36 //
2.37 // tabPageDisplay
2.38 //
2.39 + this.tabPageDisplay.Controls.Add(this.checkBoxConnectOnStartup);
2.40 + this.tabPageDisplay.Controls.Add(this.panelDisplay);
2.41 this.tabPageDisplay.Controls.Add(this.checkBoxShowBorders);
2.42 this.tabPageDisplay.Controls.Add(this.trackBarBrightness);
2.43 this.tabPageDisplay.Controls.Add(this.buttonFill);
2.44 @@ -79,7 +84,6 @@
2.45 this.tabPageDisplay.Controls.Add(this.buttonClose);
2.46 this.tabPageDisplay.Controls.Add(this.buttonOpen);
2.47 this.tabPageDisplay.Controls.Add(this.buttonCapture);
2.48 - this.tabPageDisplay.Controls.Add(this.tableLayoutPanel);
2.49 this.tabPageDisplay.Controls.Add(this.buttonFont);
2.50 this.tabPageDisplay.Location = new System.Drawing.Point(4, 22);
2.51 this.tabPageDisplay.Name = "tabPageDisplay";
2.52 @@ -164,86 +168,6 @@
2.53 this.buttonCapture.UseVisualStyleBackColor = true;
2.54 this.buttonCapture.Click += new System.EventHandler(this.buttonCapture_Click);
2.55 //
2.56 - // tableLayoutPanel
2.57 - //
2.58 - this.tableLayoutPanel.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
2.59 - this.tableLayoutPanel.ColumnCount = 1;
2.60 - this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
2.61 - this.tableLayoutPanel.Controls.Add(this.marqueeLabelTop, 0, 0);
2.62 - this.tableLayoutPanel.Controls.Add(this.marqueeLabelBottom, 0, 1);
2.63 - this.tableLayoutPanel.Location = new System.Drawing.Point(180, 161);
2.64 - this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);
2.65 - this.tableLayoutPanel.Name = "tableLayoutPanel";
2.66 - this.tableLayoutPanel.RowCount = 2;
2.67 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
2.68 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
2.69 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.70 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.71 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.72 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.73 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.74 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.75 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.76 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.77 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.78 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.79 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.80 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.81 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.82 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.83 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.84 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.85 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.86 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.87 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.88 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.89 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.90 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.91 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.92 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.93 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.94 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.95 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.96 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.97 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.98 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.99 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.100 - this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.101 - this.tableLayoutPanel.Size = new System.Drawing.Size(256, 64);
2.102 - this.tableLayoutPanel.TabIndex = 4;
2.103 - //
2.104 - // marqueeLabelTop
2.105 - //
2.106 - this.marqueeLabelTop.AutoEllipsis = true;
2.107 - this.marqueeLabelTop.BackColor = System.Drawing.Color.Transparent;
2.108 - this.marqueeLabelTop.Dock = System.Windows.Forms.DockStyle.Fill;
2.109 - this.marqueeLabelTop.Location = new System.Drawing.Point(1, 1);
2.110 - this.marqueeLabelTop.Margin = new System.Windows.Forms.Padding(0);
2.111 - this.marqueeLabelTop.Name = "marqueeLabelTop";
2.112 - this.marqueeLabelTop.OwnTimer = false;
2.113 - this.marqueeLabelTop.PixelsPerSecond = 64;
2.114 - this.marqueeLabelTop.Separator = "|";
2.115 - this.marqueeLabelTop.Size = new System.Drawing.Size(254, 30);
2.116 - this.marqueeLabelTop.TabIndex = 2;
2.117 - this.marqueeLabelTop.Text = "ABCDEFGHIJKLMNOPQRST-0123456789";
2.118 - this.marqueeLabelTop.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2.119 - this.marqueeLabelTop.UseCompatibleTextRendering = true;
2.120 - //
2.121 - // marqueeLabelBottom
2.122 - //
2.123 - this.marqueeLabelBottom.AutoEllipsis = true;
2.124 - this.marqueeLabelBottom.Dock = System.Windows.Forms.DockStyle.Fill;
2.125 - this.marqueeLabelBottom.Location = new System.Drawing.Point(1, 32);
2.126 - this.marqueeLabelBottom.Margin = new System.Windows.Forms.Padding(0);
2.127 - this.marqueeLabelBottom.Name = "marqueeLabelBottom";
2.128 - this.marqueeLabelBottom.OwnTimer = false;
2.129 - this.marqueeLabelBottom.PixelsPerSecond = 64;
2.130 - this.marqueeLabelBottom.Size = new System.Drawing.Size(254, 31);
2.131 - this.marqueeLabelBottom.TabIndex = 3;
2.132 - this.marqueeLabelBottom.Text = "abcdefghijklmnopqrst-0123456789";
2.133 - this.marqueeLabelBottom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2.134 - this.marqueeLabelBottom.UseCompatibleTextRendering = true;
2.135 - //
2.136 // buttonFont
2.137 //
2.138 this.buttonFont.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
2.139 @@ -294,20 +218,125 @@
2.140 // toolStripStatusLabelSpring
2.141 //
2.142 this.toolStripStatusLabelSpring.Name = "toolStripStatusLabelSpring";
2.143 - this.toolStripStatusLabelSpring.Size = new System.Drawing.Size(442, 17);
2.144 + this.toolStripStatusLabelSpring.Size = new System.Drawing.Size(473, 17);
2.145 this.toolStripStatusLabelSpring.Spring = true;
2.146 //
2.147 + // toolStripStatusLabelPower
2.148 + //
2.149 + this.toolStripStatusLabelPower.Name = "toolStripStatusLabelPower";
2.150 + this.toolStripStatusLabelPower.Size = new System.Drawing.Size(24, 17);
2.151 + this.toolStripStatusLabelPower.Text = "NA";
2.152 + //
2.153 // toolStripStatusLabelFps
2.154 //
2.155 this.toolStripStatusLabelFps.Name = "toolStripStatusLabelFps";
2.156 this.toolStripStatusLabelFps.Size = new System.Drawing.Size(26, 17);
2.157 this.toolStripStatusLabelFps.Text = "FPS";
2.158 //
2.159 - // toolStripStatusLabelPower
2.160 + // panelDisplay
2.161 //
2.162 - this.toolStripStatusLabelPower.Name = "toolStripStatusLabelPower";
2.163 - this.toolStripStatusLabelPower.Size = new System.Drawing.Size(24, 17);
2.164 - this.toolStripStatusLabelPower.Text = "NA";
2.165 + this.panelDisplay.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
2.166 + this.panelDisplay.Controls.Add(this.tableLayoutPanel);
2.167 + this.panelDisplay.Location = new System.Drawing.Point(181, 151);
2.168 + this.panelDisplay.Margin = new System.Windows.Forms.Padding(0);
2.169 + this.panelDisplay.Name = "panelDisplay";
2.170 + this.panelDisplay.Size = new System.Drawing.Size(258, 66);
2.171 + this.panelDisplay.TabIndex = 12;
2.172 + //
2.173 + // tableLayoutPanel
2.174 + //
2.175 + this.tableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
2.176 + | System.Windows.Forms.AnchorStyles.Left)
2.177 + | System.Windows.Forms.AnchorStyles.Right)));
2.178 + this.tableLayoutPanel.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
2.179 + this.tableLayoutPanel.ColumnCount = 1;
2.180 + this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
2.181 + this.tableLayoutPanel.Controls.Add(this.marqueeLabelTop, 0, 0);
2.182 + this.tableLayoutPanel.Controls.Add(this.marqueeLabelBottom, 0, 1);
2.183 + this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
2.184 + this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);
2.185 + this.tableLayoutPanel.Name = "tableLayoutPanel";
2.186 + this.tableLayoutPanel.RowCount = 2;
2.187 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
2.188 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
2.189 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.190 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.191 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.192 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.193 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.194 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.195 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.196 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.197 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.198 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.199 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.200 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.201 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.202 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.203 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.204 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.205 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.206 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.207 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.208 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.209 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.210 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.211 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.212 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.213 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.214 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.215 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.216 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.217 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.218 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.219 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.220 + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
2.221 + this.tableLayoutPanel.Size = new System.Drawing.Size(256, 64);
2.222 + this.tableLayoutPanel.TabIndex = 5;
2.223 + //
2.224 + // marqueeLabelTop
2.225 + //
2.226 + this.marqueeLabelTop.AutoEllipsis = true;
2.227 + this.marqueeLabelTop.BackColor = System.Drawing.Color.Transparent;
2.228 + this.marqueeLabelTop.Dock = System.Windows.Forms.DockStyle.Fill;
2.229 + this.marqueeLabelTop.Location = new System.Drawing.Point(1, 1);
2.230 + this.marqueeLabelTop.Margin = new System.Windows.Forms.Padding(0);
2.231 + this.marqueeLabelTop.Name = "marqueeLabelTop";
2.232 + this.marqueeLabelTop.OwnTimer = false;
2.233 + this.marqueeLabelTop.PixelsPerSecond = 64;
2.234 + this.marqueeLabelTop.Separator = "|";
2.235 + this.marqueeLabelTop.Size = new System.Drawing.Size(254, 1);
2.236 + this.marqueeLabelTop.TabIndex = 2;
2.237 + this.marqueeLabelTop.Text = "ABCDEFGHIJKLMNOPQRST-0123456789";
2.238 + this.marqueeLabelTop.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2.239 + this.marqueeLabelTop.UseCompatibleTextRendering = true;
2.240 + //
2.241 + // marqueeLabelBottom
2.242 + //
2.243 + this.marqueeLabelBottom.AutoEllipsis = true;
2.244 + this.marqueeLabelBottom.Dock = System.Windows.Forms.DockStyle.Fill;
2.245 + this.marqueeLabelBottom.Location = new System.Drawing.Point(1, -19);
2.246 + this.marqueeLabelBottom.Margin = new System.Windows.Forms.Padding(0);
2.247 + this.marqueeLabelBottom.Name = "marqueeLabelBottom";
2.248 + this.marqueeLabelBottom.OwnTimer = false;
2.249 + this.marqueeLabelBottom.PixelsPerSecond = 64;
2.250 + this.marqueeLabelBottom.Separator = null;
2.251 + this.marqueeLabelBottom.Size = new System.Drawing.Size(254, 20);
2.252 + this.marqueeLabelBottom.TabIndex = 3;
2.253 + this.marqueeLabelBottom.Text = "abcdefghijklmnopqrst-0123456789";
2.254 + this.marqueeLabelBottom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2.255 + this.marqueeLabelBottom.UseCompatibleTextRendering = true;
2.256 + //
2.257 + // checkBoxConnectOnStartup
2.258 + //
2.259 + this.checkBoxConnectOnStartup.AutoSize = true;
2.260 + this.checkBoxConnectOnStartup.Location = new System.Drawing.Point(113, 321);
2.261 + this.checkBoxConnectOnStartup.Name = "checkBoxConnectOnStartup";
2.262 + this.checkBoxConnectOnStartup.Size = new System.Drawing.Size(119, 17);
2.263 + this.checkBoxConnectOnStartup.TabIndex = 13;
2.264 + this.checkBoxConnectOnStartup.Text = "Connect on stratup ";
2.265 + this.checkBoxConnectOnStartup.UseVisualStyleBackColor = true;
2.266 + this.checkBoxConnectOnStartup.CheckedChanged += new System.EventHandler(this.checkBoxConnectOnStartup_CheckedChanged);
2.267 //
2.268 // MainForm
2.269 //
2.270 @@ -319,13 +348,15 @@
2.271 this.MinimumSize = new System.Drawing.Size(640, 480);
2.272 this.Name = "MainForm";
2.273 this.Text = "Sharp Display Manager";
2.274 + this.Load += new System.EventHandler(this.MainForm_Load);
2.275 this.tabControl.ResumeLayout(false);
2.276 this.tabPageDisplay.ResumeLayout(false);
2.277 this.tabPageDisplay.PerformLayout();
2.278 ((System.ComponentModel.ISupportInitialize)(this.trackBarBrightness)).EndInit();
2.279 - this.tableLayoutPanel.ResumeLayout(false);
2.280 this.statusStrip.ResumeLayout(false);
2.281 this.statusStrip.PerformLayout();
2.282 + this.panelDisplay.ResumeLayout(false);
2.283 + this.tableLayoutPanel.ResumeLayout(false);
2.284 this.ResumeLayout(false);
2.285 this.PerformLayout();
2.286
2.287 @@ -338,9 +369,6 @@
2.288 private System.Windows.Forms.TabPage tabPageTests;
2.289 private System.Windows.Forms.Button buttonFont;
2.290 private System.Windows.Forms.FontDialog fontDialog;
2.291 - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
2.292 - private MarqueeLabel marqueeLabelTop;
2.293 - private MarqueeLabel marqueeLabelBottom;
2.294 private System.Windows.Forms.Button buttonCapture;
2.295 private System.Windows.Forms.Timer timer;
2.296 private System.Windows.Forms.Button buttonFill;
2.297 @@ -354,6 +382,11 @@
2.298 private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelSpring;
2.299 private System.Windows.Forms.CheckBox checkBoxShowBorders;
2.300 private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelPower;
2.301 + private System.Windows.Forms.Panel panelDisplay;
2.302 + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
2.303 + private MarqueeLabel marqueeLabelTop;
2.304 + private MarqueeLabel marqueeLabelBottom;
2.305 + private System.Windows.Forms.CheckBox checkBoxConnectOnStartup;
2.306 }
2.307 }
2.308
3.1 --- a/MainForm.cs Thu Jul 10 22:03:29 2014 +0200
3.2 +++ b/MainForm.cs Sat Jul 12 13:13:17 2014 +0200
3.3 @@ -23,12 +23,26 @@
3.4
3.5 InitializeComponent();
3.6 UpdateStatus();
3.7 +
3.8 //Load settings
3.9 marqueeLabelTop.Font = Properties.Settings.Default.DisplayFont;
3.10 marqueeLabelBottom.Font = Properties.Settings.Default.DisplayFont;
3.11 checkBoxShowBorders.Checked = Properties.Settings.Default.DisplayShowBorders;
3.12 + checkBoxConnectOnStartup.Checked = Properties.Settings.Default.DisplayConnectOnStartup;
3.13 + //
3.14 + tableLayoutPanel.CellBorderStyle = (checkBoxShowBorders.Checked ? TableLayoutPanelCellBorderStyle.Single : TableLayoutPanelCellBorderStyle.None);
3.15 }
3.16
3.17 + private void MainForm_Load(object sender, EventArgs e)
3.18 + {
3.19 + if (Properties.Settings.Default.DisplayConnectOnStartup)
3.20 + {
3.21 + iDisplay.Open();
3.22 + UpdateStatus();
3.23 + }
3.24 + }
3.25 +
3.26 +
3.27 private void buttonFont_Click(object sender, EventArgs e)
3.28 {
3.29 //fontDialog.ShowColor = true;
3.30 @@ -126,7 +140,8 @@
3.31 unchecked
3.32 {
3.33 uint color=(uint)bmp.GetPixel(i, j).ToArgb();
3.34 - iDisplay.SetPixel(i, j, Convert.ToInt32((checkBoxShowBorders.Checked?color!=0xFFFFFFFF:color == 0xFF000000)));
3.35 + //(checkBoxShowBorders.Checked?color!=0xFFFFFFFF:color == 0xFF000000)
3.36 + iDisplay.SetPixel(i, j, Convert.ToInt32(color != 0xFFFFFFFF));
3.37 }
3.38 }
3.39 }
3.40 @@ -213,10 +228,20 @@
3.41 }
3.42 }
3.43
3.44 +
3.45 +
3.46 private void checkBoxShowBorders_CheckedChanged(object sender, EventArgs e)
3.47 {
3.48 + tableLayoutPanel.CellBorderStyle = (checkBoxShowBorders.Checked ? TableLayoutPanelCellBorderStyle.Single : TableLayoutPanelCellBorderStyle.None);
3.49 Properties.Settings.Default.DisplayShowBorders = checkBoxShowBorders.Checked;
3.50 Properties.Settings.Default.Save();
3.51 }
3.52 +
3.53 + private void checkBoxConnectOnStartup_CheckedChanged(object sender, EventArgs e)
3.54 + {
3.55 + Properties.Settings.Default.DisplayConnectOnStartup = checkBoxConnectOnStartup.Checked;
3.56 + Properties.Settings.Default.Save();
3.57 + }
3.58 +
3.59 }
3.60 }
4.1 --- a/Properties/Settings.Designer.cs Thu Jul 10 22:03:29 2014 +0200
4.2 +++ b/Properties/Settings.Designer.cs Sat Jul 12 13:13:17 2014 +0200
4.3 @@ -58,5 +58,17 @@
4.4 this["DisplayShowBorders"] = value;
4.5 }
4.6 }
4.7 +
4.8 + [global::System.Configuration.UserScopedSettingAttribute()]
4.9 + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
4.10 + [global::System.Configuration.DefaultSettingValueAttribute("False")]
4.11 + public bool DisplayConnectOnStartup {
4.12 + get {
4.13 + return ((bool)(this["DisplayConnectOnStartup"]));
4.14 + }
4.15 + set {
4.16 + this["DisplayConnectOnStartup"] = value;
4.17 + }
4.18 + }
4.19 }
4.20 }
5.1 --- a/Properties/Settings.settings Thu Jul 10 22:03:29 2014 +0200
5.2 +++ b/Properties/Settings.settings Sat Jul 12 13:13:17 2014 +0200
5.3 @@ -11,5 +11,8 @@
5.4 <Setting Name="DisplayShowBorders" Type="System.Boolean" Scope="User">
5.5 <Value Profile="(Default)">False</Value>
5.6 </Setting>
5.7 + <Setting Name="DisplayConnectOnStartup" Type="System.Boolean" Scope="User">
5.8 + <Value Profile="(Default)">False</Value>
5.9 + </Setting>
5.10 </Settings>
5.11 </SettingsFile>
5.12 \ No newline at end of file