예제 #1
0
 private void Settings_Click(object sender, EventArgs e)
 {
     CF = new ConfigForm();
     CF.Show(MainForm.This);
 }
예제 #2
0
 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();
             }
         },
     });
 }