Beispiel #1
0
        void BtnLoad_Click(object sender, RoutedEventArgs e)
        {
            Button thisButton = sender as Button;

            if (thisButton.Content != null)
            {
                ConfirmWindow confirmWindow = new ConfirmWindow("Вы действительно хотите загрузить это сохранение?");

                if (confirmWindow.ShowDialog() == false)
                {
                    return;
                }
            }

            LoadProcess(thisButton.Content.ToString());
        }
Beispiel #2
0
        void BtnSave_Click(object sender, RoutedEventArgs e)
        {
            thisButton = sender as Button;

            if (textBox != null)
            {
                return;
            }

            if (thisButton.Content != null)
            {
                ConfirmWindow confirmWindow = new ConfirmWindow("Вы действительно хотите перезаписать это сохранение?");

                if (confirmWindow.ShowDialog() == false)
                {
                    return;
                }
            }

            buttonName = thisButton.Name;
            SaveProcess();
        }