예제 #1
0
 private void forwardMessageToLogMonitor(string message, string name)
 {
     System.Windows.Application.Current.Dispatcher.BeginInvoke((Action)(() =>
     {
         logMonitor.addLogMessage(message, name);
     }));
 }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();
            //System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en");

            logMonitor = new LogMonitor(tbLog, tbLogScroll);

            infoManager = new InfoManager();
            infoManager.provideLVS(lvTasks, lvData, lvProxy);

            bot = new Bot(infoManager);

            colTaskName.DisplayMemberBinding      = new Binding("TaskName");
            colProfile.DisplayMemberBinding       = new Binding("ProfileName");
            colCheckoutDelay.DisplayMemberBinding = new Binding("CheckoutDelay");

            dataColProfileName.DisplayMemberBinding = new Binding("ProfileName");

            colProxyName.DisplayMemberBinding = new Binding("profileName");
            colIP.DisplayMemberBinding        = new Binding("ip");
            colUsername.DisplayMemberBinding  = new Binding("username");

            bot.logMonitor = logMonitor;

            logMonitor.addLogMessage(Properties.Resources.logLoadingData, "BOT");

            infoManager.loadProfilesList();
            infoManager.loadTasksList();
            infoManager.loadProxiesList();

            logMonitor.addLogMessage(Properties.Resources.logLoadingDataFinished, "BOT");

            cbCountry.SelectedIndex   = 0;
            cbCardType.SelectedIndex  = 0;
            cbCardMonth.SelectedIndex = 0;
            cbCardYear.SelectedIndex  = 0;

            bot.monitorCaptchas(lCapchasSolved);
        }
예제 #3
0
        private void butRemoveTask_Click(object sender, RoutedEventArgs e)
        {
            LvTaskItem gti = ((LvTaskItem)lvTasks.SelectedItem);

            if (gti != null)    // something is selected
            {
                infoManager.RemoveTaskByName(gti.TaskName);
                infoManager.updateTasksList();
                infoManager.saveTasksList();
                logMonitor.addLogMessage(Properties.Resources.logTaskRemoved, "BOT");
            }
            else
            {
                MessageBox.Show(Properties.Resources.errorSelectTaskFirst);
            }
        }