Пример #1
0
        void OnExit(object sender, EventArgs e)
        {
            var res = System.Windows.MessageBox.Show("Exiting SAFE.NetworkDrive mounter.", "Exit", System.Windows.MessageBoxButton.OKCancel);

            if (res == System.Windows.MessageBoxResult.OK)
            {
                _notifyIcon.Visible = false;
                _app.Exit();
            }
        }
Пример #2
0
        void BtnDeleteUser_Click(object sender, RoutedEventArgs e)
        {
            var res = MessageBox.Show("This will remove your user and all local drive logins. " +
                                      "If you don't remember your network login credentials, you will never be " +
                                      "able to access your data on these drives again.", "Delete user.", MessageBoxButton.OKCancel);

            if (res == MessageBoxResult.OK)
            {
                _mounter.UnmountAll(); // unmount and clean up dbs
                foreach (var drive in _drives)
                {
                    drive.NotifyIcon.RemoveMenuItem();
                }
                _drives.Clear();
                _userConfig.DeleteUser(); // remove encrypted file
                _app.Exit();              // exit application
            }
        }