Пример #1
0
 private void DazeRestart_Click(object sender, EventArgs e)
 {
     currentServer.Text = "当前服务器:未选择";
     dz.close();
     dz = new DazeHelper(this, cfg.LocalPort);
     LoadLastServer();
     dz.Run();
 }
Пример #2
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     this.Text   = "DazeClient-GUI " + version;
     cfg         = new Config();
     cfg.Servers = new Server[0];
     InitNotifyIcon();
     try
     {
         LoadConfig();
     }
     catch (Exception ex)
     {
         MessageBox.Show("配置文件GuiConfig.json加载失败,请修改正确或者直接把它删了。\n具体错误信息:" + ex.Message, "错误");
         System.Environment.Exit(0);
     }
     updateStatus = new UpdateStatus(UpdateStatusMethod);
     dz           = new DazeHelper(this, cfg.LocalPort);
     LoadLastServer();
     dz.Run();
     SaveConfig();
     refreshList();
     ShowBalloonMsg("配置", "配置加载成功,一共" + cfg.Servers.Length.ToString() + "个服务器\n", 1000);
 }