Пример #1
0
 public DisplayAppSettingsTab(TextEditorSettings textEditorSettings, FileTreeViewSettings fileTreeViewSettings, FileTabManagerSettings fileTabManagerSettings)
 {
     this.textEditorSettings = textEditorSettings;
     this.fileTreeViewSettings = fileTreeViewSettings;
     this.fileTabManagerSettings = fileTabManagerSettings;
     this.displayAppSettingsVM = new DisplayAppSettingsVM(textEditorSettings.Clone(), fileTreeViewSettings.Clone(), fileTabManagerSettings.Clone());
 }
Пример #2
0
 public FileTreeViewSettings CopyTo(FileTreeViewSettings other)
 {
     other.SyntaxHighlight = this.SyntaxHighlight;
     other.SingleClickExpandsTreeViewChildren = this.SingleClickExpandsTreeViewChildren;
     other.ShowAssemblyVersion        = this.ShowAssemblyVersion;
     other.ShowAssemblyPublicKeyToken = this.ShowAssemblyPublicKeyToken;
     other.ShowToken            = this.ShowToken;
     other.DeserializeResources = this.DeserializeResources;
     other.MemberKind0          = this.MemberKind0;
     other.MemberKind1          = this.MemberKind1;
     other.MemberKind2          = this.MemberKind2;
     other.MemberKind3          = this.MemberKind3;
     other.MemberKind4          = this.MemberKind4;
     return(other);
 }
Пример #3
0
        public DisplayAppSettingsVM(TextEditorSettings textEditorSettings, FileTreeViewSettings fileTreeViewSettings, FileTabManagerSettings fileTabManagerSettings)
        {
            this.textEditorSettings = textEditorSettings;
            this.fileTreeViewSettings = fileTreeViewSettings;
            this.fileTabManagerSettings = fileTabManagerSettings;
            this.fontFamilies = null;
            this.fontFamilyVM = new FontFamilyVM(textEditorSettings.FontFamily);
            Task.Factory.StartNew(() => {
                AppCulture.InitializeCulture();
                return Fonts.SystemFontFamilies.Where(a => !FontUtils.IsSymbol(a)).OrderBy(a => a.Source.ToUpperInvariant()).Select(a => new FontFamilyVM(a)).ToArray();
            })
            .ContinueWith(t => {
                var ex = t.Exception;
                if (!t.IsCanceled && !t.IsFaulted)
                    FontFamilies = t.Result;
            }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());

            var defObjs = typeof(MemberKind).GetEnumValues().Cast<MemberKind>().ToArray();
            this.memberKindVMs = new MemberKindVM[defObjs.Length];
            for (int i = 0; i < defObjs.Length; i++)
                this.memberKindVMs[i] = new MemberKindVM(defObjs[i], ToString(defObjs[i]));
            this.memberKindVMs2 = this.memberKindVMs.ToArray();

            this.MemberKind0 = this.memberKindVMs.First(a => a.Object == fileTreeViewSettings.MemberKind0);
            this.MemberKind1 = this.memberKindVMs.First(a => a.Object == fileTreeViewSettings.MemberKind1);
            this.MemberKind2 = this.memberKindVMs.First(a => a.Object == fileTreeViewSettings.MemberKind2);
            this.MemberKind3 = this.memberKindVMs.First(a => a.Object == fileTreeViewSettings.MemberKind3);
            this.MemberKind4 = this.memberKindVMs.First(a => a.Object == fileTreeViewSettings.MemberKind4);
        }
Пример #4
0
 public FileTreeViewSettings CopyTo(FileTreeViewSettings other)
 {
     other.SyntaxHighlight = this.SyntaxHighlight;
     other.SingleClickExpandsTreeViewChildren = this.SingleClickExpandsTreeViewChildren;
     other.ShowAssemblyVersion = this.ShowAssemblyVersion;
     other.ShowAssemblyPublicKeyToken = this.ShowAssemblyPublicKeyToken;
     other.ShowToken = this.ShowToken;
     other.DeserializeResources = this.DeserializeResources;
     other.MemberKind0 = this.MemberKind0;
     other.MemberKind1 = this.MemberKind1;
     other.MemberKind2 = this.MemberKind2;
     other.MemberKind3 = this.MemberKind3;
     other.MemberKind4 = this.MemberKind4;
     return other;
 }