Ejemplo n.º 1
0
 private void ViewEnclosureCameraPB_Click(object sender, RoutedEventArgs e)
 {
     if (m_enclosureCameraViewer == null)
     {
         m_enclosureCameraViewer         = new EnclosureCameraViewer();
         m_enclosureCameraViewer.Closed += m_enclosureCameraViewer_Closed;
         m_enclosureCameraViewer.Show();
     }
     else
     {
         // need code here to bring Enclosure Camera Viewer window to front
     }
 }
Ejemplo n.º 2
0
        private void EnclosureCameraPB_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (m_enclosureCameraViewer == null)
            {
                m_enclosureCameraViewer = new EnclosureCameraViewer();

                m_enclosureCameraViewer.Closed += m_enclosureCameraViewer_Closed;

                m_enclosureCameraViewer.Show();
            }
            else
            {
                m_enclosureCameraViewer.BringWindowToFront();
            }
        }
Ejemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();

            m_wgDB = new WaveguideDB();
            m_enclosureCameraViewer = null;

            //GlobalVars.UserID = 1;  // should get from login

            switch (GlobalVars.UserRole)
            {
            case GlobalVars.USER_ROLE_ENUM.ADMIN:
                break;

            case GlobalVars.USER_ROLE_ENUM.USER:
                UsersTab.Visibility       = Visibility.Collapsed;
                FiltersTab.Visibility     = Visibility.Collapsed;
                PlateTypesTab.Visibility  = Visibility.Collapsed;
                MaintenanceTab.Visibility = Visibility.Collapsed;
                break;

            case GlobalVars.USER_ROLE_ENUM.OPERATOR:
                MethodsTab.Visibility     = Visibility.Collapsed;
                ProjectsTab.Visibility    = Visibility.Collapsed;
                UsersTab.Visibility       = Visibility.Collapsed;
                FiltersTab.Visibility     = Visibility.Collapsed;
                PlateTypesTab.Visibility  = Visibility.Collapsed;
                MaintenanceTab.Visibility = Visibility.Collapsed;
                break;
            }



            m_imager = null;

            this.Title = "Waveguide     " + GlobalVars.UserDisplayName + "  (" + GlobalVars.UserRole.ToString() + ")";


            VM = new MainWindowViewModel();

            this.DataContext = VM;

            // catch close event caused by clicking X button
            this.Closing += new System.ComponentModel.CancelEventHandler(Window_Closing);
        }
Ejemplo n.º 4
0
 void m_enclosureCameraViewer_Closed(object sender, EventArgs e)
 {
     m_enclosureCameraViewer = null;
 }
Ejemplo n.º 5
0
        string m_timestamp;        // timestamp of last command message received

        public MainWindow()
        {
            InitializeComponent();

            Application.Current.MainWindow.WindowState = WindowState.Maximized;

            m_wgDB = new WaveguideDB();
            m_enclosureCameraViewer = null;


            switch (GlobalVars.Instance.UserRole)
            {
            case GlobalVars.USER_ROLE_ENUM.ADMIN:
                break;

            case GlobalVars.USER_ROLE_ENUM.USER:
                UsersTab.Visibility       = Visibility.Collapsed;
                FiltersTab.Visibility     = Visibility.Collapsed;
                PlateTypesTab.Visibility  = Visibility.Collapsed;
                MaintenanceTab.Visibility = Visibility.Collapsed;
                break;

            case GlobalVars.USER_ROLE_ENUM.OPERATOR:
                MethodsTab.Visibility     = Visibility.Collapsed;
                ProjectsTab.Visibility    = Visibility.Collapsed;
                UsersTab.Visibility       = Visibility.Collapsed;
                FiltersTab.Visibility     = Visibility.Collapsed;
                PlateTypesTab.Visibility  = Visibility.Collapsed;
                MaintenanceTab.Visibility = Visibility.Collapsed;
                break;
            }



            m_imager      = null;
            m_vworks      = null;
            m_vworksReady = false;



            VM = new MainWindowViewModel();

            this.DataContext = VM;

            VM.WindowTitle = "Waveguide     " + GlobalVars.Instance.UserDisplayName + "  (" + GlobalVars.Instance.UserRole.ToString() + ")";

            // catch close event caused by clicking X button
            this.Closing += new System.ComponentModel.CancelEventHandler(Window_Closing);

            m_uiTask = TaskScheduler.FromCurrentSynchronizationContext();
            GlobalVars.Instance.UITask = m_uiTask;

            MyRunExperimentControl.PostMessage_RunExperimentPanelEvent += MyRunExperimentControl_PostMessage_RunExperimentPanelEvent;
            MyRunExperimentControl.BringToFrontRunExperimentPanelEvent += MyRunExperimentControl_BringToFrontRunExperimentPanelEvent;

            m_tcpServer = new SimpleTcpServer();
            m_tcpServer.ClientConnected       += M_tcpServer_ClientConnected;
            m_tcpServer.ClientDisconnected    += M_tcpServer_ClientDisconnected;
            m_tcpServer.DataReceived          += M_tcpServer_DataReceived;
            m_tcpServer.DelimiterDataReceived += M_tcpServer_DelimiterDataReceived;
            m_tcpServer.Start(GlobalVars.Instance.TCPCommand_Port);
            m_commandMessageCount = 0;

            GlobalVars.Instance.m_statusChangeEvent += StatusChangeEvent;

            GlobalVars.Instance.Status = WGStatus.ONLINE;
        }
