示例#1
0
        /** constructor
         */
        public RowUpdate()
        {
            //callback
            this.callback = null;

            //delta
            this.delta = 0.0f;
        }
示例#2
0
        /** 削除。
         */
        public void Delete()
        {
                        #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL)
            {
                //解除漏れ。
                Tool.Assert(this.callback == null);
            }
                        #endif

            this.callback = null;
        }
示例#3
0
 protected override void OnRowUpdated(RowUpdateType updateType, int rowId)
 {
     lock (_locker)
     {
         if (Updated != null)
         {
             var tradeNo = GetTradeNo(rowId);
             var orderNo = GetOrderNo(rowId);
             var quantity = GetQuantity(rowId);
             var price = GetPrice(rowId);
             var value = GetValue(rowId);
             var e = new TradesUpdatedEventArgs(DateTime.Now, tradeNo, orderNo, quantity, price, value);
             Updated(this, e);
         }
     }
 }
示例#4
0
        protected override void OnRowUpdated(RowUpdateType updateType, int rowId)
        {
            //WriteLine("Securities updated " + Rows[LastUpdatedRow] + " " + Rows.Count);
            if (_rows == null) return;

            if (updateType == RowUpdateType.Updated)
            {
                //lock (_rowsLock)
                    SetRow(rowId);
            }
            else
                throw new InvalidOperationException("Added or deleted row in SECUTIRIES");
            var security = _rows[rowId];
            if (UpdatedEvent != null)
                UpdatedEvent(this, new SecuritiesUpdatedEventArgs(security.Updated, security));
        }
示例#5
0
        /// <summary>
        /// Updates the rows.
        /// </summary>
        /// <param name="enabled">The enabled.</param>
        /// <param name="enabled">The enabled.</param>
        private void UpdateRows(string enabled, RowUpdateType rowType)
        {
            object value = null;

            if (rowType == RowUpdateType.Enabled || rowType == RowUpdateType.Favorite)
            {
                value = (object)Convert.ToInt32(enabled);
            }

            try
            {
                var messgae = new UserRequestRowMessage(_selectedService.SelectedGames, rowType, value);

                //Publish after the gameslist is updated here
                _eventAgg.GetEvent <UserRequestUpdateSelectedRows>().Publish(messgae);
            }
            catch (Exception) { throw; }
        }
 public UserRequestRowMessage(IEnumerable <GameItemViewModel> gameItems, RowUpdateType updateType, object value)
 {
     GameItems     = gameItems;
     RowUpdateType = updateType;
     Value         = value;
 }
示例#7
0
 /** UnSetRowUpdate
  */
 public void UnSetRowUpdate(RowUpdateType a_callback)
 {
     this.rowupdate.UnSetCallBack(a_callback);
 }
示例#8
0
 protected override void OnRowUpdated(RowUpdateType updateType, int rowId)
 {
 }
示例#9
0
 /** UnSetCallBack
  */
 public void UnSetCallBack(RowUpdateType a_callback)
 {
     this.callback -= a_callback;
 }
示例#10
0
 protected virtual void OnRowUpdated(RowUpdateType updateType, int rowId)
 {
 }
示例#11
0
 protected override void OnRowUpdated(RowUpdateType updateType, int rowId)
 {
     lock (_locker)
     {
         if (Updated != null)
         {
             var orderNo = GetOrderNo(rowId);
             var status = GetStatus(rowId);
             var price = GetPrice(rowId);
             var balance = GetBalance(rowId);
             var e = new OrdersUpdatedEventArgs(DateTime.Now, orderNo, status, price, balance);
             Updated(this, e);
         }
     }
 }