예제 #1
0
        public void DoingExchange(eDATAEXCHANGE dir, eVIWER id)
        {
            switch (dir)
            {
            case eDATAEXCHANGE.Data2UI:
                switch (id)
                {
                case eVIWER.None:
                    pgeMoni_Vec.DoingExchange(eDATAEXCHANGE.Data2UI);
                    pgeMoni_Pwr.DoingExchange(eDATAEXCHANGE.Data2UI);
                    break;

                case eVIWER.Pnl_Vec: pgeMoni_Vec.DoingExchange(eDATAEXCHANGE.Data2UI); break;

                case eVIWER.Pnl_Pwr: pgeMoni_Pwr.DoingExchange(eDATAEXCHANGE.Data2UI); break;
                }
                break;

            case eDATAEXCHANGE.UI2Data:
                switch (id)
                {
                case eVIWER.None: break;

                case eVIWER.Pnl_Vec: pgeMoni_Vec.DoingExchange(eDATAEXCHANGE.UI2Data); break;

                case eVIWER.Pnl_Pwr: pgeMoni_Pwr.DoingExchange(eDATAEXCHANGE.UI2Data); break;
                }
                break;

            case eDATAEXCHANGE.Load:
                Tmr_Work(true);
                Pge_Sel(eVIWER.Pnl_Vec, pgeMoni_Vec);
                DoingExchange(eDATAEXCHANGE.Data2UI, id);
                break;

            case eDATAEXCHANGE.Save:
                DoingExchange(eDATAEXCHANGE.UI2Data, id);
                //_Data.Inst.SysSave();
                DoingExchange(eDATAEXCHANGE.Data2UI, id);
                break;

            case eDATAEXCHANGE.StatusUpdate:
                if (togleTime.IsOver(1 * 1000))
                {
                    bTogle ^= true;
                }
                break;
            }
        }
        public void DoingExchange(eDATAEXCHANGE dir)
        {
            if (false == _ctrl.bLoaded && dir != eDATAEXCHANGE.Load)
            {
                return;
            }
            switch (dir)
            {
            case eDATAEXCHANGE.Data2UI:
                break;

            case eDATAEXCHANGE.UI2Data:
                break;

            case eDATAEXCHANGE.Load:
                DoingExchange(eDATAEXCHANGE.Data2UI);
                break;

            case eDATAEXCHANGE.Save:
                break;

            case eDATAEXCHANGE.StatusUpdate:
                if (null != status)
                {
                    txt_State.Text  = status.state.st.ToString();
                    txt_SubMsg.Text = status.state.subMsg;
                    txt_Dest.Text   = status.dest;
                    txt_PosX.Text   = status.pos.x.ToString();
                    txt_PosY.Text   = status.pos.y.ToString();
                    txt_PosAng.Text = status.pos.ang.ToString();
                    txt_Loc.Text    = status.local.ToString();
                    txt_Temp.Text   = status.temp.ToString();
                    txt_Bat.Text    = status.batt.ToString();
                }
                else
                {
                    txt_State.Text  = "NONE";
                    txt_SubMsg.Text = "------";
                    txt_Dest.Text   = "NONE";
                    txt_PosX.Text   = txt_PosY.Text = txt_PosAng.Text = "---";
                    txt_Loc.Text    = txt_Temp.Text = txt_Bat.Text = "---";
                }
                break;
            }
        }
예제 #3
0
        public void DoingExchange(eDATAEXCHANGE dir)
        {
            if (false == _ctrl.bLoaded && dir != eDATAEXCHANGE.Load)
            {
                return;
            }
            switch (dir)
            {
            case eDATAEXCHANGE.Data2UI:
                break;

            case eDATAEXCHANGE.UI2Data:
                break;

            case eDATAEXCHANGE.Load:
                DoingExchange(eDATAEXCHANGE.Data2UI);
                break;

            case eDATAEXCHANGE.Save:
                break;

            case eDATAEXCHANGE.StatusUpdate:
                if (null != status)
                {
                    txt_Bat.Text      = status.soc.ToString();
                    txt_Curr.Text     = status.curr.ToString("F1");
                    txt_Volt.Text     = status.volt.ToString("F1");
                    txt_temp_1st.Text = status.temp_1st.ToString();
                    txt_temp_2nd.Text = status.temp_2nd.ToString();
                    txt_temp_3th.Text = status.temp_3th.ToString();
                    txt_State.Text    = status.state.ToString();
                    txt_ErrBit.Text   = status.errbit.ToString();
                }
                else
                {
                    txt_Bat.Text      = "NONE";
                    txt_Curr.Text     = txt_Volt.Text = "---";
                    txt_temp_1st.Text = txt_temp_2nd.Text = txt_temp_3th.Text = "---";
                    txt_State.Text    = ePWR_CHR_STATE.None.ToString();
                    txt_ErrBit.Text   = "---";
                }
                break;
            }
        }