示例#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
        private void ChangeBranch_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            SelectBranch frm = new SelectBranch();

            frm.ShowDialog();
            frm.Dispose();
            CurBranch.Text      = UpdateSystem.GetCurrentBranch();
            CurBranch.ForeColor = UpdateSystem.GetCurrentBranchColor();
            BranchToolTip.SetToolTip(CurBranch, UpdateSystem.GetCurrentBranchToolTip());
        }
示例#3
0
        private void InfoDialog_Load(object sender, EventArgs e)
        {
            if (!KeppySynthConfiguratorMain.IsInternetAvailable)
            {
                CFU.Visible = false;
            }

            ComputerInfo CI      = new ComputerInfo();
            String       Version = String.Format("{0}.{1}.{2}", Driver.FileMajorPart, Driver.FileMinorPart, Driver.FileBuildPart);

            VerLabel.Text       = String.Format("Keppy's Synthesizer {0}\n\nCopyright Ⓒ 2011\nKaleidonKep99, Kode54 && Mudlord", Version, DateTime.Now.Year.ToString());
            DriverVer.Text      = ReturnDriverAssemblyVersion(Version, Driver.FilePrivatePart);
            BASSVer.Text        = ReturnBASSAssemblyVersion(BASS.FileVersion, BASS.FilePrivatePart);
            BASSMIDIVer.Text    = ReturnBASSAssemblyVersion(BASSMIDI.FileVersion, BASSMIDI.FilePrivatePart);
            CompiledOn.Text     = GetLinkerTime(Assembly.GetExecutingAssembly(), TimeZoneInfo.Utc).ToString();
            CurBranch.Text      = UpdateSystem.GetCurrentBranch();
            CurBranch.ForeColor = UpdateSystem.GetCurrentBranchColor();
            BranchToolTip.SetToolTip(CurBranch, UpdateSystem.GetCurrentBranchToolTip());

            OSInfo.OSVERSIONINFOEX osVersionInfo = new OSInfo.OSVERSIONINFOEX();
            osVersionInfo.dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSInfo.OSVERSIONINFOEX));

            if (Properties.Settings.Default.IsItPreRelease)
            {
                DriverVer.Text += " (Pre-release build)";
            }

            WinName.Text = String.Format("{0} ({1})", OSInfo.Name, Environment.Is64BitOperatingSystem ? "64-bit" : "32-bit");

            if (Environment.OSVersion.Version.Major == 10) // If OS is Windows 10, get UBR too
            {
                WinVer.Text = String.Format("{0}.{1}.{2} (Update Build Revision {3})",
                                            Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor,
                                            Environment.OSVersion.Version.Build, CurrentVerKey.GetValue("UBR", 0).ToString());
            }
            else // Else, give normal version number
            {
                if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor <= 1)
                {
                    WinVer.Text = String.Format("{0}.{1}.{2} ({3})",
                                                Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor,
                                                Environment.OSVersion.Version.Build, Environment.OSVersion.ServicePack);
                }
                else
                {
                    WinVer.Text = String.Format("{0}.{1}.{2} (Metro)",
                                                Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor,
                                                Environment.OSVersion.Version.Build);
                }
            }

            CheckDateLogo();
        }
示例#4
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;
            }
        }
