示例#1
0
        /// <summary>
        /// Identifies if there are invalid entries in the skill plan,
        /// displays message if required.
        /// </summary>
        private void CheckInvalidEntries()
        {
            if (m_plan.ContainsInvalidEntries)
            {
                StringBuilder message = new StringBuilder();

                message.AppendLine("When loading the plan one or more skills were not found. This can be caused by loading a plan from a previous version of EVEMon or CCP have renamed a skill.");
                message.AppendLine();

                foreach (var entry in m_plan.InvalidEntries)
                {
                    message.AppendFormat(CultureConstants.DefaultCulture, " - {0} planned to {1}{2}", entry.SkillName, entry.PlannedLevel, Environment.NewLine);
                }

                message.AppendLine();
                message.AppendLine("Do you wish to keep these entries?\r\n- If you select \"Yes\" the entries will be removed from the plan\r  and will be stored in settings.\r\n- If you select \"No\" the entries will be discarded.");

                var result = MessageBox.Show(message.ToString(), "Invalid Entries Detected", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);

                if (result == DialogResult.No)
                {
                    m_plan.ClearInvalidEntries();
                }
                else if (result == DialogResult.Yes)
                {
                    m_plan.AcknoledgeInvalidEntries();
                }
            }
        }