Esempio n. 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            VerifyBeforeClose  = false;
            this.rTxtOutputer  = new RTxtOutputer(rtxtOutput);
            this.ShowInTaskbar = false;
            this.WindowState   = FormWindowState.Minimized;
            try
            {
                if (LoginDAO.CreateCred(commonAppConfig.IP, commonAppConfig.User, commonAppConfig.Pass))
                {
                    this.rTxtOutputer.Output("凭据添加成功");
                    Log4Neter.Info("凭据添加成功");
                }
                else
                {
                    this.rTxtOutputer.Output("凭据添加失败", eOutputType.Warn);
                    Log4Neter.Info("凭据添加失败");
                }
            }
            catch (Exception ex)
            {
                this.rTxtOutputer.Output("凭据添加失败", eOutputType.Error);
                Log4Neter.Error("添加凭据", ex);
            }

            //try
            //{
            //    // 添加、取消开机启动
            //    StartUpUtil.InsertStartUp(Application.ProductName, Application.ExecutablePath);
            //    this.rTxtOutputer.Output("添加开机启动成功", eOutputType.Normal);
            //    //StartUpUtil.DeleteStartUp(Application.ProductName);
            //}
            //catch (Exception ex)
            //{
            //    this.rTxtOutputer.Output("添加开机启动失败", eOutputType.Warn);
            //    Log4Neter.Error("添加开机启动", ex);
            //}

            TestFileSystemWatcher(commonAppConfig.DataPath);
        }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     LoginDAO.CreateCred("10.90.20.10", "assayuploader", "123456");
 }