Пример #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

#if __ANDROID__
            int[] position = new int[2];
            MyTextBlock.GetLocationOnScreen(position);
            Console.WriteLine($"MyTextBloc Position x:{position[0]}, y:{position[1]}");
#endif
        }
Пример #2
0
        private void EditCategory_Click(object sender, EventArgs e)
        {
            MyTextBlock mt = (MyTextBlock)sender;

            if (mt.Tag != null)
            {
                Data.Category  category          = (Data.Category)mt.Tag;
                AddNewCategory newCategoryDialog = new Projects.AddNewCategory(category, this.RootCategory);
                newCategoryDialog.Closing   += NewCategoryDialog_Closing;
                newCategoryDialog.Confirmed += NewCategoryDialog_UpdateConfirmed;
                this.ShowDialog(newCategoryDialog);
            }
        }
Пример #3
0
        private void DeleteCategory_Click(object sender, EventArgs e)
        {
            MyTextBlock mt = (MyTextBlock)sender;

            if (mt.Tag != null)
            {
                Data.Category         category = (Data.Category)mt.Tag;
                Dialogs.ConfirmDialog Cfm      = new Dialogs.ConfirmDialog("Are you sure want to delete category: \n" + category.Name, Dialogs.ConfirmDialog.DialogTypes.YesNo);
                Cfm.Header   = "Confirm Delete Category";
                Cfm.Tag      = category.Key;
                Cfm.Closing += DeleteCfmClosing;
                this.ShowDialog(Cfm);
            }
        }