Пример #1
0
        public void SetState(ToolBot_State newState)
        {
            this.BotState = newState;
            if (this.stateLabel == null)
            {
                return;
            }

            this.stateLabel.Invoke(new Action(
                                       () => {
                this.ProcessState(this.BotState);
            }
                                       ));
        }
Пример #2
0
        private void ProcessState(ToolBot_State state)
        {
            string stateText = string.Empty;

            switch (state)
            {
            case ToolBot_State.Deactivated:
                stateText = "Bot system is deactivated";
                break;

            case ToolBot_State.Initializing:
                stateText = "Bot initializing";
                break;

            case ToolBot_State.Idle:
                stateText = "Systems ready! Waitting for port to hack";
                break;

            case ToolBot_State.Hacking:
                stateText = "Hacking in process";
                break;

            case ToolBot_State.HackingNewWord:
                stateText = "Hacking in process - New word require identification";
                break;

            case ToolBot_State.Error:
                break;

            case ToolBot_State.HackingSucess:
                stateText = "Hacking sucessful!";
                break;

            default:
                break;
            }
            this.stateLabel.Text = stateText;
        }