📄 bookofthedayform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Globalization;
using System.Threading;
using System.Resources;
using System.Reflection;
namespace Wrox.ProCSharp
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class BookOfTheDayForm : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBoxItemsSold;
private System.Windows.Forms.Label labelBooksSold;
private System.Windows.Forms.TextBox textBoxTitle;
private System.Windows.Forms.TextBox textBoxDate;
private System.Windows.Forms.Label labelBookOfTheDay;
private System.Windows.Forms.PictureBox pictureBoxLogo;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public BookOfTheDayForm(string culture)
{
if (culture != "")
{
CultureInfo cultureInfo = new CultureInfo(culture);
// set culture for formatting
Thread.CurrentThread.CurrentCulture = cultureInfo;
// set culture for resources
Thread.CurrentThread.CurrentUICulture = cultureInfo;
}
WelcomeMessage();
//
// Required for Windows Form Designer support
//
InitializeComponent();
SetDateAndNumber();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(BookOfTheDayForm));
this.textBoxItemsSold = new System.Windows.Forms.TextBox();
this.labelBooksSold = new System.Windows.Forms.Label();
this.textBoxTitle = new System.Windows.Forms.TextBox();
this.textBoxDate = new System.Windows.Forms.TextBox();
this.labelBookOfTheDay = new System.Windows.Forms.Label();
this.pictureBoxLogo = new System.Windows.Forms.PictureBox();
this.SuspendLayout();
//
// textBoxItemsSold
//
this.textBoxItemsSold.AccessibleDescription = ((string)(resources.GetObject("textBoxItemsSold.AccessibleDescription")));
this.textBoxItemsSold.AccessibleName = ((string)(resources.GetObject("textBoxItemsSold.AccessibleName")));
this.textBoxItemsSold.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("textBoxItemsSold.Anchor")));
this.textBoxItemsSold.AutoSize = ((bool)(resources.GetObject("textBoxItemsSold.AutoSize")));
this.textBoxItemsSold.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("textBoxItemsSold.BackgroundImage")));
this.textBoxItemsSold.Cursor = System.Windows.Forms.Cursors.Default;
this.textBoxItemsSold.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("textBoxItemsSold.Dock")));
this.textBoxItemsSold.Enabled = ((bool)(resources.GetObject("textBoxItemsSold.Enabled")));
this.textBoxItemsSold.Font = ((System.Drawing.Font)(resources.GetObject("textBoxItemsSold.Font")));
this.textBoxItemsSold.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("textBoxItemsSold.ImeMode")));
this.textBoxItemsSold.Location = ((System.Drawing.Point)(resources.GetObject("textBoxItemsSold.Location")));
this.textBoxItemsSold.MaxLength = ((int)(resources.GetObject("textBoxItemsSold.MaxLength")));
this.textBoxItemsSold.Multiline = ((bool)(resources.GetObject("textBoxItemsSold.Multiline")));
this.textBoxItemsSold.Name = "textBoxItemsSold";
this.textBoxItemsSold.PasswordChar = ((char)(resources.GetObject("textBoxItemsSold.PasswordChar")));
this.textBoxItemsSold.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("textBoxItemsSold.RightToLeft")));
this.textBoxItemsSold.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("textBoxItemsSold.ScrollBars")));
this.textBoxItemsSold.Size = ((System.Drawing.Size)(resources.GetObject("textBoxItemsSold.Size")));
this.textBoxItemsSold.TabIndex = ((int)(resources.GetObject("textBoxItemsSold.TabIndex")));
this.textBoxItemsSold.Text = resources.GetString("textBoxItemsSold.Text");
this.textBoxItemsSold.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("textBoxItemsSold.TextAlign")));
this.textBoxItemsSold.Visible = ((bool)(resources.GetObject("textBoxItemsSold.Visible")));
this.textBoxItemsSold.WordWrap = ((bool)(resources.GetObject("textBoxItemsSold.WordWrap")));
//
// labelBooksSold
//
this.labelBooksSold.AccessibleDescription = ((string)(resources.GetObject("labelBooksSold.AccessibleDescription")));
this.labelBooksSold.AccessibleName = ((string)(resources.GetObject("labelBooksSold.AccessibleName")));
this.labelBooksSold.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("labelBooksSold.Anchor")));
this.labelBooksSold.AutoSize = ((bool)(resources.GetObject("labelBooksSold.AutoSize")));
this.labelBooksSold.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("labelBooksSold.Dock")));
this.labelBooksSold.Enabled = ((bool)(resources.GetObject("labelBooksSold.Enabled")));
this.labelBooksSold.Font = ((System.Drawing.Font)(resources.GetObject("labelBooksSold.Font")));
this.labelBooksSold.Image = ((System.Drawing.Image)(resources.GetObject("labelBooksSold.Image")));
this.labelBooksSold.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("labelBooksSold.ImageAlign")));
this.labelBooksSold.ImageIndex = ((int)(resources.GetObject("labelBooksSold.ImageIndex")));
this.labelBooksSold.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("labelBooksSold.ImeMode")));
this.labelBooksSold.Location = ((System.Drawing.Point)(resources.GetObject("labelBooksSold.Location")));
this.labelBooksSold.Name = "labelBooksSold";
this.labelBooksSold.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("labelBooksSold.RightToLeft")));
this.labelBooksSold.Size = ((System.Drawing.Size)(resources.GetObject("labelBooksSold.Size")));
this.labelBooksSold.TabIndex = ((int)(resources.GetObject("labelBooksSold.TabIndex")));
this.labelBooksSold.Text = resources.GetString("labelBooksSold.Text");
this.labelBooksSold.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("labelBooksSold.TextAlign")));
this.labelBooksSold.Visible = ((bool)(resources.GetObject("labelBooksSold.Visible")));
//
// textBoxTitle
//
this.textBoxTitle.AccessibleDescription = ((string)(resources.GetObject("textBoxTitle.AccessibleDescription")));
this.textBoxTitle.AccessibleName = ((string)(resources.GetObject("textBoxTitle.AccessibleName")));
this.textBoxTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("textBoxTitle.Anchor")));
this.textBoxTitle.AutoSize = ((bool)(resources.GetObject("textBoxTitle.AutoSize")));
this.textBoxTitle.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("textBoxTitle.BackgroundImage")));
this.textBoxTitle.Cursor = System.Windows.Forms.Cursors.Default;
this.textBoxTitle.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("textBoxTitle.Dock")));
this.textBoxTitle.Enabled = ((bool)(resources.GetObject("textBoxTitle.Enabled")));
this.textBoxTitle.Font = ((System.Drawing.Font)(resources.GetObject("textBoxTitle.Font")));
this.textBoxTitle.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("textBoxTitle.ImeMode")));
this.textBoxTitle.Location = ((System.Drawing.Point)(resources.GetObject("textBoxTitle.Location")));
this.textBoxTitle.MaxLength = ((int)(resources.GetObject("textBoxTitle.MaxLength")));
this.textBoxTitle.Multiline = ((bool)(resources.GetObject("textBoxTitle.Multiline")));
this.textBoxTitle.Name = "textBoxTitle";
this.textBoxTitle.PasswordChar = ((char)(resources.GetObject("textBoxTitle.PasswordChar")));
this.textBoxTitle.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("textBoxTitle.RightToLeft")));
this.textBoxTitle.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("textBoxTitle.ScrollBars")));
this.textBoxTitle.Size = ((System.Drawing.Size)(resources.GetObject("textBoxTitle.Size")));
this.textBoxTitle.TabIndex = ((int)(resources.GetObject("textBoxTitle.TabIndex")));
this.textBoxTitle.Text = resources.GetString("textBoxTitle.Text");
this.textBoxTitle.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("textBoxTitle.TextAlign")));
this.textBoxTitle.Visible = ((bool)(resources.GetObject("textBoxTitle.Visible")));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -