예제 #1
0
 public static void Remove(ProjectItemWindow window)
 {
     if (instance.ContainsKey(window.Key))
     {
         instance.Remove(window.Key);
     }
 }
예제 #2
0
        public static ProjectItemWindow GetInstance(string title, string objectKey, object configObject, object Tag)
        {
            ProjectItemWindow retVal = null;

            if (instance.ContainsKey(objectKey))
            {
                retVal = instance[objectKey];
            }
            else
            {
                RadPropertyGrid propertyGrid = new RadPropertyGrid();
                propertyGrid                = new RadPropertyGrid();
                propertyGrid.Dock           = DockStyle.Fill;
                propertyGrid.SelectedObject = configObject;
                propertyGrid.ToolbarVisible = true;
                propertyGrid.PropertySort   = PropertySort.CategorizedAlphabetical;


                ProjectItemWindow window = new ProjectItemWindow(propertyGrid);
                window.Key     = objectKey;
                window.Tag     = Tag;
                window.Text    = title;
                window.editors = GetCustomEditors(configObject);
                window.onValueChangedCommands = GetValueChangedCommands(configObject);


                window.Controls.Add(window.PropertyGrid);



                instance.Add(objectKey, window);

                retVal = window;
            }
            return(retVal);
        }