コード例 #1
0
        private void RunClient(String locale)
        {
            LocaleChanger.ChangeVarTXT(locale, locale);
            Client client = Client.GetClientByLocale(locale);
            String path   = client.GameFolder + "\\StarCraft II.exe";

            if (File.Exists(path))
            {
                System.Diagnostics.Process.Start(path);
                Application.Exit();
            }
            else
            {
                MessageBox.Show(path + "\n指定位置找不到客户端,请重新编辑游戏所在目录!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                try
                {
                    EditClient open = new EditClient(client);
                    open.ShowDialog();
                }
                catch (Exception ex)
                {
                    //Do any logging operation here if necessary
                    MessageBox.Show(ex.Message + " \n\n" + ex.Source + "\n\n" + ex.StackTrace, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
コード例 #2
0
 private void Button_EditClient_Click(object sender, EventArgs e)
 {
     try
     {
         EditClient open = new EditClient(Client.GetClientByClientListItem(ClientList.SelectedItem.ToString()));
         open.ShowDialog();
     }
     catch (Exception ex)
     {
         //Do any logging operation here if necessary  
         MessageBox.Show(ex.Message + " \n\n" + ex.Source + "\n\n" + ex.StackTrace, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #3
0
 private void Button_EditClient_Click(object sender, EventArgs e)
 {
     try
     {
         EditClient open = new EditClient(Client.GetClientByClientListItem(ClientList.SelectedItem.ToString()));
         open.ShowDialog();
     }
     catch (Exception ex)
     {
         //Do any logging operation here if necessary
         MessageBox.Show(ex.Message + " \n\n" + ex.Source + "\n\n" + ex.StackTrace, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #4
0
 private void Button_AddClient_Click(object sender, EventArgs e)
 {
     EditClient open = new EditClient();
     open.ShowDialog();
 }
コード例 #5
0
 private void RunClient(String locale)
 {
     LocaleChanger.ChangeVarTXT(locale, locale);
     Client client = Client.GetClientByLocale(locale);
     String path = client.GameFolder + "\\StarCraft II.exe";
     if (File.Exists(path))
     {
         System.Diagnostics.Process.Start(path);
         Application.Exit();
     }
     else
     {
         MessageBox.Show(path + "\n指定位置找不到客户端,请重新编辑游戏所在目录!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         try
         {
             EditClient open = new EditClient(client);
             open.ShowDialog();
         }
         catch (Exception ex)
         {
             //Do any logging operation here if necessary  
             MessageBox.Show(ex.Message + " \n\n" + ex.Source + "\n\n" + ex.StackTrace, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
コード例 #6
0
        private void Button_AddClient_Click(object sender, EventArgs e)
        {
            EditClient open = new EditClient();

            open.ShowDialog();
        }