Esempio n. 1
0
        private void Remove_Clicked(object sender, RoutedEventArgs e)
        {
            e.Handled = true;

            if (MessageBox.Show(Window.GetWindow(this), UserQueryMessage.AreYouSureToRemove0.NiceToString().FormatWith(CurrentUserChart), UserQueryMessage.RemoveUserQuery.NiceToString(),
                                MessageBoxButton.YesNo, MessageBoxImage.Exclamation, MessageBoxResult.No) == MessageBoxResult.Yes)
            {
                CurrentUserChart.ToLite().DeleteLite(UserChartOperation.Delete);

                CurrentUserChart = null;

                Initialize();
            }
        }
Esempio n. 2
0
        private void Edit_Clicked(object sender, RoutedEventArgs e)
        {
            e.Handled = true;

            var d    = Dispatcher;
            var desc = Description;

            Navigator.Navigate(CurrentUserChart.ToLite().Retrieve(), new NavigateOptions()
            {
                View = () => new UserChart {
                    QueryDescription = desc
                },
                Closed = (s, args) => d.Invoke(() => Initialize())
            });
        }