Пример #1
0
        public WindowVisualBlocks(VisualBlocksViewModel vm)
        {
            InitializeComponent();
            DataContext = vm;

            //lbVisuals.MouseLeftButtonUp += ListBoxVisuals_MouseLeftButtonUp;
            //lvwBlocks.MouseLeftButtonUp += ListBoxVisuals_MouseLeftButtonUp;
        }
Пример #2
0
        public static void InsertBlock(string fileBlocks, Predicate<string> filter, Layers.LayerInfo layer = null)
        {
            List<IVisualBlock> visuals;
            if (!dictFiles.TryGetValue(filter, out visuals))
            {
                visuals = LoadVisuals(fileBlocks, filter);
                dictFiles.Add(filter, visuals);
            }

            var vm = new VisualBlocksViewModel(visuals);
            var winVisual = new WindowVisualBlocks(vm);
            Application.ShowModalWindow(winVisual);
        }