Пример #1
0
        public PaletteModel([NotNull] IEnumerable <IPaletteCommand> commands, string version)
        {
            Version         = version;
            PaletteCommands = new ObservableCollection <IPaletteCommand>();
            foreach (var item in commands)
            {
                if (PaletteSetCommands.IsAccess(item.Access))
                {
                    PaletteCommands.Add(item);
                }
            }

            ChangeContent(Settings.Default.PaletteStyle);
        }
Пример #2
0
 private static PaletteSetCommands Create()
 {
     var palette = new PaletteSetCommands();
     return palette;
 }
Пример #3
0
 /// <summary>
 /// Создание палитры и показ
 /// </summary>
 public static void Start()
 {
     if (_paletteSet == null)
     {
         _paletteSet = Create();
     }
     _paletteSet.Visible = true;
 }