コード例 #1
0
 public AboutWindowViewModel()
 {
     WeakSubscriptionManager.Subscribe(App.Current.LocaleManager, nameof(LocaleManager.UICultureChanged), this);
     AssemblyVersions = VersionStatistics.LoadedAssemblyVersions.Select(kvp => new AssemblyVersionViewModel(kvp.Key, kvp.Value));
     CloseCommand     = ReactiveCommand.Create(() => AttachedView.Close());
     Changelog        = File.ReadAllText("Changelog.md");
     Attributions     = new AttributionViewModel();
 }
コード例 #2
0
        public AboutWindowViewModel()
        {
            WeakSubscriptionManager.Subscribe(App.Current.Locales, nameof(LocaleManager.UICultureChanged), this);
            AssemblyVersions = VersionStatistics.LoadedAssemblyVersions.Select(kvp => new AssemblyVersionViewModel(kvp.Key, kvp.Value));
            CloseCommand     = ReactiveCommand.Create(() => AttachedView.Close());

            var changelogFile = new FileInfo(Path.Combine(Program.ApplicationDirectory.FullName, "Changelog.md"));

            Changelog = changelogFile.Exists ? File.ReadAllText(changelogFile.FullName) : string.Empty;

            Attributions = new AttributionViewModel();
        }