Exemplo n.º 1
0
        ///<summary></summary>
        public MountItemDef Copy()
        {
            MountItemDef m = new MountItemDef();

            m.MountItemDefNum = MountItemDefNum;
            m.MountDefNum     = MountDefNum;
            m.Xpos            = Xpos;
            m.Ypos            = Ypos;
            m.Width           = Width;
            m.Height          = Height;
            return(m);
        }
Exemplo n.º 2
0
        ///<summary></summary>
        public static void Update(MountItemDef def)
        {
            string command = "UPDATE mountitemdef SET "
                             + "MountDefNum = '" + POut.PInt(def.MountDefNum) + "'"
                             + ",Xpos = '" + POut.PInt(def.Xpos) + "'"
                             + ",Ypos = '" + POut.PInt(def.Ypos) + "'"
                             + ",Width = '" + POut.PInt(def.Width) + "'"
                             + ",Height = '" + POut.PInt(def.Height) + "'"
                             + " WHERE MountItemDefNum  ='" + POut.PInt(def.MountItemDefNum) + "'";

            General2.NonQ(command);
        }
Exemplo n.º 3
0
        ///<summary></summary>
        public static void Insert(MountItemDef def)
        {
            string command = "INSERT INTO mountitemdef (MountDefNum,Xpos,Ypos,Width,Height"
                             + ") VALUES("
                             + "'" + POut.PInt(def.MountDefNum) + "', "
                             + "'" + POut.PInt(def.Xpos) + "', "
                             + "'" + POut.PInt(def.Ypos) + "', "
                             + "'" + POut.PInt(def.Width) + "', "
                             + "'" + POut.PInt(def.Height) + "')";

            def.MountItemDefNum = General2.NonQ(command, true);
        }
Exemplo n.º 4
0
        ///<summary>Gets a list of all MountItemDefs when program first opens.</summary>
        public static void Refresh()
        {
            string    command = "SELECT * FROM mountitemdef";
            DataTable table   = General2.GetTable(command);

            Listt = new List <MountItemDef>();
            MountItemDef mount;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                mount = new MountItemDef();
                mount.MountItemDefNum = PIn.PInt(table.Rows[i][0].ToString());
                mount.MountDefNum     = PIn.PInt(table.Rows[i][1].ToString());
                mount.Xpos            = PIn.PInt(table.Rows[i][2].ToString());
                mount.Ypos            = PIn.PInt(table.Rows[i][3].ToString());
                mount.Width           = PIn.PInt(table.Rows[i][4].ToString());
                mount.Height          = PIn.PInt(table.Rows[i][5].ToString());
                Listt.Add(mount);
            }
        }