Beispiel #1
0
        private void End_Load(object sender, EventArgs e)
        {
            VERSION version = new VERSION();

            this.Text = version.VersionActuelle();

            lblTitre.Text = version.VersionActuelle();
        }
Beispiel #2
0
        private void Repair_Load(object sender, EventArgs e)
        {
            VERSION version = new VERSION();

            this.Text = version.VersionActuelle();

            bCacherFenetre       = true;
            cbxCacherCMD.Checked = true;

            openFileDialog1.FileName = "";
            openFileDialog1.Title    = "Open WIM file";
            openFileDialog1.Filter   = "WIM files|*.wim";

            #region VERSION_WINDOWS
            string r = "";
            using (ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem"))
            {
                ManagementObjectCollection information = searcher.Get();
                if (information != null)
                {
                    foreach (ManagementObject obj in information)
                    {
                        r = obj["Caption"].ToString().ToString();
                    }
                }
                r = r.Replace("NT 5.1.2600", "XP");
                r = r.Replace("NT 5.2.3790", "Server 2003");

                string ProductName = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "").ToString();

                winVersion.Text = r + " " + ProductName;

                #endregion
            }
        }
Beispiel #3
0
        private void InfosAuteur_Load(object sender, EventArgs e)
        {
            string r = "";
            string f = "";

            VERSION version = new VERSION();

            lblVersionWin.Text = version.VersionActuelle();

            using (ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem"))
            {
                ManagementObjectCollection information = searcher.Get();
                if (information != null)
                {
                    foreach (ManagementObject obj in information)
                    {
                        r = obj["Caption"].ToString().ToString();
                        f = obj["OSArchitecture"].ToString();
                    }
                }
                r = r.Replace("NT 5.1.2600", "XP");
                r = r.Replace("NT 5.2.3790", "Server 2003");

                string ProductName = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "").ToString();

                lblVersion.Text = "Version : " + r + "\n\nVersion number : " + ProductName + "\n\nArchitecture : " + f;
            }
        }
Beispiel #4
0
        private void Accueil_Load(object sender, EventArgs e)
        {
            try
            {
                if (VERIFICATION_ACTIFOUPAS == true)
                {
                    Cursor.Current = Cursors.AppStarting;
                    WebClient MAJ          = new WebClient();
                    string    ACTIF_OU_PAS = MAJ.DownloadString("https://brunopaiva.ch/Actif.txt");

                    if (ACTIF_OU_PAS != "1")
                    {
                        Cursor.Current = Cursors.Default;
                        MessageBox.Show("Redows is not available at the moment.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                        Quit quit = new Quit();

                        this.Hide();

                        quit.ShowDialog();
                    }
                }
            }
            catch
            {
                if (VERIFICATION_ACTIFOUPAS == true)
                {
                    VERIFICATION_ACTIFOUPAS = true;
                }
                else
                {
                    MessageBox.Show("Redows was unable to contact the central server.", "Network error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Cursor.Current          = Cursors.Default;
                    VERIFICATION_ACTIFOUPAS = false;
                }
            }

            lblVersion.Text = VERSION_MINILABEL;

            VERSION version = new VERSION();

            this.Text = version.VersionActuelle();

            lblTitre.Text = version.VersionActuelle();
        }