예제 #1
0
        private void ChangeBranch_Click(object sender, EventArgs e)
        {
            new SelectBranch().ShowDialog();

            CurBranch.Text      = UpdateSystem.GetCurrentBranch();
            CurBranch.ForeColor = UpdateSystem.GetCurrentBranchColor();
            BranchToolTip.SetToolTip(CurBranch, UpdateSystem.GetCurrentBranchToolTip());
        }
예제 #2
0
        public InfoWindow()
        {
            InitializeComponent();

            VerLabel.Text = ReturnDriverAssemblyVersion(
                "OmniConverter",
                "CR",
                new int[] { Converter.Major, Converter.Minor, Converter.Build, 0 }
                );

            BASSVer.Text = ReturnDriverAssemblyVersion(
                null,
                "U",
                new int[] { BASS.FileMajorPart, BASS.FileMinorPart, BASS.FileBuildPart, BASS.FilePrivatePart }
                );

            BASSMIDIVer.Text = ReturnDriverAssemblyVersion(
                null,
                "U",
                new int[] { BASSMIDI.FileMajorPart, BASSMIDI.FileMinorPart, BASSMIDI.FileBuildPart, BASSMIDI.FilePrivatePart }
                );

            CopyrightLabel.Text = String.Format(CopyrightLabel.Text, DateTime.Today.Year);

            CurBranch.Text      = UpdateSystem.GetCurrentBranch();
            CurBranch.ForeColor = UpdateSystem.GetCurrentBranchColor();
            BranchToolTip.SetToolTip(CurBranch, UpdateSystem.GetCurrentBranchToolTip());
            if (Properties.Settings.Default.PreRelease)
            {
                VerLabel.Text += " (PR)";
            }

            // Date check :^)

            OCBigLogo.Image = IconSystem.GetResizedIcon(Properties.Resources.OCLogo, OCBigLogo.Width, OCBigLogo.Height);

            GitHubPage.Cursor = Program.SystemHandCursor;
            GitHubPage.Image  = IconSystem.GetResizedIcon(Properties.Resources.Octocat, GitHubPage.Width, GitHubPage.Height);

            OMLicense.Cursor = Program.SystemHandCursor;
            OMLicense.Image  = IconSystem.GetResizedIcon(Properties.Resources.License, OMLicense.Width, OMLicense.Height);

            WinName.Text   = String.Format("{0}", OSInfo.Name.Replace("Microsoft ", ""));
            RAMAmount.Text = DataCheck.BytesToHumanReadableSize(Convert.ToUInt64((new ComputerInfo()).TotalPhysicalMemory));
            switch (Environment.OSVersion.Version.Major)
            {
            case 10:
                WinVer.Text = String.Format(
                    "Version {0} ({1})\nRelease {2}, Revision {3}",
                    WVerKey.GetValue("ReleaseId", 0).ToString(),
                    Environment.Is64BitOperatingSystem ? "64-bit" : "32-bit",
                    Environment.OSVersion.Version.Build,
                    WVerKey.GetValue("UBR", 0).ToString()
                    );
                break;

            case 6:
                if (Environment.OSVersion.Version.Minor > 1)
                {
                    WinVer.Text = String.Format(
                        "Version {0}.{1}\nBuild {2}",
                        Environment.OSVersion.Version.Major,
                        Environment.OSVersion.Version.Minor,
                        Environment.OSVersion.Version.Build
                        );
                }
                else
                {
                    if (Int32.Parse(Regex.Match(Environment.OSVersion.ServicePack, @"\d+").Value, NumberFormatInfo.InvariantInfo) > 0)
                    {
                        WinVer.Text = String.Format("{0}.{1}\nBuild {2}, Service Pack {3}",
                                                    Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor,
                                                    Environment.OSVersion.Version.Build, Environment.OSVersion.ServicePack);
                    }
                    else
                    {
                        WinVer.Text = String.Format("{0}.{1}\nBuild {2}",
                                                    Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor,
                                                    Environment.OSVersion.Version.Build);
                    }
                }
                break;
            }
        }