public void ActionRefreshSessionTree() { Cursor.Current = Cursors.WaitCursor; ClearAll theClearAllEvent = new ClearAll(); theClearAllEvent._StoreSessionTreeState = true; Notify(this, theClearAllEvent); UpdateAll theUpdateAllEvent = new UpdateAll(); theUpdateAllEvent._RestoreSessionTreeState = true; Notify(this, theUpdateAllEvent); Cursor.Current = Cursors.Default; }
private void WindowNewProjectView_Click(object sender, System.EventArgs e) { ProjectForm2 theChildProjectForm = new ProjectForm2(_Project, this); theChildProjectForm.MdiParent = this; theChildProjectForm.Show (); theChildProjectForm.Activate(); // Make the project form update itself completely. UpdateAll theUpdateAll = new UpdateAll(); theChildProjectForm.Update(this, theUpdateAll); this.UpdateUIControls (); }
public MainForm() { _UserSettings.Load(); // // Required for Windows Form Designer support // InitializeComponent(); Cursor.Current = Cursors.WaitCursor; // Create the singleton array class for all supported Transfer Syntaxes Dvtk.Setup.Initialize (); _FindForm = new FindForm(this); if (_StartWithProjectFile != "") { _Project.display_message = new Dvt.Project.CallBackMessageDisplay (this.CallBackMessageDisplay); _Project.Load(_StartWithProjectFile); } else if (_StartWithSessionFile != "") { _Project.display_message = new Dvt.Project.CallBackMessageDisplay (this.CallBackMessageDisplay); _Project.New(_StartWithSessionFile.ToLower().Replace (".ses", ".pdvt")); _Project.AddSession (_StartWithSessionFile); } if (_Project.IsProjectConstructed) { ProjectForm2 theProjectForm = new ProjectForm2(_Project, this); theProjectForm.MdiParent = this; theProjectForm.Show(); theProjectForm.Activate(); // Make the project form update itself completely. UpdateAll theUpdateAll = new UpdateAll(); theProjectForm.Update(this, theUpdateAll); } this.UpdateUIControls (); Cursor.Current = Cursors.Default; }
private void WindowNewProjectViewAndTile_Click(object sender, System.EventArgs e) { ProjectForm2 theChildProjectForm = new ProjectForm2(_Project, this); theChildProjectForm.MdiParent = this; // Note: Show is not robust enough for MDI childs with window state maximized. // Workaround: Forcing all existing child windows to window state normal before show. foreach (object theObject in this.MdiChildren) { ProjectForm2 theProjectForm2 = theObject as ProjectForm2; if (theProjectForm2 != null) { theProjectForm2.WindowState = FormWindowState.Normal; } } theChildProjectForm.Show (); theChildProjectForm.Activate(); this.LayoutMdi (MdiLayout.TileHorizontal); // Make the project form update itself completely. UpdateAll theUpdateAll = new UpdateAll(); theChildProjectForm.Update(this, theUpdateAll); this.UpdateUIControls (); }
private void OnSessionRemovedEvent(object theSource, object theEvent) { SessionRemovedEvent theSessionRemovedEvent = (SessionRemovedEvent)theEvent; ClearAll theClearAllEvent = new ClearAll(); theClearAllEvent._StoreSessionTreeState = true; Notify( theClearAllEvent); UpdateAll theUpdateAllEvent = new UpdateAll(); theUpdateAllEvent._RestoreSessionTreeState = true; Notify(theUpdateAllEvent); }