示例#1
0
        /// <summary>
        /// Performs the supplemental controls layout.
        /// </summary>
        private void PerformSupplementalControlsLayout()
        {
            // Skip if the user do not want to be warned about accounts not in training
            string warningMessage;

            if (Settings.UI.SystemTrayPopup.ShowWarning && APIKey.HasCharactersNotTraining(out warningMessage))
            {
                FlowLayoutPanel warningPanel = CreateAccountsNotTrainingPanel(warningMessage);
                if (!MainFlowLayoutPanel.IsDisposed)
                {
                    MainFlowLayoutPanel.Controls.Add(warningPanel);
                }
            }

            // Server Status
            if (Settings.UI.SystemTrayPopup.ShowServerStatus)
            {
                m_serverStatusLabel.AutoSize = true;
                if (!MainFlowLayoutPanel.IsDisposed)
                {
                    MainFlowLayoutPanel.Controls.Add(m_serverStatusLabel);
                    UpdateServerStatusLabel();
                }
            }

            // EVE Time
            if (Settings.UI.SystemTrayPopup.ShowEveTime)
            {
                m_eveTimeLabel.AutoSize = true;
                if (!MainFlowLayoutPanel.IsDisposed)
                {
                    MainFlowLayoutPanel.Controls.Add(m_eveTimeLabel);
                    UpdateEveTimeLabel();
                }
            }
        }