Adding suspend/resume button.
Setting our server process to higher priority to avoid render lags.
1.1 --- a/Client/Program.cs Thu Aug 14 09:57:44 2014 +0200
1.2 +++ b/Client/Program.cs Thu Aug 14 10:19:53 2014 +0200
1.3 @@ -16,6 +16,9 @@
1.4 [STAThread]
1.5 static public void Main()
1.6 {
1.7 + //Set high priority to our process to avoid lags when rendering to our screen
1.8 + System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal;
1.9 +
1.10 Application.EnableVisualStyles();
1.11 Application.SetCompatibleTextRenderingDefault(false);
1.12 iMainForm = new MainForm();
2.1 --- a/Server/MainForm.Designer.cs Thu Aug 14 09:57:44 2014 +0200
2.2 +++ b/Server/MainForm.Designer.cs Thu Aug 14 10:19:53 2014 +0200
2.3 @@ -35,8 +35,6 @@
2.4 this.checkBoxConnectOnStartup = new System.Windows.Forms.CheckBox();
2.5 this.panelDisplay = new System.Windows.Forms.Panel();
2.6 this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
2.7 - this.marqueeLabelTop = new SharpDisplayManager.MarqueeLabel();
2.8 - this.marqueeLabelBottom = new SharpDisplayManager.MarqueeLabel();
2.9 this.checkBoxShowBorders = new System.Windows.Forms.CheckBox();
2.10 this.trackBarBrightness = new System.Windows.Forms.TrackBar();
2.11 this.buttonFill = new System.Windows.Forms.Button();
2.12 @@ -54,6 +52,9 @@
2.13 this.toolStripStatusLabelPower = new System.Windows.Forms.ToolStripStatusLabel();
2.14 this.toolStripStatusLabelFps = new System.Windows.Forms.ToolStripStatusLabel();
2.15 this.buttonStartClient = new System.Windows.Forms.Button();
2.16 + this.buttonSuspend = new System.Windows.Forms.Button();
2.17 + this.marqueeLabelTop = new SharpDisplayManager.MarqueeLabel();
2.18 + this.marqueeLabelBottom = new SharpDisplayManager.MarqueeLabel();
2.19 this.tabControl.SuspendLayout();
2.20 this.tabPageDisplay.SuspendLayout();
2.21 this.panelDisplay.SuspendLayout();
2.22 @@ -77,6 +78,7 @@
2.23 //
2.24 // tabPageDisplay
2.25 //
2.26 + this.tabPageDisplay.Controls.Add(this.buttonSuspend);
2.27 this.tabPageDisplay.Controls.Add(this.buttonStartClient);
2.28 this.tabPageDisplay.Controls.Add(this.checkBoxReverseScreen);
2.29 this.tabPageDisplay.Controls.Add(this.checkBoxConnectOnStartup);
2.30 @@ -204,39 +206,6 @@
2.31 this.tableLayoutPanel.Size = new System.Drawing.Size(256, 64);
2.32 this.tableLayoutPanel.TabIndex = 5;
2.33 //
2.34 - // marqueeLabelTop
2.35 - //
2.36 - this.marqueeLabelTop.AutoEllipsis = true;
2.37 - this.marqueeLabelTop.BackColor = System.Drawing.Color.Transparent;
2.38 - this.marqueeLabelTop.Dock = System.Windows.Forms.DockStyle.Fill;
2.39 - this.marqueeLabelTop.Location = new System.Drawing.Point(1, 1);
2.40 - this.marqueeLabelTop.Margin = new System.Windows.Forms.Padding(0);
2.41 - this.marqueeLabelTop.Name = "marqueeLabelTop";
2.42 - this.marqueeLabelTop.OwnTimer = false;
2.43 - this.marqueeLabelTop.PixelsPerSecond = 64;
2.44 - this.marqueeLabelTop.Separator = "|";
2.45 - this.marqueeLabelTop.Size = new System.Drawing.Size(254, 30);
2.46 - this.marqueeLabelTop.TabIndex = 2;
2.47 - this.marqueeLabelTop.Text = "ABCDEFGHIJKLMNOPQRST-0123456789";
2.48 - this.marqueeLabelTop.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2.49 - this.marqueeLabelTop.UseCompatibleTextRendering = true;
2.50 - //
2.51 - // marqueeLabelBottom
2.52 - //
2.53 - this.marqueeLabelBottom.AutoEllipsis = true;
2.54 - this.marqueeLabelBottom.Dock = System.Windows.Forms.DockStyle.Fill;
2.55 - this.marqueeLabelBottom.Location = new System.Drawing.Point(1, 32);
2.56 - this.marqueeLabelBottom.Margin = new System.Windows.Forms.Padding(0);
2.57 - this.marqueeLabelBottom.Name = "marqueeLabelBottom";
2.58 - this.marqueeLabelBottom.OwnTimer = false;
2.59 - this.marqueeLabelBottom.PixelsPerSecond = 64;
2.60 - this.marqueeLabelBottom.Separator = null;
2.61 - this.marqueeLabelBottom.Size = new System.Drawing.Size(254, 31);
2.62 - this.marqueeLabelBottom.TabIndex = 3;
2.63 - this.marqueeLabelBottom.Text = "abcdefghijklmnopqrst-0123456789";
2.64 - this.marqueeLabelBottom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2.65 - this.marqueeLabelBottom.UseCompatibleTextRendering = true;
2.66 - //
2.67 // checkBoxShowBorders
2.68 //
2.69 this.checkBoxShowBorders.AutoSize = true;
2.70 @@ -387,6 +356,49 @@
2.71 this.buttonStartClient.UseVisualStyleBackColor = true;
2.72 this.buttonStartClient.Click += new System.EventHandler(this.buttonStartClient_Click);
2.73 //
2.74 + // buttonSuspend
2.75 + //
2.76 + this.buttonSuspend.Location = new System.Drawing.Point(7, 253);
2.77 + this.buttonSuspend.Name = "buttonSuspend";
2.78 + this.buttonSuspend.Size = new System.Drawing.Size(75, 23);
2.79 + this.buttonSuspend.TabIndex = 16;
2.80 + this.buttonSuspend.Text = "Suspend";
2.81 + this.buttonSuspend.UseVisualStyleBackColor = true;
2.82 + this.buttonSuspend.Click += new System.EventHandler(this.buttonSuspend_Click);
2.83 + //
2.84 + // marqueeLabelTop
2.85 + //
2.86 + this.marqueeLabelTop.AutoEllipsis = true;
2.87 + this.marqueeLabelTop.BackColor = System.Drawing.Color.Transparent;
2.88 + this.marqueeLabelTop.Dock = System.Windows.Forms.DockStyle.Fill;
2.89 + this.marqueeLabelTop.Location = new System.Drawing.Point(1, -376);
2.90 + this.marqueeLabelTop.Margin = new System.Windows.Forms.Padding(0);
2.91 + this.marqueeLabelTop.Name = "marqueeLabelTop";
2.92 + this.marqueeLabelTop.OwnTimer = false;
2.93 + this.marqueeLabelTop.PixelsPerSecond = 64;
2.94 + this.marqueeLabelTop.Separator = "|";
2.95 + this.marqueeLabelTop.Size = new System.Drawing.Size(254, 20);
2.96 + this.marqueeLabelTop.TabIndex = 2;
2.97 + this.marqueeLabelTop.Text = "ABCDEFGHIJKLMNOPQRST-0123456789";
2.98 + this.marqueeLabelTop.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2.99 + this.marqueeLabelTop.UseCompatibleTextRendering = true;
2.100 + //
2.101 + // marqueeLabelBottom
2.102 + //
2.103 + this.marqueeLabelBottom.AutoEllipsis = true;
2.104 + this.marqueeLabelBottom.Dock = System.Windows.Forms.DockStyle.Fill;
2.105 + this.marqueeLabelBottom.Location = new System.Drawing.Point(1, -250);
2.106 + this.marqueeLabelBottom.Margin = new System.Windows.Forms.Padding(0);
2.107 + this.marqueeLabelBottom.Name = "marqueeLabelBottom";
2.108 + this.marqueeLabelBottom.OwnTimer = false;
2.109 + this.marqueeLabelBottom.PixelsPerSecond = 64;
2.110 + this.marqueeLabelBottom.Separator = null;
2.111 + this.marqueeLabelBottom.Size = new System.Drawing.Size(254, 20);
2.112 + this.marqueeLabelBottom.TabIndex = 3;
2.113 + this.marqueeLabelBottom.Text = "abcdefghijklmnopqrst-0123456789";
2.114 + this.marqueeLabelBottom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
2.115 + this.marqueeLabelBottom.UseCompatibleTextRendering = true;
2.116 + //
2.117 // MainForm
2.118 //
2.119 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
2.120 @@ -440,6 +452,7 @@
2.121 private System.Windows.Forms.CheckBox checkBoxConnectOnStartup;
2.122 private System.Windows.Forms.CheckBox checkBoxReverseScreen;
2.123 private System.Windows.Forms.Button buttonStartClient;
2.124 + private System.Windows.Forms.Button buttonSuspend;
2.125 }
2.126 }
2.127
3.1 --- a/Server/MainForm.cs Thu Aug 14 09:57:44 2014 +0200
3.2 +++ b/Server/MainForm.cs Thu Aug 14 10:19:53 2014 +0200
3.3 @@ -406,6 +406,19 @@
3.4 clientThread.Start();
3.5 }
3.6
3.7 + private void buttonSuspend_Click(object sender, EventArgs e)
3.8 + {
3.9 + timer.Enabled = !timer.Enabled;
3.10 + if (!timer.Enabled)
3.11 + {
3.12 + buttonSuspend.Text = "Suspend";
3.13 + }
3.14 + else
3.15 + {
3.16 + buttonSuspend.Text = "Pause";
3.17 + }
3.18 + }
3.19 +
3.20
3.21
3.22 }