Exemplo n.º 1
0
        private void tcDeviceSet_SelectedIndexChanged(object sender, EventArgs e)
        {
            int iSeletedIndex;

            iSeletedIndex = tcDeviceSet.SelectedIndex;

            switch (iSeletedIndex)
            {
            default: break;

            case 1: gbJogUnit.Parent = pnJog1;                       break;

            case 2: gbJogUnit.Parent = pnJog2;                       break;

            case 3: gbJogUnit.Parent = pnJog3;                       break;

            case 4: gbJogUnit.Parent = pnJog4;                       break;

            case 5: gbJogUnit.Parent = pnJog5;                       break;
            }

            UpdateDevInfo(true);
            UpdateDevOptn(true);
            //LoadTrayMask(OM.GetCrntDev());

            PM.UpdatePstn(true);
            PM.Load(OM.GetCrntDev());
        }
Exemplo n.º 2
0
        private void btSave_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ti.Frm);

            //Check Running Status.
            if (SEQ._bRun)
            {
                Log.ShowMessage("Warning", "Can't Save during Autorunning!");
                return;
            }

            if (Log.ShowMessageModal("Confirm", "Are you Sure?") != DialogResult.Yes)
            {
                return;
            }
            ((Button)sender).Enabled = false;

            UpdateComOptn(false);
            OM.SaveCmnOptn();

            UpdateEqpOptn(false);
            OM.SaveEqpOptn();

            //비전 결과 색 이름 표기
            SetDisp(ri.RLT1); SetDisp(ri.RLT2); SetDisp(ri.RLT3);
            SetDisp(ri.WRK1); SetDisp(ri.WRK2); SetDisp(ri.WRK3);
            SetDisp(ri.PSTB);
            SetDisp(ri.SPC);

            ((Button)sender).Enabled = true;
        }
Exemplo n.º 3
0
        public void ShowPage(int _iPageIdx)
        {
            FrmDeviceSet.UpdateDevInfo(true);
            PM.UpdatePstn(true);
            PM.Load(OM.GetCrntDev());

            switch (_iPageIdx)
            {
            case 0: FrmOperation.Show();          break;

            case 1: FrmDevice.Show();          break;

            case 2: /*FrmMacro    .Show();*/ break;

            case 3: FrmOption.Show();
                FrmOption.bUpdate = true;     break;

            case 4: FrmSPC.Show();          break;

            //FrmSPC      .ShowUpdate();    break;
            case 5: SM.SetDllMainWin(ref pnBase); break;

            default: FrmOperation.Show();         break;
            }
        }
Exemplo n.º 4
0
        private void tmUpdate_Tick(object sender, EventArgs e)
        {
            tmUpdate.Enabled  = false;
            lbCrntDevice.Text = OM.GetCrntDev();

            //Download 버튼 활성화 조건(나중에 확인 진섭)
            if (SEQ._iSeqStat == EN_SEQ_STAT.Stop || SEQ._iSeqStat == EN_SEQ_STAT.Error)
            {
                btDownload.Enabled = true;
            }

            //접근레벨에 따른 Setting 버튼 활성화
            int iLevel = (int)FormPassword.GetLevel();

            switch (iLevel)
            {
            case (int)EN_LEVEL.Operator: btSetting.Enabled = false; break;

            case (int)EN_LEVEL.Engineer: btSetting.Enabled = true; break;

            case (int)EN_LEVEL.Master: btSetting.Enabled = true; break;

            default: break;
            }

            tmUpdate.Enabled = true;
        }
Exemplo n.º 5
0
        private void SaveJobFile(string _sDevice)
        {
            string   sCommandPath   = "C:\\Data\\VisnJobChange.ini";
            CIniFile IniCommandSave = new CIniFile(sCommandPath);

            IniCommandSave.Save("JobChange", "Device", OM.GetCrntDev());
        }
