Beispiel #1
0
        public MainForm()
        {
            InitializeComponent();

            if (!string.IsNullOrEmpty(Globals.CurrentPasswordDb))
            {
                _repo = new PasswordDatabaseRepository(Globals.CurrentPasswordDb);
                _data = _repo.Read();

                var loginDialog = new OpenDatabaseForm(_data);

                if (loginDialog.ShowDialog() == DialogResult.OK)
                {
                    LoadData();
                }
            }
        }
Beispiel #2
0
        public MainForm()
        {
            InitializeComponent();

            if (!string.IsNullOrEmpty(Globals.CurrentPasswordDb))
            {
                _repo = new PasswordDatabaseRepository(Globals.CurrentPasswordDb);
                _data = _repo.Read();

                var loginDialog = new OpenDatabaseForm(_data);

                if (loginDialog.ShowDialog() == DialogResult.OK)
                {
                    LoadData();
                }
            }
        }
Beispiel #3
0
        private void OpenDatabase()
        {
            var fileDialog = new OpenFileDialog();

            fileDialog.Filter           = "password database (*.mpd)|*.mpd|All Files (*.*)|*.*";
            fileDialog.DefaultExt       = "*.mpd";
            fileDialog.FilterIndex      = 1;
            fileDialog.RestoreDirectory = true;

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                var _filename = fileDialog.FileName;
                _repo = new PasswordDatabaseRepository(_filename);
                _data = _repo.Read();

                var loginDialog = new OpenDatabaseForm(_data);
                if (loginDialog.ShowDialog() == DialogResult.OK)
                {
                    Globals.CurrentPasswordDb = _filename;

                    LoadData();
                }
            }
        }
Beispiel #4
0
        private void importToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var fileDialog = new OpenFileDialog();

            fileDialog.Filter           = "KeePass CSV (1.x) (*.csv)|*.csv|All Files (*.*)|*.*";
            fileDialog.DefaultExt       = "*.csv";
            fileDialog.FilterIndex      = 1;
            fileDialog.RestoreDirectory = true;

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                var _filename = fileDialog.FileName;
                _repo = new PasswordDatabaseRepository(_filename);
                _data = _repo.Read();

                var loginDialog = new OpenDatabaseForm(_data);
                if (loginDialog.ShowDialog() == DialogResult.OK)
                {
                    Globals.CurrentPasswordDb = _filename;

                    LoadData();
                }
            }
        }
Beispiel #5
0
        private void OpenDatabase()
        {
            var fileDialog = new OpenFileDialog();

            fileDialog.Filter = "password database (*.mpd)|*.mpd|All Files (*.*)|*.*";
            fileDialog.DefaultExt = "*.mpd";
            fileDialog.FilterIndex = 1;
            fileDialog.RestoreDirectory = true;

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                var _filename = fileDialog.FileName;
                _repo = new PasswordDatabaseRepository(_filename);
                _data = _repo.Read();

                var loginDialog = new OpenDatabaseForm(_data);
                if (loginDialog.ShowDialog() == DialogResult.OK)
                {
                    Globals.CurrentPasswordDb = _filename;

                    LoadData();
                }
            }
        }
Beispiel #6
0
        private void importToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var fileDialog = new OpenFileDialog();

            fileDialog.Filter = "KeePass CSV (1.x) (*.csv)|*.csv|All Files (*.*)|*.*";
            fileDialog.DefaultExt = "*.csv";
            fileDialog.FilterIndex = 1;
            fileDialog.RestoreDirectory = true;

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                var _filename = fileDialog.FileName;
                _repo = new PasswordDatabaseRepository(_filename);
                _data = _repo.Read();

                var loginDialog = new OpenDatabaseForm(_data);
                if (loginDialog.ShowDialog() == DialogResult.OK)
                {
                    Globals.CurrentPasswordDb = _filename;

                    LoadData();
                }
            }
        }