コード例 #1
0
        /// <summary>
        /// Show a notification with the changelog to new users.
        /// </summary>
        private void ShowChangelog()
        {
            var v = Package.Current.Id.Version;
            var currentVersion = $"{v.Major}.{v.Minor}.{v.Build}";

            var lastVersion = App._LocalSettings.Get <string>(UserSettings.LastVersion);

            if (currentVersion == lastVersion)
            {
                return;
            }

            vm.InfoBarTitle   = $"Welcome to Crypto Tracker v{currentVersion}";
            vm.InfoBarMessage = "New in this version: \n";

            if (App._LocalSettings.Get <bool>(UserSettings.IsNewUser))
            {
                App._LocalSettings.Set(UserSettings.IsNewUser, false);
                vm.InfoBarMessage += Changelogs.FormatChangelog(Changelogs.MajorChangelog);
            }
            else
            {
                vm.InfoBarMessage += Changelogs.FormatChangelog(Changelogs.CurrentChangelog);
            }

            vm.InfoBarOpened = true;
            App._LocalSettings.Set(UserSettings.LastVersion, currentVersion);
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var html = Changelogs.GetChangelogHtml(listBox1.SelectedItem.ToString());

            webBrowser1.DocumentText = html;
            richTextBox1.Text        = html;
        }
コード例 #3
0
ファイル: ChangeLog.cs プロジェクト: CmlLib/CmlLib.Core
        private async void ChangeLog_Load(object sender, EventArgs e)
        {
            btnLoad.Enabled = false;
            changelogs      = await Changelogs.GetChangelogs();

            listBox1.Items.AddRange(changelogs.GetAvailableVersions());
            btnLoad.Enabled = true;
        }
コード例 #4
0
        private void SettingsChangelog_Loaded(object sender, RoutedEventArgs e)
        {
            var version = Package.Current.Id.Version;

            foreach (var changelog in Changelogs.LatestChangelogs)
            {
                var changes = Changelogs.FormatChangelog(changelog.Value);
                var s       = new StackPanel()
                {
                    Children =
                    {
                        new TextBlock()
                        {
                            Text = changelog.Key, Style = Resources["SettingsSectionSubtitle"] as Style
                        },
                        new TextBlock()
                        {
                            Text = changes
                        }
                    }
                };
                ChangeLogList.Children.Add(s);
            }
        }
コード例 #5
0
 private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     textBox1.Text = Changelogs.GetChangelogUrl(listBox1.SelectedItem.ToString());
 }
コード例 #6
0
 private void ChangeLog_Load(object sender, EventArgs e)
 {
     listBox1.Items.AddRange(Changelogs.GetAvailableVersions());
 }