Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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 ();
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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 ();
        }
Esempio n. 5
0
        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);
        }