Esempio n. 1
0
        private void ProcessStkRoomStatus(ArrayList item)
        {
            if (item.Count > 1)
            {
                byte nID = TryConver.ToByte(item[0].ToString());
                if (nID == stockorId)
                {
                    listViewPageStkRoom.Clear();
                    for (int i = 1; i < 142; i++)
                    {
                        Int32        nStatus  = TryConver.ToInt32(item[i].ToString());
                        ListViewItem listItem = new ListViewItem();
                        switch (nStatus)
                        {
                        case 0:
                            listItem.ImageKey = "green";
                            break;

                        case 1:
                            listItem.ImageKey = "blue";
                            break;

                        case 2:
                            listItem.ImageKey = "red";
                            break;
                        }
                        listItem.Text = i.ToString();
                        listViewPageStkRoom.Items.Add(listItem);
                    }
                }
            }
        }
Esempio n. 2
0
        private void dataGridViewKeyPos_SelectionChanged(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection rows = dataGridViewKeyPos.SelectedRows;

            if (rows.Count > 0)
            {
                DataGridViewRow row = rows[0];
                m_nPathPosition = TryConver.ToInt32(row.Cells[0].Value.ToString());
            }
        }
Esempio n. 3
0
        private void btnBackTimeFoups_Click(object sender, EventArgs e)
        {
            string strTime = tBBackTimeFoups.Text;
            byte   nID     = stockorId;
            Int32  nTime   = 0;

            nTime = TryConver.ToInt32(strTime);
            string strVal;

            strVal = string.Format("<{0},{1}>", nID, nTime);

            int nWRet = m_dataHub.WriteData(GuiCommand.StkSetFoupInfoBackTime, strVal);
        }
Esempio n. 4
0
        private void btnFoupMoveInOut_Click(object sender, EventArgs e)
        {
            Button btn   = sender as Button;
            byte   nID   = stockorId;
            byte   nOpt  = 2;
            byte   nMode = TryConver.ToByte(cBFoupMove.SelectedIndex.ToString());
            int    nData = TryConver.ToInt32(tBFoupMove.Text);

            if (btn.Name == "btnFoupMoveIn")
            {
                nOpt = 0;
            }
            else if (btn.Name == "btnFoupMoveOut")
            {
                nOpt = 1;
            }
            string strVal;

            strVal = string.Format("<{0},{1},{2},{3}>", nID, nOpt, nMode, nData);

            int nWRet = m_dataHub.WriteData(GuiCommand.StkHandFoup, strVal);
        }
Esempio n. 5
0
        private void bnSetPath_Click(object sender, EventArgs e)
        {
            int    nFrom  = TryConver.ToInt32(textBoxPathFrom.Text);
            int    nTo    = TryConver.ToInt32(textBoxPathTo.Text);
            string strSQL = String.Format("Position >= {0} and Position <= {1}", nFrom, nTo);

            DataRow[] rows = m_tableKeyPos.Select(strSQL);
            m_tablePathView.Rows.Clear();
            string strPathData = "";

            foreach (DataRow row in rows)
            {
                DataRow newRow = m_tablePathView.NewRow();
                newRow.ItemArray = row.ItemArray;
                m_tablePathView.Rows.Add(newRow);
                string strKeyPoint = "";
                strKeyPoint = string.Format("<{0},{1},{2}>", newRow[TKeyP_Pos].ToString(),
                                            newRow[TKeyP_Type].ToString(), newRow[TKeyP_Speed].ToString());
                strPathData += strKeyPoint;
            }

            string strSetPath = "";
            int    nPathCache = 0;

            if (checkBoxPathCache.Checked)
            {
                nPathCache = 1;
            }
            else
            {
                nPathCache = 0;
            }
            strSetPath = String.Format("<{0},{1}>{2}", m_uIdSelected,
                                       nPathCache, strPathData);


            m_dataHub.Async_WriteData(GuiCommand.OhtSetPath, strSetPath);
        }
