Ejemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        private void HandleButtonNewFromFilesClick(object sender, EventArgs e)
        {
            using (var viewModel = _newSessionsFromFileDlgViewModel(_model))
                using (var dlg = new NewSessionsFromFilesDlg(viewModel))
                {
                    if (dlg.ShowDialog(FindForm()) == DialogResult.OK)
                    {
                        LoadElementList(viewModel.FirstNewSessionAdded);
                    }

                    SetFocusOnId();
                }
        }
Ejemplo n.º 2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Open new sessions from files dialog box.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void btnNewFromFiles_Click(object sender, EventArgs e)
        {
            using (var viewModel = new NewSessionsFromFileDlgViewModel())
                using (var dlg = new NewSessionsFromFilesDlg(viewModel))
                {
                    viewModel.Dialog             = dlg;
                    _currProj.EnableFileWatching = false;

                    if (dlg.ShowDialog(FindForm()) == DialogResult.OK)
                    {
                        _currProj.RefreshSessionList();
                        RefreshSessionList();
                        lpSessions.CurrentItem = viewModel.FirstNewSessionAdded;
                    }

                    _currProj.EnableFileWatching = true;
                    FindForm().Focus();
                }
        }