Exemple #1
0
 private void txtTable_TextChanged(object sender, EventArgs e)
 {
     IniHelper.WriteIniKey("数据库", "表名", txtTable.Text);
 }
Exemple #2
0
 private void txt_port_TextChanged(object sender, EventArgs e)
 {
     IniHelper.WriteIniKey("数据库", "端口", txt_port.Text);
 }
Exemple #3
0
 private void txt_pass_TextChanged(object sender, EventArgs e)
 {
     IniHelper.WriteIniKey("数据库", "密码", txt_pass.Text);
 }
Exemple #4
0
 private void txt_server_TextChanged(object sender, EventArgs e)
 {
     IniHelper.WriteIniKey("数据库", "地址", txt_server.Text);
 }
Exemple #5
0
 private void textBox1_TextChanged(object sender, EventArgs e)
 {
     IniHelper.WriteIniKey("淘宝客", "推广位", textBox1.Text);
 }
Exemple #6
0
 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
 {
     numericUpDown1.EndInit();
     IniHelper.WriteIniKey("定时", "秒", numericUpDown1.Text);
 }
Exemple #7
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            //隐藏创建pid的选项卡
            tabControl1.TabPages[1].Parent = null;


            //淘宝联盟账号 combox

            /*
             * IList<TbUnionAccountBean> infoList = new List<TbUnionAccountBean>();
             * String accountArr = IniHelper.GetIniKeyValue("淘宝联盟账号", "集合");
             * if (String.IsNullOrEmpty(accountArr))
             * {
             *  Addlogs("淘宝联盟账号读取失败,请检查Config.ini是否配置淘宝联盟账号-集合");
             *  return;
             * }
             * else
             * {
             *  String[] account = accountArr.Split('#');
             *  foreach(string accInfo in account)
             *  {
             *      if (!String.IsNullOrEmpty(accInfo))
             *      {
             *          String[] accInfoArr = accInfo.Split('|');
             *          if (accInfoArr.Length == 2)
             *          {
             *              TbUnionAccountBean info1 = new TbUnionAccountBean() { Id = accInfoArr[1], Name = accInfoArr[0] };
             *              infoList.Add(info1);
             *          }
             *
             *      }
             *  }
             * }
             * IList<TbUnionAccountBean> infoList = DataUtil.infoList;
             * if (infoList.Count == 0)
             * {
             *  Addlogs("淘宝联盟账号读取失败,请检查Config.ini是否配置淘宝联盟账号-集合\n格式:账号1|账号1id#账号1|账号1id" );
             *  return;
             * }
             *
             * this.tbUnionAccountCombox.DataSource = infoList;
             * this.tbUnionAccountCombox.ValueMember = "Id";
             * this.tbUnionAccountCombox.DisplayMember = "Name";
             */
            //淘宝联盟账号 combox
            this.tbUnionAccountCombox.ValueMember   = "Id";
            this.tbUnionAccountCombox.DisplayMember = "Name";
            DataPassWithinForm.ComboBoxInMainForm   = this.tbUnionAccountCombox;

            DbHelperMySQL.connectionString =
                "Database='" + txtTable.Text.Trim() + "';Data Source='" + txt_server.Text + "';User Id='" + txt_name.Text + "';Password='******';port='" + txt_port.Text + "';charset='utf8';pooling=true";
            numericUpDown1.Text = IniHelper.GetIniKeyValue("定时", "秒");
            textBox1.Text       = IniHelper.GetIniKeyValue("淘宝客", "推广位");
            txt_server.Text     = IniHelper.GetIniKeyValue("数据库", "地址");
            txt_port.Text       = IniHelper.GetIniKeyValue("数据库", "端口");
            txt_name.Text       = IniHelper.GetIniKeyValue("数据库", "登录名");
            txt_pass.Text       = IniHelper.GetIniKeyValue("数据库", "密码");
            txtDbName.Text      = IniHelper.GetIniKeyValue("数据库", "数据库名");
            txtTable.Text       = IniHelper.GetIniKeyValue("数据库", "表名");

            label11.Text = numericUpDown1.Text + " 秒";

            string filepath = Application.StartupPath + "\\Orders";

            if (Directory.Exists(filepath))
            {
                Directory.Delete(filepath, true);
            }
            else
            {
                Directory.CreateDirectory(filepath);
            }
            Directory.CreateDirectory(filepath);
        }
Exemple #8
0
 private void AliLoginForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.timer1.Stop();
     IniHelper.FilePath = DT.ConfigPath;
     IniHelper.WriteIniKey("MinOrMax", "way", "normal");
 }