Esempio n. 6
0
 private void ProcessFoupTable(ArrayList item)
 {
     if (7 == item.Count)
     {
         UInt32  uBarCode  = TryConver.ToUInt32(item[0].ToString());
         UInt32  uLot      = TryConver.ToUInt32(item[1].ToString());
         UInt32  uCarrier  = TryConver.ToUInt32(item[2].ToString());
         uint    uPort     = TryConver.ToUInt32(item[3].ToString());
         int     nLocation = TryConver.ToInt32(item[4].ToString());
         uint    uLocType  = TryConver.ToUInt32(item[5].ToString());
         uint    uStatus   = TryConver.ToUInt32(item[6].ToString());
         DataRow row       = m_tableFoup.Rows.Find(uBarCode);
         if (null != row)
         {
             row[1] = uLot;
             row[2] = uCarrier;
             row[3] = uPort;
             row[4] = nLocation;
             row[5] = uLocType;
             row[6] = uStatus;
             row.AcceptChanges();
         }
         else
         {
             row    = m_tableFoup.NewRow();
             row[0] = uBarCode;
             row[1] = uLot;
             row[2] = uCarrier;
             row[3] = uPort;
             row[4] = nLocation;
             row[5] = uLocType;
             row[6] = uStatus;
             m_tableFoup.Rows.Add(row);
             m_tableFoup.AcceptChanges();
         }
     }
 }
Esempio n. 7
0
        private void ProcessLastOptFoup(ArrayList item)
        {
            if (item.Count > 1)
            {
                byte nID = TryConver.ToByte(item[0].ToString());
                if (nID == stockorId)
                {
                    tBLastBarCode.Text      = item[1].ToString();
                    tBLastFoupID.Text       = item[2].ToString();
                    tBLastLot.Text          = item[3].ToString();
                    tBLastFoupEventDir.Text = item[4].ToString();
                    UInt16 nInput = Convert.ToUInt16(item[5].ToString());
                    if (1 == nInput)
                    {
                        tBLastFoupAuto.Text = "1";
                        tBLastFoupManu.Text = "0";
                    }
                    else if (2 == nInput)
                    {
                        tBLastFoupAuto.Text = "2";
                        tBLastFoupManu.Text = "0";
                    }
                    else if (3 == nInput)
                    {
                        tBLastFoupAuto.Text = "3";
                        tBLastFoupManu.Text = "0";
                    }
                    else if (4 == nInput)
                    {
                        tBLastFoupAuto.Text = "4";
                        tBLastFoupManu.Text = "0";
                    }
                    else if (5 == nInput)
                    {
                        tBLastFoupAuto.Text = "0";
                        tBLastFoupManu.Text = "1";
                    }
                    else if (6 == nInput)
                    {
                        tBLastFoupAuto.Text = "0";
                        tBLastFoupManu.Text = "2";
                    }
                    else if (7 == nInput)
                    {
                        tBLastFoupAuto.Text = "0";
                        tBLastFoupManu.Text = "3";
                    }
                    else if (8 == nInput)
                    {
                        tBLastFoupAuto.Text = "0";
                        tBLastFoupManu.Text = "4";
                    }

                    try
                    {
                        DateTime dt = new DateTime(TryConver.ToInt32(item[6].ToString()),
                                                   TryConver.ToInt32(item[7].ToString()),
                                                   TryConver.ToInt32(item[8].ToString()),
                                                   TryConver.ToInt32(item[9].ToString()),
                                                   TryConver.ToInt32(item[10].ToString()),
                                                   TryConver.ToInt32(item[11].ToString()));
                        string lastEventTime = dt.ToString();
                        tBLastEventTime.Text = lastEventTime;
                    }
                    catch (System.Exception ex)
                    {
                        //MessageBox.Show(ex.Message);
                    }
                }
            }
        }