示例#5
0
        public InfoWindow()
        {
            InitializeComponent();

            VerLabel.Text = ReturnDriverAssemblyVersion(
                "OmniMIDI",
                "CR",
                new int[] { Driver.FileMajorPart, Driver.FileMinorPart, Driver.FileBuildPart, Driver.FilePrivatePart }
                );
            VerLabel.Cursor = Program.SystemHandCursor;

            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 }
                );

            int[] KDMAPIVerRef = { 0, 0, 0, 0 };
            if (KDMAPI.ReturnKDMAPIVer(ref KDMAPIVerRef[0], ref KDMAPIVerRef[1], ref KDMAPIVerRef[2], ref KDMAPIVerRef[3]) != 0)
            {
                KDMAPIVer.Text = ReturnDriverAssemblyVersion(
                    null,
                    "U",
                    KDMAPIVerRef
                    );
            }
            else
            {
                KDMAPIVer.Text = "N/A";
            }

            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)";
            }

            OMBigLogo.Image =
                (DateTime.Today.Month == 4 && DateTime.Today.Day == 1) ? Properties.Resources.OMLauncherFish : Properties.Resources.OMLauncher;

            BB.Location  = new Point(OMBigLogo.Size.Width - BB.Size.Width - 8, OMBigLogo.Size.Height - BB.Size.Height - 8);
            BB.Parent    = OMBigLogo;
            BB.Image     = Properties.Resources.BB;
            BB.BackColor = Color.Transparent;

            BecomePatron.Cursor = Program.SystemHandCursor;
            BecomePatron.Image  = Properties.Resources.PatreonLogo;

            PayPalDonation.Cursor = Program.SystemHandCursor;
            PayPalDonation.Image  = Properties.Resources.PayPalLogo;

            GitHubPage.Cursor = Program.SystemHandCursor;
            GitHubPage.Image  = Properties.Resources.Octocat;

            OMLicense.Cursor = Program.SystemHandCursor;
            OMLicense.Image  = Properties.Resources.TextLogo;

            WinName.Text   = String.Format("{0}", OSInfo.Name.Replace("Microsoft ", ""));
            RAMAmount.Text = SoundFontListExtension.ReturnSoundFontSize(null, "ram", Convert.ToInt64((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;
            }
        }
示例#6
0
        private void InfoDialog_Load(object sender, EventArgs e)
        {
            CurrentLogo.Image = Properties.Resources.KSynthLogo;

            if (!OmniMIDIConfiguratorMain.IsInternetAvailable)
            {
                CFU.Visible = false;
            }

            ComputerInfo CI      = new ComputerInfo();
            String       Version = String.Format("{0}.{1}.{2}", Driver.FileMajorPart, Driver.FileMinorPart, Driver.FileBuildPart);

            VerLabel.Text       = String.Format("OmniMIDI {0}\nⒸ 2011 KaleidonKep99 && SonoSooS\n\nFork of BASSMIDI Driver by Kode54 and Mudlord", Version, DateTime.Now.Year.ToString());
            DriverVer.Text      = ReturnDriverAssemblyVersion(Version, Driver.FilePrivatePart);
            BASSVer.Text        = ReturnBASSAssemblyVersion(BASS.FileVersion, BASS.FilePrivatePart);
            BASSMIDIVer.Text    = ReturnBASSAssemblyVersion(BASSMIDI.FileVersion, BASSMIDI.FilePrivatePart);
            KDMAPIVer.Text      = KDMAPI.KDMAPIVer;
            CurBranch.Text      = UpdateSystem.GetCurrentBranch();
            CurBranch.ForeColor = UpdateSystem.GetCurrentBranchColor();
            BranchToolTip.SetToolTip(CurBranch, UpdateSystem.GetCurrentBranchToolTip());

            OSInfo.OSVERSIONINFOEX osVersionInfo = new OSInfo.OSVERSIONINFOEX();
            osVersionInfo.dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSInfo.OSVERSIONINFOEX));

            if (Properties.Settings.Default.IsItPreRelease)
            {
                DriverVer.Text += " (Pre-release build)";
            }

            WinName.Text = String.Format("{0} ({1})", OSInfo.Name.Replace("Microsoft ", ""), Environment.Is64BitOperatingSystem ? "64-bit" : "32-bit");

            if (Environment.OSVersion.Version.Major == 10) // If OS is Windows 10, get UBR too
            {
                WinVer.Text = String.Format("Version {0} (Release {1}, Revision {2})",
                                            CurrentVerKey.GetValue("ReleaseId", 0).ToString(), Environment.OSVersion.Version.Build, CurrentVerKey.GetValue("UBR", 0).ToString());
            }
            else // Else, give normal version number
            {
                if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor > 1)
                {
                    WinVer.Text = String.Format("{0}.{1}.{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}.{2} ({3})",
                                                    Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor,
                                                    Environment.OSVersion.Version.Build, Environment.OSVersion.ServicePack);
                    }
                    else
                    {
                        WinVer.Text = String.Format("{0}.{1}.{2}",
                                                    Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor,
                                                    Environment.OSVersion.Version.Build);
                    }
                }
            }
        }