示例#1
0
        public static void ShowWelcome(Control owner)
        {
            var notes    = string.Empty;
            var assembly = Assembly.GetExecutingAssembly();
            var version  = assembly.GetName().Version;

            var releaseresource = assembly.GetManifestResourceNames()
                                  .Where(n => n.ToLowerInvariant().Contains(".releasenotes.") && ExtractReleaseVersions(n) <= version)
                                  .OrderByDescending(n => ExtractReleaseVersions(n))
                                  .FirstOrDefault();

            if (releaseresource != null)
            {
                using (Stream stream = assembly.GetManifestResourceStream(releaseresource))
                {
                    if (stream != null)
                    {
                        using (StreamReader reader = new StreamReader(stream))
                        {
                            notes = reader.ReadToEnd();
                        }
                    }
                }
            }
            var welcome = new Welcome();

            welcome.txtWelcome.Text = welcome.txtWelcome.Text.Replace("{version}", version.ToString());
            welcome.txtNotes.Rtf    = notes.ToString();
            welcome.ShowDialog(owner);
        }
示例#2
0
        public static void ShowWelcome(Control owner)
        {
            var assembly = Assembly.GetExecutingAssembly();
            var version  = assembly.GetName().Version;
            var verurl   = $"{version.Major}-{version.Minor}-{version.Build}";
            var url      = $"https://jonasr.app/fxb/releases/{verurl}#content";

            url = Utils.ProcessURL(url);

            var welcome = new Welcome();

            welcome.webRelease.Source = new Uri(url);
            welcome.ShowDialog(owner);
        }
示例#3
0
        public static void ShowWelcome(Control owner)
        {
            var assembly = Assembly.GetExecutingAssembly();
            var version  = assembly.GetName().Version;

            var releaseresources = assembly.GetManifestResourceNames()
                                   .Where(n => n.ToLowerInvariant().Contains(".releasenotes."))
                                   .Select(n => new ReleaseDoc(n))
                                   .Where(n => n.Version <= version)
                                   .OrderByDescending(n => n.Version);

            var welcome = new Welcome();

            welcome.cmbVersions.Items.AddRange(releaseresources.ToArray());
            welcome.txtWelcome.Text = welcome.txtWelcome.Text.Replace("{version}", version.ToString());
            welcome.ShowDialog(owner);
        }