public static void LoadMonoreportsExtensions(this PropertyGrid.PropertyGrid pg)
 {
     pg.AddPropertyEditor(typeof(MonoReports.Model.Point), typeof(MonoReports.Extensions.PropertyGridEditors.PointEditorCell));
     pg.AddPropertyEditor(typeof(MonoReports.Model.Border), typeof(MonoReports.Extensions.PropertyGridEditors.BorderEditorCell));
     pg.AddPropertyEditor(typeof(MonoReports.Model.Thickness), typeof(MonoReports.Extensions.PropertyGridEditors.ThicknessEditorCell));
     pg.AddPropertyEditor(typeof(MonoReports.Model.Color), typeof(MonoReports.Extensions.PropertyGridEditors.MonoreportsColorEditorCell));
 }
 public WorkspaceService(Gtk.Bin mainWindow, DrawingArea designArea, DrawingArea previewArea, PropertyGrid.PropertyGrid propertyGrid, Gtk.Label statusLabel)
 {
     this.designArea   = designArea;
     this.previewArea  = previewArea;
     this.propertyGrid = propertyGrid;
     this.mainControl  = mainWindow;
     this.StatusLabel  = statusLabel;
 }
Exemplo n.º 3
0
 public WorkspaceService(Gtk.Bin mainWindow, DrawingArea designArea,DrawingArea previewArea, PropertyGrid.PropertyGrid propertyGrid,Gtk.Label statusLabel)
 {
     this.designArea = designArea;
     this.previewArea = previewArea;
     this.propertyGrid = propertyGrid;
     this.mainControl = mainWindow;
     this.StatusLabel = statusLabel;
 }
