Esempio n. 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());
 }
Esempio n. 2
0
 public TextEditorSettings CopyTo(TextEditorSettings other)
 {
     other.FontFamily           = this.FontFamily;
     other.FontSize             = this.FontSize;
     other.ShowLineNumbers      = this.ShowLineNumbers;
     other.AutoHighlightRefs    = this.AutoHighlightRefs;
     other.HighlightCurrentLine = this.HighlightCurrentLine;
     other.WordWrap             = this.WordWrap;
     return(other);
 }
Esempio n. 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);
        }
Esempio n. 4
0
 public TextEditorSettings CopyTo(TextEditorSettings other)
 {
     other.FontFamily = this.FontFamily;
     other.FontSize = this.FontSize;
     other.ShowLineNumbers = this.ShowLineNumbers;
     other.AutoHighlightRefs = this.AutoHighlightRefs;
     other.HighlightCurrentLine = this.HighlightCurrentLine;
     other.WordWrap = this.WordWrap;
     return other;
 }