/// <summary> /// Shows the selected skill in Skill Explorer /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tmSkillExplorer_Click(object sender, EventArgs e) { var item = (ToolStripMenuItem)sender; var skill = (Skill)item.Tag; var window = WindowsFactory <SkillExplorerWindow> .ShowUnique(); window.Skill = skill; }
/// <summary> /// Occurs when the user click the "add to calendar" button. /// We open the unique external calendar window. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddToCalendar_Click(object sender, EventArgs e) { // Ensure that we are trying to use the external calendar. if (!Settings.Calendar.Enabled) { btnAddToCalendar.Visible = false; return; } WindowsFactory <ExternalCalendarWindow> .ShowByTag(m_character); }
/// <summary> /// Show the details for the given notification. /// </summary> /// <param name="notification"></param> private static void ShowDetails(Notification notification) { // API error ? if (notification is APIErrorNotification) { var window = WindowsFactory <APIErrorWindow> .ShowUnique(); window.Notification = (APIErrorNotification)notification; return; } // Skills Completion ? if (notification is SkillCompletionNotification) { var window = WindowsFactory <SkillCompletionWindow> .ShowUnique(); window.Notification = (SkillCompletionNotification)notification; return; } // Market orders ? if (notification is MarketOrdersNotification) { var ordersNotification = (MarketOrdersNotification)notification; var window = WindowsFactory <MarketOrdersWindow> .ShowUnique(); window.Orders = ordersNotification.Orders; window.Columns = Settings.UI.MainWindow.MarketOrders.Columns; window.Grouping = MarketOrderGrouping.State; window.ShowIssuedFor = IssuedFor.All; return; } // Industry jobs ? if (notification is IndustryJobsNotification) { var jobsNotification = (IndustryJobsNotification)notification; var window = WindowsFactory <IndustryJobsWindow> .ShowUnique(); window.Jobs = jobsNotification.Jobs; window.Columns = Settings.UI.MainWindow.IndustryJobs.Columns; window.Grouping = IndustryJobGrouping.State; window.ShowIssuedFor = IssuedFor.All; return; } }
/// <summary> /// Show the details for the given notification. /// </summary> /// <param name="notification"></param> private void ShowDetails(Notification notification) { // API error ? if (notification is APIErrorNotification) { var window = WindowsFactory <APIErrorWindow> .ShowUnique(); window.Notification = (APIErrorNotification)notification; return; } // Market orders ? if (notification is MarketOrdersNotification) { var ordersNotification = (MarketOrdersNotification)notification; var window = WindowsFactory <MarketOrdersWindow> .ShowUnique(); window.Orders = ordersNotification.Orders; window.Columns = Settings.UI.MainWindow.MarketOrders.Columns; window.Grouping = MarketOrderGrouping.State; return; } }