예제 #1
0
 private void json()
 {
     JSONserialized.jsonFormatter.JCompany  = CompanyList;
     JSONserialized.jsonFormatter.Jowner    = OwnerList;
     JSONserialized.jsonFormatter.JCleaner  = CleanerList;
     JSONserialized.jsonFormatter.JEngineer = EngineerList;
     JSONserialized.jsonFormatter.JManager  = ManagerList;
     JSONserialized.Savejson("people.json");
 }
예제 #2
0
 private void Dejson()
 {
     JSONserialized.Loadjson("people.json");
     CompanyList  = JSONserialized.jsonFormatter.JCompany;
     OwnerList    = JSONserialized.jsonFormatter.Jowner;
     CleanerList  = JSONserialized.jsonFormatter.JCleaner;
     EngineerList = JSONserialized.jsonFormatter.JEngineer;
     ManagerList  = JSONserialized.jsonFormatter.JManager;
     UpdateGrid();
 }
예제 #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            BinarySerializer.CreateInstance();
            JSONserialized.CreateJson();
            Companydata.DataSource  = CompanyList;
            Ownerdata.DataSource    = OwnerList;
            Managerdata.DataSource  = ManagerList;
            Engineerdata.DataSource = EngineerList;
            Cleanerdata.DataSource  = CleanerList;

            LoadPlugins();
        }
예제 #4
0
 public static void Loadjson(string fileName)
 {
     using (var st = File.OpenRead(fileName))
         jsonFormatter = (JSONserialized) new DataContractJsonSerializer(typeof(JSONserialized)).ReadObject(st);
 }
예제 #5
0
 public static void CreateJson()
 {
     jsonFormatter = new JSONserialized();
 }