Exemple #1
0
        protected override async Task OnRefreshAsync()
        {
            Bot bot;

            await base.OnRefreshAsync();

            await Tasks.RefreshAsync();

            bot = await BotsClient.GetBotForWorkerAsync(Model.WorkerID);

            if (bot == null)
            {
                Bot = null;
            }
            else
            {
                Bot = new BotViewModel(PIOClient, BotsClient, TranslationModule);
                await Bot.LoadAsync(bot);
            }
        }
Exemple #2
0
        protected override async Task OnLoadAsync(Worker Model)
        {
            Bot bot;

            Tasks = new TasksViewModel(PIOClient, BotsClient, TranslationModule, Model.WorkerID);
            await Tasks.LoadAsync();

            Task = Tasks.FirstOrDefault();

            bot = await BotsClient.GetBotForWorkerAsync(Model.WorkerID);

            if (bot == null)
            {
                Bot = null;
            }
            else
            {
                Bot = new BotViewModel(PIOClient, BotsClient, TranslationModule);
                await Bot.LoadAsync(bot);
            }
        }