Exemplo n.º 1
0
        public Login()
        {
            InitializeComponent();

            this.KeyPreview = true;
            this.KeyPress += Comdata.textBox_KeyPressDBC;
            //textBox1.KeyPress += Comdata.textBox_KeyPressDBC;
            //textBox2.KeyPress += Comdata.textBox_KeyPressDBC;
            #if ALONE
            button2.Visible = false;
            button1.Location = new System.Drawing.Point(100, 161);
            #else

            #endif

            ///读取上次记录的账户密码
            if (iniLogin.Read())
            {
                textBox1.Text = iniLogin.FileObj.id;
                textBox2.Text = iniLogin.FileObj.psw;
            }

            //////////////////读取打印机信息/////////////////
            Comdata.iniPrint.Read();

            //////////////////读取服务器配置/////////////////
            if (!Mysqlcom.ServerSet.Read())
            {
                Form3 f3 = new Form3();
                f3.ShowDialog();
            }

            //////////////////读取洗衣店信息/////////////////
            if (!Comdata.iniShop.Read())
            {
                CreateShop cs = new CreateShop();
                cs.ShowDialog();
            }

            this.Font = new System.Drawing.Font("宋体", Comdata.iniShop.FileObj.font_size);
        }
Exemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form3 f3 = new Form3();
     f3.ShowDialog();
 }