コード例 #1
0
        /// <summary>
        /// Gets usually invoked from FormMainwindow, hence we don't have any issues yet.
        /// </summary>
        /// <param name="paramformMainWindow"></param>
        public TemplateCopier(FormMainWindow paramformMainWindow)
        {
            InitializeComponent();
            this.formMainWindow = paramformMainWindow;

            //brobot
            bRobot = new BackGroundRobot();
            //ResetBot();
            ruleEditor.SetFileName(SessionsManager.TemplateParserFileName);
            comboWikiSelector.DataSource = mediaWikiVars;
        }
コード例 #2
0
 private void ResetBot()
 {
     bRobot = new BackGroundRobot();
     bRobot.SetThreadSleepTime = int.Parse(comboBoxThreadSleepTime.SelectedValue + "000");
     //if the user has ever logged in get the username and password
     if (formMainWindow.SessionsManager.LoginData.HasLoggedInOnce)
     {
         //username and passwords are saved in that file
         bRobot.SetFormMainWindowUserNameAndPassword(
             formMainWindow.SessionsManager.LoginData.UserName,
             formMainWindow.SessionsManager.LoginData.Password
             );
     }
     else
     {
         LoginForm loginForm = new LoginForm(formMainWindow.SessionsManager);
         loginForm.ShowDialog();
         ResetBot();
     }
 }