예제 #1
0
 public void InitDialog(bool isFile)
 {
     IsSingleFile = isFile;
     if (IsSingleFile)
     {
         LabResShow.Text = "选择Res资源文件地址:";
         strResAddr      = PlayerPref.GetData(RES_DECODE_RES_SINGLE_ADDR);
     }
     else
     {
         LabResShow.Text = "选择Res资源文件夹地址:";
         strResAddr      = PlayerPref.GetData(RES_DECODE_RES_FOLDER_ADDR);
     }
     isDialogChange = false;
     strDelladdr    = PlayerPref.GetData(RES_DECODE_DELL_ADDR);
     strExcelAddr   = PlayerPref.GetData(RES_DECODE_EXCEL_ADDR);
 }
예제 #2
0
        public void SelectJsonFile()
        {
            OpenFileDialog fileDialog = new OpenFileDialog();
            string         jsonPath   = PlayerPref.GetData("JsonDecodePath");

            if (jsonPath != null)
            {
                fileDialog.FileName = jsonPath;
            }
            fileDialog.Multiselect = false;
            fileDialog.Title       = "请选择Json文件路径";
            fileDialog.Filter      = "Json文件 (*.json)|*.json|All文件 (*.*)|*.*";
            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                PlayerPref.SetData("JsonDecodePath", fileDialog.FileName);
                JsonDecode(fileDialog.FileName);
            }
        }