示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Username = textBox1.Text;
            if (Directory.Exists("data/" + Username))
            {
                MessageBox.Show("This save already exist.");
            }

            else
            {
                Directory.CreateDirectory("data/" + Username);
                StreamWriter Writer = new StreamWriter("data/" + Username + "/" + "user.kkuf");
                Writer.WriteLine(Username);
                Writer.Close();
                File.Create("data/" + Username + "data.kkuf");
                Shop sh = new Shop();
                sh.Show();
            }
        }
示例#2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Username = textBox1.Text;
            if (File.Exists("data/" + Username + "/user.kkuf"))
            {
                StreamWriter Writer = new StreamWriter("data/latest.kkuf");
                Writer.WriteLine(Username);
                Writer.Close();
                latest = textBox1.Text;
                //label3.Text = "Latest save: " + latest;
                Shop sh = new Shop();
                sh.Show();
                Data.Load();
            }

            else
            {
                MessageBox.Show("This save does not exist.");
            }
        }
示例#3
0
        private void CreateBtn_Click(object sender, EventArgs e)
        {
            Username = UsernameTxb.Text;
            if (Directory.Exists("data/users/" + Username))
            {
                MessageBox.Show("This save already exist.");
            }

            else
            {
                Directory.CreateDirectory("data/users/" + Username);
                StreamWriter Writer = new StreamWriter("data/users/" + Username + "/user.kkuf");
                Writer.WriteLine(Username);
                Writer.Close();
                File.Create("data/users/" + Username + "/data.kkuf");
                Shop sh = new Shop();
                sh.Show();
            }

            if (TexturePackCkb.Checked == true)
            {
                TexturePack = "data/texturepacks/" + TexturePackTxb.Text + "/";
            }
        }
示例#4
0
        private void LoadBtn_Click(object sender, EventArgs e)
        {
            Username = UsernameTxb.Text;
            if (File.Exists("data/users/" + Username + "/user.kkuf"))
            {
                StreamWriter Writer = new StreamWriter("data/users/latest.kkuf");
                Writer.WriteLine(Username);
                Writer.Close();
                latest = UsernameTxb.Text;
                //label3.Text = "Latest save: " + latest;
                Shop sh = new Shop();
                sh.Show();
                Data.Load();
            }

            else
            {
                MessageBox.Show("This save does not exist.");
            }

            if (TexturePackCkb.Checked == true)
            {
                TexturePack = "data/texturepacks/" + TexturePackTxb.Text + "/";
            }
        }