示例#1
0
        public searchForm(mainForm mf)
        {
            InitializeComponent();
            this.mf = mf;

            try
            {
                if ((RK = Registry.CurrentUser.OpenSubKey("Software\\PHPExecuter\\Search")) == null)
                {
                    RK = Registry.CurrentUser.CreateSubKey("Software\\PHPExecuter\\Search");
                }
                if (RK.GetValue("wholeword") != null)
                {
                    chbWholeWord.Checked = (RK.GetValue("wholeword").ToString().Equals("true") ? true : false);
                }

                RK.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(this, e.Message, "Registry", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            try
            {
                if ((RK = Registry.CurrentUser.OpenSubKey("Software\\PHPExecuter\\Search")) == null)
                {
                    RK = Registry.CurrentUser.CreateSubKey("Software\\PHPExecuter\\Search");
                }
                if (RK.GetValue("casesensitive") != null)
                {
                    chbCaseSensitive.Checked = (RK.GetValue("casesensitive").ToString().Equals("true") ? true : false);
                }

                RK.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(this, e.Message, "Registry", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            try
            {
                if ((RK = Registry.CurrentUser.OpenSubKey("Software\\PHPExecuter\\Search")) == null)
                {
                    RK = Registry.CurrentUser.CreateSubKey("Software\\PHPExecuter\\Search");
                }
                if (RK.GetValue("wildcards") != null)
                {
                    chbUseWildcards.Checked = (RK.GetValue("wildcards").ToString().Equals("true") ? true : false);
                }

                RK.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(this, e.Message, "Registry", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            try
            {
                if ((RK = Registry.CurrentUser.OpenSubKey("Software\\PHPExecuter\\Search")) == null)
                {
                    RK = Registry.CurrentUser.CreateSubKey("Software\\PHPExecuter\\Search");
                }
                if (RK.GetValue("regexp") != null)
                {
                    chbRegexp.Checked = (RK.GetValue("regexp").ToString().Equals("true") ? true : false);
                }

                RK.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(this, e.Message, "Registry", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }