예제 #1
0
파일: Client.cs 프로젝트: nekosaur/Haytham
        public void ProcessJson_test(myJsonClass mjson)
        {
            string folder = @"fromGlass\Jsons\";

            if (!Directory.Exists(folder))
            {
                Directory.CreateDirectory(folder);
            }


            if (mjson.img != null)
            {
                String SuspiciousPath = Path.Combine(folder, mjson.name + ".jpg");
                mjson.img.Save(SuspiciousPath);
            }
            myJsonClass_test temp = new myJsonClass_test(mjson);


            System.Web.Script.Serialization.JavaScriptSerializer jSearializer =
                new System.Web.Script.Serialization.JavaScriptSerializer();
            String s = jSearializer.Serialize(temp);

            System.IO.File.WriteAllText(Path.Combine(folder, temp.name + ".txt"), s);

            METState.Current.METCoreObject.SendToForm(mjson.img, "imScene");
            METState.Current.METCoreObject.SendToForm("", "Update Glass Picturebox");
        }
예제 #2
0
 public myJsonClass_test(myJsonClass mjson)
 {
     name = mjson.name;
     text = mjson.text;
 }