Exemplo n.º 1
0
 void reCalculateModalOverlayLayer()
 {
     if (modalDialogBorder.Visibility == Visibility.Visible)
     {
         modalDialogBorder.Clip = ViewSystemHelper.GetClipCombine(this, _modalElement);
     }
 }
Exemplo n.º 2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     if (_debuggerAttached)
     {
         //try to make application full screen in secondary monitor
         ViewSystemHelper.TrySwitchToSecondaryScreen(this, WindowState.Normal);
     }
     patientOverviewControl.SwitchToAnalysis += patientOverviewControl_SwitchToAnalysis;
     acquisitionControl.snapshotsStrip.SnapshotDoubleClick += patientOverviewControl_SwitchToAnalysis;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Start System and load all basic modules.
        /// </summary>
        public void StartMSOT(WindowContainer tempWindowContainer)
        {
            try
            {
                ChildWindowContainer = tempWindowContainer;

                _paintCursor        = ViewSystemHelper.LoadCursorResource("pack://application:,,,/ViewMSOT.UIControls;component/GFX/Paint.cur");
                _system             = new MSOTSystem();
                _system.PaintCursor = _paintCursor;
                _system.Notify     += systemPushNotifications;
                _system.Verify     += system_Verify;

                _system.InitializePlugin("MSOT System", null);
                if (_system.HasSystemConfigWriteAccess)
                {
                    _system.ExtractAll("");
                }
                _system.CommandLoad.Execute(null);

                _system.AddEmptyImagingSessionAtAnalysis              = true;
                _system.EnablePreviewVisibleImagesRepeatMode          = true;
                _system.AddSnapshotImagingSuperSessionAtVisualization = true;

                _log = _system.IMSOTLog;

                string cfgFile = "";
                if (_system.IsUsingAdvancedGui)
                {
                    cfgFile = " - " + System.IO.Path.GetFileNameWithoutExtension(_system.SettingsFilePath);
                }
                this.Title = _system.MsotApplicationInfo.ProductName;
                this.TaskbarItemInfo.Description = this.Title + cfgFile;
                this.DataContext = _system;

                if (_system.IsSystemSuccessfullyLoaded())
                {
                    _pendingPushedMessagesHandled = true;
                    loadSystemOnStartUp();
                }

                ChildWindowContainer = childWindowContainer;
            }
            catch (Exception ex)
            {
                NotifyUserOnError("Unable to load " + this.Title + "\nException: " + ex.Message, Title, UserNotificationType.Error, false);
                //System.Windows.MessageBox.Show(this,"Unable to load "+this.Title + "\nException: "+ex.Message);
            }
            finally
            {
                _system.SystemExit += OnSystemExited;
                _system.Notify     -= systemPushNotifications;
                _system.Notify     += system_Notify;
            }
        }
Exemplo n.º 4
0
        public void NotifyUserOnError(string message, string caption, UserNotificationType notificationType, bool doNotBlock)
        {
            if (notificationType == UserNotificationType.ReportIssue)
            {
                ViewSystemHelper.HandPlay();
                if (!string.IsNullOrEmpty(message))
                {
                    _system.IMSOTLog.HandleError(caption, message);
                }
                _system.CommandCreateIssueReporter.Execute(message);
                mainIssueReportChildWindow.Caption     = caption;
                mainIssueReportChildWindow.IsModal     = !doNotBlock;
                mainIssueReportChildWindow.WindowState = Xceed.Wpf.Toolkit.WindowState.Open;
            }
            else
            {
                MessageBoxChildWindow messageBoxNotify = new MessageBoxChildWindow(message, caption, notificationType, doNotBlock);
                ViewSystemHelper.BeepPlay();

                messageBoxNotify.ShowMessage();
            }
        }
Exemplo n.º 5
0
 private void OnSystemExited(object sender, EventArgs e)
 {
     ViewSystemHelper.CloseAllWindows(true);
     Dispose();
 }