Exemplo n.º 1
0
        /// <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;
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
        /// <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;
            }
        }
Exemplo n.º 4
0
        /// <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;
            }
        }