예제 #1
0
 public Form1()
 {
     clientCollection = ClientCollection.GetJSON();
     f2 = new Form2(clientCollection.clientList.ElementAt(0));
     InitializeComponent();
     this.Load += new EventHandler(Form1_Load);
 }
예제 #2
0
        static public ClientCollection GetJSON()
        {
            ClientCollection fileClients = null;

            string rawJSON = System.IO.File.ReadAllText(@"C:\Users\~\source\repos\testDataGrid\testDataGrid\clients.json");

            fileClients = JsonConvert.DeserializeObject <ClientCollection>(rawJSON);

            return(fileClients);
        }