예제 #1
0
        private void PATS_OnFillUpdate(string key, FillStruct fill)
        {
            
            ////寫db
            //string date = DateTime.Now.ToString("yyyy/MM/dd");
            //string qrysql = string.Format("SELECT COUNT(*) FROM CAPITALMATCH WHERE DATE='{0}' AND ORDNO='{1}'", date, o.OrdNo);
            //DataTable dt = m_SQL.DoQuery(qrysql);
            //if (dt.Rows[0][0].ToInt() <= 0)
            //{
            //    string sql = string.Format("INSERT INTO CAPITALMATCH ([DATE],ORDNO,CUSTNO,COMID,SIDE,LOTS,PRICE,TIME) VALUES ('{0}','{1}','{2}','{3}',{4},{5},{6},'{7}')", date, o.OrdNo, o.CustNo, o.ComID, (o.BuySell == OrderProcessor.Capital.BuySell.B ? 0 : 1), o.Qty, o.Price, o.Time);
            //    try
            //    {
            //        m_SQL.DoExecute(sql);
            //    }
            //    catch (Exception) { }

            //}
        }
예제 #2
0
 private void PATS_OnFillUpdate(string key, FillStruct fill)
 {
 }
예제 #3
0
        public bool this[int x, int y, MapObjectType type, object obj]
        {
            get
            {

                if (Bounds.Height == Bounds.Width && Bounds.Width == 0)
                {
                    Console.WriteLine("Floor " + FloorMapID + " not loaded!!");
                    return true;
                }
                if (y >= Bounds.Height || x >= Bounds.Width || x < 0 || y < 0)
                    return false;

                if (Locations[x, y] == null)
                    Locations[x, y] = new FillStruct() { };

                FillStruct filltype = Locations[x, y];
                if (type == MapObjectType.InvalidCast)
                    return filltype.Full;
                if (filltype.Full)
                    return false;
                if (type == MapObjectType.Player)
                {
                    return true;
                }
                else if (type == MapObjectType.Monster)
                {
                    return filltype.Monsters == 0;
                }
                else if (type == MapObjectType.Item)
                {
                    return filltype.Item == null;
                }

                return false;
            }
            set
            {
                if (value)
                {
                    if (Bounds.Height == Bounds.Width && Bounds.Width == 0)
                        return;
                    if (y >= Bounds.Height || x >= Bounds.Width || x < 0 || y < 0)
                        return;

                    if (Locations[x, y] == null)
                        Locations[x, y] = new FillStruct() { };
                    if (type == MapObjectType.InvalidCast)
                    {
                        Locations[x, y].Full = false;
                    }
                    if (type == MapObjectType.Item)
                        Locations[x, y].Item = null;

                    if (type == MapObjectType.Monster)
                        Locations[x, y].Monsters = 0;
                }
                else
                {
                    if (y >= Bounds.Height || x >= Bounds.Width)
                        return;

                    if (Locations[x, y] == null)
                        Locations[x, y] = new FillStruct() { };
                    if (type == MapObjectType.InvalidCast)
                        Locations[x, y].Full = true;
                    if (obj != null)
                    {
                        if (obj is Interfaces.INpc)
                        {
                            Locations[x, y].Npc = obj as Interfaces.INpc;
                        }
                    }

                    if (type == MapObjectType.Item)
                        Locations[x, y].Item = obj as Network.GamePackets.FloorItem;

                    if (type == MapObjectType.Monster)
                        Locations[x, y].Monsters = 1;
                }
            }
        }
예제 #4
0
 private void PATS_OnFillReply(string key, FillStruct fill)
 {
     _Match();
 }
예제 #5
0
 private void PATS_OnFillReply(string key, FillStruct fill)
 {
     _Summary();
 }
예제 #6
0
 private void PATS_OnFillReply(string key, FillStruct fill)
 {
     _Order();
 }