/// <summary> /// Deletes the selected Apparatus in the <see cref="RecipeToolsListBox"/> from the <see cref="RecipesListBox"/> /// when <see cref="RecipeToolDelete"/> is clicked. /// </summary> /// <param name="sender"><see cref="RecipeToolDelete"/></param> /// <param name="e">Event Arguments</param> private void RecipeToolDelete_Click(object sender, RoutedEventArgs e) { Recipe recipe = this.RecipesListBox.SelectedItem as Recipe; Apparatus apparatus = this.RecipeToolsListBox.SelectedItem as Apparatus; recipe.Tools.Remove(apparatus); }
public VehiclesDetailTableSource(Apparatus Apparatus, UITableView TableView, VehicleDetailController Caller) { CurrentApparatus = Apparatus; DetailItems = new List <UITableViewCell>(); Delegate = TableView; Parent = Caller; BuildTable(); }
public override GameObject CreateGameObject(ReferenceData referenceData, Transform parent = null) { var gameObject = base.CreateGameObject(referenceData, parent); Apparatus.Create(gameObject, this, referenceData); return(gameObject); }
/// <summary> /// Adds the selected apparatus from the <see cref="ApparatusListBox"/> to the <see cref="Recipe.Tools"/> of the /// selected recipe of the <see cref="RecipesListBox"/>. /// </summary> /// <param name="sender"><see cref="ApparatusListBox"/></param> /// <param name="e">Event Arguments</param> private void ApparatusListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Apparatus apparatus = this.ApparatusListBox.SelectedItem as Apparatus; if (this.RecipesListBox.SelectedItem is Recipe recipe) { recipe.Tools.Add(apparatus); } }
/// <summary> /// Executes when the <see cref="SubmitButton"/> for the <see cref="NewApparatusDialog"/> is clicked. /// Generates apparartus from form and executes <see cref="dialogClosingHandler"/>. /// </summary> /// <param name="sender"><see cref="SubmitButton"/></param> /// <param name="e"> event arguments</param> private void Submit_Click(object sender, RoutedEventArgs e) { Apparatus apparatus = new Apparatus(this.ApparatusNameTextBox.Text) { Name = this.ApparatusNameTextBox.Text }; this.dialogClosingHandler(false, apparatus); this.dialogClosingHandler = null; }
/// <summary> /// Overload to handle dialog closing when ingredient is created but a quantity is not included. /// Adds <paramref name="outTool"/> to the <see cref="ApparatusListBox"/> and, when a recipe is selected /// then the <paramref name="outTool"/> is also added to the <see cref="RecipeToolsListBox"/>. /// </summary> /// <param name="isCancelled"> TRUE if dialog is cancelled.</param> /// <param name="outTool"> Apparatus created by the closing dialog.</param> private void HandleDialogClosing(bool isCancelled, Apparatus outTool) { if (!isCancelled) { this.viewModel.AllTools.Add(outTool); if (this.RecipesListBox.SelectedItem is Recipe recipe) { recipe.Tools.Add(outTool); } } CloseDialog(); }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell(CellIdentifier); Apparatus item = TableItems[indexPath.Row]; if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Subtitle, CellIdentifier); } cell.TextLabel.Text = item.Name; cell.DetailTextLabel.Text = item.Status.ToString(); if (item.Status.DutyStatus == Core.Model.Abstract.DutyStatus.OOS) { cell.DetailTextLabel.TextColor = UIColor.FromRGB(237, 61, 56); } cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; return(cell); }
public static Ingredient Calcination(Apparatus apparatus, Solid substance) { // https://en.wikipedia.org/wiki/Calcination return(null); }
/// <summary> /// Makes the Objective to run throug all of its IntentObtainers and /// have them contribute their intents into the final ApparatusInput /// that is to be sent to drone. /// </summary> /// /// <param name="aApparatusOutput"> /// Information that came down from the drone and the last input /// that has been sent to the drone from autopilot. /// </param> /// /// <param name="aApparatusInput"> /// A reference to an existing Apparatus.Input variable which will /// be filled up with values by the intent obtainers involved with /// the Objective. /// </param> /// /// <remarks> /// This is called automtically by the Autopilot, but it has been /// made public to allow the user to analyze created objectives. /// </remarks> public void Contribute(Apparatus.Output aApparatusOutput, ref Apparatus.Input aApparatusInput) { bool canBeObtained = false; bool obtained = true; foreach (IntentObtainer item in List) { item.Contribute(aApparatusOutput, ref aApparatusInput); if (CanBeObtained && item.CanBeObtained) { canBeObtained = true; obtained &= item.Obtained; } } if (canBeObtained) Obtained = obtained; }
public static Ingredient Ceration(Apparatus apparatus, Liquid imbibitor, Solid substance) { // https://en.wikipedia.org/wiki/Ceration return(null); }
/// <summary> /// Deletes the selected Apparatus from the <see cref="ApparatusListBox"/>. /// </summary> /// <param name="sender"><see cref="AllToolsDelete"/></param> /// <param name="e">event arguments</param> private void AllToolsDelete_Click(object sender, RoutedEventArgs e) { Apparatus apparatus = this.ApparatusListBox.SelectedItem as Apparatus; this.viewModel.AllTools.Remove(apparatus); }
public static Ingredient Filtration(Apparatus apparatus, Liquid substance) { // https://en.wikipedia.org/wiki/Filtration return(null); }
public static Ingredient Crystallization(Apparatus apparatus, Vapor substance) { return(null); }
public static void Clear() { NewApparatusStatus = new ApparatusStatus(); Apparatus = default(Apparatus); NeedsCommit = false; }
public void SetVehicle(VehiclesListTableSource d, Apparatus vehicle) { Delegate = d; currentVehicle = vehicle; }
public static Ingredient Filtration(Apparatus apparatus, Vapor substance) { return(null); }
/// <summary> /// Enqueue drone's output data for autopilot handling based on current objective. /// </summary> /// <param name="aData">Output data to be enqueued</param> public void EnqueueOutput(Apparatus.Output aData) { ApparatusOutputQueue.Enqueue(aData); }
public static Ingredient Amalgamation(Apparatus apparatus, Solid mercury, Solid substance) { // https://en.wikipedia.org/wiki/Amalgam_(chemistry) return(null); }
public static Ingredient Sublimation(Apparatus apparatus, Solid substance) { // https://en.wikipedia.org/wiki/Sublimation_(phase_transition) return(null); }
public static Ingredient Solution(Apparatus apparatus, Solid substance, Liquid solvent) { // https://en.wikipedia.org/wiki/Solution return(null); }