public SessionContextHeandler(ApplicationConfiguration config, LoginForm mainView)
        {
            this.mainView = mainView;
            //sessionValidationStruct = new IMSApiSessionValidationStruct();
            //sessionValidationStruct.stationNumber = config.StationNumber;
            //sessionValidationStruct.stationPassword = "";
            //sessionValidationStruct.user = "";
            //sessionValidationStruct.password = "";
            //sessionValidationStruct.client = config.Client;
            //sessionValidationStruct.registrationType = config.RegistrationType;
            //sessionValidationStruct.systemIdentifier = config.StationNumber;

            initResult = imsapi.imsapiInit();

            if (initResult != 0)
            {
                mainView.SetStatusLabelText("Conncection to DMS failed", 1);
                mainView.isCanLogin = false;
                LogHelper.Info("Conncection to DMS failed");
            }
            else
            {
                mainView.SetStatusLabelText("Conncection to DMS established", 0);
                mainView.isCanLogin = true;
                LogHelper.Info("Conncection to DMS established");
            }
        }
        public SessionContextHeandler(CommonModel config, LoginForm mainView)
        {
            this.mainView = mainView;
            initResult    = imsapi.imsapiInit();

            if (initResult != 0)
            {
                mainView.SetStatusLabelText("Conncection to DMS failed", 1);
                mainView.isCanLogin = false;
                LogHelper.Info("Conncection to DMS failed");
            }
            else
            {
                mainView.SetStatusLabelText("Conncection to DMS established", 0);
                mainView.isCanLogin = true;
                LogHelper.Info("Conncection to DMS established");
            }
        }