Adding OwnTimer property to marquee. This enables us to use an external timer
and thus use a single timer for multiple marquee.
1 namespace SharpDisplayManager
6 /// Required designer variable.
8 private System.ComponentModel.IContainer components = null;
11 /// Clean up any resources being used.
13 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
14 protected override void Dispose(bool disposing)
16 if (disposing && (components != null))
20 base.Dispose(disposing);
23 #region Windows Form Designer generated code
26 /// Required method for Designer support - do not modify
27 /// the contents of this method with the code editor.
29 private void InitializeComponent()
31 this.components = new System.ComponentModel.Container();
32 this.tabControl = new System.Windows.Forms.TabControl();
33 this.tabPageDisplay = new System.Windows.Forms.TabPage();
34 this.buttonCapture = new System.Windows.Forms.Button();
35 this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
36 this.buttonFont = new System.Windows.Forms.Button();
37 this.tabPageTests = new System.Windows.Forms.TabPage();
38 this.fontDialog = new System.Windows.Forms.FontDialog();
39 this.timer = new System.Windows.Forms.Timer(this.components);
40 this.marqueeLabelTop = new SharpDisplayManager.MarqueeLabel();
41 this.marqueeLabelBottom = new SharpDisplayManager.MarqueeLabel();
42 this.tabControl.SuspendLayout();
43 this.tabPageDisplay.SuspendLayout();
44 this.tableLayoutPanel.SuspendLayout();
49 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
50 | System.Windows.Forms.AnchorStyles.Left)
51 | System.Windows.Forms.AnchorStyles.Right)));
52 this.tabControl.Controls.Add(this.tabPageDisplay);
53 this.tabControl.Controls.Add(this.tabPageTests);
54 this.tabControl.Location = new System.Drawing.Point(12, 12);
55 this.tabControl.Name = "tabControl";
56 this.tabControl.SelectedIndex = 0;
57 this.tabControl.Size = new System.Drawing.Size(529, 362);
58 this.tabControl.TabIndex = 0;
62 this.tabPageDisplay.Controls.Add(this.buttonCapture);
63 this.tabPageDisplay.Controls.Add(this.tableLayoutPanel);
64 this.tabPageDisplay.Controls.Add(this.buttonFont);
65 this.tabPageDisplay.Location = new System.Drawing.Point(4, 22);
66 this.tabPageDisplay.Name = "tabPageDisplay";
67 this.tabPageDisplay.Padding = new System.Windows.Forms.Padding(3);
68 this.tabPageDisplay.Size = new System.Drawing.Size(521, 336);
69 this.tabPageDisplay.TabIndex = 0;
70 this.tabPageDisplay.Text = "Display";
71 this.tabPageDisplay.UseVisualStyleBackColor = true;
75 this.buttonCapture.Location = new System.Drawing.Point(6, 278);
76 this.buttonCapture.Name = "buttonCapture";
77 this.buttonCapture.Size = new System.Drawing.Size(75, 23);
78 this.buttonCapture.TabIndex = 5;
79 this.buttonCapture.Text = "Capture";
80 this.buttonCapture.UseVisualStyleBackColor = true;
81 this.buttonCapture.Click += new System.EventHandler(this.buttonCapture_Click);
85 this.tableLayoutPanel.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
86 this.tableLayoutPanel.ColumnCount = 1;
87 this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
88 this.tableLayoutPanel.Controls.Add(this.marqueeLabelTop, 0, 0);
89 this.tableLayoutPanel.Controls.Add(this.marqueeLabelBottom, 0, 1);
90 this.tableLayoutPanel.Location = new System.Drawing.Point(215, 165);
91 this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(0);
92 this.tableLayoutPanel.Name = "tableLayoutPanel";
93 this.tableLayoutPanel.RowCount = 2;
94 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
95 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
96 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
97 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
98 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
99 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
100 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
101 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
102 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
103 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
104 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
105 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
106 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
107 this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
108 this.tableLayoutPanel.Size = new System.Drawing.Size(256, 64);
109 this.tableLayoutPanel.TabIndex = 4;
113 this.buttonFont.Location = new System.Drawing.Point(6, 307);
114 this.buttonFont.Name = "buttonFont";
115 this.buttonFont.Size = new System.Drawing.Size(75, 23);
116 this.buttonFont.TabIndex = 0;
117 this.buttonFont.Text = "Select Font";
118 this.buttonFont.UseVisualStyleBackColor = true;
119 this.buttonFont.Click += new System.EventHandler(this.buttonFont_Click);
123 this.tabPageTests.Location = new System.Drawing.Point(4, 22);
124 this.tabPageTests.Name = "tabPageTests";
125 this.tabPageTests.Padding = new System.Windows.Forms.Padding(3);
126 this.tabPageTests.Size = new System.Drawing.Size(521, 336);
127 this.tabPageTests.TabIndex = 1;
128 this.tabPageTests.Text = "Test";
129 this.tabPageTests.UseVisualStyleBackColor = true;
133 this.timer.Enabled = true;
134 this.timer.Interval = 50;
135 this.timer.Tick += new System.EventHandler(this.timer_Tick);
139 this.marqueeLabelTop.BackColor = System.Drawing.Color.Transparent;
140 this.marqueeLabelTop.Dock = System.Windows.Forms.DockStyle.Fill;
141 this.marqueeLabelTop.Location = new System.Drawing.Point(1, -187);
142 this.marqueeLabelTop.Margin = new System.Windows.Forms.Padding(0);
143 this.marqueeLabelTop.Name = "marqueeLabelTop";
144 this.marqueeLabelTop.OwnTimer = false;
145 this.marqueeLabelTop.PixelsPerSecond = 64;
146 this.marqueeLabelTop.Size = new System.Drawing.Size(254, 20);
147 this.marqueeLabelTop.TabIndex = 2;
148 this.marqueeLabelTop.Text = "ABCDEFGHIJKLMNOPQRST-0123456789";
149 this.marqueeLabelTop.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
150 this.marqueeLabelTop.UseCompatibleTextRendering = true;
152 // marqueeLabelBottom
154 this.marqueeLabelBottom.Dock = System.Windows.Forms.DockStyle.Fill;
155 this.marqueeLabelBottom.Location = new System.Drawing.Point(1, -61);
156 this.marqueeLabelBottom.Margin = new System.Windows.Forms.Padding(0);
157 this.marqueeLabelBottom.Name = "marqueeLabelBottom";
158 this.marqueeLabelBottom.OwnTimer = false;
159 this.marqueeLabelBottom.PixelsPerSecond = 64;
160 this.marqueeLabelBottom.Size = new System.Drawing.Size(254, 20);
161 this.marqueeLabelBottom.TabIndex = 3;
162 this.marqueeLabelBottom.Text = "abcdefghijklmnopqrst-0123456789";
163 this.marqueeLabelBottom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
164 this.marqueeLabelBottom.UseCompatibleTextRendering = true;
168 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
169 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
170 this.ClientSize = new System.Drawing.Size(553, 386);
171 this.Controls.Add(this.tabControl);
172 this.Name = "MainForm";
173 this.Text = "Sharp Display Manager";
174 this.tabControl.ResumeLayout(false);
175 this.tabPageDisplay.ResumeLayout(false);
176 this.tableLayoutPanel.ResumeLayout(false);
177 this.ResumeLayout(false);
183 private System.Windows.Forms.TabControl tabControl;
184 private System.Windows.Forms.TabPage tabPageDisplay;
185 private System.Windows.Forms.TabPage tabPageTests;
186 private System.Windows.Forms.Button buttonFont;
187 private System.Windows.Forms.FontDialog fontDialog;
188 private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
189 private MarqueeLabel marqueeLabelTop;
190 private MarqueeLabel marqueeLabelBottom;
191 private System.Windows.Forms.Button buttonCapture;
192 private System.Windows.Forms.Timer timer;