Exemplo n.º 6
0
        //FormMain FrmMain;

        public FormOption(Panel _pnBase)
        {
            InitializeComponent();

            this.TopLevel = false;
            this.Parent   = _pnBase;

            //FrmMain = _FrmMain;

            //파일 버전, 수정한날짜 보여줄때 필요한 부분
            string   sExeFolder = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
            string   FileName   = Path.GetFileName(sExeFolder);
            FileInfo File       = new FileInfo(FileName);
            //파일 버전 보여주는 부분
            string sFileVersion = System.Windows.Forms.Application.ProductVersion;

            lbVer.Text = "Ver " + sFileVersion;
            //수정한 날짜 보여주는 부분
            double Age  = File.LastWriteTime.ToOADate();
            string Date = DateTime.FromOADate(Age).ToString("''yyyy'_ 'M'_ 'd'_ 'tt' 'h': 'm''");

            lbDate.Text = Date;

            UpdateComOptn(true);
            OM.LoadCmnOptn();
        }
Exemplo n.º 7
0
        public void ShowPage(int _iPageIdx)
        {
            FrmDeviceSet.UpdateDevInfo(true);
            FrmDeviceSet.UpdateDevOptn(true);
            PM.UpdatePstn(true);
            PM.Load(OM.GetCrntDev());

            switch (_iPageIdx)
            {
            case 0: FrmOperation.Show();          break;

            case 1:                               break;

            case 2: FrmDevice.Show();          break;

            case 3: FrmOption.Show();          break;

            case 4: FrmSPC.FormInit();
                FrmSPC.Show();          break;

            case 5: SML.SetDllMainWin(ref pnBase); break;

            default: FrmOperation.Show();         break;
            }
        }
Exemplo n.º 8
0
        public FormOption(Panel _pnBase)
        {
            InitializeComponent();

            this.TopLevel = false;
            this.Parent   = _pnBase;

            UpdateComOptn(true);
            UpdateEqpOptn(true);

            OM.LoadCmnOptn();

            //Scable Setting
            this.Dock = DockStyle.Fill;
            int _iWidth  = _pnBase.Width;
            int _iHeight = _pnBase.Height;

            const int iWidth  = 1280;
            const int iHeight = 863;

            float widthRatio  = _iWidth / (float)iWidth;   // this.ClientSize.Width;//1280f;
            float heightRatio = _iHeight / (float)iHeight; //.ClientSize.Height; //863f ;

            SizeF scale = new SizeF(widthRatio, heightRatio);

            //this.Scale(scale);

            foreach (Control control in this.Controls)
            {
                control.Scale(scale);
                //control.Font = new Font("Verdana", control.Font.SizeInPoints * heightRatio * widthRatio);
            }
        }
Exemplo n.º 9
0
        private bool DeviceChange(string _sDevName)
        {
            bool bRet = true;

            if (!OM.LoadJobFile(_sDevName))
            {
                return(false);
            }
            SEQ.Visn.SendJobChange(_sDevName);
            PM.Load(_sDevName);
            CConfig Config       = new CConfig();
            string  sExeFolder   = System.AppDomain.CurrentDomain.BaseDirectory;
            string  sDevOptnPath = sExeFolder + "JobFile\\" + _sDevName + "\\TrayMask.ini";

            Config.Load(sDevOptnPath, CConfig.EN_CONFIG_FILE_TYPE.ftIni);
            DM.ARAY[ri.MASK].Load(Config, true);

            CDelayTimer TimeOut = new CDelayTimer();

            TimeOut.Clear();
            while (!SEQ.Visn.GetSendCycleEnd(VisnCom.vs.JobChange))
            {
                Thread.Sleep(1);
                if (TimeOut.OnDelay(8000))
                {
                    Log.ShowMessage("Vision", "Device Change TimeOut");
                    bRet = false;
                    break;
                }
            }

            PM.UpdatePstn(true);

            DM.ARAY[ri.SPLR].SetMaxColRow(1, 1);
            DM.ARAY[ri.IDXR].SetMaxColRow(OM.DevInfo.iTRAY_PcktCntX, OM.DevInfo.iTRAY_PcktCntY);
            DM.ARAY[ri.IDXF].SetMaxColRow(OM.DevInfo.iTRAY_PcktCntX, OM.DevInfo.iTRAY_PcktCntY);
            DM.ARAY[ri.PCKR].SetMaxColRow(1, 1);
            DM.ARAY[ri.TRYF].SetMaxColRow(OM.DevInfo.iTRAY_PcktCntX, OM.DevInfo.iTRAY_PcktCntY);
            DM.ARAY[ri.TRYG].SetMaxColRow(OM.DevInfo.iTRAY_PcktCntX, OM.DevInfo.iTRAY_PcktCntY);
            DM.ARAY[ri.OUTZ].SetMaxColRow(1, 1);
            DM.ARAY[ri.STCK].SetMaxColRow(1, OM.DevInfo.iTRAY_StackingCnt);
            DM.ARAY[ri.BARZ].SetMaxColRow(1, 1);
            DM.ARAY[ri.INSP].SetMaxColRow(1, OM.DevInfo.iTRAY_PcktCntY);
            DM.ARAY[ri.PSTC].SetMaxColRow(1, 1);
            DM.ARAY[ri.MASK].SetMaxColRow(OM.DevInfo.iTRAY_PcktCntX, OM.DevInfo.iTRAY_PcktCntY);

            DM.ARAY[ri.TRYF].SetStat(cs.Empty);
            DM.ARAY[ri.TRYG].SetStat(cs.Good);
            DM.ARAY[ri.STCK].SetStat(cs.Empty);
            DM.ARAY[ri.INSP].SetStat(cs.Good);

            DM.ARAY[ri.IDXR].SetMask(DM.ARAY[ri.MASK]);
            DM.ARAY[ri.IDXF].SetMask(DM.ARAY[ri.MASK]);
            DM.ARAY[ri.TRYF].SetMask(DM.ARAY[ri.MASK]);
            DM.ARAY[ri.TRYG].SetMask(DM.ARAY[ri.MASK]);

            return(bRet);
        }
