示例#1
0
 public AddArmWindow(ARM arm)
 {
     InitializeComponent();
     DataContext  = new AddArmWindowViewModel(arm);
     TextUpdated += ((AddArmWindowViewModel)DataContext).TextUpdated;
     ((AddArmWindowViewModel)DataContext).closeWindow += WindowClose;
 }
示例#2
0
 public bool IsVacuumCheck(ARM _Arm)
 {
     if (_Arm == ARM.LOWER)
     {
         if (_Main.GetVaccumTmData().Robot.RobotData.Wafer_A_Status == WAFER_STS.PRESENT)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         if (_Main.GetVaccumTmData().Robot.RobotData.Wafer_B_Status == WAFER_STS.PRESENT)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
示例#3
0
        public ActionResult DeleteConfirmed(int?id)
        {
            Service service    = db.Services.Find(id);
            string  resourceId = service.ResourceId;
            string  rgName     = "";

            // If we have a resource ID
            if (resourceId.Contains("/subscriptions/"))
            {
                rgName = ARM.GetResourceGroupNameFromId(resourceId);
            }
            // Otherwise it is directly the rgName
            else
            {
                rgName = resourceId;
            }
            string subId = service.SubscriptionId;
            // Instead of taking the first customerId, some additional logic would be desirable
            var customerList = ModelTools.GetCustomersFromUserID(User.Identity.GetUserId());

            db.Services.Remove(service);
            db.SaveChanges();
            Task.Run(() => ARM.DeleteResourceGroupAsync(customerList[0].CustomerId, subId, rgName));
            return(RedirectToAction("Index"));
        }
示例#4
0
        public bool Cmd_ReadEnc(ARM _Arm)
        {
            string strCmd = string.Format("RQ ENC ARM {0}\r"
                                          , _Arm == ARM.LOWER ? "A" : "B");

            return(SendData(strCmd));
        }
示例#5
0
        /// <summary>
        /// The object factory for a particular data collection instance.
        /// </summary>
        public virtual void CreateObjectsFromData(ARMCollection armcollection, System.Data.DataSet data)
        {
            // Do nothing if we have nothing
            if (data == null || data.Tables.Count == 0 || data.Tables[0].Rows.Count == 0)
            {
                return;
            }


            // Create a local variable for the new instance.
            ARM newobj = null;

            // Create a local variable for the data row instance.
            System.Data.DataRow dr = null;


            // Iterate through the table rows
            for (int i = 0; i < data.Tables[0].Rows.Count; i++)
            {
                // Get a reference to the data row
                dr = data.Tables[0].Rows[i];
                // Create a new object instance
                newobj = System.Activator.CreateInstance(armcollection.ContainsType[0]) as ARM;
                // Let the instance set its own members
                newobj.SetMembers(ref dr);
                // Add the new object to the collection instance
                armcollection.Add(newobj);
            }
        }
示例#6
0
        /// <summary>
        /// Fill method for populating an entire collection of ARMCollection
        /// </summary>
        public virtual void Fill(ARMCollection aRMCollection)
        {
            // create the connection to use
            SqlConnection cnn = new SqlConnection(ARM.GetConnectionString());


            try
            {
                using (cnn)
                {
                    // open the connection
                    cnn.Open();


                    // create an instance of the reader to fill.
                    SqlDataReader datareader = SqlHelper.ExecuteReader(cnn, "gsp_SelectARMCollection");


                    // Send the collection and data to the object factory
                    CreateObjectsFromData(aRMCollection, datareader);


                    // close the connection
                    cnn.Close();
                }


                // nullify the connection
                cnn = null;
            }
            catch (SqlException sqlex)
            {
                throw sqlex;
            }
        }
示例#7
0
        public bool MoveExtend(int nStage, int nSlot, ARM _Arm, UPDOWN_POS _UpDnPos)
        {
            RADIAL_POS _RadialPos = RADIAL_POS.EXTENDED;

            _Main.GetVaccumTmData().Robot.Cmd_SendGoTo(nStage, nSlot, _Arm, _RadialPos, _UpDnPos);
            //_Main.GetVaccumTmData().Robot.Cmd_Extend(nStage, nSlot, _Arm, _UpDnPos);
            return(true);
        }
示例#8
0
        public bool MoveRetract(int nStage, int nSlot, ARM _Arm, UPDOWN_POS _UpDnPos)
        {
            RADIAL_POS _RadialPos = RADIAL_POS.RETRACTED;

            _Main.GetVaccumTmData().Robot.Cmd_SendGoTo(nStage, nSlot, _Arm, _RadialPos, _UpDnPos);
            //_Main.GetVaccumTmData().Robot.Cmd_Retract(nStage, nSlot, _Arm, _UpDnPos);
            return(true);
        }
示例#9
0
        public static void Task()
        {
            ARM Dankec = new ARM();

            Dankec.LoadProgram(Core.Input);

            Dankec.Simulate();
        }
 public AddArmWindowViewModel(ARM arm)
 {
     this.arm = arm;
     if (!String.IsNullOrEmpty(arm.ARM_NUMBER))
     {
         name = arm.ARM_NUMBER;
     }
 }
示例#11
0
        public async void Cmd_Write_Move_ArmVac(ARM _Hand, bool bOn)
        {        // Motion 명령 : Down Fold
            string strCmd = string.Format("VACCTRL {0},{1}", (int)_Hand, bOn ? 1 : 0);

            while (Seq_SendCommand(strCmd) == 0)
            {
                await Task.Delay(Loop_Delay);
            }
        }
示例#12
0
        public async void Cmd_Write_Move_DownFold(int nStage, int nSlot, ARM _Hand)
        {        // Motion 명령 : Down Fold
            string strCmd = string.Format("DOWNFOLD {0},{1},{2}", nStage, nSlot, (int)_Hand);

            while (Seq_SendCommand(strCmd) == 0)
            {
                await Task.Delay(Loop_Delay);
            }
        }
示例#13
0
        public async void Cmd_Write_Move_Pos(int nStage, int nSlot, ARM _Hand)
        {        // Motion 명령 : Teaching 위치로 이동
            string strCmd = string.Format("MOVEPOS {0},{1},{2}", nStage, nSlot, (int)_Hand);

            while (Seq_SendCommand(strCmd) == 0)
            {
                await Task.Delay(Loop_Delay);
            }
        }
示例#14
0
        public async void Cmd_Write_Move_Put(int nStage, int nSlot, ARM _Hand)
        {        // Motion 명령 : Put
            string strCmd = string.Format("PUTINTO {0},{1},{2}", nStage, nSlot, (int)_Hand);

            while (Seq_SendCommand(strCmd) == 0)
            {
                await Task.Delay(Loop_Delay);
            }
        }
示例#15
0
        public async void Cmd_Write_MoveWait_FG(int nStage, int nSlot, ARM _Hand)
        {        // Motion 명령 : 앞으로 이동
            string strCmd = string.Format("FGREADY {0},{1},{2}", nStage, nSlot, (int)_Hand);

            while (Seq_SendCommand(strCmd) == 0)
            {
                await Task.Delay(Loop_Delay);
            }
        }
        private void BtnARMporKruskal_Click(object sender, EventArgs e)
        {
            Kruskal kruskal = new Kruskal(G);

            AristasKruskal = kruskal.getCamino();
            ArbolKruskal   = new Grafo();
            List <Vertice> listaVertices;

            listaVertices = ArbolKruskal.getLv();
            TamAristasKruskal.Items.Clear();
            foreach (Vertice v in G.getLv())
            {
                Vertice copia = new Vertice(v.getX(), v.getY(), v.getR(), v.getId());
                listaVertices.Add(copia);
            }
            foreach (Arista a in AristasKruskal)
            {
                foreach (Vertice v in listaVertices)
                {
                    if (a.getVertexOrigen().getId() == v.getId())
                    {
                        Arista copia1 = new Arista(a.getVertex(), a.getPond(), a.getVertexOrigen(), a.getLinea());
                        v.getLa().Add(copia1);
                    }
                    if (a.getVertex().getId() == v.getId())
                    {
                        Arista copia2 = new Arista(a.getVertexOrigen(), a.getPond(), a.getVertex(), a.getLinea());
                        v.getLa().Add(copia2);
                    }
                }
            }
            Double Acumulado = 0;

            foreach (Arista a in AristasKruskal)
            {
                TamAristasKruskal.Items.Add(a.getVertexOrigen().getId().ToString() + " - " + a.getVertex().getId().ToString() + " Peso: " + Math.Round(a.getPond()).ToString());
                Acumulado = Acumulado + Math.Round(a.getPond());
            }
            TamAristasKruskal.Items.Add("Peso Acumulado= " + Math.Round(Acumulado).ToString());
            Graphics graphics = Graphics.FromImage(ARM);

            pictureBox1.Image = ARM;
            Pen pluma = new Pen(Color.Purple, 10);

            foreach (Arista a in AristasKruskal)
            {
                graphics.DrawLine(pluma, a.getVertexOrigen().getX(), a.getVertexOrigen().getY(), a.getVertex().getX(), a.getVertex().getY());
            }
            pictureBox1.Refresh();
            Rectangle Rectangulo = new Rectangle(0, 0, ARM.Width, ARM.Height);

            System.Drawing.Imaging.PixelFormat Format = ARM.PixelFormat;
            copia = ARM.Clone(Rectangulo, Format);
            this.lblNumeroSubgrafos.Text  = kruskal.getSubgrafos().ToString();
            this.BtnAgenteKruskal.Enabled = true;
        }
示例#17
0
        public bool Cmd_SendPlace(int nStage, int nSlot, ARM _Arm)
        {
            _WorkStatus = WORK_STATUS.MOVING;
            string strCmd = string.Format("PLACE {0} SLOT {1} ARM {2}\r"
                                          , nStage
                                          , nSlot
                                          , _Arm == ARM.LOWER ? "A" : "B");

            return(SendData(strCmd));
        }
 public EquipmentViewModelNew(MethodsEntities methodsEntities, ARM arm_one)
 {
     this.arm_one         = arm_one;
     this.methodsEntities = methodsEntities;
     this.arm_id          = arm_one.ARM_ID;
     data           = new ObservableCollection <EQUIPMENT>(methodsEntities.EQUIPMENT.Where(p => p.EQ_ARM_ID == arm_id));
     EquipmentTypes = new ObservableCollection <EQUIPMENT_TYPE>(methodsEntities.EQUIPMENT_TYPE);
     equipmentNew   = new EQUIPMENT();
     isEnabled      = false;
 }
示例#19
0
        public bool Cmd_SendZAxis(int nStage, int nSlot, ARM _Arm, UPDOWN_POS _UpDnPos)
        {
            _WorkStatus = WORK_STATUS.MOVING;
            string strCmd = string.Format("ZAXIS {0} SLOT {1} {2} ARM {3}\r"
                                          , nStage
                                          , nSlot
                                          , _UpDnPos == UPDOWN_POS.UP ? "UP" : "DN"
                                          , _Arm == ARM.LOWER ? "A" : "B");

            return(SendData(strCmd));
        }
示例#20
0
        public bool Cmd_Retract(int nStage, int nSlot, ARM _Arm, UPDOWN_POS _UpDnPos)
        {
            _WorkStatus = WORK_STATUS.MOVING;
            string strCmd = string.Format("RETRACT {0} {1} {2} {3}\r"
                                          , nStage
                                          , _UpDnPos == UPDOWN_POS.UP ? "UP" : "DN"
                                          , nSlot
                                          , _Arm == ARM.LOWER ? "A" : "B");

            return(SendData(strCmd));
        }
示例#21
0
        public async void Cmd_Write_Move_Transfer(int nGetStage, int nGetSlot, ARM _GetHand, int nPutStage, int nPutSlot, ARM _PutHand)
        {        // Motion 명령 : TRANSFER => 메뉴얼에는 TRANSFR로 나와있음.
            string strCmd = string.Format("TRANSFER {0},{1},{2},{3},{4},{5}\r\n"
                                          , nGetStage, nGetSlot, (int)_GetHand
                                          , nPutStage, nPutSlot, (int)_PutHand);

            while (Seq_SendCommand(strCmd) == 0)
            {
                await Task.Delay(Loop_Delay);
            }
        }
示例#22
0
        public bool Cmd_SendGoTo(int nStage, int nSlot, ARM _Arm, RADIAL_POS _RadialPos, UPDOWN_POS _UpDnPos)
        {
            _WorkStatus = WORK_STATUS.MOVING;
            string strCmd = string.Format("GOTO N {0} R {1} Z {2} SLOT {3} ARM {4}\r"
                                          , nStage
                                          , _RadialPos == RADIAL_POS.EXTENDED ? "EX" : "RE"
                                          , _UpDnPos == UPDOWN_POS.UP ? "UP" : "DN"
                                          , nSlot
                                          , _Arm == ARM.LOWER ? "A" : "B");

            return(SendData(strCmd));
        }
示例#23
0
        public MdViewModel(MethodsEntities methodsEntities, ARM arm_one)
        {
            this.methodsEntities = methodsEntities;
            this.arm_id          = arm_one.ARM_ID;
            mdTypes = new ObservableCollection <MEASURING_DEVICE_TYPE>(methodsEntities.MEASURING_DEVICE_TYPE);
            mdArm   = new ObservableCollection <MEASURING_DEVICE>();

            PrepareData();
            CheckRightLeft();

            isEnabled = false;
        }
示例#24
0
    void Start()
    {
        conf    = Memory.LoadConfig();
        ARMList = new string[30] {
            "SCEN001.ARM",
            "SCEN002.ARM",
            "SCEN003.ARM",
            "SCEN004.ARM",
            "SCEN005.ARM",
            "SCEN006.ARM",
            "SCEN007.ARM",
            "SCEN008.ARM",
            "SCEN009.ARM",
            "SCEN010.ARM",
            "SCEN011.ARM",
            "SCEN012.ARM",
            "SCEN013.ARM",
            "SCEN014.ARM",
            "SCEN015.ARM",
            "SCEN016.ARM",
            "SCEN017.ARM",
            "SCEN019.ARM",
            "SCEN020.ARM",
            "SCEN021.ARM",
            "SCEN022.ARM",
            "SCEN023.ARM",
            "SCEN024.ARM",
            "SCEN025.ARM",
            "SCEN026.ARM",
            "SCEN027.ARM",
            "SCEN028.ARM",
            "SCEN029.ARM",
            "SCEN030.ARM",
            "SCEN031.ARM"
        };


        myDropdown.onValueChanged.AddListener(delegate
        {
            myDropdownValueChangedHandler(myDropdown);
        });

        ARM aRM = new ARM();

        aRM.Parse(conf.VSPath + "SMALL/SCEN001.ARM");
        GameObject miniMapGO = aRM.BuildGameObject();

        miniMapGO.transform.parent        = container.transform;
        miniMapGO.transform.localPosition = Vector3.zero;
        miniMapGO.transform.localRotation = new Quaternion();
        miniMapGO.transform.localScale    = Vector3.one;
    }
示例#25
0
        public bool CheckStatusWafer(ARM _Arm)
        {
            bool bRet = false;

            if (_Arm == ARM.UPPER)
            {
                bRet = FmRobot.IsWaferUpper();
            }
            else
            {
                bRet = FmRobot.IsWaferLower();
            }

            return(bRet);
        }
示例#26
0
    private void myDropdownValueChangedHandler(Dropdown target)
    {
        foreach (Transform child in container.transform)
        {
            Destroy(child.gameObject);
        }
        ARM aRM = new ARM();

        //aRM.parseFromFile("E:/SMALL/" + ARMList[target.value]);
        aRM.Parse(conf.VSPath + "SMALL/" + ARMList[target.value]);
        GameObject miniMapGO = aRM.BuildGameObject();

        miniMapGO.transform.parent        = container.transform;
        miniMapGO.transform.localPosition = Vector3.zero;
        miniMapGO.transform.localRotation = new Quaternion();
        miniMapGO.transform.localScale    = Vector3.one;
    }
示例#27
0
        /// <summary>
        /// Deletes the object.
        /// </summary>
        public virtual void Delete(ARM deleteObject)
        {
            // create a new instance of the connection
            SqlConnection cnn = new SqlConnection(ARM.GetConnectionString());
            // create local variable array for the sql parameters
            SqlParameterHash sqlparams = null;


            try
            {
                // discover the parameters
                sqlparams = SqlHelperParameterCache.GetSpParameterSet(ARM.GetConnectionString(), "gsp_DeleteARM");


                // Store the parameter for the LoanApplicationId attribute.
                sqlparams["@loanApplicationId"].Value = deleteObject.LoanApplicationId;


                using (cnn)
                {
                    // open the connection
                    cnn.Open();


                    // Execute the stored proc to perform the delete on the instance.
                    SqlHelper.ExecuteNonQuery(cnn, CommandType.StoredProcedure, "gsp_DeleteARM", sqlparams);


                    // close the connection after usage
                    cnn.Close();
                }


                // nullify the connection var
                cnn = null;
            }
            catch (SqlException sqlex)
            {
                throw sqlex;
            }


            // nullify the reference
            deleteObject = null;
        }
示例#28
0
        /// <summary>
        /// Fill method for populating a collection by LOAN_PRODUCT_DATA
        /// </summary>
        public void FillByLoanProductData(ARMCollection aRMCollection, System.Int64 loanApplicationId)
        {
            // create the connection to use
            SqlConnection cnn = new SqlConnection(ARM.GetConnectionString());


            try
            {
                // discover the sql parameters
                SqlParameterHash sqlparams = SqlHelperParameterCache.GetSpParameterSet(ARM.GetConnectionString(), "gsp_SelectARMCollectionByLoanProductData");


                using (cnn)
                {
                    // open the connection
                    cnn.Open();


                    // set the parameters
                    sqlparams["@loanApplicationId"].Value = loanApplicationId;


                    // create an instance of the reader to fill.
                    SqlDataReader datareader = SqlHelper.ExecuteReader(cnn, "gsp_SelectARMCollectionByLoanProductData", sqlparams);


                    // Send the collection and data to the object factory.
                    CreateObjectsFromData(aRMCollection, datareader);


                    // close the connection
                    cnn.Close();
                }


                // nullify the connection
                cnn = null;
            }
            catch (SqlException sqlex)
            {
                throw sqlex;
            }
        }
示例#29
0
        /// <summary>
        /// Fills a single instance with data based on its primary key values.
        /// </summary>
        public virtual void Fill(ARM arm, System.Int64 loanApplicationId)
        {
            // create the connection to use
            SqlConnection cnn = new SqlConnection(ARM.GetConnectionString());

            try
            {
                // discover the sql parameters
                SqlParameterHash sqlparams = SqlHelperParameterCache.GetSpParameterSet(ARM.GetConnectionString(), "gsp_SelectARM");


                using (cnn)
                {
                    // open the connection
                    cnn.Open();


                    // set the parameters
                    sqlparams["@loanApplicationId"].Value = loanApplicationId;


                    // create an instance of the reader to fill.
                    SqlDataReader datareader = SqlHelper.ExecuteReader(cnn, "gsp_SelectARM", sqlparams);


                    if (datareader.Read())
                    {
                        arm.SetMembers(ref datareader);
                    }


                    cnn.Close();                     // close the connection
                }


                // nullify the connection var
                cnn = null;
            }
            catch (SqlException sqlex)
            {
                throw sqlex;
            }
        }
示例#30
0
 public HardwareType Resolve(Hardware source, HardwareDto destination, HardwareType destMember, ResolutionContext context)
 {
     return(source switch
     {
         Cabinet e => HardwareType.Cabinet,
         ARM e => HardwareType.ARM,
         Flowmeter e => HardwareType.Flowmeter,
         Pressure e => HardwareType.Pressure,
         DiffPressure e => HardwareType.DiffPressure,
         Temperature e => HardwareType.Temperature,
         GasAnalyzer e => HardwareType.GasAnalyzer,
         FireSensor e => HardwareType.FireSensor,
         FlowComputer e => HardwareType.FlowComputer,
         PLC e => HardwareType.PLC,
         APC e => HardwareType.APC,
         NetworkHardware e => HardwareType.Network,
         Valve e => HardwareType.Valve,
         InformPanel e => HardwareType.InformPanel,
         FireModule e => HardwareType.FireModule,
         _ => HardwareType.Valve,
     });