Ejemplo n.º 6
0
        public MainWindow()
        {
            InitializeComponent();

            Application.Current.MainWindow.WindowState = WindowState.Maximized;

            m_wgDB = new WaveguideDB();
            m_enclosureCameraViewer = null;


            // SET Arction LightningChart Deployment License Key (this key is generated by the License manager located in C:\Program Files (x86)\Arction\LightningChart Ultimate SDK v.8\LicenseManager)
            //Set Deployment Key for Arction components
            string deploymentKey = "lgCAALwgjYPfmNIBJABVcGRhdGVhYmxlVGlsbD0yMDE4LTAyLTIxI1JldmlzaW9uPTAC/z9RMX8f5kurNjaFxccuADLxbK6lqM22zoVs0PjqOimZGOh5Of+fUyLaQXp/cIp7yMraliTZTxzfR+bGoyiCLC0r5ISOje5A2uN0gsfp0PwgAm8lPKZ/b38tTW5Bt7H5fSexpGO4Eh9zbou68P8TKA1YCTCgknu8zITZcGVxWmSAz8aRCKCofN6Hqr/IjhY5NocKN3iTd1oP5ue9OG7RbGoefmUVSTV277fOjc1TLr4RRFtZslR6iZIplFOs+i5bwfQg7UpTefFkFJNKauV0tjdqW2aWbkzysgwv8ZMmsE2ZfBPcTQbtyvnJHgaeO3JDPh4Bjl29lIrk96Ar0Zuu6K/0TxNXMfW5OLXs7V0+CaRDzcwp9IkF6jqUj4oTQr8KiCWJzdTlRRKYLHMAePBANLMyWorZz9aq6gV3fSawkPz4Z7Wf4ouPnESF9x/SbBXp6a6noeefwZvF+BkPrBjdK7I+L9T3ogEIObZ2tiK8y84Y2fT/IHVDvwk9Dhhu7nb3yvM=";

            //Set Deployment Key for fully bindable chart, if you use it
            //Arction.Wpf.BindableCharting.LightningChartUltimate .SetDeploymentKey(deploymentKey);

            //Set Deployment Key for semi-bindable chart, if you use it
            // Arction.Wpf.SemibindableCharting.LightningChartUltimate .SetDeploymentKey(deploymentKey);

            //Set Deployment Key for non-bindable chart, if you use it
            Arction.Wpf.Charting.LightningChartUltimate.SetDeploymentKey(deploymentKey);



            //GlobalVars.UserID = 1;  // should get from login

            switch (GlobalVars.UserRole)
            {
            case GlobalVars.USER_ROLE_ENUM.ADMIN:
                break;

            case GlobalVars.USER_ROLE_ENUM.USER:
                UsersTab.Visibility       = Visibility.Collapsed;
                FiltersTab.Visibility     = Visibility.Collapsed;
                PlateTypesTab.Visibility  = Visibility.Collapsed;
                MaintenanceTab.Visibility = Visibility.Collapsed;
                break;

            case GlobalVars.USER_ROLE_ENUM.OPERATOR:
                MethodsTab.Visibility     = Visibility.Collapsed;
                ProjectsTab.Visibility    = Visibility.Collapsed;
                UsersTab.Visibility       = Visibility.Collapsed;
                FiltersTab.Visibility     = Visibility.Collapsed;
                PlateTypesTab.Visibility  = Visibility.Collapsed;
                MaintenanceTab.Visibility = Visibility.Collapsed;
                break;
            }



            m_imager      = null;
            m_vworks      = null;
            m_vworksReady = false;

            this.Title = "Waveguide     " + GlobalVars.UserDisplayName + "  (" + GlobalVars.UserRole.ToString() + ")";


            VM = new MainWindowViewModel();

            this.DataContext = VM;

            // catch close event caused by clicking X button
            this.Closing += new System.ComponentModel.CancelEventHandler(Window_Closing);

            m_uiTask          = TaskScheduler.FromCurrentSynchronizationContext();
            GlobalVars.UITask = m_uiTask;

            MyRunExperimentControl.PostMessage_RunExperimentPanelEvent += MyRunExperimentControl_PostMessage_RunExperimentPanelEvent;
            MyRunExperimentControl.BringToFrontRunExperimentPanelEvent += MyRunExperimentControl_BringToFrontRunExperimentPanelEvent;
        }