Ejemplo n.º 1
0
        public frmEditList(EditorType t, string gamePath)
        {
            InitializeComponent();
            m_EditWhat = t;
            m_sPath    = gamePath;

            switch (m_EditWhat)
            {
            case EditorType.editNames:
                nameLists = new CNameLists(m_sPath);
                bool success = nameLists.loadNameLists();
                if (!success)
                {
                    success = nameLists.readLPNameLists();
                }

                if (success)
                {
                    txtFemale.Text = nameLists.getFemaleList();
                    txtMale.Text   = nameLists.getMaleList();
                }
                break;

            case EditorType.editClothesWork:
            case EditorType.editClothesSport:
            case EditorType.editClothesCasual:
                lblLeft.Text  = "Male clothing";
                lblRight.Text = "Female clothing";

                CClothLists.ClothType ct = CClothLists.ClothType.ctCasual;
                switch (t)
                {
                case EditorType.editClothesSport:
                    ct = CClothLists.ClothType.ctSport;
                    break;

                case EditorType.editClothesWork:
                    ct = CClothLists.ClothType.ctWork;
                    break;
                }

                clothLists = new CClothLists(m_sPath, ct);
                bool successCl = clothLists.loadClothList();
                if (!successCl)
                {
                    successCl = clothLists.readLPClothList();
                }

                if (successCl)
                {
                    txtFemale.Text = clothLists.getFemaleList();
                    txtMale.Text   = clothLists.getMaleList();
                }
                break;
            }
        }
Ejemplo n.º 2
0
        private void btnLaunch_Click(object sender, EventArgs e)
        {
            if (File.Exists(m_sPath + "lifeplay.exe"))
            {
                WriteModControlFile();

                if (CNameLists.hasCustomNameList(m_sPath))
                {
                    CNameLists nameLists = new CNameLists(m_sPath);
                    if (nameLists.loadNameLists())
                    {
                        nameLists.writeLifePlayNameLists(m_sPath);
                    }
                }

                if (CClothLists.hasCustomClothLists(m_sPath, CClothLists.ClothType.ctCasual))
                {
                    CClothLists clothList = new CClothLists(m_sPath, CClothLists.ClothType.ctCasual);
                    if (clothList.loadClothList())
                    {
                        clothList.writeLifePlayClothList(m_sPath);
                    }
                }

                if (CClothLists.hasCustomClothLists(m_sPath, CClothLists.ClothType.ctWork))
                {
                    CClothLists clothList = new CClothLists(m_sPath, CClothLists.ClothType.ctWork);
                    if (clothList.loadClothList())
                    {
                        clothList.writeLifePlayClothList(m_sPath);
                    }
                }

                if (CClothLists.hasCustomClothLists(m_sPath, CClothLists.ClothType.ctSport))
                {
                    CClothLists clothList = new CClothLists(m_sPath, CClothLists.ClothType.ctSport);
                    if (clothList.loadClothList())
                    {
                        clothList.writeLifePlayClothList(m_sPath);
                    }
                }

#if !DEBUG
                Process.Start(m_sPath + "lifeplay.exe");
#endif
            }
            else
            {
                MessageBox.Show("Ouch! I could not find the 'LifePlay.exe' in the same directory as 'LPLauncher.exe'.\n\nPlease make sure you extracted the LPLauncher into your LifePlay game directory.\n\nCheck the readme.txt file for further information. Thanks...", "LifePlay not found :-(");
            }
        }