Exemple #1
0
        private void initData()
        {
            Dictionary <string, string> type_list = new Dictionary <string, string>()
            {
                { "0", "字符串替换" },
                { "1", "文件名替换为作成时间" },
                { "2", "文件名替换为更新时间" }
            };

            //浏览器区块设置
            this.replaceType.ItemsSource       = type_list;
            this.replaceType.SelectedValuePath = "Key";
            this.replaceType.DisplayMemberPath = "Value";

            RegeditMng myReg = new RegeditMng(ToolName);

            if (ReNameTool.Program.inputArgu != "")
            {
                dataForm.TextPath = ReNameTool.Program.inputArgu;
            }
            else
            {
                dataForm.TextPath = myReg.getRegValue("TextPath");
            }
            dataForm.CheckFolder    = myReg.getRegBoolValue("CheckFolder");
            dataForm.CheckFile      = myReg.getRegBoolValue("CheckFile");
            dataForm.CheckSubFolder = myReg.getRegBoolValue("CheckSubFolder");
            dataForm.TextFrom       = myReg.getRegValue("TextFrom");
            //this.replaceType.SelectedValue = myReg.getRegValue("ReplaceType");
            dataForm.ReplaceType = myReg.getRegValue("ReplaceType");
            dataForm.setTextToArr(0, myReg.getRegValue("TextTo0"));
            dataForm.setTextToArr(1, myReg.getRegValue("TextTo1"));
            dataForm.setTextToArr(2, myReg.getRegValue("TextTo2"));
            if (dataForm.ReplaceType == "")
            {
                dataForm.ReplaceType = "0";
            }
            if (dataForm.getTextToArr(1) == "")
            {
                dataForm.setTextToArr(1, "YYYYMMDD_HHMISS");
            }
            if (dataForm.getTextToArr(2) == "")
            {
                dataForm.setTextToArr(2, "YYYYMMDD_HHMISS");
            }
            dataForm.TextTo = dataForm.getTextToArr(int.Parse(dataForm.ReplaceType));

            //check右键菜单
            if (myReg.leftMenuChk(ToolName))
            {
                this.button_regedit.Content = "右菜单删除";
            }
            myReg.CloseReg();
        }
Exemple #2
0
        private void radioButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.radioButton1.Checked)
            {
                level = "1";
            }
            else if (this.radioButton2.Checked)
            {
                level = "2";
            }
            else if (this.radioButton3.Checked)
            {
                level = "3";
            }
            else if (this.radioButton4.Checked)
            {
                level = "4";
            }
            RegeditMng myReg       = new RegeditMng(ToolName);
            String     time_now    = myReg.getRegValue("time_" + level);
            String     wordNum_now = myReg.getRegValue("wordNum_" + level);
            String     line_now    = myReg.getRegValue("line_" + level);

            this.checkBox1.Checked = myReg.getRegBoolValue("base64_" + level);
            myReg.CloseReg();

            this.textBox1.Text     = time_now == "" ? "4" : time_now;
            this.textBox2.Text     = wordNum_now == "" ? "15" : wordNum_now;
            this.text_nowLine.Text = line_now == "" ? "0" : line_now;
        }
Exemple #3
0
        private void initData()
        {
            RegeditMng myReg = new RegeditMng(ToolName);

            dataForm.FromFolder      = myReg.getRegValue("FromFolder");
            dataForm.ImgType1        = myReg.getRegBoolValue("ImgType1");
            dataForm.ImgType2        = myReg.getRegBoolValue("ImgType2");
            dataForm.ImgType3        = myReg.getRegBoolValue("ImgType3");
            dataForm.SubFolder       = myReg.getRegBoolValue("SubFolder");
            dataForm.ReMake          = myReg.getRegBoolValue("ReMake");
            dataForm.OutFolder       = myReg.getRegValue("OutFolder");
            dataForm.BlackWhiteRadio = myReg.getRegBoolValue("BlackWhiteRadio");
            dataForm.ColorRadio      = myReg.getRegBoolValue("ColorRadio");
            dataForm.ReplaceColor    = myReg.getRegValue("ReplaceColor");
            myReg.CloseReg();

            text_replaceColor.IsEnabled = true;

            /*           if (dataForm.BlackWhiteRadio)
             *                     {
             *                             text_replaceColor.IsEnabled = false;
             *                     }
             *                     else if (dataForm.ColorRadio)
             *                     {
             *                             text_replaceColor.IsEnabled = true;
             *                     }
             *                     else
             *                     {
             *                             dataForm.BlackWhiteRadio = true;
             *                             text_replaceColor.IsEnabled = false;
             *                     }*/
        }
