| 1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using Muchinfo.PC.Common.Bosn;
- namespace Muchinfo.MTPClient.Resources
- {
- public class ResxManagerHelper
- {
- /// <summary>
- /// Saves the data.
- /// </summary>
- /// <param name="hastableResx">The hastable RESX.</param>
- /// <param name="ver">The ver.</param>
- /// <param name="filePath">The file path.</param>
- public static void SaveData(Hashtable hastableResx, ulong ver, string filePath)
- {
- var resx = new CommonResx() { ResourceHashtable = hastableResx, Version = ver };
- JsonHelper.SaveData<CommonResx>(filePath, resx, null, true);
- }
- /// <summary>
- /// Gets the data.
- /// </summary>
- /// <param name="filePath">The file path.</param>
- /// <returns>CommonResx.</returns>
- public static CommonResx GetData(string filePath)
- {
- var resx = new CommonResx() { Version = 0 };
- if (!File.Exists(filePath))
- return resx;
- return JsonHelper.LoadData<CommonResx>(filePath).FirstOrDefault();
- }
- }
- }
|