Exemplo n.º 1
0
        private void CallBackEvent(int winNum, BloombergTicker data, string text, Image image, string errorMessage)
        {
            if (_blpGetDataCallback != null)
            {
                HPProgressArgs arg = new HPProgressArgs();
                arg.Windownum     = winNum;
                arg.ISIN          = data.ISIN;
                arg.PricingSource = data.PricingSource;
                arg.Text          = text;
                arg.Image         = image;

                if (!string.IsNullOrEmpty(errorMessage))
                {
                    arg.IsError      = true;
                    arg.ErrorMessage = errorMessage;
                }

                _blpGetDataCallback.Report(arg);
            }
        }
Exemplo n.º 2
0
        private void BLPDataArrive(HPProgressArgs args)
        {
            int    winNum        = args.Windownum;
            string ISIN          = args.ISIN;
            string pricingSource = args.PricingSource;
            Image  image         = args.Image;
            string text          = args.Text;
            bool   isSuccess     = !args.IsError;
            string errorMessage  = args.ErrorMessage;


            if (isSuccess)
            {
                picResult.Image = image;
                txtResult.Text  = text;
            }
            else
            {
                // Error handle
            }
        }