public void ProcessToTest() { var Output = new LinkedList<string>(); var mainProcess = new MainProcess(); var f1 = new MyProcess1(); var f2 = new MyProcess2(); MyProcess.DrawedHandler OnDrawed = delegate(object sender, EventArgs e) { var de = ((DrawedEventArgs)e); Console.WriteLine(":" + Convert.ToString(de.n)); Output.AddLast(Convert.ToString(de.n)); }; f1.Drawed += new MyProcess.DrawedHandler(OnDrawed); f2.Drawed += new MyProcess.DrawedHandler(OnDrawed); while (mainProcess.State != State.Ended) { Output.AddLast("["); //Output.AddLast(String.Join(",", Process.allProcesses)); mainProcess.ExecuteTree(); mainProcess.DrawTree(null); //f1._ExecuteProcess(); //Console.WriteLine("RemoveOld[1/2]"); ProcessBase._RemoveOld(); //Console.WriteLine("RemoveOld[2/2]"); Output.AddLast("]"); } //Console.ReadKey(); }
public void ProcessToTest() { var Output = new LinkedList<string>(); var mainProcess = new MainProcess(); var f1 = new MyProcess1(); var f2 = new MyProcess2(); MyProcess.DrawedHandler OnDrawed = delegate(object sender, EventArgs e) { var de = ((DrawedEventArgs)e); //Console.WriteLine(Output); Output.AddLast(Convert.ToString(de.n)); }; f1.Drawed += new MyProcess.DrawedHandler(OnDrawed); f2.Drawed += new MyProcess.DrawedHandler(OnDrawed); while (mainProcess.State != State.Ended) { Output.AddLast("["); //Output.AddLast(String.Join(",", Process.allProcesses)); mainProcess._ExecuteProcess(); mainProcess._DrawProcess(); //f1._ExecuteProcess(); Process._removeOld(); Output.AddLast("]"); } Assert.AreEqual( "[,1,-1,],[,2,-2,],[,3,-3,],[,4,-4,],[,3,-3,],[,2,-2,],[,1,-1,],[,0,0,],[,-1,1,],[,-2,2,],[,-3,3,],[,-4,4,],[,-4,4,],[,]", String.Join(",", Output) ); //Console.ReadKey(); }
private void startSelectingProcess() { new SoftUpdater(); if (!initConsts()) { Warning_CantComplateOperation(); return; } MainProcess.ClearControls(); MainProcess.Process = new SelectingProcess(); }
public override void OnHotKey(KeyAction TypeOfAction) { switch (TypeOfAction) { case KeyAction.Esc: MainProcess.ClearControls(); MainProcess.Process = new InstallingNewLighter(MainProcess, LampBarCode) { MapInfo = MapInfo }; break; } }
public override sealed void DrawControls() { if (IsLoad) { object idObj = getAcceptanceDoc(); if (idObj != null) { documentId = idObj; acceptanceDoc.Read <AcceptanceOfNewComponents>(documentId); string caseModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.CaseModel); string lampModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.LampModel); string unitModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.UnitModel); caseModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.CaseModel); lampModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.LampModel); unitModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.UnitModel); if (acceptanceDoc.CaseModel == 0) { selectedModelRef = acceptanceDoc.LampModel == 0 ? unitModelRef : lampModelRef; } else { selectedModelRef = caseModelRef; } const string emptyModel = "-"; MainProcess.CreateLabel( string.Concat("Корпус: ", string.IsNullOrEmpty(caseModel) ? emptyModel : caseModel) , 5, 95, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default); MainProcess.CreateLabel( string.Concat("Лампа: ", string.IsNullOrEmpty(lampModel) ? emptyModel : lampModel) , 5, 130, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default); MainProcess.CreateLabel( string.Concat("Блок: ", string.IsNullOrEmpty(unitModel) ? emptyModel : unitModel) , 5, 165, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default); labelOfCount = MainProcess.CreateLabel("0", 0, 215, 240, MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info); MainProcess.CreateButton("Завершити приймання", 15, 275, 210, 35, "ok", ok_Click); } else { MainProcess.CreateLabel( "Не знайдено жодного відкритого документа \"Прийомка нового комплектуючого\" для обраного типу!", 5, 115, 230, 150, MobileFontSize.Multiline, MobileFontPosition.Center, MobileFontColors.Warning, FontStyle.Bold); } } }
public override void DrawControls() { pickingTask = new PickingTaskControls(); int top = 42; top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; pickingTask.planPickingCell = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; pickingTask.pickingWareLine1 = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS - 7; pickingTask.pickingWareLine2 = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; pickingTask.productionDate = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; pickingTask.planedQuantity = MainProcess.CreateLabel(string.Empty, 10, top, 230, MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); scanPallet = new ScanPallet(); scanPallet.order = MainProcess.CreateLabel("Відскануйте палету", 10, 240, 230, MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); quantityEditControls = new QuantityEditControls(); top = 205; quantityEditControls.boxesLabel = MainProcess.CreateLabel("Відібрано упаковок", 10, top, 150, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); quantityEditControls.packsCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; quantityEditControls.unitsLabel = MainProcess.CreateLabel("Відібрано одиниць", 10, top, 150, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); quantityEditControls.unitsCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; quantityEditControls.linersLabel = MainProcess.CreateLabel("Знято прокладок", 10, top, 150, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); quantityEditControls.linersCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; quantityEditControls.proceedButton = MainProcess.CreateButton("Продовжити ( F5 )", 10, top, 220, 30, "modelButton", proceed); }
public override void OnHotKey(KeyAction TypeOfAction) { switch (TypeOfAction) { case KeyAction.Esc: MainProcess.ClearControls(); MainProcess.Process = new SelectingLampProcess(MainProcess); break; case KeyAction.Proceed: OnBarcode("9786175660690"); break; } }
private void ExcuteWork(object sender, System.Timers.ElapsedEventArgs e) { try { Utility.WriteLog("Start Timer tick ", "Normal"); MainProcess main = new MainProcess(); main.RunningProcessModelAndPart(); main.RunningProcessServiceManual(); } catch (Exception ex) { Utility.WriteLog("Error execute time tick : " + ex.Message, "Error"); } }
private void MinimizeToJobQueue() { if (ucModule.ucPreview == null) { ucModule.ucPreview = new ucModulePreview { Module = ucModule, ModuleForm = this }; ShowInTaskbar = true; Hide(); MainProcess.AddModulePreview(ucModule.ucPreview); } }
static void Main(string[] args) { Utility.WriteLog("############################################################", "Normal"); Utility.WriteLog("ImportExcel Console started " + System.DateTime.Now.ToString(), "Normal"); MainProcess Main = new MainProcess(); Main.RunningProcessModelAndPart(); Main.RunningProcessServiceManual(); Main.RunningProcessModelBL(); Utility.WriteLog("ImportExcel Console ended " + System.DateTime.Now.ToString(), "Normal"); Utility.WriteLog("############################################################", "Normal"); Environment.Exit(0); }
protected virtual ButtonEdit CreateOpenFileControl(ModuleFieldInfo fieldInfo) { var txtButtonEdit = new ButtonEdit { Name = string.Format(CONSTANTS.TEXTINPUT_NAME_FORMAT, fieldInfo.FieldName), Tag = fieldInfo, EnterMoveNextControl = true }; //trungtt - 6.12.2013 - follow SSC's sugestion //Disable textbox. //txtButtonEdit.Text = "(Chọn đường dẫn)"; txtButtonEdit.Properties.TextEditStyle = TextEditStyles.DisableTextEditor; //end trungtt var button = txtButtonEdit.Properties.Buttons[0]; button.Tag = fieldInfo.ListSource; txtButtonEdit.ButtonClick += delegate(object sender, ButtonPressedEventArgs e) { if (e.Button == button) { try { Program.strExecMod = ModuleInfo.ExecuteMode.ToString(); //var targetModule = (ucSearchMaster)MainProcess.CreateModuleInstance(STATICMODULE.UPFILE_MODID); var targetModule = (ucUploadFile)MainProcess.CreateModuleInstance(STATICMODULE.UPFILE_MODULE); //if (targetModule is ucSearchMaster) if (targetModule is ucUploadFile) { targetModule.ShowDialogModule(this); } if (Program.blCheckFile) { //txtButtonEdit.Text = "(File attached)"; txtButtonEdit.Text = Program.FileName; } } catch (Exception ex) { ShowError(ex); } } // } }; return(txtButtonEdit); }
private void createScanPalletLabelControls() { scanNextPalletControls = new ScanPalletControls(); int top = 120; top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; scanNextPalletControls.WillLabel = MainProcess.CreateLabel("Відскануйте палету", 10, top, 230, MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 2; scanNextPalletControls.FinishCellButton = MainProcess.CreateButton(string.Empty, 5, top, 230, 55, "modelButton", () => finishCell()); }
public override sealed void DrawControls() { if (IsLoad) { MainProcess.ClearControls(); ListOfLabelsConstructor listOfLabels = new ListOfLabelsConstructor(MainProcess, "Ремонт", getUnitInfo()); List <LabelForConstructor> list = new List <LabelForConstructor>(); bool underWarrantly = underWarranty(); if (underWarrantly) { list.Add(new LabelForConstructor(string.Empty, ControlsStyle.LabelH2Red)); list.Add(new LabelForConstructor("УВАГА! Ел.блок", ControlsStyle.LabelH2Red)); list.Add(new LabelForConstructor("знаходиться на гарантії!", ControlsStyle.LabelH2Red)); } else { list.Add(new LabelForConstructor(string.Empty, ControlsStyle.LabelH2Red)); list.Add(new LabelForConstructor(string.Empty, ControlsStyle.LabelH2Red)); list.Add(new LabelForConstructor("Ел.блок не на гарантії", ControlsStyle.LabelH2)); } list.AddRange( new List <LabelForConstructor> { new LabelForConstructor(string.Empty, false), new LabelForConstructor("Модель: {0}"), new LabelForConstructor("Партія: {0}"), new LabelForConstructor("Гарантія до {0}"), new LabelForConstructor("Контрагент {0}"), new LabelForConstructor(string.Empty, false), new LabelForConstructor(underWarrantly ? "Помітити на обмін?" : string.Empty, ControlsStyle.LabelH2Red) }); listOfLabels.ListOfLabels = list; if (underWarrantly) { MainProcess.CreateButton("Так", 15, 275, 100, 35, "exchangeButton", exchange_Click); MainProcess.CreateButton("Ні", 125, 275, 100, 35, "repairButton", repair_Click); } else { MainProcess.CreateButton("Ок", 15, 275, 100, 35, "repairButton", repair_Click); MainProcess.CreateButton("Відміна", 125, 275, 100, 35, "exitButton", exit_click); } } }
public override void ShowModule(System.Windows.Forms.IWin32Window owner) { using (var ctrlSA = new SAController()) { List <string> values; string targetModule; GetOracleParameterValues(out values, SwitchInfo.SwitchStore); if (values.Count == 1 && values[0] == null) { CloseModule(); } else { ctrlSA.ExecuteSwitchModule(out targetModule, ModuleInfo.ModuleID, ModuleInfo.SubModule, values); //tudq them if (SwitchInfo.SwitchStore.ToUpper() == "SP_SWITCH_MAINTAIN_LOG" || SwitchInfo.SwitchStore.ToUpper() == "SP_SWITCH_VIEW_TLLOGMEMBER") { Program.txnum = values[1]; } // if (SwitchInfo.SwitchStore.ToUpper() == "SP_SWITCH_APPROVE") { Program.txnum = values[1]; //HUYVQ: Fix 2 -> 1: bỏ BUROWID } if (SwitchInfo.SwitchStore.ToUpper() == "SP_SWITCH_IMP") { Program.rptid = values[1]; if (values.Count > 2) { Program.rptlogID = values[2]; } } var module = MainProcess.CreateModuleInstance(targetModule); foreach (var param in ParameterFields) { module.SetFieldValue(param.FieldName, ParameterByFieldID[param.FieldID]); } module.ModuleClosed += delegate { RequireRefresh = module.RequireRefresh; CloseModule(); }; module.ShowModule(owner); } } }
protected override void OnHotKey(KeyAction TypeOfAction) { switch (TypeOfAction) { case KeyAction.Esc: MainProcess.ClearControls(); MainProcess.Process = new SelectingProcess(); break; case KeyAction.Enter: selectProcess(selectedIndex, selectedDescription); break; } }
protected override void InitializeGUI(DevExpress.Skins.Skin skin) { base.InitializeGUI(skin); StatusLed = new BarButtonItem { Alignment = BarItemLinkAlignment.Left, Glyph = ThemeUtils.Image16.Images[Language.Icon], PaintStyle = BarItemPaintStyle.CaptionGlyph }; StatusLed.ItemClick += StatusLed_ItemClick; MainProcess.RegisterButton(StatusLed); }
/// <summary>Отображение</summary> /// <param name="id">Id</param> /// <param name="typeOfAccessories">Тип комплектующего</param> private void showInfoById(long id, TypeOfAccessories typeOfAccessories) { MainProcess.ClearControls(); ListOfLabelsConstructor list = new ListOfLabelsConstructor(MainProcess); string topic; Dictionary <string, KeyValuePair <Type, object> > listOfDetail; //Отображаем текстовое инфо о элементе list.ListOfLabels = CatalogObject.GetVisualPresenter(id, typeOfAccessories, out topic, out listOfDetail); MainProcess.ToDoCommand = topic; //Отображаем кнопки для перехода на связанные элементы drawButtons(listOfDetail); }
protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); if (App.Environment.ClientInfo.SessionKey == null || frmConfirm.ShowConfirm(Language.ExitTitle, Language.ExitConfirm, this)) { MainProcess.LogoutFromSystem(false); e.Cancel = false; } else { e.Cancel = true; } }
/// <summary>Выбор позиции</summary> private void selectPostition() { hideTextBox(); if (string.IsNullOrEmpty(registerLabel.Text) || registerLabel.Text.Equals(NOT_CHOOSEN)) { ShowMessage("Не заполнен регистр!"); } else { MainProcess.ClearControls(); MainProcess.Process = new SelectPosition(MainProcess, MapInfo, registerLabel.Text, LampBarCode); } }
public override sealed void DrawControls() { MainProcess.ToDoCommand = "Вкажіть місце"; MainProcess.CreateButton("Карта", 15, 80, 100, 35, "map", selectMap); registerBtn = MainProcess.CreateButton("Регістр", 15, 125, 100, 35, "register", selectRegister, null, null, false); positionBtn = MainProcess.CreateButton("Позиція", 15, 170, 100, 35, "position", selectPostition, null, null, false); mapLabel = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 90, 100, MobileFontSize.Normal, MobileFontPosition.Center); registerLabel = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 135, 100, MobileFontSize.Normal, MobileFontPosition.Center); positionLabel = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 180, 100, MobileFontSize.Normal, MobileFontPosition.Center); MainProcess.CreateButton("Заповнити як попередній", 20, 230, 200, 35, "fillLikePrev", fillLikePrev); MainProcess.CreateButton("Ok", 20, 275, 200, 35, "ok", Ok); }
private void DrawForm1Controls() { mapDescription = getMapDescription(map); if (string.IsNullOrEmpty(mapDescription)) { MainProcess.Process = new SelectingLampProcess(MainProcess); return; } MainProcess.CreateLabel(string.Format("Карта {0}", mapDescription), 10, 70, 160, ControlsStyle.LabelLarge); MainProcess.CreateLabel(string.Format("Регістр {0}", register), 10, 105, 160, ControlsStyle.LabelLarge); MainProcess.CreateLabel(string.Format("Позиція {0}", position), 10, 140, 160, ControlsStyle.LabelLarge); MainProcess.CreateLabel("Скануйте світильник", 10, 220, 230, ControlsStyle.LabelLarge); }
private void createReturnWareStepControls() { returnWareControls = new ReturnWareControls(); int top = TOPMOST_CONTROL_Y_POSITION; returnWareControls.WareLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230, MobileFontSize.Little, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.PartyLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230, MobileFontSize.Little, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.QuantityLabel = MainProcess.CreateLabel("Кол-во единиц", 5, top, 160, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); returnWareControls.UnitsCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.QuantityBoxesLabel = MainProcess.CreateLabel("Кол-во упак.", 5, top, 160, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); returnWareControls.PacksCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.LinerButton = MainProcess.CreateButton("<без прокладки>", 5, top, 230, 30, string.Empty, chooseLiner_ButtonClick); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS + 10; returnWareControls.LinersQuantityLabel = MainProcess.CreateLabel("Кол-во прокл.", 5, top, 160, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular); returnWareControls.LinersCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false); updateLinerName(); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.ScanPalletLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold); top += VERTICAL_DISTANCE_BETWEEN_CONTROLS; returnWareControls.NewPalletButton = MainProcess.CreateButton("Новая паллета", 5, top, 230, 40, string.Empty, newPallet_ButtonClick); }
public override sealed void DrawControls() { if (IsLoad) { string accessory = string.Empty; string endOfTopic; switch (typeOfAccessory) { case TypeOfAccessories.Lamp: accessory = "Лампа"; break; case TypeOfAccessories.Case: accessory = "Світильник"; break; case TypeOfAccessories.ElectronicUnit: accessory = "Ел.блок"; break; } switch (newState) { case TypesOfLampsStatus.Storage: endOfTopic = "зберігання"; break; case TypesOfLampsStatus.ToCharge: endOfTopic = "списання"; break; default: const string message = "Для даного статусу не реалізовано логіку!"; ShowMessage(message); throw new Exception(message); } MainProcess.CreateLabel(string.Format("{0} буде поставленно на {1}!", accessory, endOfTopic), 5, 105, 230, 65, MobileFontSize.Multiline, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold); MainProcess.CreateLabel("Зберегти дані?", 5, 190, 230, MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info); MainProcess.CreateButton("Ок", 10, 275, 105, 35, "ok", Save_click); MainProcess.CreateButton("Відміна", 125, 275, 105, 35, "cancel", Cancel_click); } }
static void Main(string[] args) { IObjectRepository repo = new ObjectRepository(); ControllerBackupBase con = new BackupController(repo); MainProcess mainProcess = new MainProcess(con); Thread backupThread = new Thread(new ThreadStart(mainProcess.Start)); backupThread.Start(); ConsoleAppClass main = new ConsoleAppClass(con); main.ShowMainMenu(); Console.ReadKey(); }
public ActionResult StartProcess(int id) { MainProcess p = ContextProcess.Object.MainProceses.Find(id); if (p.CurrentStateName == ProcState.HaveToRun) { int new_session = p.Process_History.Count() == 0 ? 1 : p.Process_History.Max(h => h.SessionID) + 1; History history = new History { SessionID = new_session, ProcessID = id, EventID = 0 }; ContextProcess.Object.Historys.Add(history); ContextProcess.Object.SaveChanges(); p.Refresh(); } return(View("Index", ContextProcess.Object.MainProceses.ToArray())); }
public ActionResult StartStep(int id) { PreRequisite step = ContextProcess.Object.PreRequisites.Find(id); MainProcess p = ContextProcess.Object.MainProceses.Find(step.ProcessID); if (p.CurrentStateName == ProcState.Running && p.CurrentStep.ID == id) { History history = new History { SessionID = p.CurrentResult.SessionID, ProcessID = p.ID, EventID = id }; ContextProcess.Object.Historys.Add(history); ContextProcess.Object.SaveChanges(); p.Refresh(); } return(View("Index", ContextProcess.Object.MainProceses.ToArray())); }
public override sealed void DrawControls() { if (IsLoad) { MainProcess.ClearControls(); MainProcess.CreateLabel("Відскануйте", 0, 130, 240, MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Info, FontStyle.Bold); MainProcess.CreateLabel("ШТРИХ-КОД!", 0, 150, 240, MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Info, FontStyle.Bold); if (currentType != typeof(Cases)) { MainProcess.CreateButton("Без штрихкода", 10, 270, 220, 35, string.Empty, () => OnBarcode(string.Empty)); } } }
public string Post([FromBody] PostData postData) { if (postData.passwd.Equals("Toffstech_Performance-Monitoring@48969487")) { var domainList = JsonConvert.DeserializeObject <List <string> >(postData.jsonDomain); MainProcess mainProcess = new MainProcess(domainList); mainProcess.Run(); return("Successful"); } else { return("Failed"); } }
private void btnMail_Click(object sender, EventArgs e) { try { var sendMailInfo = ModuleUtils.GetModuleInfo(ModuleInfo.ModuleID, CODES.DEFMOD.SUBMOD.SEND_MAIL); var ucSendMail = (ucSendMail)MainProcess.CreateModuleInstance(sendMailInfo.ModuleID, sendMailInfo.SubModule); //ucExport.LastSearchResultKey = BufferResult.LastSearchResultKey; //ucExport.LastSearchTime = BufferResult.LastSearchTime; //ucExport.PrintGrid = gcMain; ucSendMail.ShowDialogModule(this); } catch (Exception ex) { ShowError(ex); } }
/// <summary> /// Default method that will manage everything that happen in the program /// </summary> public MainWindow() { AllocConsole(); // We open a console for logs InitializeComponent(); // Initialize the components _logger.Info("Application is starting"); _mainProcess = new MainProcess(); // Define a new mainProcess _mainProcess.backupList = new List <Backup>(); // Define a new backup list UnserializeCollection(BackupExportFile); // We load the backup configuration file dataGridBackupList.ItemsSource = _mainProcess.backupList; // We load the backup list in the window item _logger.Info("Application started successfully"); }
public override void DrawControls() { InitDatabase(); if (!isEmptyCriterions) { isEmptyCriterions = ShowQuery("Выполнить обновление номенклатуры и критериев оценивания?"); } if (isEmptyCriterions) { if (!UpdateRules()) { throw new ConnectionIsNotExistsException("нужно обновить критерии оценивания и номенклатуру!"); } } MainProcess.ClearControls(); MainProcess.ToDoCommand = "Регистрация качества"; labelControl = (MainProcess.CreateLabel("", 5, 59, 229, 39, ControlsStyle.LabelMultilineSmall).GetControl()) as Label; textBoxControl = (MainProcess.CreateTextBox(0, 0, 0, "", ControlsStyle.LabelH2, onTextBoxEndEdit, false)).GetControl() as TextBox; textBoxControl.LostFocus += new EventHandler(textBoxControl_LostFocus); textBoxControl.Hide(); Nomenclature = ""; #region Создание рабочей таблицы var dataTable = new DataTable(); dataTable.Columns.AddRange(new DataColumn[] { new DataColumn("CriterionName", typeof(string)), new DataColumn("CriterionId", typeof(long)), new DataColumn("Mark", typeof(int)), new DataColumn("HaveSubCriterion", typeof(bool)), new DataColumn("ParentCriterionId", typeof(long)) }); #endregion table = MainProcess.CreateTable("operations", 217, 99, onRowSelected); table.DT = dataTable; table.AddColumn("Критерий", "CriterionName", 180); table.AddColumn("Балл", "Mark", 34); table.Focus(); }
private void startGroupRegistration() { currentCase = accessory as Cases; if (currentCase.Lamp == 0 || currentCase.ElectronicUnit == 0) { ShowMessage("Нужно заполнить лампу и эл. блок!"); return; } if (!(accessory is Cases)) { return; } currentLamp = new Lamps(); currentLamp.Read(currentCase.Lamp); currentUnit = new ElectronicUnits(); currentUnit.Read(currentCase.ElectronicUnit); if (!string.IsNullOrEmpty(currentLamp.BarCode) || !string.IsNullOrEmpty(currentUnit.BarCode)) { ShowMessage("Для групової реєстрації лампа та блок мають бути без штрих-коду"); return; } if (isMainDataEntered && warrantlyDataIsValid()) { accessory.Write(); } else { showWriteErrorMessage(); return; } groupRegistration = true; currentCase = new Cases(); currentCase.Read(accessory.Id); groupRegistrationButton.Hide(); groupSizeLabel = MainProcess.CreateLabel("", 5, 283, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Info, FontStyle.Bold); groupSize = 0; }