/// <summary> /// Handles the Click event of the showInBrowserMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void showInBrowserMenuItem_Click(object sender, EventArgs e) { ToolStripItem menuItem = sender as ToolStripItem; if (menuItem == null) { return; } PlanetaryPin pin = lvPlanetary.SelectedItems[0]?.Tag as PlanetaryPin; // showInstallationInBrowserMenuItem if (menuItem == showInstallationInBrowserMenuItem) { if (pin?.TypeID == null) { return; } Item installation = StaticItems.GetItemByID(pin.TypeID); if (installation != null) { PlanWindow.ShowPlanWindow(Character).ShowItemInBrowser(installation); } return; } // showCommodityInBrowserMenuItem if (menuItem == showCommodityInBrowserMenuItem) { if (pin?.ContentTypeID == null) { return; } Item commmodity = StaticItems.GetItemByID(pin.ContentTypeID); if (commmodity != null) { PlanWindow.ShowPlanWindow(Character).ShowItemInBrowser(commmodity); } return; } if (pin?.Colony?.PlanetTypeID == null) { return; } Item planet = StaticItems.GetItemByID(pin.Colony.PlanetTypeID); if (planet != null) { PlanWindow.ShowPlanWindow(Character).ShowItemInBrowser(planet); } }
public void Exitmethod(object obj) { pm.Dispose(); PlanWindow pw = (PlanWindow)obj; pw.Close(); }
/// <summary> /// Handles the Click event of the showInBrowserMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void showInBrowserMenuItem_Click(object sender, EventArgs e) { if (m_selectedItem == null) { return; } Ship ship = m_selectedItem as Ship; Blueprint blueprint = StaticBlueprints.GetBlueprintByID(m_selectedItem.ID); Skill skill = m_killLog.Character.Skills[m_selectedItem.ID]; if (skill == Skill.UnknownSkill) { skill = null; } PlanWindow planWindow = PlanWindow.ShowPlanWindow(m_killLog.Character); if (ship != null) { planWindow.ShowShipInBrowser(ship); } else if (blueprint != null) { planWindow.ShowBlueprintInBrowser(blueprint); } else if (skill != null) { planWindow.ShowSkillInBrowser(skill); } else { planWindow.ShowItemInBrowser(m_selectedItem); } }
/// <summary> /// Handles the Click event of the showInShipBrowserMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void showInShipBrowserMenuItem_Click(object sender, EventArgs e) { Item item = StaticItems.GetItemByID(m_killLog.Victim.ShipTypeID); if (item != null) { PlanWindow.ShowPlanWindow(m_killLog.Character).ShowShipInBrowser(item); } }
/// <summary> /// Handles the Click event of the showInShipBrowserMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void showInShipBrowserMenuItem_Click(object sender, EventArgs e) { if (m_selectedKillLog == null) { return; } Ship ship = StaticItems.GetItemByID(m_selectedKillLog.Victim.ShipTypeID) as Ship; if (ship == null) { return; } PlanWindow.ShowPlanWindow(Character).ShowShipInBrowser(ship); }
public void OKmethod(object obj) { if (SJList == null) { MessageBox.Show("请选择计划后确定"); } else { PlanWindow pw = (PlanWindow)obj; //先隐藏完事再退出防止卡 pw.Visibility = Visibility.Hidden; UpdateRunChartAction(SJList); pm.SaveChanges(); pm.Dispose(); pw.Close(); } }
/// <summary> /// Handles the Click event of the showInBrowserMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void showInBrowserMenuItem_Click(object sender, EventArgs e) { if (m_selectedItem == null) { return; } PlanWindow planWindow = PlanWindow.ShowPlanWindow(KillLog.Character); if (m_selectedItem is Ship) { planWindow.ShowShipInBrowser(m_selectedItem); } else { planWindow.ShowItemInBrowser(m_selectedItem); } }
/// <summary> /// Handler for a plan item click on the plan's context menu. /// Add a skill to the plan. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void menuPlanItem_Click(object sender, EventArgs e) { ToolStripMenuItem planItem = (ToolStripMenuItem)sender; KeyValuePair <Plan, SkillLevel> tag = (KeyValuePair <Plan, SkillLevel>)planItem.Tag; IPlanOperation operation = tag.Key.TryPlanTo(tag.Value.Skill, tag.Value.Level); if (operation == null) { return; } PlanWindow planWindow = PlanWindow.ShowPlanWindow(plan: operation.Plan); if (planWindow == null) { return; } PlanHelper.SelectPerform(new PlanToOperationWindow(operation), planWindow, operation); }
/// <summary> /// Handler for a context menu item click on a skill. /// Add the entire skill queue to a plan. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void tsmiCreatePlanFromSkillQueue_Click(object sender, EventArgs e) { if (Character == null) { return; } // Create new plan Plan newPlan = PlanWindow.CreateNewPlan(Character, EveMonConstants.CurrentSkillQueueText); if (newPlan == null) { return; } // Add skill queue to new plan and insert it on top of the plans bool planCreated = PlanIOHelper.CreatePlanFromCharacterSkillQueue(newPlan, Character); // Show the editor for this plan if (planCreated) { PlanWindow.ShowPlanWindow(plan: newPlan); } }
/// <summary> /// Shows the selected skill in Skill Browser. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void showInSkillBrowserMenuItem_Click(object sender, EventArgs e) { // Open the skill browser PlanWindow.ShowPlanWindow(Character).ShowSkillInBrowser(m_selectedSkill); }