WinForms implementation of IDesktopWindowView.

This class may subclassed if customization is desired. In this case, the ApplicationView class must also be subclassed in order to instantiate the subclass from its ApplicationView.CreateDesktopWindowView method.

Reasons for subclassing may include: overriding the CreateDesktopForm factory method to supply a custom subclass of the DesktopForm class, overriding the CreateWorkspaceView, CreateShelfView, or CreateDialogBoxView factory methods to supply custom subclasses of these view classes, overriding SetMenuModel or SetToolbarModel to customize the menu/toolbar display, and overriding ShowMessageBox to customize the display of message boxes.

Inheritance: ClearCanvas.Desktop.View.WinForms.DesktopObjectView, IDesktopWindowView
Example #1
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="workspace"></param>
		/// <param name="desktopView"></param>
		protected internal WorkspaceView(Workspace workspace, DesktopWindowView desktopView)
		{
			var componentView = workspace.ComponentView;

			_control = (Control)componentView.GuiElement;
			_tabPage = new Crownwood.DotNetMagic.Controls.TabPage { Control = _control, Tag = this };
			this.DesktopView = desktopView;

			_dialogBoxManager = new WorkspaceDialogBoxViewManager(this, _control);
		}
Example #2
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="workspace"></param>
		/// <param name="desktopView"></param>
		protected internal WorkspaceView(Workspace workspace, DesktopWindowView desktopView)
		{
			var componentView = (IApplicationComponentView)ViewFactory.CreateAssociatedView(workspace.Component.GetType());
			componentView.SetComponent((IApplicationComponent)workspace.Component);

			_control = (Control)componentView.GuiElement;
			_tabPage = new Crownwood.DotNetMagic.Controls.TabPage { Control = _control, Tag = this };
			this.DesktopView = desktopView;

			_dialogBoxManager = new WorkspaceDialogBoxViewManager(this, _control);
		}
Example #3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="dialogBox"></param>
        /// <param name="owner"></param>
        protected internal DialogBoxView(DialogBox dialogBox, DesktopWindowView owner)
        {
            IApplicationComponentView componentView = dialogBox.ComponentView;

            // cache the app component - we'll need it later to get the ExitCode
            _component = (IApplicationComponent)dialogBox.Component;

            _form = CreateDialogBoxForm(dialogBox, (Control)componentView.GuiElement);
            _form.FormClosing += new FormClosingEventHandler(_form_FormClosing);

            _owner = owner.DesktopForm;
        }
Example #4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="workspace"></param>
        /// <param name="desktopView"></param>
        protected internal WorkspaceView(Workspace workspace, DesktopWindowView desktopView)
        {
            var componentView = (IApplicationComponentView)ViewFactory.CreateAssociatedView(workspace.Component.GetType());

            componentView.SetComponent((IApplicationComponent)workspace.Component);

            _control = (Control)componentView.GuiElement;
            _tabPage = new Crownwood.DotNetMagic.Controls.TabPage {
                Control = _control, Tag = this
            };
            this.DesktopView = desktopView;

            _dialogBoxManager = new WorkspaceDialogBoxViewManager(this, _control);
        }
Example #5
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="dialogBox"></param>
        /// <param name="owner"></param>
        protected internal DialogBoxView(DialogBox dialogBox, DesktopWindowView owner)
        {
            IApplicationComponentView componentView = (IApplicationComponentView)ViewFactory.CreateAssociatedView(dialogBox.Component.GetType());

            componentView.SetComponent((IApplicationComponent)dialogBox.Component);

            // cache the app component - we'll need it later to get the ExitCode
            _component = (IApplicationComponent)dialogBox.Component;

            _form              = CreateDialogBoxForm(dialogBox, (Control)componentView.GuiElement);
            _form.FormClosing += new FormClosingEventHandler(_form_FormClosing);

            _owner = owner.DesktopForm;
        }
        private void btnDownImage_Click(object sender, EventArgs e)
        {
            List <string> l_list = new List <string> ();

            if (listView1.Items.Count > 0)
            {
                foreach (ListViewItem li in listView1.Items)
                {
                    if (li.Selected)
                    {
                        string PatientID    = string.Format("{0}", li.SubItems[0].Text);
                        string Modality     = string.Format("{0}", li.SubItems[5].Text);
                        string StudyDate    = string.Format("{0}", li.SubItems[4].Text);
                        string strAccessnum = li.SubItems[6].Text;
                        StudyDate = Convert.ToDateTime(StudyDate).ToShortDateString();
                        l_list.Add(strAccessnum);
                    }
                }
                GlobalData.RunParams.listAccessionNumber = l_list.ToArray();
                ClearCanvas.ImageViewer.ImageViewerComponent viewer = null;

                DesktopWindow desktopWindow = null;
                List <string> _filenames    = new List <string>();

                foreach (DesktopWindow window in Application.DesktopWindows)
                {
                    foreach (Workspace space in window.Workspaces)
                    {
                        if (space.Title == "imageview")
                        {
                            desktopWindow = window;
                            viewer        = space.Component as ClearCanvas.ImageViewer.ImageViewerComponent;
                        }
                    }
                }
                if (viewer != null)
                {
                    DesktopWindowView windowview = (DesktopWindowView)desktopWindow.DesktopWindowView;
                    viewer.LoadHistoryStudyFromFtp(windowview.DesktopForm);
                }
            }
        }
Example #7
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="shelf"></param>
 /// <param name="desktopView"></param>
 protected internal ShelfView(Shelf shelf, DesktopWindowView desktopView)
 {
     _shelf = shelf;
     _desktopView = desktopView;
 }
Example #8
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="shelf"></param>
 /// <param name="desktopView"></param>
 protected internal ShelfView(Shelf shelf, DesktopWindowView desktopView)
 {
     _shelf       = shelf;
     _desktopView = desktopView;
 }