public PanelsAkrView(List<PanelAKR> panels, LibraryEditor libEditor) { this.libEditor = libEditor; panelsAkr = panels; var alphaComparer = AcadLib.Comparers.AlphanumComparator.New; panelsAkr.Sort((p1, p2) => alphaComparer.Compare(p1.MarkAkr,p2.MarkAkr)); FillPanels(panels); Insert = new RelayCommand(OnInsertExecute, OnInsertCanExecute); Delete = new RelayCommand<PanelAkrView>(OnDeleteExecute); UndoDelete = new RelayCommand(OnUndoDeleteExecute, OnUndoDeleteCanExecute); }
//public PaletteCommand() { } public PaletteCommand(string name, Bitmap image, string command, string description, string group = "") { this.Image = GetSource(image); this.Name = name; this.CommandName = command; Command = new RelayCommand(Execute); this.Description = description; this.Group = group; // HelpMedia HelpMedia = Path.Combine(AutoCAD_PIK_Manager.Settings.PikSettings.ServerShareSettingsFolder, AutoCAD_PIK_Manager.Settings.PikSettings.UserGroup, "Help", command, command + ".mp4"); if (!File.Exists(HelpMedia)) { HelpMedia = null; } }
public VisualBlock(BlockTableRecord btr) { Name = btr.Name; Image = BlockPreviewHelper.GetPreview(btr); Redefine = new RelayCommand(OnRedefineBlockExecute, CanRedefineBlockExecute); }
public VisualBlocksViewModel(List<IVisualBlock> visuals) { Visuals = new ObservableCollection<IVisualBlock>(visuals); Insert = new RelayCommand<IVisualBlock>(OnInsertExecute); }