private void bt_SetToDefault_Click(object sender, EventArgs e) { Default yd = new Default(); yd.xmlFirst = "ChinaLife"; if (DialogResult.OK == yd.ShowDialog()) { cfg_chinalife cfg = new cfg_chinalife(); cfg.GetConfig(); eNumberHead = cfg.ENumberHead; this.tbSignatureDate.Text = cfg.Signature; this.numericUpDown1.Value = cfg.OffsetX; this.numericUpDown2.Value = cfg.OffsetY; this.tbNo.Text = cfg.SaveNo; } }
private void ChinaLife_Load(object sender, EventArgs e) { cfg_chinalife cc = new cfg_chinalife(); cc.GetConfig(); this.tbSignatureDate.Text = System.DateTime.Now.ToShortDateString(); this.numericUpDown1.Value = cc.OffsetX; this.numericUpDown2.Value = cc.OffsetY; this.tbNo.Text = cc.SaveNo; this.tbPhone.Text = cc.Phone; retstring = ""; b_opened = true; connect_4_Command.PrintWindowOpen = true; context = this; if (this.tbPhone.Text.Trim() == "82424242") { tbPhone.Text = ""; } }