From 7c497d6df09bc92b6bfa4877216bbeded1a9cd51 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 20 Jul 2019 17:58:09 -0400 Subject: [PATCH] uwt: Change access modifiers to protected for event handler functions --- .../Dialogs/CustomOptionsDialog.cs | 2 +- .../Dialogs/DocumentPropertiesDialog.cs | 2 +- .../Dialogs/GenericBrowserPopup.cs | 2 +- .../Dialogs/NewDialog.cs | 2 +- .../UniversalEditor.UserInterface/Editor.cs | 2 +- .../Editors/FileSystem/FileSystemEditor.Designer.cs | 1 + .../Editors/FileSystem/FileSystemEditor.cs | 12 +++++++++--- .../UniversalEditor.UserInterface/MainWindow.cs | 4 ++-- .../Panels/ErrorListPanel.cs | 2 +- .../Controls/DrawingArea/DrawingAreaControl.cs | 2 +- 10 files changed, 19 insertions(+), 12 deletions(-) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/CustomOptionsDialog.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/CustomOptionsDialog.cs index 1b278030..cfbfa512 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/CustomOptionsDialog.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/CustomOptionsDialog.cs @@ -54,7 +54,7 @@ namespace UniversalEditor.UserInterface.Dialogs private CustomOption.CustomOptionCollection mvarCustomOptions = new CustomOption.CustomOptionCollection(); public CustomOption.CustomOptionCollection CustomOptions { get { return mvarCustomOptions; } set { mvarCustomOptions = value; } } - public override void OnCreating(EventArgs e) + protected override void OnCreating(EventArgs e) { base.OnCreating(e); diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/DocumentPropertiesDialog.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/DocumentPropertiesDialog.cs index c4a4f11f..5cda16c5 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/DocumentPropertiesDialog.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/DocumentPropertiesDialog.cs @@ -50,7 +50,7 @@ namespace UniversalEditor.UserInterface.Dialogs private TextBox txtAccessor = null; // ********************************************************** - public override void OnCreating(EventArgs e) + protected override void OnCreating(EventArgs e) { base.OnCreating(e); diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/GenericBrowserPopup.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/GenericBrowserPopup.cs index 87400f4b..d98fda49 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/GenericBrowserPopup.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/GenericBrowserPopup.cs @@ -59,7 +59,7 @@ namespace UniversalEditor.UserInterface.Dialogs } */ - public override void OnCreated(EventArgs e) + protected override void OnCreated(EventArgs e) { base.OnCreated(e); UpdateSearch(); diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/NewDialog.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/NewDialog.cs index 66af068c..8cc2934f 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/NewDialog.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/NewDialog.cs @@ -154,7 +154,7 @@ namespace UniversalEditor.UserInterface.Dialogs public string SolutionTitle { get; set; } public string ProjectTitle { get; set; } - public override void OnCreating(EventArgs e) + protected override void OnCreating(EventArgs e) { base.OnCreating(e); diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Editor.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Editor.cs index 22bfe3f2..2054ae1d 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Editor.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Editor.cs @@ -475,7 +475,7 @@ namespace UniversalEditor.UserInterface return base.ProcessKeyPreview(ref m); } */ - public override void OnKeyDown(KeyEventArgs e) + protected override void OnKeyDown(KeyEventArgs e) { base.OnKeyDown(e); diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.Designer.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.Designer.cs index cc125254..d8d0f49a 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.Designer.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.Designer.cs @@ -37,6 +37,7 @@ namespace UniversalEditor.Editors.FileSystem this.tmTreeView = new DefaultTreeModel(new Type[] { typeof(string), typeof(string), typeof(string), typeof(string) }); this.tv = new ListView(); + this.tv.Mode = ListViewMode.Detail; this.tv.SelectionMode = SelectionMode.Multiple; this.tv.Model = this.tmTreeView; diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs index 37efd6ec..7176d1f4 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs @@ -37,18 +37,24 @@ namespace UniversalEditor.Editors.FileSystem this.InitializeComponent(); } - public override void OnCreated(EventArgs e) + protected override void OnCreated(EventArgs e) { this.tv.RegisterDragSource(new DragDropTarget[] { - new DragDropTarget("text/uri-list", DragDropTargetFlags.SameApplication | DragDropTargetFlags.OtherApplication, 0x1) + new DragDropTarget("STRING", DragDropTargetFlags.SameApplication | DragDropTargetFlags.OtherApplication, 0x0) }, DragDropEffect.Copy, MouseButtons.Primary | MouseButtons.Secondary, KeyboardModifierKey.None); this.tv.DragDropDataRequest += tv_DragDropDataRequest; } private void tv_DragDropDataRequest(object sender, DragDropDataRequestEventArgs e) { - e.Data = "file:///tmp/test/" + tv.SelectedRows[0].RowColumns[0].Value.ToString() + "\r\n"; + if (tv.SelectedRows.Count == 0) return; + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + for (int i = 0; i < tv.SelectedRows.Count; i++) + { + sb.AppendLine("file:///tmp/test/" + tv.SelectedRows[i].RowColumns[0].Value.ToString()); + } + e.Data = sb.ToString(); } public override void Copy() diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs b/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs index efab8771..5aca1276 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs @@ -287,11 +287,11 @@ namespace UniversalEditor.UserInterface cmd.Execute(); } - public override void OnClosed(EventArgs e) + protected override void OnClosed(EventArgs e) { UniversalWidgetToolkit.Application.Stop(); } - public override void OnCreated(EventArgs e) + protected override void OnCreated(EventArgs e) { this.RegisterDropTarget(new DragDropTarget[] { diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Panels/ErrorListPanel.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Panels/ErrorListPanel.cs index 64288458..251e2201 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Panels/ErrorListPanel.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Panels/ErrorListPanel.cs @@ -74,7 +74,7 @@ namespace UniversalEditor.UserInterface.Panels this.Controls.Add(tvErrorList, new BoxLayout.Constraints(true, true)); } - public override void OnCreated(EventArgs e) + protected override void OnCreated(EventArgs e) { base.OnCreated(e); diff --git a/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/Controls/DrawingArea/DrawingAreaControl.cs b/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/Controls/DrawingArea/DrawingAreaControl.cs index b03e2117..2a93e379 100644 --- a/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/Controls/DrawingArea/DrawingAreaControl.cs +++ b/CSharp/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/Controls/DrawingArea/DrawingAreaControl.cs @@ -38,7 +38,7 @@ namespace UniversalEditor.Controls.DrawingArea this.Refresh(); } } - public override void OnPaint(PaintEventArgs e) + protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e);