public Car() { name = "케이세븐"; color = "빨간색"; vender = "기아"; aEngin = new Engin(); }
static void Main(string[] args) { var raceTower = new RaceTower(); var engine = new Engin(raceTower); engine.Start(); }
public Car() { color = "하양"; name = "자동차"; vendor = "람보르기니"; aEngin = new Engin(); }
private FormEnginViewModel GetFormEngin(bool isEdit, Engin unEngin = null) { FormEnginViewModel formModel = new FormEnginViewModel(); formModel.unEngin = unEngin; formModel.isEdit = isEdit; return(formModel); }
public static void Main(string[] args) { ICommandInterpreter command = new CommandInterpreter(); IEngin engin = new Engin(command); engin.Run(); }
// Use this for initialization void Start() { engin = GameObject.Find("Engin").GetComponent <Engin>(); ac = GameObject.Find("Body").GetComponent <AirControl>(); rig = GetComponent <Rigidbody>(); rig.maxAngularVelocity = 2; rig.angularDrag = 5; speed = new Vector3(0, 0, 0); }
public MainWindow() { InitializeComponent(); engin = new Engin(); SetTopics(); RenderNotes(); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}:\n", Model); sb.Append(Engin.ToString()); sb.AppendFormat("{0}Weight: {1}\n", offset, Weight == -1 ? "n/a" : Weight.ToString()); sb.AppendFormat("{0}Color: {1}", offset, Color); return(sb.ToString()); }
public ActionResult Details(int?id) { if (id == null) { string ErrorMessage = "Id Engin manquant"; return(RedirectToAction("Index", new { MessageErreur = ErrorMessage })); } Engin unEngin = this.enginService.GetEnginById(id); if (unEngin == null) { return(HttpNotFound()); } return(View(unEngin)); }
public ActionResult Edit(int?id) { if (id == null) { string ErrorMessage = "Id Engin manquant"; return(RedirectToAction("Index", new { MessageErreur = ErrorMessage })); } Engin unEngin = this.enginService.GetEnginById(id); if (unEngin == null) { return(HttpNotFound()); } FormEnginViewModel formModel = this.GetFormEngin(true, unEngin); return(View(formModel)); }
public ActionResult Edit([Bind(Include = "ID,Nom,Numero,Immatriculation,CodeConf,CodeChauff,DateCreation,DateModification")] Engin unEngin) { FormEnginViewModel formModel = this.GetFormEngin(true, unEngin); if (ModelState.IsValid) { ActionControllerResult result = this.enginService.UpdateEngin(unEngin, User.Identity.GetUserId()); if (result == ActionControllerResult.FAILURE) { ViewBag.ErrorMessage = Constantes.MESSAGE_ERR_NOTIFICATIONS; return(View(formModel)); } this.logService.LogEvenement(LOG_TYPE_EVENT.Edit, LOG_TYPE_OBJECT.Engin, unEngin.ID, "Modification d'un Engin", null, User.Identity.GetUserId()); return(RedirectToAction("Index")); } return(View(formModel)); }
public ActionControllerResult UpdateEngin(Engin unEngin, string userId = null) { ActionControllerResult result; try { unEngin.DateModification = DateTime.Now; this.enginRepository.Update(unEngin); this.unitOfWork.Save(); result = ActionControllerResult.SUCCESS; } catch (Exception ex) { this.logService.LogErreur(LOG_TYPE_OBJECT.Engin, null, "Erreur Lors de la modification d'un Engin", ex.Message, userId); result = ActionControllerResult.FAILURE; } return(result); }
public ActionResult Create([Bind(Include = "ID,Nom,Numero,Immatriculation,CodeConf,CodeChauff")] Engin unEngin) { FormEnginViewModel formModel = this.GetFormEngin(false, unEngin); if (ModelState.IsValid) { //insertion du blocInventaire ActionControllerResult result = this.enginService.InsertEngin(unEngin, User.Identity.GetUserId()); //si erreur on affiche un message if (result == ActionControllerResult.FAILURE) { ViewBag.ErrorMessage = Constantes.MESSAGE_ERR_NOTIFICATIONS; return(View(formModel)); } //Réussi this.logService.LogEvenement(LOG_TYPE_EVENT.Create, LOG_TYPE_OBJECT.Engin, unEngin.ID, "Création d'un Engin", null, User.Identity.GetUserId()); return(RedirectToAction("Index")); } return(View(formModel)); }
public ActionResult CreatePleinEngin(int?id) { if (id == null) { string ErrorMessage = "Id Engin manquant"; return(RedirectToAction("Index", new { MessageErreur = ErrorMessage })); } Engin unEngin = this.enginService.GetEnginById(id); if (unEngin == null) { return(HttpNotFound()); } PleinEssence unPlein = new PleinEssence(); unPlein.EnginID = unEngin.ID; unPlein.Engin = unEngin; return(View(this.GetFormPleinEngin(false, unPlein))); }
public MainWindow() { InitializeComponent(); analyseResults.AddHandler(TreeViewItem.ExpandedEvent, new RoutedEventHandler(AnalyseResults_ItemExpanded)); m_timerElapsed = new DispatcherTimer { Interval = new TimeSpan(0, 0, 0, 1) }; m_timerElapsed.Stop(); m_timerElapsed.Tick += new EventHandler(TimerElapsed_Tick); // Ajout de l'onglet détails dans la liste //tcOutilsAdditionnels.Controls.Add(new TabPageDetails()); //analyseResults.Items.SortDescriptions TreeViewNodeSorter = new NodeSorter(); //ChargementImage(); m_moteur = new Engin(); m_moteur.AnalyseCompleter += new Engin.EnginEventHandler(Moteur_AnalyseCompleter); m_moteur.AnalyseProgression += new Engin.EnginProgressionEventHandler(Moteur_AnalyseProgression); m_moteur.EtatModifier += new Engin.EnginEtatModifierEventHandler(Moteur_EtatModifier); try { foreach (EsGaceEngin.Item disque in m_moteur.DisqueRacines) { AjouterItemArbre(null, disque); } } catch (Exception) { throw; } // Affiche les bons contrôles disponibles //AjusterFenetreSelonEtat(); }
// Use this for initialization void Start() { engin = GameObject.Find("Engin").GetComponent<Engin>(); ac = GameObject.Find("Body").GetComponent<AirControl>(); rig = GetComponent<Rigidbody>(); rig.maxAngularVelocity = 2; rig.angularDrag = 5; speed = new Vector3(0, 0, 0); }
static void Main(string[] args) { var engin = new Engin(); engin.Start(); }
static void Main(string[] args) { Engin.Start(); }