예제 #1
0
        private void delBtn_Click(object sender, RoutedEventArgs e)
        {
            MessageWindow message = new MessageWindow("Czy na pewno chcesz usunąć całe zadanie?", true);

            try
            {
                if (message.ShowDialog() == true)
                {
                    string simpleResponse;
                    simpleResponse = mainTask.DeleteTask();

                    if (simpleResponse != null)
                    {
                        MessageWindow message1 = new MessageWindow("Usunięto zadanie");
                        message1.Show();
                        this.Close();
                    }
                }
            }
            catch (Exception exc)
            {
                MessageWindow messageWindow = new MessageWindow(exc.Message);
                messageWindow.Show();
            }
        }
        private void delBtn_Click(object sender, RoutedEventArgs e)
        {
            MessageWindow message = new MessageWindow("Czy na pewno chcesz usunąć to zadanie? ", true);

            if (message.ShowDialog() == true)
            {
                materialsLstBox.ItemsSource = null;
                MessageWindow message2 = new MessageWindow(mainTask.DeleteTask());
                message2.Show();
                this.Close();
            }
        }