Exemplo n.º 10
0
        private void btSave_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ti.Frm);

            UpdateMstOptn(false);
            OM.SaveMstOptn();
        }
Exemplo n.º 11
0
        public FormLotOpen()
        {
            InitializeComponent();

            tbSelDevice.Text = OM.GetCrntDev();
            tbLotNo.Text     = "";

            tbLotNo.Focus();
        }
Exemplo n.º 12
0
        public static void Init()
        {
            SML.TPara Para;

            Para.sParaFolderPath = Directory.GetCurrentDirectory() + "\\Util\\";
            Para.iWidth          = 1280;
            Para.iHeight         = 863;
            Para.bTabHides       = new bool[6];
            Para.bUseErrPic      = true;
            Para.iCntErr         = 60;
            Para.iCntDIn         = 32;
            Para.iCntDOut        = 32;
            Para.iCntCylinder    = 9;
            Para.iCntMotr        = 3;
            Para.eLanSel         = EN_LAN_SEL.English;
            Para.eDio            = EN_DIO_SEL.AXL;
            Para.eMotors         = new EN_MOTR_SEL[Para.iCntMotr];

            Para.eMotors[0] = EN_MOTR_SEL.AXL;
            Para.eMotors[1] = EN_MOTR_SEL.AXL;
            Para.eMotors[2] = EN_MOTR_SEL.AXL;

            SML.Init(Para);
            DM.Init();
            OM.Init();
            LOT.Init();
            SPC.Init();
            PM.Init(PM.PstnCnt);

            MainThread.Priority = ThreadPriority.Highest;
            //MainThread.Priority = ThreadPriority.Normal;
            MainThread.Start();

            m_tmToStop    = new CDelayTimer();
            m_tmToStrt    = new CDelayTimer();
            m_tmFlickOn   = new CDelayTimer();
            m_tmFlickOff  = new CDelayTimer();
            m_tmCloseDoor = new CDelayTimer();
            m_tmTemp      = new CDelayTimer();

            m_bBtnReset = false;
            m_bBtnStart = false;
            m_bBtnStop  = false;
            m_bBtnAir   = false;

            m_bRun     = false;
            m_bRunEdge = false;
            m_bFlick   = false;
            m_iStep    = EN_SEQ_STEP.Idle;
            m_iSeqStat = EN_SEQ_STAT.Stop;

            //Run End Buzzer.
            m_bRunEnd = false;

            m_Part[(int)pi.IDX] = IDX;
        }
Exemplo n.º 13
0
        public static void Close()
        {
            MainThread.Abort();
            MainThread.Join();

            SM.Close();
            OM.Close();
            LOT.Close();
            SPC.Close();
        }
