Beispiel #1
0
        private Color getStateColor(AddonState state)
        {
            switch (state)
            {
            case AddonState.Installed: return(Color.Black);

            case AddonState.NotInstalled: return(Color.Gray);

            case AddonState.NeedsRepair: return(Color.Red);

            case AddonState.UpdateAvailable: return(Color.Blue);

            default: return(Color.Empty);
            }
        }
Beispiel #2
0
        public void SetState(AddonState state, bool refreshDisplay = true)
        {
            if (!IsAvailable)
            {
                state = AddonState.BuddyOnly;
            }

            if (State != state)
            {
                State = state;

                if (refreshDisplay)
                {
                    RefreshDisplay();
                }
            }
        }