public DirectoryBrowser() { InitializeComponent(); VisualStyleUtil.StyleTreeView(_treeView); _imageList.Assign(_treeView); _watcher.IncludeSubdirectories = true; _watcher.NotifyFilter = NotifyFilters.CreationTime | NotifyFilters.DirectoryName | NotifyFilters.LastWrite; _watcher.SynchronizingObject = this; _watcher.Changed += _watcher_Changed; _watcher.Created += _watcher_Changed; _watcher.Deleted += _watcher_Changed; _watcher.Renamed += _watcher_Renamed; _treeView.Nodes.Add(new TreeNode("Root")); var dragDropManager = new DragDropManager(this); dragDropManager.DragEnter += _dragDropManager_DragEnter; dragDropManager.DragLeave += _dragDropManager_DragLeave; dragDropManager.DragOver += _dragDropManager_DragOver; dragDropManager.DragDrop += _dragDropManager_DragDrop; Reload(); }
public ReportForm(Api api, string directory, string fileName, ReportDefinition report) { if (api == null) { throw new ArgumentNullException(nameof(api)); } if (directory == null) { throw new ArgumentNullException(nameof(directory)); } if (report == null) { throw new ArgumentNullException(nameof(report)); } _api = api; _directory = directory; _fileName = fileName; _entity = report.Entity; _filters = report.Filters; InitializeComponent(); if (fileName != null) { Text += " - " + fileName; } _gridManager = new ReportGridManager(_grid); foreach (ToolStripMenuItem menuItem in _aggregateMenuItem.DropDownItems) { menuItem.Tag = Enum.Parse(typeof(ReportFieldTransform), (string)menuItem.Tag); } VisualStyleUtil.StyleTreeView(_fields); BuildFields(_fields.Nodes, _entity); foreach (var field in report.Fields) { switch (field.Type) { case ReportFieldType.Column: _columns.Items.Add(field); break; case ReportFieldType.Row: _rows.Items.Add(field); break; case ReportFieldType.Value: _values.Items.Add(field); break; } } UpdateEnabled(); }
public ProjectControl(JavaScriptForm owner) { if (owner == null) { throw new ArgumentNullException(nameof(owner)); } _owner = owner; _owner.ProjectChanged += _owner_ProjectChanged; Font = SystemFonts.MessageBoxFont; InitializeComponent(); VisualStyleUtil.StyleTreeView(_treeView); }
private TreeView BuildPathSelectorTreeView() { var treeView = new EntityPathSelectorTreeView(_api, _entity) { Dock = DockStyle.Fill, BorderStyle = BorderStyle.None, Font = Font }; VisualStyleUtil.StyleTreeView(treeView); treeView.LostFocus += treeView_LostFocus; treeView.NodeMouseDoubleClick += treeView_NodeMouseDoubleClick; return(treeView); }