public TaskListPage(UserDTO user) { _user = user; _provider = new TaskManagerProvider(); _businessLogic = new TaskManagerBusinessLogic(); _tasks = _provider.GetTasksByUser(_user); _businessLogic.SortTasks(_tasks); string status; foreach (TaskDTO task in _tasks) { if (task.IsDone) { status = "Done"; } else { status = "In progress"; } buttons.Add(new Button { Content = $"{task.PublisherName} to group {task.GroupTitle} \n{task.PublicationDate} {status} \n{task.Content}", ButtonAction = MarkTaskAsDone }); } buttons.Add(new Button { Content = "<-- back to Main Menu", ButtonAction = BackToMainMenu }); }
public AuthenticationPage() { _provider = new TaskManagerProvider(); buttons.Add(new Button { Content = "Login", ButtonAction = LogIn }); buttons.Add(new Button { Content = "Registration", ButtonAction = Registration }); buttons.Add(new Button { Content = "Exit", ButtonAction = Exit }); }
public GroupPage(GroupDTO group, UserDTO user) { _group = group; _user = user; _provider = new TaskManagerProvider(); _businessLogic = new TaskManagerBusinessLogic(); _tasks = _provider.GetTasksByGroup(_group); _businessLogic.SortTasks(_tasks); buttons.Add(new Button { Content = $"Group : {group.Title}\n", ButtonAction = NullAction, AbilityToChange = false }); string status = string.Empty; foreach (TaskDTO task in _tasks) { if (task.IsDone) { status = "Done"; } else { status = "In progress"; } buttons.Add(new Button { Content = $"{task.PublisherName} {task.PublicationDate} {status} \n{task.Content}", ButtonAction = MarkTaskAsDone }); } buttons.Add(new Button { Content = "Add new task", ButtonAction = AddNewTask, AbilityToChange = false }); buttons.Add(new Button { Content = "Add new user", ButtonAction = AddNewUserToGroup, AbilityToChange = false }); buttons.Add(new Button { Content = "Leave group", ButtonAction = LeaveGroup, AbilityToChange = false }); buttons.Add(new Button { Content = "<-- back to groups", ButtonAction = BackToGroups, AbilityToChange = false }); }
public GroupListPage(UserDTO user) { _user = user; _provider = new TaskManagerProvider(); try { _groups = _provider.GetGroupsByUser(_user); foreach (GroupDTO group in _groups) { buttons.Add( new Button { Content = $"{group.Title} \n {group.NumberOfUnresolvedTasks} unresolved tasks", ButtonAction = ShowGroup }); } } catch (Exception) { buttons.Add(new Button { Content = "No groups", ButtonAction = NullAction, AbilityToChange = false, BackgroundColor = ConsoleColor.Red }); } buttons.Add(new Button { Content = "Add new group", ButtonAction = AddNewGroup, AbilityToChange = false, BackgroundColor = ConsoleColor.DarkYellow }); buttons.Add(new Button { Content = "<-- back to Main Menu", ButtonAction = BackToMainMenu, AbilityToChange = false, BackgroundColor = ConsoleColor.DarkYellow }); }
public override void Start() { Poi.Current = null; if (DutyManager.InInstance && !Constants.SelectedDungeon.DeepDungeonRawIds.Contains(WorldManager.ZoneId)) { Constants.SelectedDungeon = Constants.GetDeepDungeonByMapid(WorldManager.ZoneId); Settings.Instance.BetterSelectedLevel = Constants.SelectedDungeon.Floors.FirstOrDefault(i => i.MapId == WorldManager.ZoneId); Logger.Warn($"Started bot inside dungeon (Not currently selected): Using {Constants.SelectedDungeon.DisplayName}"); } if (Constants.SelectedDungeon == null) { Logger.Error("No Selected Deep Dungeon: Something went really wrong"); _root = new ActionAlwaysFail(); return; } if (Settings.Instance.BetterSelectedLevel == null) { Settings.Instance.BetterSelectedLevel = Constants.SelectedDungeon.Floors[0]; Logger.Error($"No floor selected, setting it to use [{Settings.Instance.BetterSelectedLevel.DisplayName}]"); } Logger.Info(Constants.SelectedDungeon.ToString()); //setup navigation manager Navigator.NavigationProvider = new DDNavigationProvider(new ServiceNavigationProvider()); Navigator.PlayerMover = new SlideMover(); TreeHooks.Instance.ClearAll(); DeepTracker.InitializeTracker(Core.Me.ClassLevel); _tasks = new TaskManagerProvider(); _tasks.Add(new LoadingHandler()); _tasks.Add(new DeathWindowHandler()); _tasks.Add(new SideStepTask()); //not sure if i want the trap handler to be above combat or not _tasks.Add(new TrapHandler()); //pomanders for sure need to happen before combat so that we can correctly apply Lust for bosses _tasks.Add(new Pomanders()); _tasks.Add(new CombatHandler()); _tasks.Add(new LobbyHandler()); _tasks.Add(new GetToCaptain()); _tasks.Add(new POTDEntrance()); _tasks.Add(new CairnOfReturn()); _tasks.Add(new FloorExit()); _tasks.Add(new Loot()); _tasks.Add(new StuckDetection()); _tasks.Add(new POTDNavigation()); _tasks.Add(new BaseLogicHandler()); Settings.Instance.Stop = false; if (!Core.Me.IsDow()) { Logger.Error("Please change to a DOW class"); _root = new ActionAlwaysFail(); return; } Logger.Error($"DeepDungeon status agent id {DeepDungeonStatus.Agent}"); //setup combat manager CombatTargeting.Instance.Provider = new DDCombatTargetingProvider(); GameSettingsManager.FaceTargetOnAction = true; if (Constants.Lang == Language.Chn) { //回避 - sidestep //Zekken if (PluginManager.Plugins.Any(i => (i.Plugin.Name.Contains("Zekken") || i.Plugin.Name.Contains("技能躲避")) && i.Enabled)) { Logger.Error("禁用 AOE技能躲避插件 - Zekken"); _root = new ActionAlwaysFail(); return; } } if (PluginManager.Plugins.Any(i => i.Plugin.Name == "Zekken" && i.Enabled)) { Logger.Error( "Zekken is currently turned on, It will interfere with DeepDive & SideStep. Please Turn it off and restart the bot."); _root = new ActionAlwaysFail(); return; } if (!ConditionParser.IsQuestCompleted(Constants.SelectedDungeon.UnlockQuest)) { Logger.Error($"You must complete \"{DataManager.GetLocalizedQuestName(Constants.SelectedDungeon.UnlockQuest)}\" to run this base."); Logger.Error( "Please switch to \"Order Bot\" and run the profile: \\BotBases\\DeepDive\\Profiles\\PotD_Unlock.xml"); _root = new ActionAlwaysFail(); return; } if (!ConditionParser.IsQuestCompleted(Settings.Instance.BetterSelectedLevel.QuestId)) { Logger.Error($"You must complete \"{DataManager.GetLocalizedQuestName(Settings.Instance.BetterSelectedLevel.QuestId)}\" to run this floor."); Logger.Error("Complete the quest or change the floor selection"); _root = new ActionAlwaysFail(); return; } //Logger.Error($"Quest {Settings.Instance.BetterSelectedLevel.QuestId} - \"{DataManager.GetLocalizedQuestName(Settings.Instance.BetterSelectedLevel.QuestId)}\" to run this base."); StopPlz = false; SetupSettings(); _root = new ActionRunCoroutine(async x => { if (StopPlz) { return(false); } if (!_init) { Logging.Write("DeepDive is waiting on Initialization to finish"); return(true); } if (await _tasks.Run()) { await Coroutine.Yield(); } else { Logger.Warn("No tasks ran"); await Coroutine.Sleep(1000); } return(true); }); }
public override void Start() { Poi.Current = null; //setup navigation manager Navigator.NavigationProvider = new DDNavigationProvider(new ServiceNavigationProvider()); Navigator.PlayerMover = new SlideMover(); TreeHooks.Instance.ClearAll(); _tasks = new TaskManagerProvider(); _tasks.Add(new LoadingHandler()); _tasks.Add(new DeathWindowHandler()); _tasks.Add(new SideStepTask()); //not sure if i want the trap handler to be above combat or not _tasks.Add(new TrapHandler()); //pomanders for sure need to happen before combat so that we can correctly apply Lust for bosses _tasks.Add(new Pomanders()); _tasks.Add(new CombatHandler()); _tasks.Add(new LobbyHandler()); _tasks.Add(new GetToCaptiain()); _tasks.Add(new POTDEntrance()); _tasks.Add(new CarnOfReturn()); _tasks.Add(new FloorExit()); _tasks.Add(new Loot()); _tasks.Add(new StuckDetection()); _tasks.Add(new POTDNavigation()); _tasks.Add(new BaseLogicHandler()); Settings.Instance.Stop = false; if (!Core.Me.IsDow()) { Logger.Error("Please change to a DOW class"); _root = new ActionAlwaysFail(); return; } //setup combat manager CombatTargeting.Instance.Provider = new DDCombatTargetingProvider(); GameSettingsManager.FaceTargetOnAction = true; if (Constants.Lang == Language.Chn) { //回避 - sidestep //Zekken if (PluginManager.Plugins.Any(i => (i.Plugin.Name.Contains("Zekken") || i.Plugin.Name.Contains("技能躲避")) && i.Enabled)) { Logger.Error("禁用 AOE技能躲避插件 - Zekken"); _root = new ActionAlwaysFail(); return; } } if (PluginManager.Plugins.Any(i => i.Plugin.Name == "Zekken" && i.Enabled)) { Logger.Error( "Zekken is currently turned on, It will interfere with DeepDive & SideStep. Please Turn it off and restart the bot."); _root = new ActionAlwaysFail(); return; } if (!ConditionParser.IsQuestCompleted(67092)) { Logger.Error("You must complete \"The House That Death Built\" to run this base."); Logger.Error( "Please switch to \"Order Bot\" and run the profile: \\BotBases\\DeepDive\\Profiles\\PotD_Unlock.xml"); _root = new ActionAlwaysFail(); return; } StopPlz = false; SetupSettings(); _root = new ActionRunCoroutine(async x => { if (StopPlz) { return(false); } if (!_init) { ff14bot.Helpers.Logging.Write($"DeepDive is waiting on Initialization to finish"); return(true); } if (await _tasks.Run()) { await Coroutine.Yield(); } else { Logger.Warn($"No tasks ran"); await Coroutine.Sleep(1000); } return(true); }); }
public override void Start() { Poi.Current = null; //setup navigation manager Navigator.NavigationProvider = new DDNavigationProvider(new ServiceNavigationProvider()); Navigator.PlayerMover = new SlideMover(); TreeHooks.Instance.ClearAll(); _tasks = new TaskManagerProvider(); DeepTracker.InitializeTracker(Core.Me.ClassLevel); _tasks.Add(new LoadingHandler()); _tasks.Add(new DeathWindowHandler()); _tasks.Add(new SideStepTask()); //not sure if i want the trap handler to be above combat or not _tasks.Add(new TrapHandler()); //pomanders for sure need to happen before combat so that we can correctly apply Lust for bosses _tasks.Add(new Pomanders()); _tasks.Add(new CombatHandler()); _tasks.Add(new LobbyHandler()); _tasks.Add(new GetToCaptiain()); _tasks.Add(new POTDEntrance()); _tasks.Add(new CarnOfReturn()); _tasks.Add(new FloorExit()); _tasks.Add(new Loot()); _tasks.Add(new StuckDetection()); _tasks.Add(new POTDNavigation()); _tasks.Add(new BaseLogicHandler()); Settings.Instance.Stop = false; if (!Core.Me.IsDow()) { Logger.Error("Please change to a DOW class"); _root = new ActionAlwaysFail(); return; } //setup combat manager CombatTargeting.Instance.Provider = new DDCombatTargetingProvider(); GameSettingsManager.FaceTargetOnAction = true; if (Constants.Lang == Language.Chn) { //回避 - sidestep //Zekken if (PluginManager.Plugins.Any(i => (i.Plugin.Name.Contains("Zekken") || i.Plugin.Name.Contains("技能躲避")) && i.Enabled)) { Logger.Error("禁用 AOE技能躲避插件 - Zekken"); _root = new ActionAlwaysFail(); return; } } if (PluginManager.Plugins.Any(i => i.Plugin.Name == "Zekken" && i.Enabled)) { Logger.Error( "Zekken is currently turned on, It will interfere with DeepDive & SideStep. Please Turn it off and restart the bot."); _root = new ActionAlwaysFail(); return; } if (!ConditionParser.IsQuestCompleted(67092)) { Logger.Error("You must complete \"The House That Death Built\" to run this base."); Logger.Error( "Please switch to \"Order Bot\" and run the profile: \\BotBases\\DeepDive\\Profiles\\PotD_Unlock.xml"); _root = new ActionAlwaysFail(); return; } StopPlz = false; SetupSettings(); if (ShowDebug) { if (_debug == null) { // _debug = new Debug // { //Text = "DeepDive2 v" + v //title // }; try { //_debug = new Form1(); Thread Messagethread = new Thread(new ThreadStart(delegate() { _debug = new Form1(); /* DispatcherOperation DispacherOP = * _debug.Dispatcher.BeginInvoke( * DispatcherPriority.Normal, * new System.Action(delegate () * { * _debug.Show(); * _debug.Closed += (o, e) => { _debug = null; }; * })); * * _debug.BeginInvoke( * new System.Action(delegate () * { * // _debug.Show(); * _debug.ShowDialog(); * _debug.Closed += (o, e) => { _debug = null; }; * })); * // _debug.Show(); */ _debug.ShowDialog(); //_debug.listBox1.DataSource = DDTargetingProvider.Instance.LastEntities; })); Messagethread.SetApartmentState(ApartmentState.STA); Messagethread.Start(); // _debug.Show(); _debug.listBox1.DataSource = DDTargetingProvider.Instance.LastEntities; //_debug.ShowDialog(); DeepTracker._debug = _debug; } catch (Exception) { } } } _root = new ActionRunCoroutine(async x => { if (StopPlz) { return(false); } if (!_init) { Logging.Write("DeepDive is waiting on Initialization to finish"); return(true); } if (await _tasks.Run()) { await Coroutine.Yield(); } else { Logger.Warn("No tasks ran"); await Coroutine.Sleep(1000); } return(true); }); }