1.1 --- a/MainForm.cs Mon Jul 07 21:32:02 2014 +0200
1.2 +++ b/MainForm.cs Mon Jul 07 22:29:26 2014 +0200
1.3 @@ -43,10 +43,11 @@
1.4 if (DlgBox.ShowDialog(fontDialog) != DialogResult.Cancel)
1.5 {
1.6
1.7 - MsgBox.Show("MessageBox MsgBox", "MsgBox caption");
1.8 + //MsgBox.Show("MessageBox MsgBox", "MsgBox caption");
1.9
1.10 //MessageBox.Show("Ok");
1.11 - //textBox1.Font = fontDlg.Font;
1.12 + marqueeLabelTop.Font = fontDialog.Font;
1.13 + marqueeLabelBottom.Font = fontDialog.Font;
1.14 //label1.Font = fontDlg.Font;
1.15 //textBox1.BackColor = fontDlg.Color;
1.16 //label1.ForeColor = fontDlg.Color;
1.17 @@ -69,6 +70,29 @@
1.18 marqueeLabelBottom.UpdateAnimation(LastTickTime, NewTickTime);
1.19
1.20 LastTickTime = NewTickTime;
1.21 +
1.22 + //Update our display
1.23 + if (iDisplay.IsOpen())
1.24 + {
1.25 + //Draw to bitmap
1.26 + System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(tableLayoutPanel.Width, tableLayoutPanel.Height);
1.27 + tableLayoutPanel.DrawToBitmap(bmp, tableLayoutPanel.ClientRectangle);
1.28 + //Send it to our display
1.29 + for (int i = 0; i < bmp.Width; i++)
1.30 + {
1.31 + for (int j = 0; j < bmp.Height; j++)
1.32 + {
1.33 + unchecked
1.34 + {
1.35 + uint color=(uint)bmp.GetPixel(i, j).ToArgb();
1.36 + iDisplay.SetPixel(i, j, Convert.ToInt32(color!=0xFFFFFFFF));
1.37 + }
1.38 + }
1.39 + }
1.40 +
1.41 + iDisplay.SwapBuffers();
1.42 +
1.43 + }
1.44 }
1.45
1.46 private void buttonOpen_Click(object sender, EventArgs e)