Exemple #1
0
        void Button1Click(object sender, EventArgs e)
        {
            SecurityFuncs.WriteConfigValues();
            ScriptGenerator.GenerateScriptForClient();
            //temp domain
            string exefile = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\" + GlobalVars.EXEName;
            string quote   = "\"";
            string args    = "-script " + quote + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + GlobalVars.ScriptLuaFile + quote + " " + quote + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\maps\\" + listBox2.SelectedItem.ToString() + quote;

            Process.Start(exefile, args);
        }
Exemple #2
0
        void NameFormLoad(object sender, EventArgs e)
        {
            if (!File.Exists(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\" + GlobalVars.Config))
            {
                SecurityFuncs.GeneratePlayerID();
                SecurityFuncs.WriteConfigValues();
                SecurityFuncs.ReadConfigValues();
            }
            else
            {
                SecurityFuncs.ReadConfigValues();
            }
            textBox1.Text = GlobalVars.Name;

            string hatdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\content\\hats";

            if (Directory.Exists(hatdir))
            {
                DirectoryInfo dinfo = new DirectoryInfo(hatdir);
                FileInfo[]    Files = dinfo.GetFiles("*.rbxm");
                foreach (FileInfo file in Files)
                {
                    if (file.Name.Equals(String.Empty))
                    {
                        continue;
                    }

                    listBox1.Items.Add(file.Name);
                }
                listBox1.SelectedItem = GlobalVars.HatName;
                Image icon1 = Image.FromFile(hatdir + @"\\" + GlobalVars.HatName.Replace(".rbxm", "") + ".png");
                pictureBox1.Image = icon1;
            }

            string mapdir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\maps";

            if (Directory.Exists(mapdir))
            {
                DirectoryInfo dinfo = new DirectoryInfo(mapdir);
                FileInfo[]    Files = dinfo.GetFiles("*.rbxl");
                foreach (FileInfo file in Files)
                {
                    listBox2.Items.Add(file.Name);
                }
                listBox2.SelectedItem = "Baseplate.rbxl";
            }

            PartSelectionLabel2.Text = SelectedPart;
            HeadButton1.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_HeadColor);
            TorsoButton2.BackColor   = ConvertStringtoColor(GlobalVars.ColorMenu_TorsoColor);
            RArmButton3.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_RightArmColor);
            LArmButton4.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_LeftArmColor);
            RLegButton5.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_RightLegColor);
            LLegButton6.BackColor    = ConvertStringtoColor(GlobalVars.ColorMenu_LeftLegColor);
            comboBox1.SelectedIndex  = GlobalVars.AASamples;
            checkBox1.Checked        = GlobalVars.Shadows;

            if (GlobalVars.EXEName == "RobloxShaders.exe")
            {
                checkBox2.Checked = true;
            }
            else
            {
                checkBox2.Checked = false;
            }

            if (GlobalVars.AnimatedCharacter == false)
            {
                groupBox1.Enabled = true;
                if (GlobalVars.UseRandomColors == true)
                {
                    label9.Enabled      = false;
                    button3.Enabled     = false;
                    button4.Enabled     = false;
                    button5.Enabled     = false;
                    button6.Enabled     = false;
                    button7.Enabled     = false;
                    button9.Enabled     = false;
                    button10.Enabled    = false;
                    button11.Enabled    = false;
                    panel1Head.Enabled  = false;
                    panel2Torso.Enabled = false;
                    panel3LLeg.Enabled  = false;
                    panel4LArm.Enabled  = false;
                    panel5RLeg.Enabled  = false;
                    panel6RArm.Enabled  = false;
                    checkBox4.Checked   = true;
                    SetColorsToPreset(1);
                    GlobalVars.PlayerColorPreset = 1;
                }
                else
                {
                    label9.Enabled      = true;
                    button3.Enabled     = true;
                    button4.Enabled     = true;
                    button5.Enabled     = true;
                    button6.Enabled     = true;
                    button7.Enabled     = true;
                    button9.Enabled     = true;
                    button10.Enabled    = true;
                    button11.Enabled    = true;
                    panel1Head.Enabled  = true;
                    panel2Torso.Enabled = true;
                    panel3LLeg.Enabled  = true;
                    panel4LArm.Enabled  = true;
                    panel5RLeg.Enabled  = true;
                    panel6RArm.Enabled  = true;
                    checkBox4.Checked   = false;
                }
                ToggleCustomization(false);
                checkBox3.Checked = true;
            }
            else
            {
                groupBox1.Enabled = false;
                if (GlobalVars.UseRandomColors == true)
                {
                    checkBox4.Checked = true;
                }
                ToggleCustomization(true);
                checkBox3.Checked = false;
            }

            SetColorsToPreset(GlobalVars.PlayerColorPreset);
        }
Exemple #3
0
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     base.OnFormClosing(e);
     SecurityFuncs.WriteConfigValues();
 }