/// <summary> /// Handles the Tick event of the m_timer control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void m_timer_Tick(object sender, EventArgs e) { m_timer.Stop(); if (!Enabled) { return; } // Actions according to mouse clicks switch (m_mouseEvent.Clicks) { case 1: { base.OnMouseClick(m_mouseEvent); } break; case 2: { base.OnMouseDoubleClick(m_mouseEvent); WindowsFactory.ShowByTag <EveImagePopUp, Item>(m_item); } break; } }
/// <summary> /// Occurs when clicking the button. /// </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 splitButtonLoadouts_Click(object sender, EventArgs e) { if (Character == null) { return; } if (Settings.LoadoutsProvider.Provider == null) { return; } ShipLoadoutSelectWindow loadoutWindow; if (Plan != null) { loadoutWindow = WindowsFactory.GetByTag <ShipLoadoutSelectWindow, Character>(Character); if (loadoutWindow == null) { loadoutWindow = WindowsFactory.ShowByTag <ShipLoadoutSelectWindow, Plan>(Plan); WindowsFactory.ChangeTag <ShipLoadoutSelectWindow, Plan, Character>(Plan, Character); } else { loadoutWindow = WindowsFactory.ShowByTag <ShipLoadoutSelectWindow, Character>(Character); } } else { loadoutWindow = WindowsFactory.ShowByTag <ShipLoadoutSelectWindow, Character>(Character); } loadoutWindow.Ship = SelectedObject; }
/// <summary> /// Handles the Click event of the buttonCharacter control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void buttonCharacter_Click(object sender, EventArgs e) { WindowsFactory.ShowByTag <AttributesOptimizerWindow, PlanEditorControl>(m_planEditorControl.ParentForm, m_planEditorControl, AttributeOptimizationStrategy.Character); Close(); }
/// <summary> /// Show the given skill in the skill explorer. /// </summary> /// <param name="skill"></param> public void ShowSkillInExplorer(Skill skill) { var planWindow = WindowsFactory <PlanWindow> .GetByTag(m_plan); var skillExplorer = WindowsFactory <SkillExplorerWindow> .ShowByTag(planWindow, (window) => new SkillExplorerWindow(skill, window)); skillExplorer.Skill = skill; }
/// <summary> /// Shows the kill details. /// </summary> private void ShowKillDetails() { if (m_selectedKillLog == null) { return; } WindowsFactory.ShowByTag <KillReportWindow, KillLog>(m_selectedKillLog); }
/// <summary> /// The button "open" is the same than "merge". When the button is in "open" state, we close the window and returns OK as a result. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOpen_Click(object sender, EventArgs e) { // Are we performing a merge ? if (lbPlanList.SelectedItems.Count > 1) { MergePlans(); return; } // Or are we just opening a plan ? var plan = (Plan)lbPlanList.SelectedItems[0].Tag; WindowsFactory <PlanWindow> .ShowByTag(plan); this.Close(); }
/// <summary> /// When the user double-click an item or uses the "Show /// in item browser" context menu item, we open the items /// browser. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tvLoadout_DoubleClick(object sender, EventArgs e) { // user double clicked an area that isn't a node if (tvLoadout.SelectedNode == null) { return; } Item item = tvLoadout.SelectedNode.Tag as Item; // if the loadout node isn't tagged or we couldn't cast it // to an Item return if (item == null) { return; } PlanWindow window = WindowsFactory <PlanWindow> .ShowByTag(m_plan); window.ShowItemInBrowser(item); }
/// <summary> /// File > New plan. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void miNewPlan_Click(object sender, EventArgs e) { // Request a new name for this plan using (NewPlanWindow npw = new NewPlanWindow()) { DialogResult dr = npw.ShowDialog(); if (dr == DialogResult.Cancel) { return; } // Create the plan and add it var plan = new Plan(m_character); plan.Name = npw.Result; m_character.Plans.Add(plan); // Open a window for this plan WindowsFactory <PlanWindow> .ShowByTag(plan); } this.Close(); }
/// <summary> /// Handles the Click event of the ChangeAPIKeyInfoMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void ChangeAPIKeyInfoMenuItem_Click(object sender, EventArgs e) { // This menu should be enabled only for CCP characters WindowsFactory.ShowByTag <ApiKeyUpdateOrAdditionWindow, IEnumerable <APIKey> >(m_character.Identity.APIKeys); }
/// <summary> /// Show the details for the given notification. /// </summary> /// <param name="notification"></param> private static void ShowDetails(NotificationEventArgs notification) { // API error ? APIErrorNotificationEventArgs errorNotification = notification as APIErrorNotificationEventArgs; if (errorNotification != null) { ApiErrorWindow window = WindowsFactory.ShowByTag <ApiErrorWindow, APIErrorNotificationEventArgs>(errorNotification); window.Notification = errorNotification; return; } // Skills Completion ? SkillCompletionNotificationEventArgs skillNotifications = notification as SkillCompletionNotificationEventArgs; if (skillNotifications != null) { SkillCompletionWindow window = WindowsFactory.ShowByTag <SkillCompletionWindow, SkillCompletionNotificationEventArgs>(skillNotifications); window.Notification = skillNotifications; return; } // Market orders ? MarketOrdersNotificationEventArgs ordersNotification = notification as MarketOrdersNotificationEventArgs; if (ordersNotification != null) { MarketOrdersWindow window = WindowsFactory.ShowByTag <MarketOrdersWindow, MarketOrdersNotificationEventArgs>(ordersNotification); window.Orders = ordersNotification.Orders; window.Columns = Settings.UI.MainWindow.MarketOrders.Columns; window.Grouping = MarketOrderGrouping.State; window.ShowIssuedFor = IssuedFor.All; return; } // Contracts ? ContractsNotificationEventArgs contractsNotification = notification as ContractsNotificationEventArgs; if (contractsNotification != null) { ContractsWindow window = WindowsFactory.ShowByTag <ContractsWindow, ContractsNotificationEventArgs>(contractsNotification); window.Contracts = contractsNotification.Contracts; window.Columns = Settings.UI.MainWindow.Contracts.Columns; window.Grouping = ContractGrouping.State; window.ShowIssuedFor = IssuedFor.All; return; } // Industry jobs ? IndustryJobsNotificationEventArgs jobsNotification = notification as IndustryJobsNotificationEventArgs; if (jobsNotification != null) { IndustryJobsWindow window = WindowsFactory.ShowByTag <IndustryJobsWindow, IndustryJobsNotificationEventArgs>(jobsNotification); window.Jobs = jobsNotification.Jobs; window.Columns = Settings.UI.MainWindow.IndustryJobs.Columns; window.Grouping = IndustryJobGrouping.State; window.ShowIssuedFor = IssuedFor.All; return; } // Planetary pins ? PlanetaryPinsNotificationEventArgs pinsNotification = notification as PlanetaryPinsNotificationEventArgs; if (pinsNotification != null) { PlanetaryPinsWindow window = WindowsFactory.ShowByTag <PlanetaryPinsWindow, PlanetaryPinsNotificationEventArgs>(pinsNotification); window.PlanetaryPins = pinsNotification.PlanetaryPins; window.Columns = Settings.UI.MainWindow.Planetary.Columns; window.Grouping = PlanetaryGrouping.Colony; return; } }