Пример #1
0
        public Usuarios()
        {
            this.ArvoreUsuarios = new ABB();

            InitializeComponent();
            LeituraUsuarios();
        }
Пример #2
0
 public HandBehaviours(ActorBehavioursBase <ACType, ABB> abb, PropHandler ph)
 {
     propHandler = ph;
     this.abb    = (ABB)abb;
     this.ac     = abb.ac;
     muscleGroup = ph.attachedMuscleGroup;
     handMuscle  = muscleGroup.muscles[muscleGroup.muscles.Length - 1];
 }
        /// <summary>
        /// Call this method when a signal change occurs
        /// </summary>
        /// <param name="signal">Signal Object</param>
        /// <param name="newValue">Value of the signal change, Can be a bool or double</param>
        /// <param name="timeStamp">Timestamp of the signal change of type Ticks</param>
        public void LogValueChange(ABB.Robotics.Paint.RobView.Database.SignalLog.Signal signal, object newValue, long timeStamp)
        {
            //Ser ut som Signalene bytter metadata underveis, workaround
              // var findsignal = _signalsList.First(x => x.Name == signal.Name);
            Signal findsignal;

               if (TriggeredUnitTest != null)
               {
               findsignal = signal;
               }
               else
               {
               findsignal = _signalsList.First(x => x.Name == signal.Name);
               }

              //  var findsignal = signal;
            if (newValue == null || !IsUsingSignal(findsignal))
            {
                return;
            }

            SignalValueTimestamp signalHandler;

            try
            {
                var value = Convert.ToDouble(newValue);

                signalHandler = new SignalValueTimestamp(findsignal, value, timeStamp);

                foreach (Trigger trigger in _triggerList)
                {
                    //var triggerd = trigger.CheckTrigger(signal, newValue);

                    if (trigger.IsUsingSignal(findsignal))
                    {
                        if (trigger.CheckTrigger(signalHandler))
                        {
                            FireTriggered(trigger.Name);
                        }
                    }
                }
            }
            catch (FormatException ex)
            {
                Console.WriteLine(ex);
                //ABB.Robotics.Paint.RobView.PluginAPI.Logger.Internal.LogException(ex);
            }
            catch (InvalidCastException ex)
            {
                Console.WriteLine(ex);
                //ABB.Robotics.Paint.RobView.PluginAPI.Logger.Internal.LogException(ex);
            }
        }
Пример #4
0
    public void InsertarAVL(AVL root, string nick, string pass, string correo)
    {
        nodoAVL nuevo    = new nodoAVL(nick, pass, correo);
        ABB     nuevoABB = new ABB();

        nuevo.sigABB = nuevoABB;
        if (root.raiz == null)
        {
            root.raiz = nuevo;
        }
        else
        {
            root.raiz = InsertarAVLR(root.raiz, nuevo);
        }
    }
Пример #5
0
        public void TestConcreteRel()
        {
            ABA a = new ABA();

            a.MyString = "a";
            pm.MakePersistent(a);
            ABB b = new ABB();

            b.MyString = "b";
            pm.MakePersistent(b);
            pm.Save();
            b.AddA(a);
            pm.Save();
            pm.UnloadCache();
            b = (ABB)pm.FindObject(b.NDOObjectId);
            Assert.AreEqual(1, b.MyA.Count, "Count wrong");
        }
Пример #6
0
        public void TestAbstractRel()
        {
            AbstractRelLeft left = new AbstractRelLeft();

            left.MyString = "Left";
            pm.MakePersistent(left);
            ABB b = new ABB();

            b.MyString = "b";
            pm.MakePersistent(b);
            pm.Save();
            left.AddABBase(b);
            pm.Save();
            pm.UnloadCache();
            left = (AbstractRelLeft)pm.FindObject(left.NDOObjectId);
            Assert.AreEqual(1, left.TheBases.Count, "Count wrong");
        }
Пример #7
0
    void Awake()
    {
        instance = this;

        items = new Queue();
        //items.InitializeQueue();
        itemsCount  = 0;
        QUEUE_LIMIT = positions.Count;

        for (int i = 0; i < QUEUE_LIMIT; i++)
        {
            queuePositions.Add(positions[i].position);
        }
        virusTypes = new ABB();
        virusTypes.InicializarArbol();

        foreach (GameObject virusGo in prefabs)
        {
            virusTypes.AgregarElem(ref virusTypes.raiz, virusGo.GetComponent <Virus>());
        }
    }