Exemplo n.º 14
0
        private void btSetting_Click(object sender, EventArgs e)    //DeviceSet Form 띄움
        {
            this.Hide();
            FrmMain.FrmDeviceSet.Show();
            FrmMain.FrmDeviceSet.UpdateDevOptn(true);
            FrmMain.FrmDeviceSet.UpdateDevInfo(true);
            PM.UpdatePstn(true);

            PM.Load(OM.GetCrntDev());
        }
Exemplo n.º 15
0
        public FormOption(Panel _pnBase)
        {
            InitializeComponent();

            this.TopLevel = false;
            this.Parent   = _pnBase;

            UpdateComOptn(true);
            UpdateEqpOptn(true);

            OM.LoadCmnOptn();
        }
Exemplo n.º 16
0
        public FormLotOpen()
        {
            InitializeComponent();



            tbSelDevice.Text  = OM.GetCrntDev();
            tbLotNo.Text      = "";
            tbEmployeeID.Text = SM.FrmLogOn.GetId();

            tbLotNo.Focus();
        }
Exemplo n.º 17
0
        private void lbOption1_DoubleClick(object sender, EventArgs e)
        {
            int iBtnTag = Convert.ToInt32(((Label)sender).Tag);

            switch (iBtnTag)
            {
            default: break;
                //case 1: OM.CmnOptn.bIgnrDoor    = !OM.CmnOptn.bIgnrDoor   ; break;
                //case 2: OM.CmnOptn.bVisnSkip    = !OM.CmnOptn.bVisnSkip   ; break;
                //case 3: OM.CmnOptn.bMrkingSkip  = !OM.CmnOptn.bMrkingSkip ; break;
            }
            OM.SaveCmnOptn();
        }
Exemplo n.º 18
0
        private void btSetting_Click(object sender, EventArgs e)    //DeviceSet Form 띄움
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ti.Frm);

            this.Hide();
            FrmMain.FrmDeviceSet.Show();
            FrmMain.FrmDeviceSet.UpdateDevInfo(true);
            PM.UpdatePstn(true);

            PM.Load(OM.GetCrntDev());
        }
Exemplo n.º 19
0
        public FormLotOpen()
        {
            InitializeComponent();


            tbSelDevice.Text  = OM.GetCrntDev();
            tbLotNo.Text      = "";
            tbEmployeeID.Text = ""; //20180125 SML.FrmLogOn.GetId();
            tbMaterialNo.Text = "";
            tbLotAlias.Text   = "";

            tbLotNo.Focus();
        }
Exemplo n.º 20
0
        private void btRename_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ForContext.Frm);

            if (tbFromName.Text == "")
            {
                //Log.ShowMessage("Error", "선택된 JOB FILE 이름이 없습니다.");
                Log.ShowMessage("Error", "The selected JOB FILE name is missing.");
                return;
            }

            if (tbToName.Text == "")
            {
                //Log.ShowMessage("Error", "입력된 JOB FILE 이름이 없습니다.");
                Log.ShowMessage("Error", "Enter JOB FILE name is missing.");
                return;
            }

            string sFromPath;
            string sToPath;

            sFromPath = Application.StartupPath + "\\JobFile\\" + tbFromName.Text;
            sToPath   = Application.StartupPath + "\\JobFile\\" + tbToName.Text;
            DirectoryInfo di = new DirectoryInfo(sToPath);

            if (di.Exists == false)
            {
                //if (Log.ShowMessageModal("Confirm", "잡파일 이름을 변경하시겠습니까?") != DialogResult.Yes) return;
                if (Log.ShowMessageModal("Confirm", "Do you want to change the JOB FILE Name?") != DialogResult.Yes)
                {
                    return;
                }
                RenameFolder(sFromPath, sToPath);
            }

            if (di.Exists == true)
            {
                //Log.ShowMessage("Warning", "같은 이름의 JOB FILE이 존재합니다.");
                Log.ShowMessage("Warning", "File with the same name exists.");
                return;
            }

            OM.SetCrntDev(tbToName.Text);
            DispDevice();

            //Trace Log.
            //Log.Trace("JobFile", (tbToName.Text + " is Maked by Rename"));
            SaveDeviceLog(3, tbFromName.Text, tbToName.Text);
        }
