コード例 #1
0
ファイル: MainForm.cs プロジェクト: gilby125/CliverBot
 private void About_Click(object sender, EventArgs e)
 {
     AF = new AboutForm();
     AF.Show(this);
 }
コード例 #2
0
ファイル: ConfigForm.cs プロジェクト: aTiKhan/CliverBot
        private void About_Click(object sender, System.EventArgs e)
        {
            AboutForm a = new AboutForm();

            a.ShowDialog();
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: aTiKhan/CliverBot
 virtual public List <ButtonAction> GetButtonActions()
 {
     return(new List <ButtonAction> {
         new ButtonAction {
             Name = "About", Action = () =>
             {
                 AboutForm f = Bot.Activator.Create <AboutForm>(false);
                 f.ShowDialog();
             }
         },
         new ButtonAction {
             Name = "Help", Action = () =>
             {
                 try
                 {
                     Process.Start(Bot.Settings.App.HelpUri);
                 }
                 catch (Exception ex)
                 {
                     LogMessage.Error(ex);
                 }
             }
         },
         new ButtonAction {
             Name = "Input", Action = () =>
             {
                 try
                 {
                     Process.Start(Bot.Settings.Input.File);
                 }
                 catch (Exception ex)
                 {
                     LogMessage.Error(ex);
                 }
             }
         },
         new ButtonAction {
             Name = "Work Dir", Action = () =>
             {
                 try
                 {
                     Process.Start(Log.RootDir);
                 }
                 catch (Exception ex)
                 {
                     LogMessage.Error(ex);
                 }
             }
         },
         new ButtonAction {
             Name = "Settings", Action = () =>
             {
                 ConfigForm f = Bot.Activator.Create <ConfigForm>(false);
                 f.ShowDialog(MainForm.This);
             }
         },
         new ButtonAction {
             Name = "Threads", Action = () =>
             {
                 BotThreadManagerForm.Visible = true;
                 //BotThreadManagerForm.ShowInTaskbar = true;
                 //BotThreadManagerForm.WindowState = FormWindowState.Normal;
                 BotThreadManagerForm.Activate();
             }
         },
     });
 }