Exemple #4
0
        private void init()
        {
            this.Height = this.Height - this.panel1.Height;

            RegeditMng myReg = new RegeditMng(ToolName);

            level = myReg.getRegValue("level");

            if (level.Length == 0)
            {
                level = "1";
                this.textBox1.Text     = "4";
                this.textBox2.Text     = "15";
                this.text_nowLine.Text = "0";
                this.checkBox1.Checked = false;

                this.hidden_ctrl.Checked  = true;
                this.hidden_alt.Checked   = true;
                this.hidden_shift.Checked = false;
                this.hidden_key.Text      = "C";

                this.stop_ctrl.Checked  = true;
                this.stop_alt.Checked   = true;
                this.stop_shift.Checked = false;
                this.stop_key.Text      = "S";

                this.pre_ctrl.Checked  = true;
                this.pre_alt.Checked   = true;
                this.pre_shift.Checked = false;
                this.pre_key.Text      = "←";

                this.next_ctrl.Checked  = true;
                this.next_alt.Checked   = true;
                this.next_shift.Checked = false;
                this.next_key.Text      = "→";

                this.button_fontColor.ForeColor = Color.Black;
                this.comboBox_fontSize.Text     = "9";
            }
            else
            {
                try
                {
                    this.textBox1.Text     = myReg.getRegValue("time_" + level);
                    this.textBox2.Text     = myReg.getRegValue("wordNum_" + level);
                    this.text_nowLine.Text = myReg.getRegValue("line_" + level);
                    this.checkBox1.Checked = myReg.getRegBoolValue("base64_" + level);

                    this.hidden_ctrl.Checked  = myReg.getRegBoolValue("hidden_ctrl");
                    this.hidden_alt.Checked   = myReg.getRegBoolValue("hidden_alt");
                    this.hidden_shift.Checked = myReg.getRegBoolValue("hidden_shift");
                    this.hidden_key.Text      = myReg.getRegValue("hidden_key");

                    this.stop_ctrl.Checked  = myReg.getRegBoolValue("stop_ctrl");
                    this.stop_alt.Checked   = myReg.getRegBoolValue("stop_alt");
                    this.stop_shift.Checked = myReg.getRegBoolValue("stop_shift");
                    this.stop_key.Text      = myReg.getRegValue("stop_key");

                    this.pre_ctrl.Checked  = myReg.getRegBoolValue("pre_ctrl");
                    this.pre_alt.Checked   = myReg.getRegBoolValue("pre_alt");
                    this.pre_shift.Checked = myReg.getRegBoolValue("pre_shift");
                    this.pre_key.Text      = myReg.getRegValue("pre_key");

                    this.next_ctrl.Checked  = myReg.getRegBoolValue("next_ctrl");
                    this.next_alt.Checked   = myReg.getRegBoolValue("next_alt");
                    this.next_shift.Checked = myReg.getRegBoolValue("next_shift");
                    this.next_key.Text      = myReg.getRegValue("next_key");

                    this.button_fontColor.ForeColor = ColorTranslator.FromHtml(myReg.getRegValue("font_color"));
                    this.comboBox_fontSize.Text     = myReg.getRegValue("font_size");
                }
                catch (Exception) {
                    level = "1";
                    this.textBox1.Text     = "4";
                    this.textBox2.Text     = "15";
                    this.text_nowLine.Text = "0";
                    this.checkBox1.Checked = false;

                    this.hidden_ctrl.Checked  = true;
                    this.hidden_alt.Checked   = true;
                    this.hidden_shift.Checked = false;
                    this.hidden_key.Text      = "C";

                    this.stop_ctrl.Checked  = true;
                    this.stop_alt.Checked   = true;
                    this.stop_shift.Checked = false;
                    this.stop_key.Text      = "S";

                    this.pre_ctrl.Checked  = true;
                    this.pre_alt.Checked   = true;
                    this.pre_shift.Checked = false;
                    this.pre_key.Text      = "←";

                    this.next_ctrl.Checked  = true;
                    this.next_alt.Checked   = true;
                    this.next_shift.Checked = false;
                    this.next_key.Text      = "→";

                    this.button_fontColor.ForeColor = Color.Black;
                    this.comboBox_fontSize.Text     = "9";
                }
            }
            myReg.CloseReg();

            switch (level)
            {
            case "2":
                radioButton2.Checked = true; break;

            case "3":
                radioButton3.Checked = true; break;

            case "4":
                radioButton4.Checked = true; break;

            default:
                radioButton1.Checked = true; break;
            }
        }