Пример #8
0
        static void Main(string[] args)
        {
            ABB arbol = new ABB();
            //se lee el archivo
            StreamReader leer = new StreamReader(@"../../../ArchivosBase/MOCK_DATA.csv", true);
            string       line = leer.ReadLine();

            line = leer.ReadLine();
            string[] separadas = new string[6];
            while (line != null)
            {
                //se vuelve a leer la línea para no tomar en cuenta los encabezados
                //se separan los campos del medicamento
                separadas = line.Split(',');
                arbol.insertarNodo(separadas);
                line = leer.ReadLine();
                arbol.mostrarinOrden();
                Console.WriteLine("\n");
            }
            Console.ReadLine();
        }
Пример #9
0
        public DataTable GetInvoiceList(ABB.Data.Search.InvoiceForReturnSearchData data)
        {
            string where = "";

            if (data.CODEFROM.Trim() != "")
                where += (where == "" ? "" : "AND ") + "UPPER(V.CODE) >= '" + data.CODEFROM.Trim().ToUpper() + "' ";
            if (data.CODETO.Trim() != "")
                where += (where == "" ? "" : "AND ") + "UPPER(V.CODE) <= '" + data.CODETO.Trim().ToUpper() + "' ";
            if (data.CUSTOMERCODE.Trim() != "")
                where += (where == "" ? "" : "AND ") + "UPPER(V.CUSTOMERCODE) >= '" + data.CUSTOMERCODE.Trim().ToUpper() + "' ";
            if (data.DATEFROM.Year != 1)
                where += (where == "" ? "" : "AND ") + "V.REQDATE >= " + OracleDB.QRDate(data.DATEFROM) + " ";
            if (data.DATETO.Year != 1)
                where += (where == "" ? "" : "AND ") + "V.REQDATE <= " + OracleDB.QRDate(data.DATETO) + " ";
            if (data.PRODUCT != 0)
                where += (where == "" ? "" : "AND ") + "PRODUCT = '" + data.PRODUCT.ToString() + "' ";

            string sql = sql_select + (where == "" ? "" : "WHERE ") + where;
            sql += "ORDER BY V.CODE ";
            return OracleDB.ExecListCmd(sql);
        }
Пример #10
0
 void Controller_EventLog_MessageWritten(object sender, ABB.Robotics.Controllers.EventLogDomain.MessageWrittenEventArgs e)
 {
     MessageBox.Show(e.Message.ToString());
 }
 public override bool IsUsingSignal(ABB.Robotics.Paint.RobView.Database.SignalLog.Signal signal)
 {
     return true;
 }
Пример #12
0
 public DataTable GetStockOutList(ABB.Data.Search.StockOutProductSearchData data, double currentStockIn)
 {
     DataTable dt = SearchObj.GetStockOutList(data, currentStockIn);
     int i = 1;
     foreach (DataRow dRow in dt.Rows)
     {
         dRow["ORDERNO"] = i;
         i += 1;
     }
     return dt;
 }
 public VerificarStatus(ABB ArvoreUsuarios)
 {
     this.ArvoreUsuarios = ArvoreUsuarios;
     InitializeComponent();
 }
Пример #14
0
 public MySrcMLCSharpParser(ABB.SrcML.SrcMLGenerator generator)
 {
     this.Generator = generator;
 }
Пример #15
0
 public BodyBehaviours(ActorBehavioursBase <ACType, ABB> abb)
 {
     this.abb = (ABB)abb;
     this.ac  = abb.ac;
 }
