예제 #1
0
        /// <summary>
        /// Updates the plan controls.
        /// </summary>
        private void UpdatePlanControls()
        {
            // Set the upper toolstrip visibility
            upperToolStrip.Visible = m_plan != null;

            // Update the status bar
            UpdateStatusBar();

            if (m_plan != null)
            {
                if (!tabControl.TabPages.Contains(tpPlanEditor))
                {
                    tabControl.TabPages.Insert(0, tpPlanEditor);
                }

                // Show the hint tip
                TipWindow.ShowTip(this, "planner",
                                  "Welcome to the Skill Planner",
                                  "Select skills to add to your plan using the list on the left." +
                                  " To view the list of skills you've added to your plan," +
                                  " choose \"Select Plan\" from the drop down in the upper left.");

                return;
            }

            // If we got this far we want to show the plan window as a Data Browser
            // Remove the Plan Editor if it exists
            if (tabControl.TabPages.Contains(tpPlanEditor))
            {
                tabControl.TabPages.Remove(tpPlanEditor);
            }

            Text = $"{(m_character == null ? string.Empty : $"{m_character.Name} - ")}EVEMon Data Browser";
예제 #2
0
파일: PlanWindow.cs 프로젝트: Almamu/evemon
        /// <summary>
        /// On load, we update the controls.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (this.DesignMode)
            {
                return;
            }

            // Force an update
            tsddbPlans.DropDownItems.Add("<New Plan>");

            // Compatibility mode : Mac OS
            if (Settings.Compatibility == CompatibilityMode.Wine)
            {
                // Under Wine, the upper toolbar is not displayed
                // We move it at the top of the first tab
                this.Controls.Remove(this.upperToolStrip);
                this.tabControl.TabPages[0].Controls.Add(this.upperToolStrip);
                this.tabControl.TabPages[0].Controls.SetChildIndex(this.upperToolStrip, 0);
            }

            // Show the hint tip
            TipWindow.ShowTip(this, "planner",
                              "Welcome to the Skill Planner",
                              "Select skills to add to your plan using the list on the left. To " +
                              "view the list of skills you've added to your plan, choose " +
                              "\"View Plan\" from the dropdown in the upper left.");

            UpdateStatusBar();
        }
예제 #3
0
파일: PlanWindow.cs 프로젝트: Almamu/evemon
        /// <summary>
        /// Autonomously updates the status bar with the plan's training time.
        /// </summary>
        public void UpdateStatusBar()
        {
            // Training time
            TimeSpan totalTime = planEditor.DisplayPlan.GetTotalTime(null, true);

            slblStatusText.Text = String.Format("{0} Skill{1} Planned ({2} Unique Skill{3}). Total training time: {4}. ",
                                                m_plan.Count,
                                                m_plan.Count == 1 ? "" : "s",
                                                m_plan.UniqueSkillsCount,
                                                m_plan.UniqueSkillsCount == 1 ? "" : "s",
                                                Skill.TimeSpanToDescriptiveText(totalTime, DescriptiveTextOptions.IncludeCommas));

            // Books cost
            long totalcost = m_plan.TotalBooksCost;
            long cost      = m_plan.NotKnownSkillBooksCost;

            if (totalcost > 0)
            {
                slblStatusText.Text += String.Format("Total skill book{0} cost : {1:0,0,0} ISK. ",
                                                     m_plan.UniqueSkillsCount == 1 ? "" : "s", totalcost);
            }

            if (cost > 0)
            {
                slblStatusText.Text += String.Format("Not known skill book{0} cost : {1:0,0,0} ISK. ",
                                                     m_plan.NotKnownSkillsCount == 1 ? "" : "s", cost);
            }

            // Suggestions
            var suggestions = m_plan.GetSuggestions();

            if (suggestions.Count != 0)
            {
                if (this.Visible && !tslSuggestion.Visible)
                {
                    tslSuggestion.Visible = true;
                    TipWindow.ShowTip(this, "suggestion",
                                      "Plan Suggestion",
                                      "EVEMon found learning skills that would lower " +
                                      "the overall training time of the plan. To view those " +
                                      "suggestions and the resulting change in plan time, click the " +
                                      "\"Suggestion\" link in the planner status bar.");
                }
            }
            else
            {
                tslSuggestion.Visible = false;
            }
        }
예제 #4
0
        private void IdCardDetected(HardWare.CardReader.IDCard idCard)
        {
            Logger.Debug("开始读卡");
            if (idCard != null)
            {
                loginVM.Name    = idCard.Name;
                loginVM.Sex     = idCard.Sex;
                loginVM.Nation  = idCard.Nation;
                loginVM.Address = idCard.Address;
                loginVM.IDCode  = idCard.IDCode;

                Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
                {
                    imgPhoto.Source = GetMemoryBmp("{AppDomain.CurrentDomain.BaseDirectory}{zp.bmp}");
                }));

                Thread.Sleep(2000);

                string examineeId;

                //TODO  暂注释 (查询数据库判断是否有可以考试)
                //var canExam = CanExam(idCard.IDCode, out examineeId);

                var canExam = true;

                if (canExam)
                {
                    //loginVM.ExamineeID = examineeId;
                    loginVM.ExamineeID = String.Empty;//考生号

                    Dispatcher.Invoke(DispatcherPriority.Normal,
                                      new Action(() => this.ParentWindow().StepToExamIntroductionPage()));
                }
                else
                {
                    Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
                    {
                        TipWindow.ShowTip("未安排在此考试\n请联系考务人员解决", ClearPage);
                    }));

                    StartDetect();
                }
            }
        }
예제 #5
0
        /// <summary>
        /// On load, we update the controls.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (DesignMode)
            {
                return;
            }

            // Global events (unsubscribed on window closing)
            EveClient.PlanChanged     += EveClient_PlanChanged;
            EveClient.SettingsChanged += EveClient_SettingsChanged;
            ResizeEnd += PlanWindow_ResizeEnd;

            // Force an update
            tsddbPlans.DropDownItems.Add("<New Plan>");

            // Compatibility mode : Mac OS
            if (Settings.Compatibility == CompatibilityMode.Wine)
            {
                // Under Wine, the upper tool bar is not displayed
                // We move it at the top of the first tab
                Controls.Remove(upperToolStrip);
                tabControl.TabPages[0].Controls.Add(upperToolStrip);
                tabControl.TabPages[0].Controls.SetChildIndex(upperToolStrip, 0);
            }

            // Show the hint tip
            TipWindow.ShowTip(this, "planner",
                              "Welcome to the Skill Planner",
                              "Select skills to add to your plan using the list on the left. To " +
                              "view the list of skills you've added to your plan, choose " +
                              "\"View Plan\" from the drop down in the upper left.");

            //Update the controls
            EveClient_SettingsChanged(null, EventArgs.Empty);

            //Update the status bar
            UpdateStatusBar();
        }