diff --git a/src/Gemini.Demo/Gemini.Demo.csproj b/src/Gemini.Demo/Gemini.Demo.csproj index 9b6da82a..148ac294 100644 --- a/src/Gemini.Demo/Gemini.Demo.csproj +++ b/src/Gemini.Demo/Gemini.Demo.csproj @@ -227,6 +227,7 @@ ResXFileCodeGenerator Resources.de.Designer.cs + ResXFileCodeGenerator Resources.Designer.cs @@ -329,6 +330,9 @@ + + + diff --git a/src/Gemini.Demo/Modules/Startup/Module.cs b/src/Gemini.Demo/Modules/Startup/Module.cs index 3d73b23c..a3023f37 100644 --- a/src/Gemini.Demo/Modules/Startup/Module.cs +++ b/src/Gemini.Demo/Modules/Startup/Module.cs @@ -5,6 +5,8 @@ using Gemini.Framework; using Gemini.Modules.Inspector; using Gemini.Modules.Output; +using Gemini.Modules.PropertyGrid; +using System.Windows.Media.Imaging; namespace Gemini.Demo.Modules.Startup { @@ -13,6 +15,7 @@ public class Module : ModuleBase { private readonly IOutput _output; private readonly IInspectorTool _inspectorTool; + private readonly IPropertyGrid _propertyGrid; public override IEnumerable DefaultTools { @@ -20,10 +23,11 @@ public override IEnumerable DefaultTools } [ImportingConstructor] - public Module(IOutput output, IInspectorTool inspectorTool) + public Module(IOutput output, IInspectorTool inspectorTool, IPropertyGrid propertyGrid) { _output = output; _inspectorTool = inspectorTool; + _propertyGrid = propertyGrid; } public override void Initialize() @@ -33,17 +37,31 @@ public override void Initialize() //MainWindow.WindowState = WindowState.Maximized; MainWindow.Title = "Gemini Demo"; + MainWindow.Icon = new BitmapImage(new Uri("pack://application:,,/Resources/icon.png")); - Shell.StatusBar.AddItem("Hello world!", new GridLength(1, GridUnitType.Star)); - Shell.StatusBar.AddItem("Ln 44", new GridLength(100)); - Shell.StatusBar.AddItem("Col 79", new GridLength(100)); + Shell.StatusBar.AddItem("Ready", new GridLength(1, GridUnitType.Star)); + Shell.StatusBar.AddItem("Ln 1", new GridLength(100)); + Shell.StatusBar.AddItem("Col 1", new GridLength(100)); _output.AppendLine("Started up"); - Shell.ActiveDocumentChanged += (sender, e) => RefreshInspector(); + Shell.ActiveDocumentChanged += delegate + { + RefreshPropertyGrid(); + RefreshInspector(); + }; + RefreshPropertyGrid(); RefreshInspector(); } + private void RefreshPropertyGrid() + { + if (Shell.ActiveItem != null) + _propertyGrid.SelectedObject = Shell.ActiveItem; + else + _propertyGrid.SelectedObject = null; + } + private void RefreshInspector() { if (Shell.ActiveItem != null) diff --git a/src/Gemini.Demo/Modules/TextEditor/Views/EditorView.xaml b/src/Gemini.Demo/Modules/TextEditor/Views/EditorView.xaml index 334bf618..c911ed21 100644 --- a/src/Gemini.Demo/Modules/TextEditor/Views/EditorView.xaml +++ b/src/Gemini.Demo/Modules/TextEditor/Views/EditorView.xaml @@ -11,5 +11,5 @@ FontFamily="Consolas" FontSize="14" ScrollViewer.VerticalScrollBarVisibility="Visible" - ScrollViewer.HorizontalScrollBarVisibility="Visible"/> + ScrollViewer.HorizontalScrollBarVisibility="Visible" TextWrapping="Wrap" AcceptsReturn="True"/> diff --git a/src/Gemini.Demo/Properties/Resources.Designer.cs b/src/Gemini.Demo/Properties/Resources.Designer.cs index acb5ca72..479232f0 100644 --- a/src/Gemini.Demo/Properties/Resources.Designer.cs +++ b/src/Gemini.Demo/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. // //------------------------------------------------------------------------------ @@ -13,12 +13,12 @@ namespace Gemini.Demo.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture + /// 속성을 재정의합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Resources() { } /// - /// Looks up a localized string similar to General. + /// General과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string SettingsPageGeneral { get { @@ -70,7 +70,7 @@ internal static string SettingsPageGeneral { } /// - /// Looks up a localized string similar to Environment. + /// Environment과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string SettingsPathEnvironment { get { diff --git a/src/Gemini.Demo/Properties/Resources.ko.resx b/src/Gemini.Demo/Properties/Resources.ko.resx new file mode 100644 index 00000000..0e187ffc --- /dev/null +++ b/src/Gemini.Demo/Properties/Resources.ko.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 일반 + + + 환경 + + \ No newline at end of file diff --git a/src/Gemini.Demo/Resources/icon.png b/src/Gemini.Demo/Resources/icon.png new file mode 100644 index 00000000..1020506a Binary files /dev/null and b/src/Gemini.Demo/Resources/icon.png differ diff --git a/src/Gemini.Modules.CodeEditor/Gemini.Modules.CodeEditor.csproj b/src/Gemini.Modules.CodeEditor/Gemini.Modules.CodeEditor.csproj index ff0ea3af..da6c88e2 100644 --- a/src/Gemini.Modules.CodeEditor/Gemini.Modules.CodeEditor.csproj +++ b/src/Gemini.Modules.CodeEditor/Gemini.Modules.CodeEditor.csproj @@ -89,6 +89,7 @@ + ResXFileCodeGenerator Resources.Designer.cs diff --git a/src/Gemini.Modules.CodeEditor/Properties/Resources.ko.resx b/src/Gemini.Modules.CodeEditor/Properties/Resources.ko.resx new file mode 100644 index 00000000..bbe6cd80 --- /dev/null +++ b/src/Gemini.Modules.CodeEditor/Properties/Resources.ko.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 파일 + + \ No newline at end of file diff --git a/src/Gemini.Modules.CodeEditor/ViewModels/CodeEditorViewModel.cs b/src/Gemini.Modules.CodeEditor/ViewModels/CodeEditorViewModel.cs index ef4e9270..4fc9c356 100644 --- a/src/Gemini.Modules.CodeEditor/ViewModels/CodeEditorViewModel.cs +++ b/src/Gemini.Modules.CodeEditor/ViewModels/CodeEditorViewModel.cs @@ -1,13 +1,17 @@ -using System; -using System.ComponentModel.Composition; -using System.IO; -using System.Threading.Tasks; +using Caliburn.Micro; using Gemini.Framework; using Gemini.Framework.Threading; using Gemini.Modules.CodeEditor.Views; +using Gemini.Modules.StatusBar; +using System; +using System.ComponentModel; +using System.ComponentModel.Composition; +using System.IO; +using System.Threading.Tasks; namespace Gemini.Modules.CodeEditor.ViewModels { + [DisplayName("Code Editor")] [Export(typeof(CodeEditorViewModel))] [PartCreationPolicy(CreationPolicy.NonShared)] #pragma warning disable 659 @@ -17,6 +21,8 @@ public class CodeEditorViewModel : PersistedDocument private readonly LanguageDefinitionManager _languageDefinitionManager; private string _originalText; private ICodeEditorView _view; + private IStatusBar _statusBar; + private bool notYetLoaded = false; [ImportingConstructor] public CodeEditorViewModel(LanguageDefinitionManager languageDefinitionManager) @@ -34,14 +40,21 @@ public override void SaveState(BinaryWriter writer) writer.Write(FilePath); } - public override void LoadState(BinaryReader reader) + public override async void LoadState(BinaryReader reader) { - Load(reader.ReadString()); + await Load(reader.ReadString()); } protected override void OnViewLoaded(object view) { _view = (ICodeEditorView) view; + _statusBar = IoC.Get(); + + if (notYetLoaded) + { + ApplyOriginalText(); + notYetLoaded = false; + } } public override bool Equals(object obj) @@ -76,6 +89,13 @@ protected override Task DoSave(string filePath) private void ApplyOriginalText() { + // At StartUp, _view is null, so notYetLoaded flag is added + if (_view == null) + { + notYetLoaded = true; + return; + } + _view.TextEditor.Text = _originalText; _view.TextEditor.TextChanged += delegate @@ -83,6 +103,14 @@ private void ApplyOriginalText() IsDirty = string.Compare(_originalText, _view.TextEditor.Text) != 0; }; + UpdateStatusBar(); + + // To update status bar items, Caret PositionChanged event is added + _view.TextEditor.TextArea.Caret.PositionChanged += delegate + { + UpdateStatusBar(); + }; + var fileExtension = Path.GetExtension(FileName).ToLower(); ILanguageDefinition languageDefinition = _languageDefinitionManager.GetDefinitionByExtension(fileExtension); @@ -90,6 +118,24 @@ private void ApplyOriginalText() SetLanguage(languageDefinition); } + /// + /// Update Column and Line position properties when caret position is changed + /// + private void UpdateStatusBar() + { + int lineNumber = _view.TextEditor.Document.GetLineByOffset(_view.TextEditor.CaretOffset).LineNumber; + int colPosition = _view.TextEditor.TextArea.Caret.VisualColumn + 1; + + // TODO: Now I don't know about Ch# + //int charPosition = _view.TextEditor.CaretOffset; + + if (_statusBar != null && _statusBar.Items.Count >= 3) + { + _statusBar.Items[1].Message = string.Format("Ln {0}", lineNumber); + _statusBar.Items[2].Message = string.Format("Col {0}", colPosition); + } + } + private void SetLanguage(ILanguageDefinition languageDefinition) { _view.TextEditor.SyntaxHighlighting = (languageDefinition != null) diff --git a/src/Gemini.Modules.ErrorList/Gemini.Modules.ErrorList.csproj b/src/Gemini.Modules.ErrorList/Gemini.Modules.ErrorList.csproj index bd0a875d..29f62b6d 100644 --- a/src/Gemini.Modules.ErrorList/Gemini.Modules.ErrorList.csproj +++ b/src/Gemini.Modules.ErrorList/Gemini.Modules.ErrorList.csproj @@ -93,6 +93,7 @@ ErrorListView.xaml + ResXFileCodeGenerator Resources.Designer.cs diff --git a/src/Gemini.Modules.ErrorList/Properties/Resources.Designer.cs b/src/Gemini.Modules.ErrorList/Properties/Resources.Designer.cs index 063a5355..d9c7807f 100644 --- a/src/Gemini.Modules.ErrorList/Properties/Resources.Designer.cs +++ b/src/Gemini.Modules.ErrorList/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. // //------------------------------------------------------------------------------ @@ -13,12 +13,12 @@ namespace Gemini.Modules.ErrorList.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture + /// 속성을 재정의합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Resources() { } /// - /// Looks up a localized string similar to {0} Errors. + /// {0} Errors과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ErrorTextPlural { get { @@ -70,7 +70,7 @@ internal static string ErrorTextPlural { } /// - /// Looks up a localized string similar to {0} Error. + /// {0} Error과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ErrorTextSingular { get { @@ -79,7 +79,7 @@ internal static string ErrorTextSingular { } /// - /// Looks up a localized string similar to {0} Messages. + /// {0} Messages과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string MessageTextPlural { get { @@ -88,7 +88,7 @@ internal static string MessageTextPlural { } /// - /// Looks up a localized string similar to {0} Message. + /// {0} Message과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string MessageTextSingular { get { @@ -97,7 +97,7 @@ internal static string MessageTextSingular { } /// - /// Looks up a localized string similar to Error L_ist. + /// Error L_ist과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ViewErrorListCommandText { get { @@ -106,7 +106,7 @@ internal static string ViewErrorListCommandText { } /// - /// Looks up a localized string similar to Error List. + /// Error List과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ViewErrorListCommandToolTip { get { @@ -115,7 +115,7 @@ internal static string ViewErrorListCommandToolTip { } /// - /// Looks up a localized string similar to {0} Warnings. + /// {0} Warnings과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string WarningTextPlural { get { @@ -124,7 +124,7 @@ internal static string WarningTextPlural { } /// - /// Looks up a localized string similar to {0} Warning. + /// {0} Warning과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string WarningTextSingular { get { diff --git a/src/Gemini.Modules.ErrorList/Properties/Resources.ko.resx b/src/Gemini.Modules.ErrorList/Properties/Resources.ko.resx new file mode 100644 index 00000000..9eee667d --- /dev/null +++ b/src/Gemini.Modules.ErrorList/Properties/Resources.ko.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 오류 목록(_i) + + + 오류 목록 + + \ No newline at end of file diff --git a/src/Gemini.Modules.Inspector/Gemini.Modules.Inspector.csproj b/src/Gemini.Modules.Inspector/Gemini.Modules.Inspector.csproj index e25a14de..66df3588 100644 --- a/src/Gemini.Modules.Inspector/Gemini.Modules.Inspector.csproj +++ b/src/Gemini.Modules.Inspector/Gemini.Modules.Inspector.csproj @@ -236,6 +236,7 @@ PublicResXFileCodeGenerator Resources.de.Designer.cs + ResXFileCodeGenerator Resources.Designer.cs diff --git a/src/Gemini.Modules.Inspector/Properties/Resources.Designer.cs b/src/Gemini.Modules.Inspector/Properties/Resources.Designer.cs index 3ad7e56c..d8e7779a 100644 --- a/src/Gemini.Modules.Inspector/Properties/Resources.Designer.cs +++ b/src/Gemini.Modules.Inspector/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. // //------------------------------------------------------------------------------ @@ -13,12 +13,12 @@ namespace Gemini.Modules.Inspector.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture + /// 속성을 재정의합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Resources() { } /// - /// Looks up a localized string similar to Change {0} from {1} to {2}. + /// Change {0} from {1} to {2}과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ChangeObjectValueActionFormat { get { @@ -70,7 +70,7 @@ internal static string ChangeObjectValueActionFormat { } /// - /// Looks up a localized string similar to Advanced. + /// Advanced과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ColorEditorAdvanced { get { @@ -79,7 +79,7 @@ internal static string ColorEditorAdvanced { } /// - /// Looks up a localized string similar to Available Colors. + /// Available Colors과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ColorEditorAvailableColors { get { @@ -88,7 +88,7 @@ internal static string ColorEditorAvailableColors { } /// - /// Looks up a localized string similar to Recent Colors. + /// Recent Colors과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ColorEditorRecentColors { get { @@ -97,7 +97,7 @@ internal static string ColorEditorRecentColors { } /// - /// Looks up a localized string similar to Standard. + /// Standard과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ColorEditorStandard { get { @@ -106,7 +106,7 @@ internal static string ColorEditorStandard { } /// - /// Looks up a localized string similar to Standard Colors. + /// Standard Colors과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ColorEditorStandardColors { get { @@ -115,7 +115,7 @@ internal static string ColorEditorStandardColors { } /// - /// Looks up a localized string similar to Miscellaneous. + /// Miscellaneous과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string InspectorBuilderMiscellaneous { get { @@ -124,7 +124,7 @@ internal static string InspectorBuilderMiscellaneous { } /// - /// Looks up a localized string similar to Inspector. + /// Inspector과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string InspectorDisplayName { get { @@ -133,7 +133,7 @@ internal static string InspectorDisplayName { } /// - /// Looks up a localized string similar to Reset all ⟲. + /// Reset all ⟲과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ResetAll { get { @@ -142,7 +142,7 @@ internal static string ResetAll { } /// - /// Looks up a localized string similar to Reset {0} from {1} to {2}. + /// Reset {0} from {1} to {2}과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ResetObjectValueActionFormat { get { @@ -151,7 +151,7 @@ internal static string ResetObjectValueActionFormat { } /// - /// Looks up a localized string similar to ⟲. + /// ⟲과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ResetSymbol { get { @@ -160,7 +160,7 @@ internal static string ResetSymbol { } /// - /// Looks up a localized string similar to Reset. + /// Reset과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ResetToolTip { get { @@ -169,7 +169,7 @@ internal static string ResetToolTip { } /// - /// Looks up a localized string similar to I_nspector. + /// I_nspector과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ViewInspectorCommandText { get { @@ -178,7 +178,7 @@ internal static string ViewInspectorCommandText { } /// - /// Looks up a localized string similar to Inspector. + /// Inspector과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ViewInspectorCommandToolTip { get { diff --git a/src/Gemini.Modules.Inspector/Properties/Resources.ko.resx b/src/Gemini.Modules.Inspector/Properties/Resources.ko.resx new file mode 100644 index 00000000..8a13be57 --- /dev/null +++ b/src/Gemini.Modules.Inspector/Properties/Resources.ko.resx @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 재설정 + + + 모두 재설정 + + + + + + 사용가능한 색상 + + + 표준 색상 + + + 표준 + + + 최근에 사용한 색상 + + + 고급 + + + 검사기 + + + 검사기 + + + 검사기 + + \ No newline at end of file diff --git a/src/Gemini.Modules.Output/Gemini.Modules.Output.csproj b/src/Gemini.Modules.Output/Gemini.Modules.Output.csproj index 43654911..ed08888b 100644 --- a/src/Gemini.Modules.Output/Gemini.Modules.Output.csproj +++ b/src/Gemini.Modules.Output/Gemini.Modules.Output.csproj @@ -103,6 +103,7 @@ ResXFileCodeGenerator Resources.de.Designer.cs + ResXFileCodeGenerator Resources.Designer.cs diff --git a/src/Gemini.Modules.Output/Properties/Resources.Designer.cs b/src/Gemini.Modules.Output/Properties/Resources.Designer.cs index f2bcf304..463620ee 100644 --- a/src/Gemini.Modules.Output/Properties/Resources.Designer.cs +++ b/src/Gemini.Modules.Output/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. // //------------------------------------------------------------------------------ @@ -13,12 +13,12 @@ namespace Gemini.Modules.Output.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture + /// 속성을 재정의합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Resources() { } /// - /// Looks up a localized string similar to Output. + /// Output과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string OutputDisplayName { get { @@ -70,7 +70,7 @@ internal static string OutputDisplayName { } /// - /// Looks up a localized string similar to _Output. + /// _Output과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ViewOutputCommandText { get { @@ -79,7 +79,7 @@ internal static string ViewOutputCommandText { } /// - /// Looks up a localized string similar to Output. + /// Output과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ViewOutputCommandToolTip { get { diff --git a/src/Gemini.Modules.Output/Properties/Resources.ko.resx b/src/Gemini.Modules.Output/Properties/Resources.ko.resx new file mode 100644 index 00000000..ad435199 --- /dev/null +++ b/src/Gemini.Modules.Output/Properties/Resources.ko.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 출력 + + + 출력(_O) + + + 출력 + + \ No newline at end of file diff --git a/src/Gemini.Modules.PropertyGrid/Gemini.Modules.PropertyGrid.csproj b/src/Gemini.Modules.PropertyGrid/Gemini.Modules.PropertyGrid.csproj index d8489bc0..ba3a3fda 100644 --- a/src/Gemini.Modules.PropertyGrid/Gemini.Modules.PropertyGrid.csproj +++ b/src/Gemini.Modules.PropertyGrid/Gemini.Modules.PropertyGrid.csproj @@ -119,6 +119,7 @@ + ResXFileCodeGenerator Resources.Designer.cs diff --git a/src/Gemini.Modules.PropertyGrid/Properties/Resources.Designer.cs b/src/Gemini.Modules.PropertyGrid/Properties/Resources.Designer.cs index 7282741c..90726940 100644 --- a/src/Gemini.Modules.PropertyGrid/Properties/Resources.Designer.cs +++ b/src/Gemini.Modules.PropertyGrid/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. // //------------------------------------------------------------------------------ @@ -13,12 +13,12 @@ namespace Gemini.Modules.PropertyGrid.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture + /// 속성을 재정의합니다. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Resources() { } /// - /// Looks up a localized string similar to Properties _Window. + /// Properties _Window과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ViewPropertyGridCommandText { get { @@ -70,7 +70,7 @@ internal static string ViewPropertyGridCommandText { } /// - /// Looks up a localized string similar to Properties Window. + /// Properties Window과(와) 유사한 지역화된 문자열을 찾습니다. /// internal static string ViewPropertyGridCommandToolTip { get { diff --git a/src/Gemini.Modules.PropertyGrid/Properties/Resources.ko.resx b/src/Gemini.Modules.PropertyGrid/Properties/Resources.ko.resx new file mode 100644 index 00000000..c46571b0 --- /dev/null +++ b/src/Gemini.Modules.PropertyGrid/Properties/Resources.ko.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 속성 창 + + + 속성 창 + + \ No newline at end of file diff --git a/src/Gemini/Framework/Document.cs b/src/Gemini/Framework/Document.cs index 6e54a651..cda65a28 100644 --- a/src/Gemini/Framework/Document.cs +++ b/src/Gemini/Framework/Document.cs @@ -89,7 +89,8 @@ Task ICommandHandler.Run(Command command) void ICommandHandler.Update(Command command) { - command.Enabled = this is IPersistedDocument; + var persistedDocument = this as IPersistedDocument; + command.Enabled = (persistedDocument != null && persistedDocument.IsDirty); } async Task ICommandHandler.Run(Command command) @@ -148,6 +149,10 @@ private static async Task DoSaveAs(IPersistedDocument persistedDocument) // Save file. await persistedDocument.Save(filePath); + + // Add to recent files + IShell _shell = IoC.Get(); + _shell.RecentFiles.Update(filePath); } } } \ No newline at end of file diff --git a/src/Gemini/Framework/IPersistedDocument.cs b/src/Gemini/Framework/IPersistedDocument.cs index 2455c8d9..1b30dc6f 100644 --- a/src/Gemini/Framework/IPersistedDocument.cs +++ b/src/Gemini/Framework/IPersistedDocument.cs @@ -5,6 +5,7 @@ namespace Gemini.Framework public interface IPersistedDocument : IDocument { bool IsNew { get; } + bool IsDirty { get; } string FileName { get; } string FilePath { get; } diff --git a/src/Gemini/Framework/Services/IShell.cs b/src/Gemini/Framework/Services/IShell.cs index 2765e04f..7bc01118 100644 --- a/src/Gemini/Framework/Services/IShell.cs +++ b/src/Gemini/Framework/Services/IShell.cs @@ -3,6 +3,7 @@ using Gemini.Modules.MainMenu; using Gemini.Modules.StatusBar; using Gemini.Modules.ToolBars; +using Gemini.Modules.RecentFiles; namespace Gemini.Framework.Services { @@ -16,6 +17,7 @@ public interface IShell : IGuardClose, IDeactivate IMenu MainMenu { get; } IToolBars ToolBars { get; } IStatusBar StatusBar { get; } + IRecentFiles RecentFiles { get; } // TODO: Rename this to ActiveItem. ILayoutItem ActiveLayoutItem { get; set; } diff --git a/src/Gemini/Gemini.csproj b/src/Gemini/Gemini.csproj index 5e543a60..3fd8e2fb 100644 --- a/src/Gemini/Gemini.csproj +++ b/src/Gemini/Gemini.csproj @@ -174,6 +174,10 @@ MainMenuSettingsView.xaml + + + + @@ -185,6 +189,12 @@ + + + + + + @@ -439,6 +449,7 @@ Resources.de.Designer.cs Designer + ResXFileCodeGenerator Resources.Designer.cs @@ -452,6 +463,13 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 파일(_F) + + + 편집 + + + 창(_W) + + + 보기(_V) + + + 새로 만들기(_N) + + + 새로 만들기 + + + 열기(_O) + + + 열기 + + + 최근에 사용한 파일 + + + 최근에 사용한 파일 + + + 다른 이름으로 저장(_A) + + + 다른 이름으로 저장 + + + 저장(_S) + + + 저장 + + + 도움말(_H) + + + 다시 실행(_R) + + + 실행 취소(_U) + + + 실행 취소 + + + 다시 실행 + + + 닫기(_C) + + + 닫기 + + + 끝내기(_X) + + + 끝내기 + + + 문서 {0} + + + 도구(_T) + + + 옵션(_O) + + + 옵션 + + + 모두 저장 + + + 모두 저장 + + + 도구 상자(_X) + + + 도구 상자 + + + 언어: + + + 다시 시작해야 적용됩니다 + + + 옵션 + + + 일반 + + + 환경 + + + 시스템 + + + 블루 + + + 광원 + + + 어둡게 + + + 색 테마: + + + [기본 제목] + + + 기록 + + + 초기 상태 + + + 표준 + + + 카데고리 + + + 도구 상자 + + + 메뉴 자동 감추기 + + + 기록(_H) + + + 기록 + + \ No newline at end of file diff --git a/src/Gemini/Properties/Resources.resx b/src/Gemini/Properties/Resources.resx index 5cb338e1..b7f1b904 100644 --- a/src/Gemini/Properties/Resources.resx +++ b/src/Gemini/Properties/Resources.resx @@ -150,6 +150,9 @@ _New + + New + Untitled {0} @@ -159,6 +162,12 @@ Open + + Recent Files + + + Recent Files + Save _As... @@ -252,4 +261,10 @@ Dark + + Save All + + + Save All + \ No newline at end of file diff --git a/src/Gemini/Properties/Resources.zh-Hans.resx b/src/Gemini/Properties/Resources.zh-Hans.resx index c3e32f90..e4819ad3 100644 --- a/src/Gemini/Properties/Resources.zh-Hans.resx +++ b/src/Gemini/Properties/Resources.zh-Hans.resx @@ -252,4 +252,19 @@ 暗色 + + 最近打开的文件 + + + 最近打开的文件 + + + 保存全部 + + + 保存全部 + + + 新建 + \ No newline at end of file diff --git a/src/Gemini/Properties/Settings.Designer.cs b/src/Gemini/Properties/Settings.Designer.cs index 2ae634e9..3cf53883 100644 --- a/src/Gemini/Properties/Settings.Designer.cs +++ b/src/Gemini/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace Gemini.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -58,5 +58,16 @@ public string LanguageCode { this["LanguageCode"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Collections.Specialized.StringCollection RecentDocuments { + get { + return ((global::System.Collections.Specialized.StringCollection)(this["RecentDocuments"])); + } + set { + this["RecentDocuments"] = value; + } + } } } diff --git a/src/Gemini/Properties/Settings.settings b/src/Gemini/Properties/Settings.settings index 0636e8c3..1a6939f4 100644 --- a/src/Gemini/Properties/Settings.settings +++ b/src/Gemini/Properties/Settings.settings @@ -11,5 +11,8 @@ + + + \ No newline at end of file diff --git a/src/Gemini/Resources/Icons/Close.png b/src/Gemini/Resources/Icons/Close.png new file mode 100644 index 00000000..a9ae49f2 Binary files /dev/null and b/src/Gemini/Resources/Icons/Close.png differ diff --git a/src/Gemini/Resources/Icons/Saveall.png b/src/Gemini/Resources/Icons/Saveall.png new file mode 100644 index 00000000..e429cd44 Binary files /dev/null and b/src/Gemini/Resources/Icons/Saveall.png differ