Пример #16
0
        public DataTable GetStockOutList(ABB.Data.Search.StockOutProductSearchData data, double currentStockIn)
        {
            string where = "V.STOCKOUT NOT IN (SELECT REFLOID FROM STOCKIN WHERE STATUS <> '" + Constz.Requisition.Status.Void.Code + "' " +
                    "AND REFTABLE = 'STOCKOUT' AND LOID <> " + currentStockIn.ToString() + " AND DOCTYPE = " + Constz.DocType.RecShop.LOID.ToString() + ") ";

            if (data.REQUISITIONCODEFROM.Trim() != "")
                where += (where == "" ? "" : "AND ") + "UPPER(V.REQUISITIONCODE) >= '" + data.REQUISITIONCODEFROM.Trim().ToUpper() + "' ";
            if (data.REQUISITIONCODETO.Trim() != "")
                where += (where == "" ? "" : "AND ") + "UPPER(V.REQUISITIONCODE) <= '" + data.REQUISITIONCODETO.Trim().ToUpper() + "' ";
            if (data.RESERVEDATEFROM.Year != 1)
                where += (where == "" ? "" : "AND ") + "TO_CHAR(V.RESERVEDATE, 'YYYYMMDD') >= TO_CHAR(" + OracleDB.QRDate(data.RESERVEDATEFROM) + ", 'YYYYMMDD')  ";
            if (data.RESERVEDATETO.Year != 1)
                where += (where == "" ? "" : "AND ") + "TO_CHAR(V.RESERVEDATE, 'YYYYMMDD') <= TO_CHAR(" + OracleDB.QRDate(data.RESERVEDATETO) + ", 'YYYYMMDD')  ";

            string sql = "SELECT distinct 0 ORDERNO, V.STOCKOUT, V.REQUISITIONCODE, V.RESERVEDATE ";
            sql += "FROM " + V_PRODUCTSTOCKINSHOP + " V ";
            sql += (where == "" ? "" : "WHERE ") + where;
            sql += "ORDER BY V.REQUISITIONCODE ";
            return OracleDB.ExecListCmd(sql);
        }
Пример #17
0
 public DataTable GetInvoiceList(ABB.Data.Search.InvoiceForReturnSearchData data)
 {
     DataTable dt = SearchObj.GetInvoiceList(data);
     int i = 1;
     foreach (DataRow dRow in dt.Rows)
     {
         dRow["ORDERNO"] = i;
         i += 1;
     }
     return dt;
 }
Пример #18
0
        /// <summary>
        /// Adds line info to the given XObject.
        /// </summary>
        /// <param name="xmlObject">the XObject</param>
        /// <param name="lineInfo">a LineInfo object. This object is added as an annotation to <paramref name="xmlObject"/></param>
        public static void SetLineInfo(this XObject xmlObject, ABB.SrcML.LineInfo lineInfo) {
            if(null == xmlObject)
                throw new ArgumentNullException("xmlObject");

            xmlObject.AddAnnotation(lineInfo);
        }
Пример #19
0
        /// <summary>
        /// Menu para arboles que no contienen datos enteros
        /// </summary>
        /// <param name="node">Arbol el cual se va manipular</param>
        /// <param name="nombre">nombre del arbol para mostrar al usuario</param>
        static public void MenuMostrar_C1(NodoArbol node, string nombre)
        {
            bool rep = false;

            do
            {
                Console.Clear();
                Console.Title = $"Arbol {nombre}";
                Console.WriteLine("1.- Mostrar Datos del Arbol");
                Console.WriteLine("2.- Recorrido PreOrden");
                Console.WriteLine("3.- Recorrido InOrden");
                Console.WriteLine("4.- Recorrido PostOrden");
                Console.WriteLine("5.- Salir del menu actual");
                Console.WriteLine("6.- Salir del programa");

                try
                {
                    switch (int.Parse(Console.ReadLine()))
                    {
                    case 1:
                        ABB.Transversa(node);
                        System.Threading.Thread.Sleep(2000);
                        rep = true;
                        break;

                    case 2:
                        Recorridos.PreOrden(node);
                        System.Threading.Thread.Sleep(2000);
                        rep = true;
                        break;

                    case 3:
                        Recorridos.InOrden(node);
                        System.Threading.Thread.Sleep(2000);
                        rep = true;
                        break;

                    case 4:
                        Recorridos.PostOrden(node);
                        System.Threading.Thread.Sleep(2000);
                        rep = true;
                        break;

                    case 5:
                        rep = false;
                        break;

                    case 6:
                        Environment.Exit(0);
                        break;

                    default:
                        Console.WriteLine("Elija una opcion valida");
                        rep = true;
                        break;
                    }
                }
                catch (System.FormatException)
                {
                    Console.WriteLine("Ingrese un valor numerico");
                    rep = true;
                }
            } while (rep);
        }
 public RelatorioDeEmprestimo(ABB ArvoreUsuarios)
 {
     this.ArvoreUsuarios = ArvoreUsuarios;
     InitializeComponent();
 }
