Example #1
0
        private void buttonClone_Click(object sender, EventArgs e)
        {
            ObjectInspector objView = EditorBasePlugin.Instance.RequestObjView(true);

            this.CopyTo(objView);
            objView.buttonLock.Checked = true;

            DockPanel mainDoc = DualityEditorApp.MainForm.MainDockPanel;

            if (this.DockHandler.DockState.IsAutoHide())
            {
                objView.Show(this.DockPanel, this.DockHandler.DockState);
            }
            else
            {
                objView.Show(this.DockHandler.Pane, DockAlignment.Bottom, 0.5d);
            }

            // Need it before showing because of instant-selection
            objView.propertyGrid.RegisterEditorProvider(CorePluginRegistry.GetPropertyEditorProviders());
            objView.propertyGrid.SelectObjects(this.propertyGrid.Selection);
            objView.gridExpandState.ApplyTo(objView.propertyGrid.MainEditor);
        }
Example #2
0
        public ObjectInspector RequestObjView(bool dontShow = false)
        {
            ObjectInspector objView = new ObjectInspector(this.objViews.Count);

            this.objViews.Add(objView);
            objView.FormClosed += delegate(object sender, FormClosedEventArgs e) { this.objViews.Remove(sender as ObjectInspector); };

            if (!this.isLoading && !dontShow)
            {
                objView.Show(DualityEditorApp.MainForm.MainDockPanel);
                if (objView.Pane != null)
                {
                    objView.Pane.Activate();
                    objView.Focus();
                }
            }
            return(objView);
        }
		public ObjectInspector RequestObjView(bool dontShow = false)
		{
			ObjectInspector objView = new ObjectInspector(this.objViews.Count);
			this.objViews.Add(objView);
			objView.FormClosed += delegate(object sender, FormClosedEventArgs e) { this.objViews.Remove(sender as ObjectInspector); };

			if (!this.isLoading && !dontShow)
			{
				objView.Show(DualityEditorApp.MainForm.MainDockPanel);
				if (objView.Pane != null)
				{
					objView.Pane.Activate();
					objView.Focus();
				}
			}
			return objView;
		}