private void ButtonClick(object sender, RoutedEventArgs e) { int indx = Snp.FindIndex(l => l.CustomerId == CustomerId); if (indx != -1) { RepositoryStatPlaceArrond.Delete(Snp[indx]); Snp.RemoveAt(indx); } else { FunctionsService.ShowMessageTime("Erroer "); } CollectionViewSource.GetDefaultView(((WGrid)Owner).dataGrid.ItemsSource).Refresh(); foreach (Window window in Application.Current.Windows) { if (window.GetType() == typeof(WStat)) { WStat w = (window as WStat); w.Reload(); } } Close(); }
public AgentSkladky(int id, OSPABA.Simulation mySim, Agent parent) : base(id, mySim, parent) { Init(); WaitingTimePerCar = new Stat(); LengthOfQueue = new WStat(mySim); UsageLoaderA = new WStat(mySim); RealWorkingTimeA = new WStat(mySim); RealWorkingTimeB = new WStat(mySim); RealWorkingA = 0; RealWorkingB = 0; UsageLoaderB = new WStat(mySim); AutaSkladkaQueue = new SimQueue <Vehicle>(LengthOfQueue); MessageSkladkaQueue = new SimQueue <MyMessage>(); MaterialNaSkladke = Constants.MaterialAtDepo; Material = Settings.Constants.MaterialToLoad; NakladacAIsOccupied = false; NakladacBIsOccupied = false; fullLoad = true; StartedWorkingA = 0; StartedWorkingB = 0; WaitingTimeSimulacia = new Stat(); LengthOfQueueSimulacia = new Stat(); RealWorkingTimeASimulacia = new Stat(); RealWorkingTimeBSimulacia = new Stat(); }
public AgentStavby(int id, OSPABA.Simulation mySim, Agent parent) : base(id, mySim, parent) { Init(); WaitingTimePerCar = new Stat(); LengthOfQueue = new WStat(mySim); UsageUnloaderA = new WStat(mySim); UsageUnloaderB = new WStat(mySim); AutaStavbaQueue = new SimQueue <Vehicle>(LengthOfQueue); MessageStavbaQueue = new SimQueue <MyMessage>(LengthOfQueue); VykladacBIsDisabled = !((MySimulation)MySim).BuyUnloader; VykladacAIsOccupied = false; VykladacAIsOccupied = false; OdoberMaterial = new Stat(); OdoberMaterialKumulativny = new Stat(); PocetUspesnyExport = 0; PocetExport = 0; RealWorkingTimeA = new WStat(mySim); RealWorkingTimeB = new WStat(mySim); RealWorkingA = 0; RealWorkingB = 0; StartedWorkingA = 0; StartedWorkingB = 0; WaitingTimeSimulacia = new Stat(); LengthOfQueueSimulacia = new Stat(); RealWorkingTimeASimulacia = new Stat(); RealWorkingTimeBSimulacia = new Stat(); }
//meta! userInfo="Generated code: do not modify", tag="begin" private void Init() { new ManagerCakarne(SimId.ManagerCakarne, MySim, this); ProcessCakania = new ProcessCakania(SimId.ProcessCakania, MySim, this); AddOwnMessage(Mc.NoticeKoniecCakania); AddOwnMessage(Mc.NoticeZaciatokCakania); AddOwnMessage(Mc.PacientCakaj); DlzkaRadu = new WStat(MySim); }
private void ButtonClick(object sender, RoutedEventArgs e) { string name = xNamePlaceArrond.Text; string QTY = xQTY.Text; if (name.Length == 0) { FunctionsService.ShowMessageTime("Пустое знаение "); } else { if (Snp.FindAll(l => l.NamePlaceArrond == name).Count > 0) { FunctionsService.ShowMessageTime("Такое имя сущ-ет "); } else { int qty; if (int.TryParse(QTY, out qty)) { int indx = Snp.FindIndex(l => l.CustomerId == this.CustomerId); if (indx != -1) { Snp[indx].NamePlaceArrond = name; Snp[indx].Qty = qty; RepositoryStatPlaceArrond.Update(Snp[indx]); } else { FunctionsService.ShowMessageTime("Erroer "); } CollectionViewSource.GetDefaultView(((WGrid)Owner).dataGrid.ItemsSource).Refresh(); foreach (Window window in Application.Current.Windows) { if (window.GetType() == typeof(WStat)) { WStat w = (window as WStat); w.Reload(); } } Close(); } else { FunctionsService.ShowMessageTime("Неверое значние поля QTY "); } } } }
protected override void PrepareSimulation() { base.PrepareSimulation(); // Create global statistcis CurrentRun.initializeCurrentRun(); _statistics = new Statistics(); // inicializacia aut // //AgentDopravy.PrepareCars(SeedGenerator); SkladkaWStat = new WStat(this); }
//meta! userInfo="Generated code: do not modify", tag="begin" private void Init() { new ManagerVysetrenia(SimId.ManagerVysetrenia, MySim, this); ProcessVysetrenia = new ProcessVysetrenia(SimId.ProcessVysetrenia, MySim, this); SchedulerObedov = new SchedulerObeduDoktorov(SimId.SchedulerObeduDoktorov, MySim, this); ProcessObsluhy = ProcessVysetrenia; AddOwnMessage(Mc.VysetriPacienta); AddOwnMessage(Mc.NoticeZaciatokVysetrenia); AddOwnMessage(Mc.NoticeKoniecVysetrenia); AddOwnMessage(Mc.NoticeCasObeda); AddOwnMessage(Mc.VykonajObed); DlzkaCakania = new Stat(); DlzkaRadu = new WStat(MySim); VytazeniePracovnikov = new WStat(MySim); }
//meta! userInfo="Generated code: do not modify", tag="begin" private void Init() { new ManagerRegistracie(SimId.ManagerRegistracie, MySim, this); ProcessRegistracie = new ProcessRegistracie(SimId.ProcessRegistracie, MySim, this); SchedulerObedov = new SchedulerObeduAdminov(SimId.SchedulerObeduAdminov, MySim, this); ProcessObsluhy = ProcessRegistracie; AddOwnMessage(Mc.NoticeKoniecRegistracie); AddOwnMessage(Mc.NoticeZaciatokRegistracie); AddOwnMessage(Mc.ZaregistrujPacienta); AddOwnMessage(Mc.NoticeCasObeda); AddOwnMessage(Mc.VykonajObed); DlzkaCakania = new Stat(); DlzkaRadu = new WStat(MySim); VytazeniePracovnikov = new WStat(MySim); }
//meta! userInfo="Generated code: do not modify", tag="begin" private void Init() { new ManagerOckovania(SimId.ManagerOckovania, MySim, this); ProcessOckovania = new ProcessOckovania(SimId.ProcessOckovania, MySim, this); SchedulerObedov = new SchedulerObeduSestriciek(SimId.SchedulerObeduDoktorov, MySim, this); ProcessObsluhy = ProcessOckovania; AddOwnMessage(Mc.NoticeKoniecOckovania); AddOwnMessage(Mc.NoticeZaciatokOckovania); AddOwnMessage(Mc.ZaockujPacienta); AddOwnMessage(Mc.NaplnStriekacky); AddOwnMessage(Mc.NoticeCasObeda); AddOwnMessage(Mc.VykonajObed); DlzkaCakania = new Stat(); DlzkaRadu = new WStat(MySim); VytazeniePracovnikov = new WStat(MySim); }
private void ButtonClick(object sender, RoutedEventArgs e) { var name = xNameNation.Text; var qtyText = xQTY.Text; if (name.Length == 0) { FunctionsService.ShowMessageTime("Пустое знаение "); } else { if (Snp.Find(l => l.NameNation == name) != null) { FunctionsService.ShowMessageTime("Такое имя сущ-ет "); } else { int qty = 0; if (int.TryParse(qtyText, out qty)) { var sn = new StatNationPopup(Guid.NewGuid(), name, qty); RepositoryStatNationPopup.Add(sn); Snp.Add(sn); CollectionViewSource.GetDefaultView((Owner as WGrid).dataGrid.ItemsSource).Refresh(); foreach (Window window in Application.Current.Windows) { if (window.GetType() == typeof(WStat)) { WStat w = (window as WStat); w.Reload(); } } Close(); } else { FunctionsService.ShowMessageTime("Неверое значние поля QTY "); } } } }