From 6f278add4187caab50e007ac456a7a2e9fd623e8 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Fri, 22 Aug 2014 09:22:53 -0400 Subject: [PATCH] Implemented Clear and CopyTo, and added Description and Path --- .../Shortcut/ShortcutObjectModel.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CSharp/Plugins/UniversalEditor.Essential/ObjectModels/Shortcut/ShortcutObjectModel.cs b/CSharp/Plugins/UniversalEditor.Essential/ObjectModels/Shortcut/ShortcutObjectModel.cs index 0e2ab98d..d3285633 100644 --- a/CSharp/Plugins/UniversalEditor.Essential/ObjectModels/Shortcut/ShortcutObjectModel.cs +++ b/CSharp/Plugins/UniversalEditor.Essential/ObjectModels/Shortcut/ShortcutObjectModel.cs @@ -14,16 +14,34 @@ namespace UniversalEditor.ObjectModels.Shortcut { _omr = base.MakeReference(); _omr.Title = "Shortcut"; + _omr.Description = "Allows the user to find a file or resource located in a different directory or folder from the place where the shortcut is located."; + _omr.Path = new string[] { "General" }; } return _omr; } public override void Clear() { + mvarComment = String.Empty; + mvarExecutableArguments.Clear(); + mvarExecutableFileName = String.Empty; + mvarIconFileName = String.Empty; + mvarRunInTerminal = false; + mvarWorkingDirectory = String.Empty; } public override void CopyTo(ObjectModel where) { + ShortcutObjectModel shortcut = (where as ShortcutObjectModel); + shortcut.Comment = (mvarComment.Clone() as string); + foreach (string s in mvarExecutableArguments) + { + shortcut.ExecutableArguments.Add(s.Clone() as string); + } + shortcut.ExecutableFileName = (mvarExecutableFileName.Clone() as string); + shortcut.IconFileName = (mvarIconFileName.Clone() as string); + shortcut.RunInTerminal = mvarRunInTerminal; + shortcut.WorkingDirectory = (mvarWorkingDirectory.Clone() as string); } private string mvarComment = String.Empty;