/// <summary> /// Обновление визуализаций /// </summary> public void UpdateVisual() { Tree?.UpdateVisual(); Front?.UpdateVisual(); Place?.UpdateVisual(); Map?.UpdateVisual(); }
/// <summary> /// Сохранение расчета в словарь чертежа /// </summary> public void SaveIns() { if (Doc == null || Doc.IsDisposed) { return; } // Словарь InsModel var dicInsModel = new DicED("InsModel"); // Список значений самого расчета InsModelRec dicInsModel.AddRec("InsModelRec", GetDataValues(Doc)); // Словарь настроек InsOptions dicInsModel.AddInner("InsOptions", Options.GetExtDic(Doc)); // Словарь расчета елочек TreeModel dicInsModel.AddInner("TreeModel", Tree.GetExtDic(Doc)); // Словарь расчета фронтов FrontModel dicInsModel.AddInner("FrontModel", Front.GetExtDic(Doc)); // Словарь расчета площадок dicInsModel.AddInner("PlaceModel", Place.GetExtDic(Doc)); // Сохранение словаря InsModel в NOD чертежа InsExtDataHelper.SaveToNod(Doc, dicInsModel); // Сохранение всех точек Tree.SavePoints(); }
public UnitConstraints() { IntroduceYear = 0; ObsoleteYear = 0; Front = Front.ALL; Environments = new List <Environment>(); }
/// <summary> /// Обновление всех расчетов /// </summary> public void Update(Document doc = null) { if (doc == null) { Doc = Application.DocumentManager.MdiActiveDocument; } else { Doc = doc; } // инициализация Initialize(Doc); // Точки рассчитаны при Initialize() // Расчет фронтов Front.Update(); // Визуализация оставшихся домов (не включенных во фронты) Map.UpdateVisual(); // Расчет площадок Place.Update(); // Определение связанных домов UpdateHousesDbSel(); IsUpdateRequired = false; UpdateInfo = "Обновление расчета"; Map.WriteReport(); // Отчет по количеству определенных объеков на карте }
public void WriteUVs(List <float> uvs) { if (VisibleTop) { Top.WriteTextureCoordinates(uvs); } if (VisibleFront) { Front.WriteTextureCoordinates(uvs); } if (VisibleLeft) { Left.WriteTextureCoordinates(uvs); } if (VisibleBottom) { Bottom.WriteTextureCoordinates(uvs); } if (VisibleRight) { Right.WriteTextureCoordinates(uvs); } if (VisibleBack) { Back.WriteTextureCoordinates(uvs); } }
public void WriteVertices(List <float> vertices) { if (VisibleTop) { Top.WriteVertices(vertices); } if (VisibleFront) { Front.WriteVertices(vertices); } if (VisibleLeft) { Left.WriteVertices(vertices); } if (VisibleBottom) { Bottom.WriteVertices(vertices); } if (VisibleRight) { Right.WriteVertices(vertices); } if (VisibleBack) { Back.WriteVertices(vertices); } }
public ActionResult Gestion(Client client) { using (var context = new Front()) { // Si les données ne sont pas bonne ou que le client existe deja on renvoi la page avec les erreurs /* if (!ModelState.IsValid)// || context.VerifierExistenceClient(client.EmailClient)) * { * ClientViewModel modelerror = new ClientViewModel * { * }; * //{ * // modelerror.Message = "Erreur : Cette adresse mail est déja utilisée"; * //} * return View(modelerror); * }*/ //Inscription du client dans la base context.UpdateClient(client); ClientViewModel model = new ClientViewModel { }; // On renvoie le client sur la page d'accueil return(RedirectToAction("Index", "Home")); } }
/// <summary> /// Helper method that moves the entire Back Stack into the Front Stack so that the node at the "Front" of the Queue is now at the Top of the Front Stack. /// </summary> private void CycleQueue() { while (Back.Peek() != null) { Front.Push(Back.Pop()); } }
/// <summary> /// 同一IP接続数を監視して /// 制限数を超えていたら切断する /// </summary> private void SameIPCheck() { // 3秒待つ Thread.Sleep(3000); // 3秒以内に接続が切れていたら終了 if (Sock.Connected == false) { return; } int num = 0; lock (Status.Gui.ClientItem) { for (int cnt = 0; cnt < Status.Gui.ClientItem.Count; cnt++) { if (Status.Gui.ClientItem[cnt].SubItems[Front.clmCV_IP_IDX].Text == Ip) { num++; } } } if (num > Front.Acl.LimitSameClient) { Front.AddLogData(1, Status, "同一IPの同時接続超過のため切断します [[" + Id + "] " + Ip + "]"); Sock.Close(); } }
//meta! sender="AgentVakCentra", id="23", type="Notice" public void ProcessNoticeZaciatokOckovania(MessageForm message) { var sprava = message as Sprava; message.Addressee = MyAgent.ProcessOckovania; message.Code = Mc.NoticeZaciatokOckovania; sprava.ZaciatokObsluhy = MySim.CurrentTime; if (!MyAgent.ObsluhaVolna) { sprava.Pacient.Stav = "Èaká na oèkovanie"; Front.Enqueue(sprava); MyAgent.DlzkaRadu.AddSample(Front.Count); } else { double dobaCakania = MySim.CurrentTime - sprava.ZaciatokObsluhy; //sprava.Pacient.CelkovaDobaCakania += dobaCakania; sprava.Pacient.DobaCakaniaNaOckovanie = dobaCakania; MyAgent.DlzkaCakania.AddSample(dobaCakania); NaplanujObsluhu(message); StartContinualAssistant(message); } }
void Awake() { if (instance == null) { instance = this; } }
void Panier() { var claimIdentity = User.Identity as ClaimsIdentity; var identifiant = new Front().RecupererInformationClient(claimIdentity.FindFirst(ClaimTypes.NameIdentifier).Value).NumeroClient; panier = new Front().ObtenirPanier(new BddContext().Clients.First(c => c.NumeroClient == identifiant)); }
private void Edit(object obj) { if (SelectedFlipCard != null) { if (!string.IsNullOrEmpty(Front.Trim()) && !string.IsNullOrEmpty(Back.Trim())) { if (model.EditFlipCardContent(SelectedFlipCard, new FlipCard(Front, Back, (sbyte)editedDeck.Id))) { RefreshFlipCards(); ClearForm(); } else { System.Windows.MessageBox.Show("Taka fiszka już istnieje"); } } else { System.Windows.MessageBox.Show("Wypełnij pola"); } } else { System.Windows.MessageBox.Show("Zaznacz fiszke do edycji"); } }
public ActionResult Register(string id, string pass, string nameUser, string email, string address, string phone) { try { UserAdmin ussr = new UserAdmin(); ussr.id = id; ussr.Password = pass; ussr.NameUser = nameUser; ussr.EmailUser = email; ussr.Adress = address; ussr.PhoneUser = phone; string respuesta = new Front().RegistrarUsuario(ussr); if (respuesta == "Registro Exitoso") { Request.Flash("success", respuesta); return(RedirectToAction("Index", "Home")); } else { Request.Flash("danger", respuesta); return(RedirectToAction("Index", "Home")); } } catch (Exception ex) { ModelState.AddModelError("Error al realizar el registro", ex.Message); throw; } }
/// <summary> /// 適用ボタンをクリック /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void optApplyBTN_Click(object sender, EventArgs e) { // GUI→Frontに設定反映 SaveSetting(); // Front→iniファイルに保存 Front.SaveSetting(); }
private void ToggleCameraSwitches(object sender, EventArgs e) { UISwitch theSwitch = (UISwitch)sender; if (theSwitch == this.Front) { if (theSwitch.On) { Back.SetState(false, true); } else { Back.SetState(true, true); } } else if (theSwitch == this.Back) { if (theSwitch.On) { Front.SetState(false, true); } else { Front.SetState(true, true); } } }
public void Enqueque(int value) { Stack temp = new Stack(); while (Front.Top.Next != null) { Node tempNode = Front.Pop(); temp.Push(tempNode.Value); } Node tempNode2 = Front.Pop(); temp.Push(tempNode2.Value); //Pushing the node to the stack Front.Push(value); while (temp.Top.Next != null) { Node tempNode = temp.Pop(); Front.Push(tempNode.Value); } Node tempNode3 = temp.Pop(); Front.Push(tempNode3.Value); }
/// <summary> /// Returns true if BrandedFoodObjectPackagingPhotos instances are equal /// </summary> /// <param name="other">Instance of BrandedFoodObjectPackagingPhotos to be compared</param> /// <returns>Boolean</returns> public bool Equals(BrandedFoodObjectPackagingPhotos other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Front == other.Front || Front != null && Front.Equals(other.Front) ) && ( Nutrition == other.Nutrition || Nutrition != null && Nutrition.Equals(other.Nutrition) ) && ( Ingredients == other.Ingredients || Ingredients != null && Ingredients.Equals(other.Ingredients) )); }
/// <summary> /// ストリーム情報の書き込み /// </summary> /// <param name="_byte"></param> public void StreamWrite(byte[] _byte) { if (_byte.Length <= 0) { return; } Status.RecvByte += _byte.Length; try { lock (ClientList) { foreach (ClientData cd in ClientList) { try { if (cd.IsAlive) { cd.StreamQueue.Enqueue(_byte); } } catch (Exception) { cd.Disc(); cd.StreamQueue.Clear(); Front.AddLogData(1, Status, "ストリーム書き込みNG [" + cd.Ip + "] / Q:" + cd.StreamQueue.Count); } } } } catch { } }
public double ComputeHypervolume(SolutionSet solutionSet, Solution referencePoint) { double hv = 0.0; if (solutionSet.Size() == 0) { hv = 0.0; } else { this.numberOfObjectives = solutionSet.Get(0).NumberOfObjectives; this.referencePoint = referencePoint; if (this.numberOfObjectives == 2) { solutionSet.Sort(new ObjectiveComparator(this.numberOfObjectives - 1, true)); hv = Get2DHV(solutionSet); } else { WFGHV wfg = new WFGHV(this.numberOfObjectives, solutionSet.Size()); Front front = new Front(solutionSet.Size(), numberOfObjectives, solutionSet); hv = wfg.GetHV(front, referencePoint); } } return(hv); }
// GET: Albumn's List public ActionResult ListarAlbum() { try { List <Album> alb = new List <Album>(); alb = new Front().ListarAlbum(); List <Compurent.Web.Models.Album> albu = new List <Compurent.Web.Models.Album>(); foreach (Album al in alb) { Compurent.Web.Models.Album albus = new Compurent.Web.Models.Album(); albus.id = al.id; albus.Name = al.Name; albu.Add(albus); } return(View(albu)); } catch (Exception e) { Request.Flash("danger", e.Message); throw; } }
/// <summary> /// Computes the HV contribution of the solutions /// </summary> /// <param name="solutionSet"></param> public void ComputeHVContributions(SolutionSet solutionSet) { double[] contributions = new double[solutionSet.Size()]; double solutionSetHV = 0; solutionSetHV = ComputeHypervolume(solutionSet); for (int i = 0; i < solutionSet.Size(); i++) { Solution currentPoint = solutionSet.Get(i); solutionSet.Remove(i); if (numberOfObjectives == 2) { contributions[i] = solutionSetHV - Get2DHV(solutionSet); } else { Front front = new Front(solutionSet.Size(), numberOfObjectives, solutionSet); double hv = new WFGHV(numberOfObjectives, solutionSet.Size(), referencePoint).GetHV(front); contributions[i] = solutionSetHV - hv; } solutionSet.Add(i, currentPoint); } for (int i = 0; i < solutionSet.Size(); i++) { solutionSet.Get(i).CrowdingDistance = contributions[i]; } }
public ActionResult AgregarCancion() { try { List <Album> alb = new List <Album>(); alb = new Front().ListarAlbum(); List <SelectListItem> items = alb.ConvertAll(al => { return(new SelectListItem() { Text = al.Name, Value = Convert.ToString(al.id), Selected = false }); }); ViewBag.items = items; return(View()); } catch (Exception ex) { Request.Flash("danger", ex.Message); throw; } }
public ActionResult EditarCancion(int Id) { try { Songs song = new Songs(); song = new Front().BuscarCancion(Id); Models.Songs sog = new Models.Songs(); sog.id = song.id; sog.Name = song.Name; List <Album> alb = new List <Album>(); alb = new Front().ListarAlbum(); List <SelectListItem> items = alb.ConvertAll(al => { return(new SelectListItem() { Text = al.Name, Value = Convert.ToString(al.id), Selected = true }); }); ViewBag.items = items; return(View(sog)); } catch (Exception e) { Request.Flash("danger", e.Message); throw; } }
public int GetTotalNumVertices() { int numverts = 0; if (Top != null) { numverts += Top.GetNumVertices(); } if (Bottom != null) { numverts += Bottom.GetNumVertices(); } if (Left != null) { numverts += Left.GetNumVertices(); } if (Right != null) { numverts += Right.GetNumVertices(); } if (Front != null) { numverts += Front.GetNumVertices(); } if (Back != null) { numverts += Back.GetNumVertices(); } return(numverts); }
public ActionResult Inscription(Client client, bool captchaValid) { using (var context = new Front()) { // Si les données ne sont pas bonne ou que le client existe deja on renvoi la page avec les erreurs if (!ModelState.IsValid || context.VerifierExistenceClient(client.EmailClient)) { ClientViewModel modelerror = new ClientViewModel { Connecte = false }; if (context.VerifierExistenceClient(client.EmailClient)) { modelerror.Message = "Erreur : Cette adresse mail est déja utilisée"; } return(View(modelerror)); } //Inscription du client dans la base context.InscriptionClient(client); ClientViewModel model = new ClientViewModel { Connecte = false }; // On renvoi le client sur la page d'authentification return(RedirectToAction("Login", "Authentication")); } }
/// <summary> /// Takes the first pet of the prefered type out of the shelter /// </summary> /// <param name="prefered">A Pet of the type that will be returned</param> /// <returns>A Pet depending on the type of prefered Pet passed in</returns> public Pet Dequeue(Pet preferred) { Pet result = null; Pet temp = null; if (preferred.GetType() == Front.GetType()) { result = Dequeue(); } else { temp = Dequeue(); Enqueue(temp); while (Front != temp) { if ((Front.GetType() == preferred.GetType()) && (result == null)) { result = Dequeue(); } else { Enqueue(Dequeue()); } } } if (result == null) { result = Dequeue(); } return(result); }
public double ComputeHypervolume(SolutionSet solutionSet) { double hv; if (solutionSet.Size() == 0) { hv = 0.0; } else { numberOfObjectives = solutionSet.Get(0).NumberOfObjectives; referencePoint = new Solution(numberOfObjectives); UpdateReferencePoint(solutionSet); if (numberOfObjectives == 2) { solutionSet.Sort(new ObjectiveComparator(numberOfObjectives - 1, true)); hv = Get2DHV(solutionSet); } else { UpdateReferencePoint(solutionSet); Front front = new Front(solutionSet.Size(), numberOfObjectives, solutionSet); hv = new WFGHV(numberOfObjectives, solutionSet.Size(), referencePoint).GetHV(front); } } return(hv); }
/// <summary> /// Return a text representation of this object. /// </summary> public override String ToString() { return(String.Format("Sphere: Left={0}, Top={1}, Front={2}, Radius={3}", Left.ToString(), Top.ToString(), Front.ToString(), Radius.ToString())); }
public Card TrimValues() { CardID = CardID.Trim(); UserID = UserID.Trim(); Front = Front.Trim(); Back = Back.Trim(); return(this); }
public Shield() { Front frontPanel = new Front(); Rear rearPanel = new Rear(); Top topPanel = new Top(); Bottom bottomPanel = new Bottom(); Right rightPanel = new Right(); Left leftPanel = new Left(); }