public void updateToolboxItems() { Type[] crowItems = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(t => t.GetTypes()) .Where(t => t.IsClass && !t.IsAbstract && t.IsPublic && t.Namespace == "Crow" && t.IsSubclassOf(typeof(GraphicObject)) && t.GetCustomAttribute <DesignIgnore>(false) == null).ToArray(); ToolboxItems = new ObservableList <GraphicObjectDesignContainer> (); foreach (Type ci in crowItems) { toolboxItems.AddElement(new GraphicObjectDesignContainer(ci)); } }
void onSelectedItemChanged(object sender, SelectionChangeEventArgs e) { ProjectItem pi = e.NewValue as ProjectItem; if (pi != null) { if (!openedItems.Contains(pi)) { openedItems.AddElement(pi); saveOpenedItemsInUserConfig(); } } this.SelectedItem = pi; UserConfig.Set("SelectedProjItems", SelectedItem?.AbsolutePath); }