コード例 #1
0
ファイル: Manager.cs プロジェクト: alaatm/UltimateFishbot
        public Manager(IManagerEventHandler managerEventHandler, IProgress <string> progressHandle)
        {
            m_managerEventHandler = managerEventHandler;

            m_eyes  = new Eyes();
            m_hands = new Hands();
            m_ears  = new Ears();
            m_mouth = new Mouth(progressHandle);
            m_legs  = new Legs();

            m_fishingState  = FishingState.Stopped;
            m_neededActions = NeededAction.None;

            m_fishingStats = new FishingStats();
            m_fishingStats.Reset();

            _cancellationTokenSource = null;

            InitializeTimer(ref m_LureTimer, LureTimerTick);
            InitializeTimer(ref m_CharmTimer, CharmTimerTick);
            InitializeTimer(ref m_RaftTimer, RaftTimerTick);
            InitializeTimer(ref m_BaitTimer, BaitTimerTick);
            InitializeTimer(ref m_HearthStoneTimer, HearthStoneTimerTick);
            InitializeTimer(ref m_AntiAfkTimer, AntiAfkTimerTick);

            ResetTimers();
        }
コード例 #2
0
ファイル: frmStats.cs プロジェクト: wele/UltimateFishbot
 private void UpdateStats()
 {
     UltimateFishBot.Classes.FishingStats stats = m_manager.GetFishingStats();
     labelSuccessCount.Text  = stats.totalSuccessFishing.ToString();
     labelNotFoundCount.Text = stats.totalNotFoundFish.ToString();
     labelNotEaredCount.Text = stats.totalNotEaredFish.ToString();
     labelTotalCount.Text    = stats.Total().ToString();
 }
コード例 #3
0
ファイル: Manager.cs プロジェクト: NaNraptor/UltimateFishbot
        public Manager(IManagerEventHandler managerEventHandler, IProgress <string> progressHandle)
        {
            m_managerEventHandler = managerEventHandler;
            IntPtr       WowWindowPointer = Helpers.Win32.FindWowWindow();
            DialogResult result           = DialogResult.Cancel;

            while (WowWindowPointer == new IntPtr())
            {
                result = MessageBox.Show("Could not find the the WoW process. Please make sure the game is running.", "Error - WoW not open", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
                if (result == DialogResult.Cancel)
                {
                    Environment.Exit(1);
                }
                WowWindowPointer = Helpers.Win32.FindWowWindow();
            }
            m_eyes  = new Eyes(WowWindowPointer);
            m_hands = new Hands(WowWindowPointer);
            m_ears  = new Ears();
            m_mouth = new Mouth(progressHandle);
            m_legs  = new Legs();

            m_fishingState  = FishingState.Stopped;
            m_neededActions = NeededAction.None;

            m_fishingStats = new FishingStats();
            m_fishingStats.Reset();

            _cancellationTokenSource = null;

            InitializeTimer(ref m_LureTimer, LureTimerTick);
            InitializeTimer(ref m_CharmTimer, CharmTimerTick);
            InitializeTimer(ref m_RaftTimer, RaftTimerTick);
            InitializeTimer(ref m_BaitTimer, BaitTimerTick);
            InitializeTimer(ref m_HearthStoneTimer, HearthStoneTimerTick);
            InitializeTimer(ref m_AntiAfkTimer, AntiAfkTimerTick);

            ResetTimers();
        }