private FishingSteps RunOnce() { switch (m_step) { case FishingSteps.START: return(FishingBoat.StartFishing()); case FishingSteps.START_LOOP: return(FishingBoat.StartLoop()); case FishingSteps.STOP: return(FishingBoat.StopFishing()); case FishingSteps.STOP_LOOP: return(FishingBoat.StopLoop()); case FishingSteps.GUESS_WASD: return(FishingBoat.GuessWasd()); case FishingSteps.INPUT_TEXT: return(FishingBoat.InputText()); case FishingSteps.TAKE_DROP: return(FishingBoat.TakeDrop()); case FishingSteps.RESTART: return(FishingBoat.RestartFishing()); } return(FishingSteps.IDLE); }
private void Window_Loaded(object sender, RoutedEventArgs e) { m_model = DataContext as OptionModel; m_model.FoodHotkey = FishingBoat.GetInteger("FoodHotkey"); m_model.FoodTime = FishingBoat.GetInteger("FoodTime"); m_model.FoodEnabled = FishingBoat.GetBoolean("FoodEnabled"); m_model.LogDrops = FishingBoat.GetBoolean("LogDrops"); m_model.LogSlider = FishingBoat.GetBoolean("LogSlider"); m_model.LogTimer = FishingBoat.GetBoolean("LogTimer"); }
private void Window_Loaded(object sender, RoutedEventArgs e) { m_model = DataContext as MainModel; m_model.DropGold = FishingBoat.GetBoolean("DropGold"); m_model.DropBlue = FishingBoat.GetBoolean("DropBlue"); m_model.DropGreen = FishingBoat.GetBoolean("DropGreen"); m_model.Templates = FishingBoat.GetText("Templates"); m_logFunc = new FishingBoat.LogFunc(LogFunc); FishingBoat.LogCallback(m_logFunc); m_running = true; m_thread1 = new Thread(Thread_Func1); m_thread2 = new Thread(Thread_Func2); m_thread1.Start(); m_thread2.Start(); }
private string StepToText(FishingSteps step) { switch (step) { case FishingSteps.START: return("準備"); case FishingSteps.START_LOOP: return("等待開始..."); case FishingSteps.STOP: return("收竿"); case FishingSteps.STOP_LOOP: return("等待重試..."); case FishingSteps.GUESS_WASD: return("文字辨識"); case FishingSteps.INPUT_TEXT: return(FishingBoat.GetText("WASD")); case FishingSteps.TAKE_DROP: return("撿取物品"); case FishingSteps.RESTART: return("拋竿"); } return(null); }