コード例 #1
0
        public TickerExchangeWebInfo Clone()
        {
            TickerExchangeWebInfo info = (TickerExchangeWebInfo)MemberwiseClone();

            info.Reader   = null;
            info.Document = null;
            return(info);
        }
        private void bbOpenWeb_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            TickerExchangeWebInfo info = (TickerExchangeWebInfo)this.gridView1.GetFocusedRow();

            if (info == null)
            {
                return;
            }
            System.Diagnostics.Process.Start(info.WebPage);
        }
        private void biAddTicker_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            TickerExchangeWebInfo info = new TickerExchangeWebInfo();
            TickerWebInfoForm     form = new TickerWebInfoForm();

            form.Ticker = info;
            if (form.ShowDialog() == DialogResult.OK)
            {
                Info.Tickers.Add(info);
                this.gridView1.RefreshData();
                Info.Save();
            }
        }
        private void biEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            TickerExchangeWebInfo sel = (TickerExchangeWebInfo)this.gridView1.GetFocusedRow();

            if (sel == null)
            {
                return;
            }
            TickerExchangeWebInfo info = sel.Clone();
            TickerWebInfoForm     form = new TickerWebInfoForm();

            form.Ticker = info;
            if (form.ShowDialog() == DialogResult.OK)
            {
                sel.AssignFrom(info);
                this.gridView1.RefreshData();
                Info.Save();
            }
        }
コード例 #5
0
        public void AssignFrom(TickerExchangeWebInfo info)
        {
            this.Marked             = info.Marked;
            this.Exchange           = info.Exchange;
            this.WebPage            = info.WebPage;
            this.XpTicker           = info.XpTicker;
            this.XpClosePrice       = info.XpClosePrice;
            this.XpPreMarketPrice   = info.XpPreMarketPrice;
            this.XpAfterMarketPrice = info.XpAfterMarketPrice;
            this.XpCurrentPrice     = info.XpCurrentPrice;

            this.Ticker           = info.Ticker;
            this.ClosePrice       = info.ClosePrice;
            this.PreMarketPrice   = info.PreMarketPrice;
            this.AfterMarketPrice = info.AfterMarketPrice;
            this.CurrentPrice     = info.CurrentPrice;

            this.Error          = info.Error;
            this.LastUpdateTime = info.LastUpdateTime;
            this.Text           = info.Text;
        }
        void UpdateTicker(TickerExchangeWebInfo t)
        {
            int rh = this.gridView1.GetRowHandle(Info.Tickers.IndexOf(t));

            this.gridView1.RefreshRow(rh);
        }