public static CommunicationStrings CommandFromStepMod(StepMod stepMod)
        {
            switch (stepMod)
            {
            case StepMod.PASSIVE_MOD:
                return(CommunicationStrings.PSV);

            case StepMod.STANDART_MOD:
                return(CommunicationStrings.STD);

            case StepMod.TETIKLEMELI_MOD:
                return(CommunicationStrings.PST);

            case StepMod.ACI_SINIRLI_MOD:
                return(CommunicationStrings.DGR);

            case StepMod.TETIKLEMELI_ACI_SINIRLI_MOD:
                return(CommunicationStrings.PDG);

            case StepMod.TEK_YONLU_TETIKLEMELI_ACI_SINIRLI_MOD:
                return(CommunicationStrings.OPD);

            case StepMod.KALIBRASYON_MODU:
                return(CommunicationStrings.CLB);

            case StepMod.MANUEL_MOD:
                return(CommunicationStrings.MAN);

            default: return(CommunicationStrings.ERR);
            }
        }
        private void ModeChangeButtons_Click(object sender, EventArgs e)
        {
            StepMod butonMod = Static.ButtonToStepMode((Button)sender);

            controller.ChangePower(StepPower.STEP_PASSIVE);
            controller.ChangeMod((controller.Mod == butonMod) ? StepMod.PASSIVE_MOD : butonMod);
            ModButtonReChangeFormVisual();
        }
        private Button ButtonFromStepMod(StepMod stepMod)
        {
            switch (stepMod)
            {
            case StepMod.STANDART_MOD: return(BtnStandartMod);

            case StepMod.TETIKLEMELI_MOD: return(BtnTetiklemeliMod);

            case StepMod.ACI_SINIRLI_MOD: return(BtnSinirliAciMod);

            case StepMod.TETIKLEMELI_ACI_SINIRLI_MOD: return(BtnTetiklemeliSinirliAciMod);

            case StepMod.TEK_YONLU_TETIKLEMELI_ACI_SINIRLI_MOD: return(BtnTekYonTetiklemeliSinirliAciMod);

            case StepMod.MANUEL_MOD: return(BtnManuelMod);

            case StepMod.KALIBRASYON_MODU: return(BtnKalibrasyonMod);

            case StepMod.PASSIVE_MOD:
            default:
                return(BtnReConnect);
            }
        }
        private void ModButtonReChangeFormVisual()
        {
            StepMod controllerMode = controller.Mod;

            Static.SetBackColorControl(Color.LightSkyBlue, BtnStandartMod, BtnTetiklemeliMod, BtnSinirliAciMod, BtnTetiklemeliSinirliAciMod, BtnTekYonTetiklemeliSinirliAciMod, BtnManuelMod, BtnKalibrasyonMod);
            BtnCalis_ReSetVisual();
            BtnEnable_ReSetVisual();

            if (controllerMode == StepMod.PASSIVE_MOD)
            {
                //PASİF MOD****************************************************
                Static.SetVisibleControl(false, BtnAyarlariUygula, BtnCalis, LblYon, LblYon_, CmbBxYon, LblHiz, LblHiz_, NumUpDwnHiz, LblDerece, LblDrece_, NumUpDwnDerece, BtnEnable, BtnDirection, BtnPulse);
                Size = new Size(379, 551);
                //*************************************************************
            }
            else
            {
                //PASİF DEĞİL**************************************************
                Size = new Size(636, 551);
                BtnReConnect.BackColor = Color.Red;
                //*************************************************************
                if ((controllerMode != StepMod.MANUEL_MOD) && (controllerMode != StepMod.KALIBRASYON_MODU))
                {
                    //PASİF,MANUEL VE KALİBRASYON HARİCİ MODLAR****************
                    Static.SetVisibleControl(true, BtnAyarlariUygula, LblYon, LblYon_, CmbBxYon, LblHiz, LblHiz_, NumUpDwnHiz);
                    Static.SetVisibleControl(false, BtnEnable, BtnDirection, BtnPulse, LblDerece, LblDrece_, NumUpDwnDerece);
                    //*********************************************************
                    if ((controllerMode != StepMod.STANDART_MOD) && (controllerMode != StepMod.TETIKLEMELI_MOD))
                    {
                        //DERECE GEREKTİREN MODLAR*****************************
                        Static.SetVisibleControl(true, LblDerece, LblDrece_, NumUpDwnDerece);
                        //*****************************************************
                    }
                }
                else if (controllerMode == StepMod.MANUEL_MOD)
                {
                    //MANUEL MOD***********************************************
                    Static.SetVisibleControl(true, BtnEnable, BtnDirection, BtnPulse);
                    Static.SetVisibleControl(false, BtnAyarlariUygula, BtnCalis, LblYon, LblYon_, CmbBxYon, LblHiz, LblHiz_, NumUpDwnHiz, LblDerece, LblDrece_, NumUpDwnDerece);
                    //*********************************************************
                }
                else if (controllerMode == StepMod.KALIBRASYON_MODU)
                {
                    //KALİBRASYON MODU******************************************
                    Static.SetVisibleControl(false, BtnAyarlariUygula, BtnCalis, LblYon, LblYon_, CmbBxYon, LblHiz, LblHiz_, NumUpDwnHiz, LblDerece, LblDrece_, NumUpDwnDerece, BtnEnable, BtnDirection, BtnPulse);
                    //**********************************************************
                }
            }
            //TETİKLEMELİ MODLAR************************************************
            if (controllerMode == StepMod.TETIKLEMELI_MOD || controllerMode == StepMod.TETIKLEMELI_ACI_SINIRLI_MOD || controllerMode == StepMod.TEK_YONLU_TETIKLEMELI_ACI_SINIRLI_MOD)
            {
                Static.SetVisibleControl(true, BtnCalis);
            }
            //*******************************************************************
            //TETİKLEMESİZ MODLAR************************************************
            else
            {
                Static.SetVisibleControl(false, BtnCalis);
            }

            ButtonFromStepMod(controllerMode).BackColor = Color.YellowGreen;
        }