示例#1
0
        private void label19_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.osuUserName = null;
            Properties.Settings.Default.osuUserID   = null;
            Properties.Settings.Default.loggedin    = false;
            Form lgd = new ResetUser();

            lgd.Show();
            this.Hide();
        }
示例#2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Start.iList.Add(this);
            String UserName = Environment.UserName;

            this.FormBorderStyle = FormBorderStyle.None;
            System.IO.Directory.CreateDirectory(Config.mainDir);
            bool vip = false;

            if (vip == true)
            {
                pictureBox28.Visible = true;
            }
            else
            {
                pictureBox28.Visible = false;
            }
            using (var client = new WebClient())
            {
                String newestver = "";
                try
                {
                    string getver = client.DownloadString(Config.localserv + "\ver\ver.txt");
                    newestver = client.DownloadString(getver);
                }
                catch
                {
                }
                if (newestver == ver)
                {
                }
                else
                {
                    MessageBox.Show("A new Version is available This ver: " + ver + " New ver: " + newestver);
                    try
                    {
                        System.Diagnostics.Process.Start(Config.siteforupadate);
                    }
                    catch
                    {
                        Form error = new errornet("355 ", "WebBrowser not Found", "The WebBrowser for the Update could'nt Start", "Now you must open the Page by self");
                        error.Show();
                    }
                }
            }



            if (Properties.Settings.Default.loggedin == true)
            {
            }
            if (Properties.Settings.Default.loggedin == true)
            {
                if (Properties.Settings.Default.loggedinnew == true)
                {
                }
                else
                {
                    using (var client = new WebClient())
                    {
                    }
                }
            }
            if (Properties.Settings.Default.loggedinnew == true)
            {
                using (var client = new WebClient())
                {
                    if (Properties.Settings.Default.osuUserID == "0")
                    {
                        soos = rand.Next(1, 1000);
                        client.DownloadFile("https://a.ppy.sh/" + Properties.Settings.Default.osuUserID, Config.mainDir + "/pb" + soos + ".png");
                        pictureBox10.Image = Image.FromFile(Config.mainDir + "/pb" + soos + ".png");
                        Properties.Settings.Default.loggedinnew = false;
                        Properties.Settings.Default.Save();
                    }
                    else
                    {
                    }
                }
            }
            else
            {
                Properties.Settings.Default.osuUserName = null;
                Properties.Settings.Default.osuUserID   = null;
                Properties.Settings.Default.loggedin    = false;
                ResetUser otherForm = new ResetUser();
                otherForm.FormClosed += new FormClosedEventHandler(otherForm_FormClosed);
                this.WindowState      = FormWindowState.Minimized;
                this.ShowInTaskbar    = false;
                otherForm.Show();
            }

            if (Properties.Settings.Default.loggedin == true)
            {
                label14.Text = Properties.Settings.Default.osuUserName;
                label24.Text = "( " + Properties.Settings.Default.osuUserID + " )";
                using (var client = new WebClient())
                {
                    try
                    {
                        client.DownloadFile("https://a.ppy.sh/" + Properties.Settings.Default.osuUserID, Config.mainDir + "/pb" + soos + ".png");
                    }
                    catch {}
                }
                try
                {
                    pictureBox10.Image = Image.FromFile(Config.mainDir + "/pb" + soos + ".png");
                }
                catch
                {
                    using (var client = new WebClient())
                    {
                        client.DownloadFile("https://marc.enjuu.click/manager/user.png", Config.mainDir + "/nli.png");
                    }
                    pictureBox10.Image = Image.FromFile(Config.mainDir + "/nli.png");
                }
            }
            else
            {
                label14.Text = "Currently not Logged In!";
                label24.Text = null;
                using (var client = new WebClient())
                {
                    client.DownloadFile("https://marc.enjuu.click/manager/user.png", Config.mainDir + "/nli.png");
                }
                pictureBox10.Image = Image.FromFile(Config.mainDir + "/nli.png");
                Properties.Settings.Default.osuUserName = null;
                Properties.Settings.Default.osuUserID   = null;
                Properties.Settings.Default.loggedin    = false;
                ResetUser otherForm = new ResetUser();
                otherForm.FormClosed += new FormClosedEventHandler(otherForm_FormClosed);
                otherForm.Show();
                this.WindowState   = FormWindowState.Minimized;
                this.ShowInTaskbar = false;
            }
        }