Exemplo n.º 21
0
        private void FormLotOpen_VisibleChanged(object sender, EventArgs e)
        {
            this.Left         = 0;
            this.Top          = 0;
            tbSelDevice.Text  = OM.GetCrntDev();
            tbEmployeeID.Text = ""; //LOT.CrntLotData.sEmployeeID ; //20180125 SML.FrmLogOn.GetId();
            tbLotNo.Text      = ""; //"HZ7170CU.98";
            tbMaterialNo.Text = ""; //"11082611";
            tbLotAlias.Text   = ""; //"5R-ebxD68-0";

            tbLotNo.Focus();

            lbConDB.Visible = false;
        }
Exemplo n.º 22
0
        private void btSave_Click(object sender, EventArgs e)
        {
            Log.Trace("SAVE", "Clicked");

            if (Log.ShowMessageModal("Confirm", "Are you Sure?") != DialogResult.Yes)
            {
                return;
            }

            UpdateDevInfo(false);
            UpdateNodePos(false);
            UpdateDevOptn(false);
            if (WorkDistanceCal() > 200)
            {
                Log.ShowMessage("Warring", "작업길이 최대치를 넘어갔습니다.");
                return;
            }
            if (WorkDistanceCal() > OM.MstOptn.dMAXWorkDist && !OM.DevOptn.bShiftWork)
            {
                if (Log.ShowMessageModal("Warring", "Used ShiftWork ?") != DialogResult.Yes)
                {
                    return;
                }
                cbshiftWork.Checked = true;
                Refresh();
            }



            OM.SaveDevInfo(OM.GetCrntDev().ToString());


            OM.SaveNodePos(OM.GetCrntDev().ToString());


            OM.SaveDevOptn(OM.GetCrntDev().ToString());

            pbLine.Refresh();

            PM.UpdatePstn(false);
            PM.Save(OM.GetCrntDev());

            tbWorkDist.Text  = OM.DevOptn.dWorkDist.ToString();
            tbWorkDist2.Text = OM.DevOptn.dWorkDist.ToString();

            //DM.ARAY[(int)ri.REAR ].SetMaxColRow(OM.DevInfo.iRearColCnt , OM.DevInfo.iRearRowCnt );
            //DM.ARAY[(int)ri.FRNT ].SetMaxColRow(OM.DevInfo.iFrntColCnt , OM.DevInfo.iFrntRowCnt );

            OM.SaveEqpOptn();
        }
Exemplo n.º 23
0
        public FormMaster()
        {
            InitializeComponent();

            //Input ListView
            lvSequence.Clear();
            lvSequence.View          = View.Details;
            lvSequence.FullRowSelect = true;
            lvSequence.MultiSelect   = true;
            lvSequence.GridLines     = true;


            lvSequence.Columns.Add("Eabled", 60, HorizontalAlignment.Left);
            lvSequence.Columns.Add("Part Name", 90, HorizontalAlignment.Left);
            lvSequence.Columns.Add("ToSTart", 60, HorizontalAlignment.Left);
            lvSequence.Columns.Add("Seq", 60, HorizontalAlignment.Left);
            lvSequence.Columns.Add("Cycle", 60, HorizontalAlignment.Left);
            lvSequence.Columns.Add("ToStop", 60, HorizontalAlignment.Left);
            lvSequence.Columns.Add("Home", 60, HorizontalAlignment.Left);

            ListViewItem [] liInput = new ListViewItem [(int)pi.MAX_PART];
            for (int i = 0; i < (int)pi.MAX_PART; i++)
            {
                liInput[i] = new ListViewItem("");
                liInput[i].SubItems.Add(SEQ.m_Part[i].GetPartName());
                liInput[i].SubItems.Add("");
                liInput[i].SubItems.Add("");
                liInput[i].SubItems.Add("");
                liInput[i].SubItems.Add("");
                liInput[i].SubItems.Add("");

                liInput[i].UseItemStyleForSubItems = false;
                lvSequence.Items.Add(liInput[i]);

                cbPart[i]      = new CheckBox();
                cbPart[i].Text = "";
                cbPart[i].Size = new System.Drawing.Size(13, 13);
                lvSequence.Controls.Add(cbPart[i]);
                cbPart[i].Left = 15;
                cbPart[i].Top  = iLvHeadHeight + iLvCellHeight * i;
            }

            var PropInput = lvSequence.GetType().GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);

            PropInput.SetValue(lvSequence, true, null);

            UpdateMstOptn(true);
            OM.LoadMstOptn();
        }
