예제 #1
0
        private void buttonReg_Click(object sender, System.EventArgs e)
        {
            RegistrySettings rs = new RegistrySettings();

            System.Text.StringBuilder sBldr = new System.Text.StringBuilder();

            sBldr.Append(String.Format("CopyToDir: {0}\n", rs.GetCopyToDir()));
            sBldr.Append(String.Format("Size: {0}, {1}\n", rs.GetWindowSize().Width, rs.GetWindowSize().Height));
            sBldr.Append(String.Format("Position: {0}, {1}\n", rs.GetWindowPosition().X, rs.GetWindowPosition().Y));

            string[] mruArray = { "NOT SET", "NOT SET", "NOT SET", "NOT SET" };
            System.Collections.ArrayList mruList = rs.GetMRUList();
            for (int i = 0; i < mruList.Count; i++)
            {
                mruArray[i] = (string)mruList[i];
            }
            sBldr.Append(String.Format("MRU List:\n\t{0}\n\t{1}\n\t{2}\n\t{3}",
                                       mruArray[0], mruArray[1], mruArray[2], mruArray[3]));

            ConfigFile cf = rs.GetConfigSettings();

            if (cf != null)
            {
                sBldr.Append(String.Format("\nConfig Data\n\t{0}, {1}, {2}, {3}, {4}", cf.IntervalTime, cf.Randomize, cf.ScriptFileList[0].FileName, cf.ScriptFileList[1].FileName, cf.ScriptFileList[2].FileName));
            }
            string outStr = sBldr.ToString();

            MessageBox.Show(outStr);
        }