Ejemplo n.º 1
0
        private void UpdateStepUi(PictureBox pictureBox, Label label, Bitmap bitmap)
        {
            ThreadSafeControlHelper.UpdatePictureBox(pictureBox, (Image)bitmap.Clone());

            ThreadSafeControlHelper.InvokeControl(label, () =>
            {
                label.Top = pictureBox.Bounds.Bottom;
            });
        }
Ejemplo n.º 2
0
        public void StartBot(List <AwakeItem> preferredAwakes)
        {
            _isRunning = true;

            _awakeningThread = new Thread((awakes) => AwakeningLoopThread(preferredAwakes));
            _awakeningThread.Start(preferredAwakes);

            ThreadSafeControlHelper.ChangeControlText(_ui.ButtonStartBot, "Stop [END]");
        }
Ejemplo n.º 3
0
 private void UpdateIterationTimeLabels(long ms)
 {
     ThreadSafeControlHelper.ChangeControlText(_ui.LabelIterationTime, ms.ToString() + " ms");
     ThreadSafeControlHelper.ChangeControlText(_ui.LabelTotalTries, (Convert.ToInt32(_ui.LabelTotalTries.Text) + 1).ToString());
 }
Ejemplo n.º 4
0
 public void StopBot()
 {
     _isRunning = false;
     ThreadSafeControlHelper.ChangeControlText(_ui.ButtonStartBot, "Start");
 }
Ejemplo n.º 5
0
        private void AppendLog(string message)
        {
            string currentTime = DateTime.Now.ToString("[HH:mm:ss] ");

            ThreadSafeControlHelper.AppendTextBox(_ui.TextBoxLog, currentTime + message + Environment.NewLine);
        }