示例#1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Const.dianName = Const.DecodeBase64(Const.readConfig()[0]);
            Const.userName = Const.DecodeBase64(Const.readConfig()[1]);
            Const.address  = Const.DecodeBase64(Const.readConfig()[2]);
            Const.call     = Const.DecodeBase64(Const.readConfig()[3]);
            Rectangle rect = Screen.GetWorkingArea(this);
            Point     p    = new Point((rect.Width - this.Size.Width) / 2, (rect.Height - this.Size.Height) / 2);

            this.Location = p;
            initData("select *  from caidan");
            loadData();
        }
示例#2
0
 private void Config_Load(object sender, EventArgs e)
 {
     string [] config = Const.readConfig();
     if ("0".Equals(config[4]))
     {
         textBox1.Text = Const.DecodeBase64(config[0]);
         textBox2.Text = Const.DecodeBase64(config[1]);
         textBox3.Text = Const.DecodeBase64(config[2]);
         textBox4.Text = Const.DecodeBase64(config[3]);
     }
     else
     {
         MessageBox.Show("读取配置文件失败!请检查");
     }
 }