コード例 #1
0
        private void nodeDoubleClicked(object sender, RoutedEventArgs e)
        {
            if (sender is VertexControl)
            {
                VertexControl control = sender as VertexControl;
                CTreeVertex vertex = control.Vertex as CTreeVertex;

                bool bInteractiveView = true;
                if (mCurrentView != E_VIEW.E_TREE_INTERACTIVE_VIEW)
                {
                    bInteractiveView = false;
                }
                IdentificationWindow identWindow = new IdentificationWindow(vertex, bInteractiveView);
                identWindow.Show();
            }
        }
コード例 #2
0
        private void btn_Identification_Click(object sender, EventArgs e)
        {
            bool runNextPhase = false;

            // Task.Factory.StartNew(() =>
            Thread.Sleep(1000);
            try
            {
                //_streaming = false;
                //_capture = new Capture();

                {
                    //Task.Run(() =>
                    //{
                    if (_fpScanner == null)
                    {
                        //MetroMessageBox.Show(this,ex.ToString(), "Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
                        //AlertForm1 al = new AlertForm1("Device is not connected", AlertForm1.AlertOptions.OK);
                        //al.ShowDialog();
                        throw new Exception("Device is not connected");
                        //OpenSelectFGDialog();
                        //runNextPhase = true;

                        //return;
                    }
                    //}).Wait();
                    else
                    {
                        //if ((bool)enterUsernameWindow.DialogResponse.result) //this.Close();

                        {
                            try
                            {
                                _afis = new LocalAFIS();

                                if (!identifyForm_hidden)
                                {
                                    //EnrollmentWindow_new enrollmentWindow = new EnrollmentWindow_new(_fpScanner, _afis);
                                    //EnrollmentWindow_new enrollmentWindow = new EnrollmentWindow_new(_fpScanner, _afis,
                                    IdentifyWindow = new IdentificationWindow(_fpScanner, _afis,
                                                                              loggedin_staff, "Identification Request", this);

                                    //IdentifyWindow.Show();
                                    IdentifyWindow.Activate();
                                    var ddg = IdentifyWindow.ShowDialog();
                                }
                                else
                                {
                                    //IdentifyWindow.reloadForm("Identification Request");
                                    //var ddg =

                                    //IdentifyWindow.Show();
                                    IdentifyWindow.Activate();
                                    var ddg = IdentifyWindow.ShowDialog();
                                }
                            }
                            catch (Exception ex)
                            {
                                AlertForm1 al = new AlertForm1(ex.ToString(), AlertForm1.AlertOptions.OK);
                                al.ShowDialog();
                            }
                        }
                    }
                    //testForm1 tf = new testForm1();
                    //tf.Show();
                }

                //).Wait();
            }
            catch (Exception ex)
            {
                //MetroMessageBox.Show(this,ex.ToString(), "Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
                AlertForm1 al = new AlertForm1(ex.Message, AlertForm1.AlertOptions.OK);
                al.ShowDialog();

                //MessageBox.Show(ex.ToString(), "Error");
                runNextPhase = false;
            }
        }