Exemple #1
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;
            numericUpDown1.Text      = GlobalVars.BotCount.ToString();
            checkBox1.Checked        = GlobalVars.Shadows;
        }
Exemple #2
0
        void Button1Click(object sender, EventArgs e)
        {
            SecurityFuncs.WriteConfigValues();
            ScriptGenerator.GenerateScriptForClient();
            //temp domain
            string exefile = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Cypher.exe";
            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);
            this.Close();
        }
Exemple #3
0
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     base.OnFormClosing(e);
     SecurityFuncs.WriteConfigValues();
 }