From fd166fe81486f03ded053f5f85f40df616b11eb1 Mon Sep 17 00:00:00 2001 From: Tiberiu Chibici Date: Mon, 8 Sep 2014 21:31:47 +0300 Subject: [PATCH] Work on project, document managers, controllers and UI --- RainmeterStudio/Business/ProjectManager.cs | 14 +- .../Properties/Settings.Designer.cs | 56 +++- RainmeterStudio/Properties/Settings.settings | 16 +- RainmeterStudio/RainmeterStudio.csproj | 10 + RainmeterStudio/Resources/Icons.Designer.cs | 52 +++- RainmeterStudio/Resources/Icons.resx | 18 +- RainmeterStudio/Resources/Icons/16/disk.png | Bin 0 -> 620 bytes .../Resources/Icons/16/disk_multiple.png | Bin 0 -> 691 bytes .../Resources/Icons/16/folder_page_white.png | Bin 0 -> 639 bytes .../Resources/Icons/16/window-close.png | Bin 0 -> 505 bytes RainmeterStudio/Resources/Strings.Designer.cs | 162 +++++++++-- RainmeterStudio/Resources/Strings.resx | 60 +++- .../UI/Controller/DocumentController.cs | 256 ++++++++++++++++-- .../UI/Controller/ProjectController.cs | 21 +- .../UI/Dialogs/CloseUnsavedDialog.xaml | 17 +- .../UI/Dialogs/CloseUnsavedDialog.xaml.cs | 56 ++-- RainmeterStudio/UI/MainWindow.xaml | 49 +++- RainmeterStudio/UI/MainWindow.xaml.cs | 39 ++- RainmeterStudio/app.config | 20 +- 19 files changed, 698 insertions(+), 148 deletions(-) create mode 100644 RainmeterStudio/Resources/Icons/16/disk.png create mode 100644 RainmeterStudio/Resources/Icons/16/disk_multiple.png create mode 100644 RainmeterStudio/Resources/Icons/16/folder_page_white.png create mode 100644 RainmeterStudio/Resources/Icons/16/window-close.png diff --git a/RainmeterStudio/Business/ProjectManager.cs b/RainmeterStudio/Business/ProjectManager.cs index dbc0e526..10ed75ee 100644 --- a/RainmeterStudio/Business/ProjectManager.cs +++ b/RainmeterStudio/Business/ProjectManager.cs @@ -36,6 +36,8 @@ namespace RainmeterStudio.Business #endregion + #region Constructor + /// /// Initializes the project manager /// @@ -45,7 +47,11 @@ namespace RainmeterStudio.Business Storage = storage; ActiveProject = null; } - + + #endregion + + #region Project operations + /// /// Creates a new project /// @@ -115,6 +121,10 @@ namespace RainmeterStudio.Business ActiveProjectChanged(this, new EventArgs()); } + #endregion + + #region Document templates + /// /// Registers a project template /// @@ -128,5 +138,7 @@ namespace RainmeterStudio.Business /// Gets a list of existing project templates /// public IEnumerable ProjectTemplates { get { return _projectTemplates; } } + + #endregion } } diff --git a/RainmeterStudio/Properties/Settings.Designer.cs b/RainmeterStudio/Properties/Settings.Designer.cs index a8f0bc67..b224a35b 100644 --- a/RainmeterStudio/Properties/Settings.Designer.cs +++ b/RainmeterStudio/Properties/Settings.Designer.cs @@ -27,12 +27,12 @@ namespace RainmeterStudio.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Ctrl+Shift+N")] [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string Command_ProjectCreateCommand_Shortcut { + public string Command_ProjectCreate_Shortcut { get { - return ((string)(this["Command_ProjectCreateCommand_Shortcut"])); + return ((string)(this["Command_ProjectCreate_Shortcut"])); } set { - this["Command_ProjectCreateCommand_Shortcut"] = value; + this["Command_ProjectCreate_Shortcut"] = value; } } @@ -40,12 +40,12 @@ namespace RainmeterStudio.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("F5")] [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string Command_ProjectPanel_RefreshCommand_Shortcut { + public string Command_ProjectPanel_Refresh_Shortcut { get { - return ((string)(this["Command_ProjectPanel_RefreshCommand_Shortcut"])); + return ((string)(this["Command_ProjectPanel_Refresh_Shortcut"])); } set { - this["Command_ProjectPanel_RefreshCommand_Shortcut"] = value; + this["Command_ProjectPanel_Refresh_Shortcut"] = value; } } @@ -53,12 +53,12 @@ namespace RainmeterStudio.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Ctrl+N")] [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string Command_DocumentCreateCommand_Shortcut { + public string Command_DocumentCreate_Shortcut { get { - return ((string)(this["Command_DocumentCreateCommand_Shortcut"])); + return ((string)(this["Command_DocumentCreate_Shortcut"])); } set { - this["Command_DocumentCreateCommand_Shortcut"] = value; + this["Command_DocumentCreate_Shortcut"] = value; } } @@ -66,12 +66,12 @@ namespace RainmeterStudio.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Ctrl+Shift+O")] [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string Command_ProjectOpenCommand_Shortcut { + public string Command_ProjectOpen_Shortcut { get { - return ((string)(this["Command_ProjectOpenCommand_Shortcut"])); + return ((string)(this["Command_ProjectOpen_Shortcut"])); } set { - this["Command_ProjectOpenCommand_Shortcut"] = value; + this["Command_ProjectOpen_Shortcut"] = value; } } @@ -79,12 +79,12 @@ namespace RainmeterStudio.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("Ctrl+W")] [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string Command_DocumentCloseCommand_Shortcut { + public string Command_DocumentClose_Shortcut { get { - return ((string)(this["Command_DocumentCloseCommand_Shortcut"])); + return ((string)(this["Command_DocumentClose_Shortcut"])); } set { - this["Command_DocumentCloseCommand_Shortcut"] = value; + this["Command_DocumentClose_Shortcut"] = value; } } @@ -183,5 +183,31 @@ namespace RainmeterStudio.Properties { this["CreateProjectDialog_CreateDirectoryCheckbox"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Ctrl+O")] + [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] + public string Command_DocumentOpen_Shortcut { + get { + return ((string)(this["Command_DocumentOpen_Shortcut"])); + } + set { + this["Command_DocumentOpen_Shortcut"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Ctrl+S")] + [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] + public string Command_DocumentSave_Shortcut { + get { + return ((string)(this["Command_DocumentSave_Shortcut"])); + } + set { + this["Command_DocumentSave_Shortcut"] = value; + } + } } } diff --git a/RainmeterStudio/Properties/Settings.settings b/RainmeterStudio/Properties/Settings.settings index 5b022c2c..16f055b3 100644 --- a/RainmeterStudio/Properties/Settings.settings +++ b/RainmeterStudio/Properties/Settings.settings @@ -2,19 +2,19 @@ - + Ctrl+Shift+N - + F5 - + Ctrl+N - + Ctrl+Shift+O - + Ctrl+W @@ -41,5 +41,11 @@ True + + Ctrl+O + + + Ctrl+S + \ No newline at end of file diff --git a/RainmeterStudio/RainmeterStudio.csproj b/RainmeterStudio/RainmeterStudio.csproj index ba49ec81..1e5ba97b 100644 --- a/RainmeterStudio/RainmeterStudio.csproj +++ b/RainmeterStudio/RainmeterStudio.csproj @@ -238,6 +238,16 @@ + + + + + + + + + +