Пример #1
0
        private void buttonVisionAdd_Click(object sender, EventArgs e)
        {
            FormVision visionFrm = new FormVision();

            visionFrm.Text = "Add Capture Card Entry";
            WindowsFormClient.RgbInput.Window          window = new RgbInput.Window();
            WindowsFormClient.RgbInput.Input           input  = new RgbInput.Input();
            WindowsFormClient.RgbInput.OnScreenDisplay osd    = new RgbInput.OnScreenDisplay();

            // set the empty object to the form
            visionFrm.WindowObj          = window;
            visionFrm.InputObj           = input;
            visionFrm.OnScreenDisplayObj = osd;
            visionFrm.NumberOfInputs     = ServerDbHelper.GetInstance().GetSystemInputCount();

            if (visionFrm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                // add to db
                visionInputPresenter.AddVisionInput(visionFrm.WindowObj, visionFrm.InputObj, visionFrm.OnScreenDisplayObj);
            }
        }