public EpromWorkingForm() { InitializeComponent(); share = new List<Packet>(); working = new List<Packet>(); mevent = new AutoResetEvent(false); workHandle = new WorkHandle(); incer = new Incer(IncP); initer = new Initer(InitProgressBar); }
public MainForm(IApplication app) { InitializeComponent(); application = app; protocol = application.GetProtocol(ProtocolVersion.x100); inserter = new Inserter(insert); status = new StatusHandle(); incer = new Incer(IncP); initer = new Initer(InitProgressBar); }
public LoadeForm(BIOS bios, ObjectCurrentState currentState) { InitializeComponent(); pBios = bios; pObject = currentState; pBios.eCompleteReadEpromLine += new EventHandler(pBios_eCompleteReadEpromLine); pBios.eMorePopitReadEpromLine += new EventHandler(pBios_eMorePopitReadEpromLine); pBios.eTimeoutReadEpromLine += new EventHandler(pBios_eTimeoutReadEpromLine); incer = new Incer(IncP); initer = new Initer(InitProgressBar); mes = new Messeger(ShowMessage); obj = new object(); }
public LoadForm(BlockConfigurationIO bios, HandleIO handle) { InitializeComponent(); pBios = bios; hio = handle; pBios.eCompleteReadEpromLine += new EventHandler(pBios_eCompleteReadEpromLine); pBios.eMorePopitReadEpromLine += new EventHandler(pBios_eMorePopitReadEpromLine); pBios.eTimeoutReadEpromLine += new EventHandler(pBios_eTimeoutReadEpromLine); incer = new Incer(IncP); initer = new Initer(InitProgressBar); mes = new Messeger(ShowMessage); obj = new object(); }
public SaveForm(BlockConfigurationIO bios, HandleIO obje) { InitializeComponent(); pBios = bios; pObject = obje; obj = new object(); incer = new Incer(IncP); initer = new Initer(InitProgressBar); DialogResult = DialogResult.OK; pBios.eSaveCompleteReadEpromLine += new EventHandler(pBios_eSaveCompleteReadEpromLine); pBios.eSaveMorePopitReadEpromLine += new EventHandler(pBios_eSaveMorePopitReadEpromLine); pBios.eSaveTimeoutReadEpromLine += new EventHandler(pBios_eSaveTimeoutReadEpromLine); }
public SaveForm(BIOS bios, ObjectCurrentState currentState) { InitializeComponent(); incer = new Incer(IncP); initer = new Initer(InitProgressBar); DialogResult = DialogResult.OK; pBios = bios; pObject = currentState; pBios.eSaveCompleteReadEpromLine += new EventHandler(pBios_eSaveCompleteReadEpromLine); pBios.eSaveMorePopitReadEpromLine += new EventHandler(pBios_eSaveMorePopitReadEpromLine); pBios.eSaveTimeoutReadEpromLine += new EventHandler(pBios_eSaveTimeoutReadEpromLine); mes = new Messeger(ShowMessage); }
private void WriteSelect() { try { Incer incer = new Incer(IncP); Initer initer = new Initer(InitProgressBar); Invoke(initer, 0, workHandle.selected.Length); if (workHandle.needSafe) { string cmd = "@JOB#000#" + string.Format("{0:X2}", workHandle.deviceNumber) + "09012002A00100$"; app.SendPacket(new Packet(cmd, DateTime.Now, null)); } foreach (DataGridViewCell cell in workHandle.selected) { lock (workHandle) { if (workHandle.need == NeedTolk.No) { return; } } if (cell.Value == null) continue; int offset = (cell.RowIndex * 16) + cell.ColumnIndex; string command = app.GetProtocol(ProtocolVersion.x100).CreateCommand(device, Command.ReadWrite, page, offset, 0x01, cell.Value.ToString()); ResultOperation result = ChekerToWrite(new Packet(command, DateTime.Now, cell)); switch (result) { case ResultOperation.Succes: break; case ResultOperation.Timeout: MessageBox.Show("Превышен лимит времени ожидания ответа", "Сообщение", MessageBoxButtons.OK); return; case ResultOperation.MorePopit: MessageBox.Show("Превышен лимит попыток чтения/записи", "Сообщение", MessageBoxButtons.OK); return; default: break; } Thread.Sleep(workHandle.defTimeout); } } finally { if (workHandle.needSafe) { string cmd = "@JOB#000#" + string.Format("{0:X2}", workHandle.deviceNumber) + "0705100100$"; app.SendPacket(new Packet(cmd, DateTime.Now, null)); } workHandle.operation = Operation.Default; } }