Пример #1
0
        public void OnCloseArchiveButtonClicked(object sender, RoutedEventArgs e)
        {
            ConnexionWindow connectWindow = new ConnexionWindow();

            connectWindow.Show();
            SettingsProvider.getInstance().LoadedArchive = null;
            SettingsProvider.getInstance().PassPhrase    = "";
            this.Close();
        }
Пример #2
0
        public void OnDeleteArchiveButtonClicked(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("We won't be able to revert this operation...", "Are you really sure ?", MessageBoxButton.OKCancel, MessageBoxImage.Warning);

            if (result == MessageBoxResult.OK)
            {
                NoteEncryptCSManager.GetInstance().DeleteArchive(SettingsProvider.getInstance().LoadedArchive);
                ConnexionWindow connectWindow = new ConnexionWindow();
                connectWindow.Show();
                SettingsProvider.getInstance().PassPhrase = "";
                this.Close();
            }
            else if (result == MessageBoxResult.Cancel)
            {
                MessageBox.Show("I think that's a good decision.", "Yeah man !");
            }
        }