예제 #1
0
파일: Solution.cs 프로젝트: masums/Crow
 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));
     }
 }
예제 #2
0
파일: Solution.cs 프로젝트: masums/Crow
        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);
        }