private void Form1_Load(object sender, EventArgs e) { TimeLbl.Text = DateTime.Now.GetDateTimeFormats('t')[0].ToString(); DateLbl.Text = DateTime.Now.GetDateTimeFormats('M')[0].ToString() + ","; Lbl.Text = Week(); PassPanel.Hide(); }
// Use this for initialization void Start() { instance = this; this.gameObject.SetActive(false); this.transform.Find("Beginbtn").GetComponent <Button>().onClick.AddListener(BeginGame); this.transform.Find("Fhbtn").GetComponent <Button>().onClick.AddListener(FhGame); Initialization(); PassText(); }
private void Form1_MouseClick(object sender, MouseEventArgs e) { Image img = Properties.Resources._2;//双引号里是图片的路径 this.BackgroundImage = img; IconPic.Visible = true; PassTxtBox.Visible = true; PassPic.Visible = true; PassTxtBox.Text = ""; NickNameLbl.Visible = true; TimeLbl.Visible = false; DateLbl.Visible = false; Lbl.Visible = false; PassPanel.Show(); }
private void PassPic_Click(object sender, EventArgs e) { string password = "******"; if (PassTxtBox.Text == password) { FormDesk dsk = new FormDesk(); dsk.Show(); } else { PassPanel.Hide(); TipPanel.Show(); } }
private void Form1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { string password = "******"; if (PassTxtBox.Text == password) { FormDesk dsk = new FormDesk(); dsk.Show(); } else { PassPanel.Hide(); TipPanel.Show(); } } }
private void ConfrimBt_Click(object sender, EventArgs e) { TipPanel.Hide(); PassTxtBox.Text = ""; PassPanel.Show(); }
private void Awake() { instance = this; }