예제 #1
0
 /// <summary>
 /// Causes the list of property descriptors to be recreated.
 /// </summary>
 protected void ReFilterProperties()
 {
     globalizedProps = null;
     if (WorkbenchSingleton.Workbench != null)
     {
         WorkbenchSingleton.SafeThreadAsyncCall(delegate { PropertyPad.RefreshItem(this); });
     }
 }
예제 #2
0
 /// <summary>
 /// Causes the list of property descriptors to be recreated.
 /// </summary>
 protected void ReFilterProperties()
 {
     globalizedProps = null;
     if (SD.Workbench != null)
     {
         SD.MainThread.InvokeAsyncAndForget(delegate {
             PropertyPad.RefreshItem(this);
         });
     }
 }
예제 #3
0
		internal PropertyContainer(bool createPadOnConstruction)
		{
			//roman//
			/*if (createPadOnConstruction && WorkbenchSingleton.Workbench != null) {
				PadDescriptor desc = WorkbenchSingleton.Workbench.GetPad(typeof(PropertyPad));
				if (desc != null) desc.CreatePad();*/
			if (createPadOnConstruction && propertyPad == null)
			{
				propertyPad = new PropertyPad();
			}
		}
예제 #4
0
        internal PropertyContainer(bool createPadOnConstruction)
        {
            //roman//

            /*if (createPadOnConstruction && WorkbenchSingleton.Workbench != null) {
             *      PadDescriptor desc = WorkbenchSingleton.Workbench.GetPad(typeof(PropertyPad));
             *      if (desc != null) desc.CreatePad();*/
            if (createPadOnConstruction && propertyPad == null)
            {
                propertyPad = new PropertyPad();
            }
        }
예제 #5
0
        public PropertyPad()
        {
            instance = this;
            //contentControl = new System.Windows.Controls.ContentPresenter();  //roman//
            panel = new Panel();

            grid = new PropertyGrid();
            //roman//
            grid.PropertySort = PropertySort.Alphabetical;

            grid.Dock = DockStyle.Fill;

            grid.SelectedObjectsChanged += delegate(object sender, EventArgs e) {
                if (SelectedObjectChanged != null)
                {
                    SelectedObjectChanged(sender, e);
                }
            };
            grid.SelectedGridItemChanged += delegate(object sender, SelectedGridItemChangedEventArgs e) {
                if (SelectedGridItemChanged != null)
                {
                    SelectedGridItemChanged(sender, e);
                }
            };

            comboBox               = new ComboBox();
            comboBox.Dock          = DockStyle.Top;
            comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox.DrawMode      = DrawMode.OwnerDrawFixed;
            comboBox.Sorted        = false;

            comboBox.DrawItem             += new DrawItemEventHandler(ComboBoxDrawItem);
            comboBox.MeasureItem          += new MeasureItemEventHandler(ComboBoxMeasureItem);
            comboBox.SelectedIndexChanged += new EventHandler(ComboBoxSelectedIndexChanged);

            panel.Controls.Add(grid);
            panel.Controls.Add(comboBox);
            //contentControl.SetContent(panel); //roman//

            ProjectService.SolutionClosed += SolutionClosedEvent;

            grid.PropertyValueChanged += new PropertyValueChangedEventHandler(PropertyChanged);
            grid.ContextMenuStrip      = MenuService.CreateContextMenu(this, "/SharpDevelop/Views/PropertyPad/ContextMenu");

            LoggingService.Debug("PropertyPad created");
            //roman// WorkbenchSingleton.Workbench.ActiveContentChanged += WorkbenchActiveContentChanged;
            // it is possible that ActiveContent changes fires before ActiveViewContent.
            // if the new content is not a IHasPropertyContainer and we listen only to ActiveContentChanged,
            // we might display the PropertyPad of a no longer active view content
            //roman// WorkbenchSingleton.Workbench.ActiveViewContentChanged += WorkbenchActiveContentChanged;
            //roman// WorkbenchActiveContentChanged(null, null);
        }
예제 #6
0
 public override void Dispose()
 {
     base.Dispose();
     if (grid != null)
     {
         ProjectService.SolutionClosed -= CombineClosedEvent;
         try {
             grid.SelectedObjects = null;
         } catch {}
         grid.Dispose();
         grid     = null;
         instance = null;
     }
 }
예제 #7
0
 public override void Dispose()
 {
     base.Dispose();
     if (grid != null)
     {
         this.ideContainer.Disconnect();
         SD.ProjectService.SolutionClosed -= SolutionClosedEvent;
         try {
             grid.SelectedObjects = null;
         } catch {}
         grid.Dispose();
         grid     = null;
         instance = null;
     }
 }
