public UserPreferences(YellowstonePathology.Business.User.UserPreference userPreference)
        {
            this.m_UserPreferenceList             = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetAllUserPreferences();
            this.m_MolecularLabelFormatCollection = YellowstonePathology.Business.Label.Model.LabelFormatCollection.GetMolecularLabelCollection();
            this.m_CassettePrinterCollection      = new Business.Label.Model.CassettePrinterCollection();
            this.m_FacilityCollection             = Business.Facility.Model.FacilityCollection.Instance;

            System.Printing.LocalPrintServer printServer = new System.Printing.LocalPrintServer();
            this.m_PrintQueueCollection = printServer.GetPrintQueues(new[] { System.Printing.EnumeratedPrintQueueTypes.Local, System.Printing.EnumeratedPrintQueueTypes.Connections });

            this.m_ApplicationVersion = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.GetApplicationVersion(this);

            InitializeComponent();

            if (userPreference == null)
            {
                this.m_UserPreference  = new Business.User.UserPreference();
                this.m_HostNameEnabled = true;
            }
            else
            {
                this.m_UserPreference  = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullUserPreference(userPreference.HostName, this);
                this.m_HostNameEnabled = false;
            }

            this.m_PageScannerCollection = new Business.Common.PageScannerCollection();
            this.DataContext             = this;
            this.Loaded  += new RoutedEventHandler(UserPreferences_Loaded);
            this.Closing += UserPreferences_Closing;
        }
        public DocumentScanningPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AccessionOrder = accessionOrder;
            this.m_PageHeaderText = "Master Accession: " + accessionOrder.MasterAccessionNo;
            this.m_PageScannerCollection = new Business.Common.PageScannerCollection();

            InitializeComponent();

            this.DataContext = this;
            this.Loaded += new RoutedEventHandler(DocumentScanningPage_Loaded);
        }
Beispiel #3
0
        public DocumentScanningPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder)
        {
            this.m_AccessionOrder        = accessionOrder;
            this.m_PageHeaderText        = "Master Accession: " + accessionOrder.MasterAccessionNo;
            this.m_PageScannerCollection = new Business.Common.PageScannerCollection();

            InitializeComponent();

            this.DataContext = this;
            this.Loaded     += new RoutedEventHandler(DocumentScanningPage_Loaded);
        }
 private void UserPreferences_Loaded(object sender, RoutedEventArgs e)
 {
     this.m_Twain = new Business.Twain.Twain(new WpfWindowMessageHook(Window.GetWindow(this)));
     if (Environment.OSVersion.VersionString != "Microsoft Windows NT 6.2.9200.0")
     {
         this.PageScannerCollection = new Business.Common.PageScannerCollection(this.m_Twain);
     }
     else
     {
         this.m_PageScannerCollection = new Business.Common.PageScannerCollection();
         MessageBox.Show("Unable to initialize the TWAIN Scanner Collection.");
     }
 }
 private void UserPreferences_Loaded(object sender, RoutedEventArgs e)
 {
     this.m_Twain = new Business.Twain.Twain(new WpfWindowMessageHook(Window.GetWindow(this)));
     if(Environment.OSVersion.VersionString != "Microsoft Windows NT 6.2.9200.0")
     {
         this.PageScannerCollection = new Business.Common.PageScannerCollection(this.m_Twain);
     }
     else
     {
         this.m_PageScannerCollection = new Business.Common.PageScannerCollection();
         MessageBox.Show("Unable to initialize the TWAIN Scanner Collection.");
     }
 }