Exemple #1
0
        private void frm_main_Load(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;
            MdiClient mdiClient;

            foreach (Control ctrl in this.Controls)
            {
                try {
                    mdiClient           = (MdiClient)ctrl;
                    mdiClient.BackColor = this.BackColor;
                } catch { }
            }

            if (Directory.Exists("Titles"))
            {
                if (File.Exists("Titles\\Titles.txt"))
                {
                    Xbox.Titles_s = new List <Xbox.Titles>();
                    foreach (string line in File.ReadAllLines("Titles\\Titles.txt"))
                    {
                        if (line.StartsWith("//"))
                        {
                            continue;
                        }
                        Xbox.Titles_s.Add(new Xbox.Titles {
                            title = BitConverter.ToUInt32(Conversion.HexStringToBytes(line.Split('=')[0]).Reverse().ToArray(), 0),
                            name  = line.Split('=')[1]
                        });
                    }
                }
            }
            else
            {
                Directory.CreateDirectory("Titles");
            }

            tsmi_con_default.Text = String.Format("Default [{0}]", Vars.xbMgr.DefaultConsole);
            if (Settings.bAutoConnect)
            {
                this.Status("Auto-Connecting...");
                Xbox.ThreadedConnection().Start();
            }
        }