예제 #8
0
        public PropertyPad()
        {
            instance = this;
            contentControl = new System.Windows.Controls.ContentPresenter();
            panel = new Panel();

            grid = new PropertyGrid();
            grid.PropertySort = PropertyService.Get("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", false) ? PropertySort.Alphabetical : PropertySort.CategorizedAlphabetical;
            grid.Dock = DockStyle.Fill;

            grid.SelectedObjectsChanged += delegate(object sender, EventArgs e) {
                if (SelectedObjectChanged != null)
                    SelectedObjectChanged(sender, e);
            };
            grid.SelectedGridItemChanged += delegate(object sender, SelectedGridItemChangedEventArgs e) {
                if (SelectedGridItemChanged != null)
                    SelectedGridItemChanged(sender, e);
            };

            comboBox = new ComboBox();
            comboBox.Dock = DockStyle.Top;
            comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox.DrawMode = DrawMode.OwnerDrawFixed;
            comboBox.Sorted = false;

            comboBox.DrawItem += new DrawItemEventHandler(ComboBoxDrawItem);
            comboBox.MeasureItem += new MeasureItemEventHandler(ComboBoxMeasureItem);
            comboBox.SelectedIndexChanged += new EventHandler(ComboBoxSelectedIndexChanged);

            panel.Controls.Add(grid);
            panel.Controls.Add(comboBox);
            SD.WinForms.SetContent(contentControl, panel);

            SD.ProjectService.SolutionClosed += SolutionClosedEvent;

            grid.PropertyValueChanged += new PropertyValueChangedEventHandler(PropertyChanged);
            grid.ContextMenuStrip = SD.WinForms.MenuService.CreateContextMenu(this, "/SharpDevelop/Views/PropertyPad/ContextMenu");

            LoggingService.Debug("PropertyPad created");
            SD.Workbench.ActiveContentChanged += WorkbenchActiveContentChanged;
            // it is possible that ActiveContent changes fires before ActiveViewContent.
            // if the new content is not a IHasPropertyContainer and we listen only to ActiveContentChanged,
            // we might display the PropertyPad of a no longer active view content
            SD.Workbench.ActiveViewContentChanged += WorkbenchActiveContentChanged;
            WorkbenchActiveContentChanged(null, null);
        }
예제 #9
0
        public PropertyPad()
        {
            instance = this;
            panel    = new Panel();

            grid = new PropertyGrid();
            grid.PropertySort = PropertyService.Get("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", false) ? PropertySort.Alphabetical : PropertySort.CategorizedAlphabetical;
            grid.Dock         = DockStyle.Fill;

            grid.SelectedObjectsChanged += delegate(object sender, EventArgs e) {
                if (SelectedObjectChanged != null)
                {
                    SelectedObjectChanged(sender, e);
                }
            };
            grid.SelectedGridItemChanged += delegate(object sender, SelectedGridItemChangedEventArgs e) {
                if (SelectedGridItemChanged != null)
                {
                    SelectedGridItemChanged(sender, e);
                }
            };

            comboBox               = new ComboBox();
            comboBox.Dock          = DockStyle.Top;
            comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox.DrawMode      = DrawMode.OwnerDrawFixed;
            comboBox.Sorted        = true;

            comboBox.DrawItem             += new DrawItemEventHandler(ComboBoxDrawItem);
            comboBox.MeasureItem          += new MeasureItemEventHandler(ComboBoxMeasureItem);
            comboBox.SelectedIndexChanged += new EventHandler(ComboBoxSelectedIndexChanged);

            panel.Controls.Add(grid);
            panel.Controls.Add(comboBox);

            ProjectService.SolutionClosed += CombineClosedEvent;

            grid.PropertyValueChanged += new PropertyValueChangedEventHandler(PropertyChanged);
            grid.ContextMenuStrip      = MenuService.CreateContextMenu(this, "/SharpDevelop/Views/PropertyPad/ContextMenu");

            LoggingService.Debug("PropertyPad created");
            WorkbenchSingleton.Workbench.ActiveWorkbenchWindowChanged += WorkbenchWindowChanged;
            WorkbenchWindowChanged(null, null);
        }
예제 #10
0
		public override void Dispose()
		{
			base.Dispose();
			if (grid != null) {
				ProjectService.SolutionClosed -= CombineClosedEvent;
				try {
					grid.SelectedObjects = null;
				} catch {}
				grid.Dispose();
				grid = null;
				instance = null;
			}
		}
예제 #11
0
		public PropertyPad()
		{
			instance = this;
			panel = new Panel();
			
			grid = new PropertyGrid();
			grid.PropertySort = PropertyService.Get("FormsDesigner.DesignerOptions.PropertyGridSortAlphabetical", false) ? PropertySort.Alphabetical : PropertySort.CategorizedAlphabetical;
			grid.Dock = DockStyle.Fill;
			
			grid.SelectedObjectsChanged += delegate(object sender, EventArgs e) {
				if (SelectedObjectChanged != null)
					SelectedObjectChanged(sender, e);
			};
			grid.SelectedGridItemChanged += delegate(object sender, SelectedGridItemChangedEventArgs e) {
				if (SelectedGridItemChanged != null)
					SelectedGridItemChanged(sender, e);
			};
			
			comboBox = new ComboBox();
			comboBox.Dock = DockStyle.Top;
			comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
			comboBox.DrawMode = DrawMode.OwnerDrawFixed;
			comboBox.Sorted = true;
			
			comboBox.DrawItem += new DrawItemEventHandler(ComboBoxDrawItem);
			comboBox.MeasureItem += new MeasureItemEventHandler(ComboBoxMeasureItem);
			comboBox.SelectedIndexChanged += new EventHandler(ComboBoxSelectedIndexChanged);
			
			panel.Controls.Add(grid);
			panel.Controls.Add(comboBox);
			
			ProjectService.SolutionClosed += CombineClosedEvent;
			
			grid.PropertyValueChanged += new PropertyValueChangedEventHandler(PropertyChanged);
			grid.ContextMenuStrip = MenuService.CreateContextMenu(this, "/SharpDevelop/Views/PropertyPad/ContextMenu");
			
			LoggingService.Debug("PropertyPad created");
			WorkbenchSingleton.Workbench.ActiveWorkbenchWindowChanged += WorkbenchWindowChanged;
			WorkbenchWindowChanged(null, null);
		}
예제 #12
0
		public override void Dispose()
		{
			base.Dispose();
			if (grid != null) {
				this.ideContainer.Disconnect();
				ProjectService.SolutionClosed -= SolutionClosedEvent;
				try {
					grid.SelectedObjects = null;
				} catch {}
				grid.Dispose();
				grid = null;
				instance = null;
			}
		}