示例#1
0
        private void OnChartIntterupTimer(object sender, ElapsedEventArgs e)
        {
            // DeviceRegistrationService.mutexDeviceList.WaitOne();
            List <ChartInfo> listRealChart     = new List <ChartInfo>();
            List <ChartInfo> listRealChartTime = new List <ChartInfo>();
            long             diffTicksProgram  = DateTime.Now.Ticks - Global_Object.startTimeProgram;
            double           tickMinutes       = new TimeSpan(diffTicksProgram).Minutes;

            double readyTime = 24 * 60 - TotalWorkingTime() + 15;


            ChartInfo _temp_WT = new ChartInfo();

            _temp_WT.name  = "Woking Mode";
            _temp_WT.value = (int)TotalWorkingTime() + 600;
            _temp_WT.color = Colors.LightSalmon;
            listRealChartTime.Add(_temp_WT);

            ChartInfo _temp_RT = new ChartInfo();

            _temp_RT.name  = "Ready Mode";
            _temp_RT.value = tickMinutes + 100;
            _temp_RT.color = Colors.DarkGray;
            listRealChartTime.Add(_temp_RT);

            ChartInfo _temp_FB = new ChartInfo();

            _temp_FB.name  = "Forklift to Buffer";
            _temp_FB.value = Global_Object.cntForkLiftToBuffer;
            _temp_FB.color = Colors.YellowGreen;
            listRealChart.Add(_temp_FB);

            ChartInfo _temp_BM = new ChartInfo();

            _temp_BM.name  = "Buffer to Machine";
            _temp_BM.value = Global_Object.cntBufferToMachine;
            _temp_BM.color = Colors.DarkOrange;
            listRealChart.Add(_temp_BM);

            ChartInfo _temp_RD = new ChartInfo();

            _temp_RD.name  = "Idle";
            _temp_RD.value = 10;
            _temp_RD.color = Colors.MediumBlue;
            listRealChart.Add(_temp_RD);


            //   _pie.Draw(listRealChart);
            pie.Draw(listRealChart);
            pieTime.Draw(listRealChartTime);
            pieChart.Data     = pie.pieCollection;
            pieChartTime.Data = pieTime.pieCollection;
            // DeviceRegistrationService.mutexDeviceList.ReleaseMutex();
        }
示例#2
0
        private void OnChartIntterupTimer(object sender, ElapsedEventArgs e)
        {
            List <ChartInfo> listRealChart     = new List <ChartInfo>();
            List <ChartInfo> listRealChartTime = new List <ChartInfo>();
            double           diffTimeProgram   = DateTime.Now.Subtract(Global_Object.startTimeProgram).Minutes;
            double           readyTime         = 24 * 60 - TotalWorkingTime() + 15;


            ChartInfo _temp_WT = new ChartInfo();

            _temp_WT.name  = "Woking Time";
            _temp_WT.value = TotalWorkingTime();
            _temp_WT.color = Colors.LightSalmon;
            listRealChartTime.Add(_temp_WT);

            ChartInfo _temp_RT = new ChartInfo();

            _temp_RT.name  = "Ready Time";
            _temp_RT.value = readyTime;
            _temp_RT.color = Colors.DarkGray;
            listRealChartTime.Add(_temp_RT);

            ChartInfo _temp_FB = new ChartInfo();

            _temp_FB.name  = "Forklift to Buffer";
            _temp_FB.value = Global_Object.cntForkLiftToBuffer;
            _temp_FB.color = Colors.YellowGreen;
            listRealChart.Add(_temp_FB);

            ChartInfo _temp_BM = new ChartInfo();

            _temp_BM.name  = "Buffer to Machine";
            _temp_BM.value = Global_Object.cntBufferToMachine;
            _temp_BM.color = Colors.DarkOrange;
            listRealChart.Add(_temp_BM);

            ChartInfo _temp_RD = new ChartInfo();

            _temp_RD.name  = "Idle";
            _temp_RD.value = 10;
            _temp_RD.color = Colors.MediumBlue;
            listRealChart.Add(_temp_RD);


            //   _pie.Draw(listRealChart);
            pie.Draw(listRealChart);
            pieTime.Draw(listRealChartTime);
            pieChart.Data     = pie.pieCollection;
            pieChartTime.Data = pieTime.pieCollection;
        }