示例#1
0
        public ChunkAnalyzer()
        {
            InitializeComponent();

            RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("SOFTWARE");
            if (Array.Exists(softwareKey.GetSubKeyNames(), delegate(string s) { return s.CompareTo("Maxis") == 0; }))
            {
                RegistryKey maxisKey = softwareKey.OpenSubKey("Maxis");
                if (Array.Exists(maxisKey.GetSubKeyNames(), delegate(string s) { return s.CompareTo("The Sims Online") == 0; }))
                {
                    RegistryKey tsoKey = maxisKey.OpenSubKey("The Sims Online");
                    string installDir = (string)tsoKey.GetValue("InstallDir");
                    installDir += "\\TSOClient\\";
                    m_TSOPath = installDir;
                    LblTSOPath.Text = "TSO path: " + m_TSOPath;
                }
                else
                {
                    LblTSOPath.Text = "TSO was not found, please specify path: ";
                    TxtTSOPath.Visible = true;
                }
            }
            else
                LblTSOPath.Text = "TSO path: " + m_TSOPath;

            m_OnUpdateStatus = new UpdateStatusDelegate(UpdateStatus);
            m_OnFoundChunk = new FoundChunkDelegate(FoundChunk);
        }
示例#2
0
        public ChunkAnalyzer()
        {
            InitializeComponent();

            RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("SOFTWARE");

            if (Array.Exists(softwareKey.GetSubKeyNames(), delegate(string s) { return(s.CompareTo("Maxis") == 0); }))
            {
                RegistryKey maxisKey = softwareKey.OpenSubKey("Maxis");
                if (Array.Exists(maxisKey.GetSubKeyNames(), delegate(string s) { return(s.CompareTo("The Sims Online") == 0); }))
                {
                    RegistryKey tsoKey     = maxisKey.OpenSubKey("The Sims Online");
                    string      installDir = (string)tsoKey.GetValue("InstallDir");
                    installDir     += "\\TSOClient\\";
                    m_TSOPath       = installDir;
                    LblTSOPath.Text = "TSO path: " + m_TSOPath;
                }
                else
                {
                    LblTSOPath.Text    = "TSO was not found, please specify path: ";
                    TxtTSOPath.Visible = true;
                }
            }
            else
            {
                LblTSOPath.Text = "TSO path: " + m_TSOPath;
            }

            m_OnUpdateStatus = new UpdateStatusDelegate(UpdateStatus);
            m_OnFoundChunk   = new FoundChunkDelegate(FoundChunk);
        }