Exemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                // Reading serialized files
                Stock.ReadComponents();
                Stock.ReadDevices();
                SerialsNumbers.ReadSerialsNumbers();

                // Login operator
                LoginOperators.Login.OperatorLog = new LoginOperators.Operator("Test", "Console", 9999, 9999);

                // Work order selection
                CoreSystem.SelectedOrder = new InternalOrder(9999, ECode.CNT_BioPanel_ACC, EType.PanelAccess, 3);

                // Device creation using your own creation method
                CoreSystem.LoadDevices(EType.PanelAccess, EValidation.Finger);
                CoreSystem.PreviewDevices.Add(CoreSystem.DeviceAssembly);

                // Manual addition of device
                CoreSystem.PreviewDevices.Add(new AccessControl(ECode.CNT_A60_ID, EType.AccessControl, EValidation.Finger));
                CoreSystem.PreviewDevices.Add(new AccessPanel(ECode.CNT_BioPanel_ACC, EType.PanelAccess, EValidation.Finger));
                CoreSystem.PreviewDevices.Add(new Attendance(ECode.CNT_E7_CR, EType.Attendance, EValidation.Finger));

                // All data in the list is printed
                Console.WriteLine(Device.Info(CoreSystem.PreviewDevices));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.ReadLine();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Load Form Default
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FrmAssembly_Load(object sender, EventArgs e)
 {
     try
     {
         this.lblErrorList.Visible = false;
         LoadOrderSelected();
         HideSubMenu();
         EnableButtons();
         SerialsNumbers.ReadSerialsNumbers();
         CoreSystem.ListAssembly = null;
         if (!(CoreSystem.SelectedOrder is null) && !(CoreSystem.PreviewDevices is null))
         {
             ButtonForType(CoreSystem.SelectedOrder.ETypeDevice);
             this.dgvPreview.DataSource = new BindingList <Device>(CoreSystem.PreviewDevices);
         }
     }
     catch (Exception ex)
     {
         this.Enabled = false;
         MessageBox.Show(ex.Message, "NO DATA DEVICES!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }