public virtual IEnumerator<ITask> DrawFrameHandler(DrawFrame drawFrame)
 {
     if(drawFrame.Body.ImageData == null || drawFrame.Body.ImageData.Length == 0){
         LogInfo("Incoming drawframe image is null");
         drawFrame.ResponsePort.Post(DefaultUpdateResponseType.Instance);
         yield break;
     }
     Stream imageStream = new MemoryStream(drawFrame.Body.ImageData);
     this.drawFrameToForm(new Bitmap(imageStream));
     drawFrame.ResponsePort.Post(DefaultUpdateResponseType.Instance);
     yield break;
 }
Ejemplo n.º 2
0
        void DrawShadow(DrawFrame frame,Vector2 pos)
        {
            Vector2 _pos = new Vector2(pos.X, pos.Y);

            Vector2 scale = new Vector2(1, 1);
            scale.Y *= -0.25f;// 0.25f;
            scale.X *= 0.25f;
            _pos.X *= 0.25f;
            frame.DrawWithTag(shadowtags, spriteBatch, _pos, scale, new Color(0, 0, 0, 1.0f));
        }
Ejemplo n.º 3
0
        public void SaveInXML(XmlElement parentNode, CandleChartControl owner)
        {
            var node     = parentNode.AppendChild(parentNode.OwnerDocument.CreateElement("Comment"));
            var attrName = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Name"));

            attrName.Value = Name;
            var attrText = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Text"));

            attrText.Value = Text;
            var attrColor = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("Color"));

            attrColor.Value = color.ToArgb().ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("ColorText")).Value =
                ColorText.ToArgb().ToString();

            var attrPivotPrice = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("PivotPrice"));

            attrPivotPrice.Value = PivotPrice.ToString(CultureProvider.Common);


            var attrPivotTime = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("PivotTime"));

            attrPivotTime.Value = owner.chart.StockSeries.GetCandleOpenTimeByIndex((int)Math.Round(PivotIndex)).ToString(
                "ddMMyyyy HHmmss", CultureProvider.Common);
            var attrArrowLength = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("ArrowLength"));

            attrArrowLength.Value = ArrowLength.ToString();
            var attrArrowAngle = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("ArrowAngle"));

            attrArrowAngle.Value = ArrowAngle.ToString(CultureProvider.Common);

            var attrHideArrow = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("HideArrow"));

            attrHideArrow.Value = HideArrow.ToString();

            var attrHideBox = node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("HideBox"));

            attrHideBox.Value = HideBox.ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("DrawFrame")).Value = DrawFrame.ToString();

            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("ColorFill")).Value        = ColorFill.ToArgb().ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("FillTransparency")).Value = FillTransparency.ToString();
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("TextCustom")).Value       = TextCustom;
            node.Attributes.Append(parentNode.OwnerDocument.CreateAttribute("magic")).Value            = Magic.ToString();
        }
Ejemplo n.º 4
0
 public void Draw(SpriteBatch sb)
 {
     DrawFrame.DrawElement(size, dum.elem, sb, pos, new Vector2(1, 1), Color.White);
 }