コード例 #1
0
        public override void HandleState(EuiStateBase state)
        {
            base.HandleState(state);

            if (state is not GhostRolesEuiState ghostState)
            {
                return;
            }
            _window.ClearEntries();

            var groupedRoles = ghostState.GhostRoles.GroupBy(
                role => (role.Name, role.Description));

            foreach (var group in groupedRoles)
            {
                var name        = group.Key.Name;
                var description = group.Key.Description;

                _window.AddEntry(name, description, group);
            }

            var closeRulesWindow = ghostState.GhostRoles.All(role => role.Identifier != _windowRulesId);

            if (closeRulesWindow)
            {
                _windowRules?.Close();
            }
        }
コード例 #2
0
        public override void HandleState(EuiStateBase state)
        {
            base.HandleState(state);

            if (state is not GhostRolesEuiState ghostState)
            {
                return;
            }

            var closeRulesWindow = true;

            _window.ClearEntries();

            foreach (var info in ghostState.GhostRoles)
            {
                _window.AddEntry(info);
                if (info.Identifier == _windowRulesId)
                {
                    closeRulesWindow = false;
                }
            }

            if (closeRulesWindow)
            {
                _windowRules?.Close();
            }
        }
コード例 #3
0
        public override void HandleState(EuiStateBase state)
        {
            base.HandleState(state);

            if (state is not GhostRolesEuiState ghostState)
            {
                return;
            }

            _window.ClearEntries();

            foreach (var info in ghostState.GhostRoles)
            {
                _window.AddEntry(info);
            }
        }