Exemple #1
0
        public string ServerMode()
        {
            string result = "";
            string param  = "";

            Thread.Sleep(1000);
            if (this.retResult == 0 && SingleConnectionSession.GetInstance().Connected)
            {
                ProductionServer srv = (ProductionServer)SingleConnectionSession.GetInstance().GetServer(HostName.ToUpper() + "_PS01");

                if (srv == null)
                {
                    this.retResult  = -3;
                    this.errMessage = "서버에 연결하는 중 에러가 발생했습니다.";
                }
                else
                {
                    param = srv.GetProductionParam(ProductionModeParamType.OperatingModeParam).ToString().ToLower().Replace(" ", "");
                }

                result         = param;
                this.retResult = 0;
            }
            else
            {
                this.retResult  = -1;
                this.errMessage = "서버에 연결되어 있지 않습니다.";
            }


            return(result);
        }
Exemple #2
0
        public bool setNormalMode()
        {
            bool retBl = false;

            Thread.Sleep(1000);

            if (SingleConnectionSession.GetInstance().Connected)
            {
                ProductionServer srv = (ProductionServer)SingleConnectionSession.GetInstance().GetServer(HostName.ToUpper() + "_PS01");

                if (srv.GetProductionParam(ProductionModeParamType.OperatingModeParam).ToString().ToLower() != "normal")
                {
                    try
                    {
                        srv.Pause();
                    }
                    catch (RimageException ex)
                    {
                        this.retResult  = -1;
                        this.errMessage = ex.Message;
                    }
                    Thread.Sleep(3000);

                    string param = srv.GetProductionParam(ProductionModeParamType.OperatingModeParam);
                    srv.SetProductionParam(ProductionModeParamType.OperatingModeParam, ServerParamValues.ProductionOperatingModeNormal);
                    srv.CommitParamChanges();

                    try
                    {
                        srv.Resume();
                        retBl          = true;
                        this.retResult = 0;
                        Thread.Sleep(3000);
                    }
                    catch (RimageException ex)
                    {
                        this.retResult  = -1;
                        this.errMessage = ex.Message;
                    }
                }
            }
            return(retBl);
        }