Example #1
0
        private void projectsList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Window parentWindow = Window.GetWindow(this);

            if (parentWindow != null)
            {
                OpenProjectWindow parentOpenWindow = parentWindow as OpenProjectWindow;
                parentOpenWindow.OkButton_Click(this, null);
            }
        }
Example #2
0
        public void ShowProjectOpenDialog()
        {
            var w = new OpenProjectWindow();

            if (w.ShowDialog() == true)
            {
                Project project = w.Project;
                if (project != null)
                {
                    Model = new SimulationModelService().Get(project);
                    SimulationUI ui = new SimulationUI(Model, false);
                    ui.InitializeComponent();
                    simulationUI.Content = ui;
                    SetTitle(project.Name);
                    MnuSave.IsEnabled   = true;
                    MnuSaveAs.IsEnabled = true;
                }
            }
        }