コード例 #1
0
 private void GetViewFrame(SessionProviderContext session, IDesktopView view)
 {
     SendTo(session, MessageHead.S_MAIN_DESKTOPVIEW_GETFRAME,
            new DesktopViewGetFramePack()
     {
         Height       = view.Height,
         Width        = view.Width,
         TimeSpan     = this.ViewRefreshInterval,
         InVisbleArea = view.InVisbleArea
     });
 }
コード例 #2
0
        public void Show(string msg)
        {
            Window parent = null;
            // check if there is a main view and if it is *the* view implemented by this plugin
            //IWorkstationView view = WorkstationModel.View;
            IDesktopView view = DesktopApplication.View;

            //if(view != null && view is WorkstationView)
            if (view != null && view is DesktopView)
            {
                //parent = ((WorkstationView)view).MainWindow;
                parent = ((DesktopView)view).MainWindow;
            }

            MessageDialog mb = new MessageDialog(parent, DialogFlags.DestroyWithParent, MessageType.Info, ButtonsType.Ok, msg);

            mb.Run();
            mb.Destroy();
        }
コード例 #3
0
ファイル: StockTool.cs プロジェクト: ronmark1/ClearCanvas-1
        public StockTool()
        {
            // check if the main is *the* view implemented by this plugin
            //IWorkstationView view = WorkstationModel.View;
            IDesktopView view = DesktopApplication.View;

            //if(view is WorkstationView)
            if (view is DesktopView)
            {
                //_mainView = (WorkstationView)view;
                _mainView = (DesktopView)view;
            }
            else
            {
                // this tool is not supported for other main views
                // TODO add a message
                throw new NotSupportedException();
            }
        }
コード例 #4
0
        public DialogBoxAction Show(string msg, MessageBoxActions buttons)
        {
            Window       parent = null;
            IDesktopView view   = DesktopApplication.View;
            ResponseType messageDialogResponse = 0;


            if (buttons == MessageBoxActions.YesNoCancel)
            {
                throw new Exception("Button YesNoCancel not supported by GTK.ButtonsType");
            }

            if (view != null && view is DesktopView)
            {
                parent = ((DesktopView)view).MainWindow;
            }

            MessageDialog mb = new MessageDialog(parent, DialogFlags.DestroyWithParent, MessageType.Info, _buttonMap[(int)buttons], msg);

            messageDialogResponse = (ResponseType)mb.Run();
            mb.Destroy();

            return((DialogBoxAction)_resultMap[messageDialogResponse]);
        }