Exemplo n.º 24
0
        //public static List<double> lstTime ;
        //static FileStream   fs;
        //static StreamWriter sw;
        //static bool bFst ;
        //static double dPreTime2;
        //static public void SaveCsv(ref List<double> _lst,string _sPath = "")
        //{
        //    string sPath1 = @"D:\" + _sPath + ".csv";
        //    string sPath2 = @"D:\TimeCheck.csv" ;

        //    if(!bFst)
        //    {
        //        fs = new FileStream(sPath1, FileMode.Append, FileAccess.Write);
        //        sw = new StreamWriter(fs, Encoding.UTF8);
        //        bFst = true;
        //    }
        //    string line = "";

        //    for(int i=0; i<_lst.Count; i++) {
        //        line += string.Format("{0:0.0000}",_lst[i]) + ",";
        //    }
        //    sw.WriteLine(line);
        //}
        //public static double GetTime()
        //{
        //    double dCrntTime = CTimer.GetTime_us();
        //    double dTime = (dCrntTime - dPreTime2) / 1000.0;
        //    dPreTime2 = dCrntTime;
        //    return dTime;
        //}
        //SaveCsv(ref lstTime,sPath);
        public static void Update()
        {
            //lstTime = new List<double>();
            //string sPath = DateTime.Now.ToString("HHmmss");
            double dPreTime = CTimer.GetTime_us();
            double dCrntTime;

            while (true)
            {
                dCrntTime = CTimer.GetTime_us();
                m_dMainThreadCycleTime = (dCrntTime - dPreTime) / 1000.0;
                dPreTime = dCrntTime;
                Thread.Sleep(0);

                //Motion Dll Update
                SM.Update(m_iSeqStat);

                //Part
                for (int i = 0; i < (int)pi.MAX_PART; i++)
                {
                    m_Part[i].Update();
                }

                //Inspection
                InspectMainAir();
                InspectEmergency();
                InspectActuator();
                InspectMotor();
                InspectCrash();
                InspectTemp();

                //Update ErrorProc.
                UpdateButton();

                //Check Button.
                UpdateSeqState();

                //Update Motor State (Input)
                MM.Update();

                //SPC
                SPC.Update(LOT.CrntLotData.sLotNo, OM.GetCrntDev(), m_iSeqStat, OM.EqpStat.bMaint);

                //Vision Communication
                VC.Update();

                //SEQ.BarcordPrnt.Update();
            }
        }
Exemplo n.º 25
0
        public static void Update()
        {
            double dPreTime = CTimer.GetTime_us();
            double dCrntTime;

            while (true)
            {
                dCrntTime = CTimer.GetTime_us();
                m_dMainThreadCycleTime = (dCrntTime - dPreTime) / 1000.0;
                if (m_dMainThreadCycleTime > 2)
                {
                    Log.Trace(m_dMainThreadCycleTime.ToString());
                }
                dPreTime = dCrntTime;
                Thread.Sleep(1);

                //Motion Dll Update
                SM.Update(m_iSeqStat);

                //Part
                for (int i = 0; i < (int)pi.MAX_PART; i++)
                {
                    m_Part[i].Update();
                }

                //Inspection
                InspectMainAir();
                InspectEmergency();
                InspectActuator();
                InspectMotor();
                InspectCrash();
                InspectTemp();
                InspectLightGrid();

                //Update ErrorProc.
                UpdateButton();

                //Check Button.
                UpdateSeqState();

                //Update Motor State (Input)
                MM.Update();

                //SPC
                SPC.Update(LOT.GetLotNo(), OM.GetCrntDev(), m_iSeqStat, OM.EqpStat.bMaint);
            }
        }