Exemplo n.º 4
0
        public PropertyGridTree(EditorManager editorManager, PropertyGrid parentGrid)
        {
            this.editorManager = editorManager;
            this.parentGrid = parentGrid;

            propertyRows = new Hashtable ();

            store = new TreeStore (typeof (string), typeof(object), typeof(bool), typeof(object));

            tree = new InternalTree (this, store);

            CellRendererText crt;

            TreeViewColumn col;

            col = new TreeViewColumn ();
            col.Title = Catalog.GetString("Property");
            crt = new CellRendererPropertyGroup (tree);
            crt.Xpad = 0;
            col.PackStart (crt, true);
            col.SetCellDataFunc (crt, new TreeCellDataFunc (GroupData));
            col.Resizable = true;
            col.Expand = false;
            col.Sizing = TreeViewColumnSizing.Fixed;
            col.FixedWidth = 180;
            tree.AppendColumn (col);

            editorColumn = new TreeViewColumn ();
            editorColumn.Title = Catalog.GetString("Value");

            CellRendererProperty crp = new CellRendererProperty (tree);

            editorColumn.PackStart (crp, true);
            editorColumn.SetCellDataFunc (crp, new TreeCellDataFunc (PropertyData));
            editorColumn.Sizing = TreeViewColumnSizing.Fixed;
            editorColumn.Resizable = false;
            editorColumn.Expand = true;
            tree.AppendColumn (editorColumn);

            tree.HeadersVisible = false;
            this.ShadowType = Gtk.ShadowType.None;

            this.HscrollbarPolicy = Gtk.PolicyType.Never;

            Add (tree);

            ShowAll ();

            tree.Selection.Changed += OnSelectionChanged;
        }
 private void InitializeComponent()
 {
     this.components                 = new Container();
     this.split                      = new SplitContainer();
     this.grid                       = new PropertyGrid.PropertyGrid();
     this.contextMenu                = new ContextMenuStrip(this.components);
     this.openFile                   = new ToolStripMenuItem();
     this.openFolder                 = new ToolStripMenuItem();
     this.swapTextures               = new ToolStripMenuItem();
     this.copyKeyToolStripMenuItem   = new ToolStripMenuItem();
     this.copyValueToolStripMenuItem = new ToolStripMenuItem();
     this.resetValue                 = new ToolStripMenuItem();
     this.description                = new Label();
     this.selection                  = new Label();
     ((ISupportInitialize)this.split).BeginInit();
     this.split.Panel1.SuspendLayout();
     this.split.Panel2.SuspendLayout();
     this.split.SuspendLayout();
     this.contextMenu.SuspendLayout();
     base.SuspendLayout();
     this.split.Dock        = DockStyle.Fill;
     this.split.Location    = new Point(0, 0);
     this.split.Name        = "split";
     this.split.Orientation = Orientation.Horizontal;
     this.split.Panel1.Controls.Add(this.grid);
     this.split.Panel2.Controls.Add(this.description);
     this.split.Panel2.Controls.Add(this.selection);
     this.split.Size             = new Size(239, 281);
     this.split.SplitterDistance = 222;
     this.split.TabIndex         = 1;
     this.split.TabStop          = false;
     this.grid.AutoScroll        = true;
     this.grid.AutoScrollMinSize = new Size(0, 100);
     this.grid.ContextMenuStrip  = this.contextMenu;
     this.grid.Dock                = DockStyle.Fill;
     this.grid.Location            = new Point(0, 0);
     this.grid.Name                = "grid";
     this.grid.Size                = new Size(239, 222);
     this.grid.SortSections        = true;
     this.grid.TabIndex            = 0;
     this.grid.OnPropertyChanged  += new PropertyGrid.PropertyGrid.PropertyChangedHandler(this.grid_OnPropertyChanged);
     this.grid.OnPropertySelected += new PropertyGrid.PropertyGrid.PropertySelectedHandler(this.grid_OnPropertySelected);
     this.contextMenu.Items.AddRange(new ToolStripItem[] { this.openFile, this.openFolder, this.swapTextures, this.copyKeyToolStripMenuItem, this.copyValueToolStripMenuItem, this.resetValue });
     this.contextMenu.Name                  = "contextMenu";
     this.contextMenu.Size                  = new Size(153, 158);
     this.contextMenu.Opening              += new CancelEventHandler(this.contextMenu_Opening);
     this.openFile.Name                     = "openFile";
     this.openFile.Size                     = new Size(152, 22);
     this.openFile.Text                     = "Open File";
     this.openFile.Click                   += new EventHandler(this.openFile_Click);
     this.openFolder.Name                   = "openFolder";
     this.openFolder.Size                   = new Size(152, 22);
     this.openFolder.Text                   = "Open Folder";
     this.openFolder.Click                 += new EventHandler(this.openFolder_Click);
     this.swapTextures.Name                 = "swapTextures";
     this.swapTextures.Size                 = new Size(152, 22);
     this.swapTextures.Text                 = "Swap Textures";
     this.swapTextures.Click               += new EventHandler(this.swapTextures_Click);
     this.copyKeyToolStripMenuItem.Name     = "copyKeyToolStripMenuItem";
     this.copyKeyToolStripMenuItem.Size     = new Size(152, 22);
     this.copyKeyToolStripMenuItem.Text     = "Copy Key";
     this.copyKeyToolStripMenuItem.Click   += new EventHandler(this.copyKey_Click);
     this.copyValueToolStripMenuItem.Name   = "copyValueToolStripMenuItem";
     this.copyValueToolStripMenuItem.Size   = new Size(152, 22);
     this.copyValueToolStripMenuItem.Text   = "Copy Value";
     this.copyValueToolStripMenuItem.Click += new EventHandler(this.copyValue_Click);
     this.resetValue.Name                   = "resetValue";
     this.resetValue.Size                   = new Size(152, 22);
     this.resetValue.Text                   = "Reset Value";
     this.resetValue.Click                 += new EventHandler(this.resetValue_Click);
     this.description.Anchor                = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.description.Location              = new Point(12, 13);
     this.description.Name                  = "description";
     this.description.Size                  = new Size(224, 42);
     this.description.TabIndex              = 1;
     this.description.Text                  = "Description";
     this.selection.AutoSize                = true;
     this.selection.Font                    = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
     this.selection.Location                = new Point(3, 0);
     this.selection.Name                    = "selection";
     this.selection.Size                    = new Size(85, 13);
     this.selection.TabIndex                = 0;
     this.selection.Text                    = "Selected Item";
     base.AutoScaleDimensions               = new SizeF(6f, 13f);
     base.AutoScaleMode                     = AutoScaleMode.Font;
     base.Controls.Add(this.split);
     base.Name = "ObjectPropertyBox";
     base.Size = new Size(239, 281);
     this.split.Panel1.ResumeLayout(false);
     this.split.Panel2.ResumeLayout(false);
     this.split.Panel2.PerformLayout();
     ((ISupportInitialize)this.split).EndInit();
     this.split.ResumeLayout(false);
     this.contextMenu.ResumeLayout(false);
     base.ResumeLayout(false);
 }