Пример #21
0
        /// <summary>
        /// Menu en caso de todos los datos del arbol sean enteros
        /// </summary>
        /// <param name="node">Arbol el cual se va manipular</param>
        /// <param name="nombre">nombre del arbol para mostrar al usuario</param>
        static public void MenuMostrar_C2(ref NodoArbol node, string nombre)
        {
            bool rep = false;

            do
            {
                Console.Clear();
                Console.Title = $"Arbol {nombre}";
                Console.WriteLine("1.- Mostrar Datos del Arbol");
                Console.WriteLine("2.- Insertar nodo");
                Console.WriteLine("3.- Eliminar nodo");
                Console.WriteLine("4.- Buscar nodo en el arbol");
                Console.WriteLine("5.- Buscar padre");
                Console.WriteLine("6.- Recorrido PreOrden");
                Console.WriteLine("7.- Recorrido InOrden");
                Console.WriteLine("8.- Recorrido PostOrden");
                Console.WriteLine("9.- Salir del Menu Actual");
                Console.WriteLine("10.- Salir del Programa");

                try
                {
                    switch (int.Parse(Console.ReadLine()))
                    {
                    case 1:
                        Console.Clear();
                        ABB.Transversa(node);
                        System.Threading.Thread.Sleep(2000);
                        rep = true;
                        break;

                    case 2:
                        var valor = MenuInsercionInt();
                        node = ABB.Insertar(valor, node);
                        rep  = true;
                        break;

                    case 3:
                        Console.WriteLine("Que valor desea eliminar?");
                        ABB.BorrarNodo(int.Parse(Console.ReadLine()), node);
                        rep = true;
                        break;

                    case 4:
                        Console.Clear();

                        Console.Write("Valor a buscar: \t");
                        int valor2 = int.Parse(Console.ReadLine());

                        if (Recorridos.Resultado_Buscar(node, valor2))
                        {
                            NodoArbol nodoBuscado = Recorridos.Buscar(node, valor2);
                            string    mensaje     = $"El elemento {nodoBuscado.Valor} si existe; ";

                            if (nodoBuscado.Izq != null)
                            {
                                mensaje += $"su hijo izquierdo es {nodoBuscado.Izq.Valor}";
                            }
                            else
                            {
                                mensaje += "su hijo izquierdo es null";
                            }

                            if (nodoBuscado.Der != null)
                            {
                                mensaje += $", su hijo derecho es {nodoBuscado.Der.Valor}";
                            }
                            else
                            {
                                mensaje += $", su hijo derecho es null";
                            }

                            Console.WriteLine(mensaje);
                        }
                        else
                        {
                            Console.WriteLine("El elemento no existe");
                        }

                        Console.ReadKey();

                        rep = true;
                        break;

                    case 5:
                        Console.Clear();
                        Console.Write("Valor a evaluar: \t");
                        int valor3 = int.Parse(Console.ReadLine());

                        if (Recorridos.Resultado_Buscar(node, valor3))
                        {
                            NodoArbol result = ABB.BuscarPadre(valor3, node);

                            if (result == null)
                            {
                                Console.WriteLine($"El valor {valor3} es la raiz");
                            }
                            else
                            {
                                Console.WriteLine($"El padre de {valor3} es {result.Valor}");
                            }
                        }
                        else
                        {
                            Console.WriteLine("El elemento no existe");
                        }

                        Console.ReadKey();
                        rep = true;
                        break;


                    case 6:
                        Recorridos.PreOrden(node);
                        System.Threading.Thread.Sleep(2000);
                        rep = true;
                        break;

                    case 7:
                        Recorridos.InOrden(node);
                        System.Threading.Thread.Sleep(2000);
                        rep = true;
                        break;

                    case 8:
                        Recorridos.PostOrden(node);
                        System.Threading.Thread.Sleep(2000);
                        rep = true;
                        break;

                    case 9:
                        rep = false;
                        break;

                    case 10:
                        Environment.Exit(0);
                        break;

                    default:
                        Console.WriteLine("Ingrese una opcion valida");
                        rep = true;
                        break;
                    }
                }
                catch (System.FormatException)
                {
                    Console.WriteLine("Ingrese un valor numerico");
                }
            } while (rep);
        }