Exemplo n.º 26
0
        private void btDelete_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ForContext.Frm);

            //Check None Name.
            if (tbFromName.Text == "")
            {   //아무것도 선택되지 않은 경우.
                //Log.ShowMessage("Error", "선택된 JOB FILE 이름이 없습니다." );
                Log.ShowMessage("Error", "The selected JOB FILE name is missing.");
                return;
            }

            string sPath;

            sPath = Application.StartupPath + "\\JobFile\\" + tbFromName.Text;

            DirectoryInfo di = new DirectoryInfo(sPath);

            if (di.Exists == true)
            {
                //if (Log.ShowMessageModal("Confirm", "선택된 JOB FILE을 삭제하시겠습니까?") != DialogResult.Yes) return;
                if (Log.ShowMessageModal("Confirm", "Do you want to delete the selected JOB FILE?") != DialogResult.Yes)
                {
                    return;
                }
                DeleteFolder(sPath);
            }

            if (tbFromName.Text == OM.GetCrntDev())
            {
                //Log.ShowMessage("Warning", "현재 사용중인 JOB FILE은 삭제할 수 없습니다." );
                Log.ShowMessage("Warning", "JOB FILE currently in use cannot be deleted.");
                return;
            }

            DispDevice();

            //Trace Log.
            //Log.Trace("JobFile", (tbFromName.Text + " is Deleted"));
            SaveDeviceLog(4, tbFromName.Text);

            //pbStatus.Minimum = 0;
            //UserFile.GridSearchDir(ExtractFilePath(Application->ExeName) + "JobFile", sgDevice, 1, true);     // 디렉토리 읽어와서 날짜와 알파벳 순으로 정렬
            //sgDevice->Row = 0;
        }
Exemplo n.º 27
0
        public static void Update()
        {
            double dPreTime = CTimer.GetTime_us();
            double dCrntTime;

            while (true)
            {
                dCrntTime = CTimer.GetTime_us();
                m_dMainThreadCycleTime = (dCrntTime - dPreTime) / 1000.0;
                dPreTime = dCrntTime;
                Thread.Sleep(0);
                SML.Update(m_iSeqStat);

                //Part
                for (int i = 0; i < (int)pi.MAX_PART; i++)
                {
                    m_Part[i].Update();
                }

                //Inspection
                InspectMainAir();
                InspectEmergency();
                InspectActuator();
                InspectMotor();
                InspectCrash();
                InspectTemp();
                InspectFlowMeter();

                //Update ErrorProc.
                UpdateButton();

                //Check Button.
                UpdateSeqState();

                //Update Motor State (Input)
                MM.Update();

                //SPC
                SPC.Update(LOT.CrntLotData.sEmployeeID, LOT.CrntLotData.sLotNo, OM.GetCrntDev(), m_iSeqStat, OM.EqpStat.bMaint);

                //Vision Communication
                Visn.Update();

                SEQ.BarcordPrnt.Update();
            }
        }
Exemplo n.º 28
0
        private void btSavePosition_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ForContext.Frm);

            if (Log.ShowMessageModal("Confirm", "Are you Sure?") != DialogResult.Yes)
            {
                return;
            }

            PM.UpdatePstn(false);
            PM.Save(OM.GetCrntDev());
            PM.UpdatePstn(true);

            Refresh();
        }
Exemplo n.º 29
0
        private void btSave_Click(object sender, EventArgs e)
        {
            //Check Running Status.
            if (SEQ._bRun)
            {
                Log.ShowMessage("Warning", "Can't Save during Autorunning!");
                return;
            }

            if (Log.ShowMessageModal("Confirm", "Are you Sure?") != DialogResult.Yes)
            {
                return;
            }

            UpdateComOptn(false);
            OM.SaveCmnOptn();
        }
Exemplo n.º 30
0
        public static void Close()
        {
            MainThread.Abort();
            MainThread.Join();

            SM.Close();
            OM.Close();
            LOT.Close();
            SPC.Close();

            //for (int i = 1; i < (int)si.MAX_RS232; i++)
            //{
            //    Com[i].PortClose();
            //}

            //ML.IO_SetY(yi.SSTG_HeaterOn,false);
            //SEQ.Oracle.CloseDB();
        }