Пример #1
0
        public void ReadAllTimeBuffer()
        {
            TimeData tda = ReadAllRollerTime();

            td.TimeData1  = tda.TimeData1;
            td.TimeData2  = tda.TimeData2;
            td.TimeData3  = tda.TimeData3;
            td.TimeData4  = tda.TimeData4;
            td.TimeData5  = tda.TimeData5;
            td.TimeData6  = tda.TimeData6;
            td.TimeData7  = tda.TimeData7;
            td.TimeData8  = tda.TimeData8;
            td.TimeData9  = tda.TimeData9;
            td.TimeData10 = tda.TimeData10;
            td.TimeData11 = tda.TimeData11;
            td.TimeData12 = tda.TimeData12;
        }
Пример #2
0
        public TimeData ReadAllRollerTime()
        {
            string   json = File.ReadAllText("C:\\TimeDataJson.txt");
            TimeData ntd  = JsonConvert.DeserializeObject <TimeData>(json);
            TimeData td   = new TimeData()
            {
                TimeData1  = ntd.TimeData1,
                TimeData2  = ntd.TimeData2,
                TimeData3  = ntd.TimeData3,
                TimeData4  = ntd.TimeData4,
                TimeData5  = ntd.TimeData5,
                TimeData6  = ntd.TimeData6,
                TimeData7  = ntd.TimeData7,
                TimeData8  = ntd.TimeData8,
                TimeData9  = ntd.TimeData9,
                TimeData10 = ntd.TimeData10,
                TimeData11 = ntd.TimeData11,
                TimeData12 = ntd.TimeData12
            };

            return(td);
        }