Пример #1
0
 private void Save()
 {
     PlayerPref.SetData(RES_DECODE_DELL_ADDR, strDelladdr);
     PlayerPref.SetData(RES_DECODE_EXCEL_ADDR, strExcelAddr);
     if (IsSingleFile)
     {
         PlayerPref.SetData(RES_DECODE_RES_SINGLE_ADDR, strResAddr);
     }
     else
     {
         PlayerPref.SetData(RES_DECODE_RES_FOLDER_ADDR, strResAddr);
     }
 }
Пример #2
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);
 }
Пример #3
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);
            }
        }