示例#1
0
    private static void InitViewValue()
    {
        string          path = Application.dataPath + PluginConfigPath;
        PListConfigInfo pListConfig;

        try
        {
            StreamReader  sr  = new StreamReader(path, Encoding.UTF8);
            XmlSerializer xml = new XmlSerializer(typeof(PListConfigInfo));
            pListConfig = xml.Deserialize(sr) as PListConfigInfo;
            sr.Dispose();
        }
        catch
        {
            pListConfig = new PListConfigInfo();
        }
        if (EditorPrefs.GetString(EComFileTypePath) == "")
        {
            EditorPrefs.SetString(EComFileTypePath, "*.unity3d|*.manifest|*.u3d|*.txt");
        }

        window.ClientVersion          = pListConfig.ClientVersion ?? "";
        window.GameVersion            = pListConfig.GameVersion ?? "";
        window.ClientUpdatePackageURL = pListConfig.ClientUpdatePackageURL ?? "";
        window.AssetPackageURL        = pListConfig.AssetPackageURL ?? "";
        window.ApkSize             = pListConfig.ApkSize ?? "";
        window.CompressionFlieType = EditorPrefs.GetString(EComFileTypePath);
        window.ZipFileName         = EditorPrefs.GetString(EZIPFileName);
    }
示例#2
0
    private static void SaveViewValue(List <string> versions, params string[] pams)
    {
        string          path  = Application.dataPath + PluginConfigPath;
        PListConfigInfo pList = new PListConfigInfo();

        pList.ClientVersion          = pams[0]; // window.ClientVersion;
        pList.GameVersion            = pams[1]; //window.GameVersion;
        pList.ClientUpdatePackageURL = pams[2]; //window.ClientUpdatePackageURL;
        pList.AssetPackageURL        = pams[3]; //window.AssetPackageURL;
        pList.ApkSize = pams[4];                //window.ApkSize;

        XmlSerializer ser        = new XmlSerializer(typeof(PListConfigInfo));
        TextWriter    textWriter = new StreamWriter(path, false);

        ser.Serialize(textWriter, pList);
        textWriter.Close();
    }