/// <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);
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var html = Changelogs.GetChangelogHtml(listBox1.SelectedItem.ToString());

            webBrowser1.DocumentText = html;
            richTextBox1.Text        = html;
        }
Exemple #3
0
        private async void ChangeLog_Load(object sender, EventArgs e)
        {
            btnLoad.Enabled = false;
            changelogs      = await Changelogs.GetChangelogs();

            listBox1.Items.AddRange(changelogs.GetAvailableVersions());
            btnLoad.Enabled = true;
        }
        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);
            }
        }
Exemple #5
0
 private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     textBox1.Text = Changelogs.GetChangelogUrl(listBox1.SelectedItem.ToString());
 }
Exemple #6
0
 private void ChangeLog_Load(object sender, EventArgs e)
 {
     listBox1.Items.AddRange(Changelogs.GetAvailableVersions());
 }