Пример #1
0
 void canvas_OnPriceChanged(Data.DayPrice p)
 {
     if (OnPriceChanged != null)
     {
         OnPriceChanged(p);
     }
 }
        internal void setPrice(string symbol, DayPrice price)
        {
            if (price == null)
            {
                return;
            }

            string txt =  symbol;
            txt += MetaFile.Inst.getName(symbol) + "  ";
            txt += CommonUtil.formatDate(price.Date) + "  ";
            txt += CommonUtil.formatDayOfWeek(price.Date) + "  ";
            txt += "开" + (price.Open / 100.0) + "  ";
            txt += "收" + (price.Close / 100.0) + "  ";
            txt += "高" + (price.High / 100.0) + "  ";
            txt += "低:" + (price.Low / 100.0) + "  ";
            txt += "涨" + CommonUtil.formatPricePercent(((price.Close - price.Open) / price.Open)) + "  ";

            txtDayInfo.Text = txt;
        }
Пример #3
0
        internal DayPrice getPrice(int itemIndex)
        {
            if (itemIndex < 0 || itemIndex >= itemCount)
            {
                return(null);
            }

            var p = new DayPrice()
            {
                Date   = dates[itemIndex],
                Open   = opens[itemIndex],
                Close  = closes[itemIndex],
                High   = highs[itemIndex],
                Low    = lows[itemIndex],
                Volume = vols[itemIndex],
                Amount = amounts[itemIndex],
            };

            return(p);
        }
Пример #4
0
        internal DayPrice getPrice(int i)
        {
            if (i < 0)
            {
                i = 0;
            }
            if (this.dates == null || this.dates.Length == 0)
            {
                return(null);
            }
            DayPrice p = new DayPrice()
            {
                Symbol = this.symbol,
                Date   = this.dates[i],
                Open   = this.opens[i],
                Close  = this.closes[i],
                High   = this.highs[i],
                Low    = this.lows[i],
                Volume = this.vols[i],
                Amount = this.amounts[i]
            };

            return(p);
        }
 internal DayPrice getPrice(int i)
 {
     if (i < 0)
     {
         i = 0;
     }
     if (this.dates==null || this.dates.Length == 0)
     {
         return null;
     }
     DayPrice p = new DayPrice()
     {
         Symbol=this.symbol,
         Date=this.dates[i],
         Open=this.opens[i],
         Close=this.closes[i],
         High=this.highs[i],
         Low=this.lows[i],
         Volume=this.vols[i],
         Amount=this.amounts[i]
     };
     return p;
 }
        internal DayPrice getPrice(int itemIndex)
        {
            if (itemIndex < 0 || itemIndex >= itemCount)
            {
                return null;
            }

            var p = new DayPrice()
            {
                Date = dates[itemIndex],
                Open = opens[itemIndex],
                Close = closes[itemIndex],
                High = highs[itemIndex],
                Low = lows[itemIndex],
                Volume = vols[itemIndex],
                Amount = amounts[itemIndex],
            };
            return p;
        }
 void view_OnPriceChanged(DayPrice price)
 {
     this.priceBox.setPrice(symbol,price);
 }