public static async Task TaskAction(ExtContentPage page, TodoTask todoTask, TodoList todoList) { var submitAccount = TodoApp.Current.GetLastUsedSubmitAccount <SubmitAccount>(todoList.ListId.ToString()); if (submitAccount == null || !todoList.IsLastUsedSecretKey(submitAccount) || todoTask.Status != TodoTaskStatusTypes.Open) { await page.Navigation.PushAsync(new TodoTaskPage(todoList, todoTask)); } else { var editItem = Tr.Get("TodoListView.EditItem"); var markDone = Tr.Get("TodoListView.MarkDone"); var result = await page.DisplayActionSheet(Tr.Get("TodoListView.ItemTitle"), Tr.Get("Common.Cancel"), null, markDone, editItem); if (result == markDone) { if (await page.ConfirmTextAsync(Tr.Get("TodoListView.ConfirmStatus"))) { page.IsBusy = true; UIApp.Run(() => TodoApp.Current.UpdateTodoItemStatus(submitAccount, TodoTaskStatusTypes.Closed, todoList, todoTask)); } } else if (result == editItem) { await page.Navigation.PushAsync(new TodoTaskPage(todoList, todoTask)); } } }
public static void NewContentPage(ExtContentPage contentPage) { if (IsGTK) { return; } #if ASSHOLE var background = new Label { BackgroundColor = Color.Red, FontSize = 20, TextColor = Color.White, Text = "DEBUG", VerticalTextAlignment = TextAlignment.Center, HorizontalTextAlignment = TextAlignment.Center }; AbsoluteLayout.SetLayoutFlags(background, AbsoluteLayoutFlags.WidthProportional); AbsoluteLayout.SetLayoutBounds(background, new Rectangle(0, 0, 1, 30)); background.InputTransparent = true; contentPage.RootLayout.Children.Insert(0, background); #endif if (!(contentPage is UWPMenuPage || contentPage is DesktopMenuPage)) { contentPage.EnableSkiaBackground(); } }
public static void NewContentPage(ExtContentPage contentPage) { if (IsGTK) { return; } if (!(contentPage is UWPMenuPage || contentPage is DesktopMenuPage || contentPage is IOSMenuPage)) { contentPage.EnableSkiaBackground(); } }
protected MessageViewBase(ExtContentPage page, TransactionDownloadData <Transaction> transaction) { Transaction = transaction; Page = page; TextLabel.InputTransparent = true; //TextLabel.FontStyle = Theme.TextFont; //TextLabel.ColorStyle = Theme.TextColor; TextLabel.Margin = new Thickness(15, 10, 15, 10); SizeChanged += LayoutChangedd; LayoutChanged += LayoutChangedd; }
public ImageMessageView(TransactionDownloadData <Transaction> transaction, ExtContentPage page) : base(page, transaction) { //LabelFrame.ColorStyle = Theme.MessageRowColor; LabelFrame.Content = TextLabel; LabelFrame.InputTransparent = true; Image.Aspect = Aspect.Fill; Image.InputTransparent = true; AbsoluteLayout.SetLayoutFlags(LabelFrame, AbsoluteLayoutFlags.WidthProportional | AbsoluteLayoutFlags.YProportional); AbsoluteLayout.SetLayoutBounds(LabelFrame, new Rectangle(0, 1, 1, AbsoluteLayout.AutoSize)); AbsoluteLayout.SetLayoutFlags(Image, AbsoluteLayoutFlags.SizeProportional); AbsoluteLayout.SetLayoutBounds(Image, new Rectangle(0, 0, 1, 1)); Update(); Children.Add(Image); Children.Add(LabelFrame); }
public TextMessageView(TransactionDownloadData <Transaction> transaction, ExtContentPage page) : base(page, transaction) { Update(); Children.Add(TextLabel); }
public static async Task OpenStatusAccountPage(ExtContentPage page, ServiceNode serviceNode, long accountId, StatusAccountProfileType profileType, long transactionId = 0) { var profile = await ProfileManager.Current.GetProfileData(accountId, ProfileDownloadType.QueryStoredData, false); await page.Navigation.PushAsync(new StatusAccountPage(profile, serviceNode, accountId, profileType, transactionId)); }
public static async Task <bool> CheckSecretKey(TodoList todoList, SubmitAccount submitAccount, ExtContentPage page) { if (todoList == null) { return(false); } if (!todoList.IsLastUsedSecretKey(submitAccount)) { if (!await page.ConfirmAsync("TodoPage.DifferentSecretKeyConfirm")) { return(false); } } return(true); }