Beispiel #1
0
 private void buttonInSelect_Click(object sender, EventArgs e)
 {
     if (IsFolder)
     {
         FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog();
         folderBrowserDialog1.Description         = "请选择文件夹路径";
         folderBrowserDialog1.ShowNewFolderButton = false;
         folderBrowserDialog1.SelectedPath        = InputPath;
         DialogResult result = folderBrowserDialog1.ShowDialog();
         if (result == DialogResult.OK)
         {
             string folderName = folderBrowserDialog1.SelectedPath;
             if (folderName != "")
             {
                 textBoxInput.Text = folderName;
             }
         }
     }
     else
     {
         OpenFileDialog fileDialog = new OpenFileDialog();
         fileDialog.Multiselect = false;
         fileDialog.Title       = "请选择文件";
         fileDialog.FileName    = PlayerPref.GetData("Md5VersionSingle_Input");
         fileDialog.Filter      = "所有 文件(*.*)|*.*";
         if (fileDialog.ShowDialog() == DialogResult.OK)
         {
             textBoxInput.Text = fileDialog.FileName;
         }
     }
 }
Beispiel #2
0
        private void Init()
        {
            if (IsFolder)
            {
                labelInput.Text = "资源文件夹路径:";
                InputPath       = PlayerPref.GetData(VersionFolderInput);
                OutPutPath      = PlayerPref.GetData(VersionFolderOutput);
            }
            else
            {
                labelInput.Text = "资源文件路径:";
                InputPath       = PlayerPref.GetData(VersionSingleInput);
                OutPutPath      = PlayerPref.GetData(VersionSingleOutput);
            }
            BigVersionNum              = PlayerPref.GetData(VersionBigVersionNum);
            VerType                    = PlayerPref.GetData(VersionType);
            TarType                    = PlayerPref.GetData(TargetType);
            IgnoorePostFix             = PlayerPref.GetData(VersionIgnorePostFix);
            textBoxInput.Text          = InputPath;
            textBoxOutPut.Text         = OutPutPath;
            textBoxBigVersionNum.Text  = BigVersionNum;
            textBoxIgnoreFileName.Text = IgnoorePostFix;
            switch (VerType)
            {
            case "Num":
                radioButtonNum.Checked = true;
                break;

            default:
                radioButtonMd5.Checked = true;
                break;
            }
            switch (TarType)
            {
            case "Upper":
                radioButtonUpper.Checked = true;
                break;

            default:
                radioButtonLower.Checked = true;
                break;
            }
            SizeUnit = PlayerPref.GetData(VersionFileSizeUnit, "B");
            for (int i = 0; i < cbUnit.Items.Count; i++)
            {
                if (cbUnit.Items[i].ToString() == SizeUnit)
                {
                    cbUnit.SelectedIndex = i;
                    break;
                }
            }
            buttonSave.Enabled = false;
        }
Beispiel #3
0
        private void buttonOutSelect_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog();

            folderBrowserDialog1.Description         = "请选择生成的文件路径";
            folderBrowserDialog1.SelectedPath        = PlayerPref.GetData("Md5VersionSingle_Output");
            folderBrowserDialog1.ShowNewFolderButton = false;
            DialogResult result = folderBrowserDialog1.ShowDialog();

            if (result == DialogResult.OK)
            {
                string folderName = folderBrowserDialog1.SelectedPath;
                if (folderName != "")
                {
                    textBoxOutPut.Text = folderName;
                }
            }
        }