Пример #1
0
        /// <summary>
        /// Updates the loadout information.
        /// </summary>
        /// <param name="e">The <see cref="LoadoutEventArgs"/> instance containing the event data.</param>
        private void UpdateLoadoutInfo(LoadoutEventArgs e)
        {
            if (IsDisposed)
            {
                return;
            }

            // Reset the controls
            m_prerequisites.Clear();
            tvLoadout.Nodes.Clear();
            Cursor = Cursors.Default;

            if (Settings.LoadoutsProvider.Provider == null)
            {
                return;
            }

            // Was there an error ?
            if (e.HasError)
            {
                throbberFitting.State = ThrobberState.Strobing;
                lblTrainTime.Text     = $"Couldn't download that loadout.{Environment.NewLine}{e.Error.Message}";
                lblTrainTime.Visible  = true;
                return;
            }

            Settings.LoadoutsProvider.Provider.DeserializeLoadout(m_selectedLoadout, e.Loadout);

            // Fill the items tree
            BuildTreeNodes(m_selectedLoadout.Items);

            throbberFitting.State = ThrobberState.Stopped;
            throbberFitting.SendToBack();

            // Compute the training time
            UpdatePlanningControls();
        }
Пример #2
0
 /// <summary>
 /// Occurs when the loadout from the provider updated.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="LoadoutEventArgs"/> instance containing the event data.</param>
 private void EveMonClient_LoadoutUpdated(object sender, LoadoutEventArgs e)
 {
     UpdateLoadoutInfo(e);
 }