Beispiel #1
0
        private bool RecipeChange(string _RecipeName, string _SrcRecipe = "")
        {
            bool _Result = true;

            if (true == ParamManager.RecipeReload(_RecipeName))
            {
                _RecipeName = ParamManager.SystemParam.LastRecipeName;

                //LDH, 2018.07.26, Light File 따로 관리
                LightControlManager.RecipeChange(_RecipeName, _SrcRecipe);
                ResultBaseWnd.SetLastRecipeName((eProjectType)ParamManager.SystemParam.ProjectType, _RecipeName);

                for (int iLoopCount = 0; iLoopCount < ISMModuleCount; ++iLoopCount)
                {
                    InspSysManager[iLoopCount].SetInspectionParameter(ParamManager.InspParam[iLoopCount], false);
                    InspSysManager[iLoopCount].GetInspectionParameterRef(ref ParamManager.InspParam[iLoopCount]);
                }

                UpdateRibbonRecipeName(_RecipeName);
            }
            else
            {
                //MessageBox.Show(new Form { TopMost = true }, "Recipe 변경에 실패했습니다.\nRecipe를 확인하세요.");
                CMsgBoxManager.Show("Recipe 변경에 실패했습니다. \nRecipe를 확인하세요", "", true);
                _Result = false;
            }

            return(_Result);
        }
Beispiel #2
0
        public void Connection(string _IPAddress, int _PortNumber)
        {
            //if (true == IsServerAlready) { MessageBox.Show("Already connected"); return; }
            if (true == IsServerAlready)
            {
                CMsgBoxManager.Show("Already connected", "", 2000); return;
            }

            ConnectIP   = _IPAddress;
            ConnectPort = _PortNumber;

            SockClientList.Clear();

            SockServer = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            IPEndPoint = new IPEndPoint(IPAddress.Parse(ConnectIP), ConnectPort);
            SockServer.Bind(IPEndPoint);
            SockServer.Listen(20);

            SocketAsyncEventArgs _SockArgs = new SocketAsyncEventArgs();

            _SockArgs.Completed += new EventHandler <SocketAsyncEventArgs>(Accept_Completed);
            SockServer.AcceptAsync(_SockArgs);

            IsServerAlready = true;
        }
Beispiel #3
0
 private void btnSend_Click(object sender, EventArgs e)
 {
     //if (false == IsConnected) { MessageBox.Show("Disconnected"); return; }
     if (false == IsConnected)
     {
         CMsgBoxManager.Show("Disconnected", "", false, 2000); return;
     }
     ServerSock.Send(textBoxManualData.Text);
 }
Beispiel #4
0
 public void SendResultData(string _ResultDataString)
 {
     //if (false == IsConnected) { MessageBox.Show("Not connected"); return; }
     if (false == IsConnected)
     {
         CMsgBoxManager.Show("Not connected", "", 2000); return;
     }
     ServerSock.Send(_ResultDataString);
     //CLogManager.AddSystemLog(CLogManager.LOG_TYPE.INFO, "Receive Data : " + _ResultDataString);
 }
Beispiel #5
0
        //LDH, 2019.04.09, DummyCount 확인
        private bool CheckDummyCount()
        {
            bool _DummyResult = ResultBaseWnd.CheckDummyCount();

            if (!_DummyResult)
            {
                CMsgBoxManager.Show("Dummy 수량을 확인하세요", "", true);
            }

            return(_DummyResult);
        }
 private bool InitializeIOBoard()
 {
     DigitalIO = new CDIO(IOCnt);
     if ((int)CDioConst.DIO_ERR_SUCCESS != DigitalIO.Initialize(IODeviceName))
     {
         CMsgBoxManager.Show("IO Board Initialize Error", "", false, 2000);
         //MessageBox.Show("IO Board Initialize Error");
         return(false);
     }
     return(true);
 }
Beispiel #7
0
        public MainForm()
        {
            CMsgBoxManager.Initialize();
            ProgramLogin();

            CLoadingManager.Show("Program Run", "Program Run Waiting...");
            InitializeComponent();
            Initialize();
            CLoadingManager.Hide();
            System.Threading.Thread.Sleep(200);

            TimerShowWindow.Start();
        }
Beispiel #8
0
        public void SendResultData(string _ResultDataString, bool _UseFormat)
        {
            if (false == IsConnected)
            {
                CMsgBoxManager.Show(string.Format("No connection - IP : {0}, Port : {1}", IPAddress, PortNumber), "", false, 2000); return;
            }

            if (_UseFormat)
            {
                ServerSock.Send(_ResultDataString);
            }
            else
            {
                ServerSock.SendNotFormat(_ResultDataString);
            }

            CLogManager.AddSystemLog(CLogManager.LOG_TYPE.INFO, "Receive Data : " + _ResultDataString);
        }
Beispiel #9
0
        static void Main()
        {
            bool  _IsNew;
            Mutex _Mutex = new Mutex(true, "KPVISION Program", out _IsNew);

            if (_IsNew)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
                _Mutex.ReleaseMutex();
            }
            else
            {
                CMsgBoxManager.Initialize();
                CMsgBoxManager.Show("The program is running.", "", false, 1000);
                //MessageBox.Show(new Form { TopMost = true }, "The program is running.");
                Application.Exit();
            }
        }