public FileBrowser() { InitializeComponent(); Enabled = false; VisualStyleUtil.StyleListView(_listView); _imageList.Assign(_listView); _watcher.IncludeSubdirectories = false; _watcher.NotifyFilter = NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.FileName | NotifyFilters.LastWrite; _watcher.SynchronizingObject = this; _watcher.Changed += _watcher_Changed; _watcher.Created += _watcher_Changed; _watcher.Deleted += _watcher_Changed; _watcher.Renamed += _watcher_Changed; var dragDropManager = new DragDropManager(this); dragDropManager.DragEnter += _dragDropManager_DragEnter; dragDropManager.DragDrop += _dragDropManager_DragDrop; Reload(); }
public ValidationErrorsForm(ApiRowErrorsCollection errors) { if (errors == null) { throw new ArgumentNullException(nameof(errors)); } InitializeComponent(); VisualStyleUtil.StyleListView(_listView); foreach (var rowErrors in errors) { foreach (var error in rowErrors.Errors) { _listView.Items.Add(new ListViewItem { Text = (rowErrors.Row + 1).ToString(), SubItems = { error.Field, error.Error } }); } } _listView.AutoResizeColumns( errors.Count > 0 ? ColumnHeaderAutoResizeStyle.ColumnContent : ColumnHeaderAutoResizeStyle.HeaderSize ); }
public VariablesControl() { Font = SystemFonts.MessageBoxFont; InitializeComponent(); VisualStyleUtil.StyleListView(_listView); }
public ExportDefinitionForm(Api api, string directory, string fileName, ExportDefinition export) { if (api == null) { throw new ArgumentNullException(nameof(api)); } if (directory == null) { throw new ArgumentNullException(nameof(directory)); } if (export == null) { throw new ArgumentNullException(nameof(export)); } _api = api; _directory = directory; _fileName = fileName; _entity = export.Entity; _filters = export.Filters; InitializeComponent(); if (fileName != null) { Text += " - " + fileName; } VisualStyleUtil.StyleListView(_availableFields); VisualStyleUtil.StyleListView(_reportFields); _entityGroup = new ListViewGroup(HumanText.GetEntityName(_entity)); _reportFields.Groups.Add(_entityGroup); var selectPath = new Button { Image = NeutralResources.navigate_close }; _path.RightButtons.Add(selectPath); selectPath.Click += selectPath_Click; foreach (var field in export.Fields) { AddReportField(field); } SetSelectedEntity(EntityMemberPath.Empty); UpdateEnabled(); }