Esempio n. 1
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            int k = -1;

            TreeItem item = LocalData.dynamicList.Single(x => x.ID == ParID);

            builder.OpenElement(k++, "div");
            builder.AddAttribute(k++, "id", CompID);
            builder.AddAttribute(k++, "style", "width:400px;max-height:26px;position:relative;");

            SvgHelper1.Cmd_Render(LocalTreeFunctions.CmdCreateDynamicIcon(item), k, builder, item.ID);


            //      < img width = "24" height = "24" title = "Ready State" style = "margin:3px;" src = "icons/Connected.png" />


            int marginLeft = 0;

            if (item.HasIcon)
            {
                builder.OpenElement(k++, "img");
                builder.AddAttribute(k++, "width", "20");
                builder.AddAttribute(k++, "height", "20");
                builder.AddAttribute(k++, "src", item.IconSource);
                builder.AddAttribute(k++, "style", "position:absolute;top:0px;cursor:pointer;margin:0px;");
                builder.AddAttribute(k++, "onclick", EventCallback.Factory.Create(this, e => CmdItemSelect(item.ID)));
                builder.CloseElement();

                marginLeft = 25;
            }

            builder.OpenElement(k++, "span");


            //Console.WriteLine("abc " + item.Column + " " + DateTime.Now.ToString("mm:ss.fff"));

            if (item.IsSelected)
            {
                //Console.WriteLine("abc is selected");
                builder.AddAttribute(k++, "style", "position:absolute;top:0px;cursor:pointer;margin-left:" + marginLeft + "px;background-color:yellow;color:blue;border-style:solid;border-width:1px;border-color:red;");
            }
            else
            {
                //Console.WriteLine("abc is not selected");
                builder.AddAttribute(k++, "style", "position:absolute;top:0px;margin-left:" + marginLeft + "px;cursor:pointer;");
            }


            builder.AddAttribute(k++, "onclick", EventCallback.Factory.Create(this, e => CmdItemSelect(item.ID)));

            builder.AddContent(k++, item.Column);

            builder.CloseElement();

            builder.CloseElement();


            base.BuildRenderTree(builder);
        }
Esempio n. 2
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            Generate_SVG();

            SvgHelper1.Cmd_Render(_Svg, 0, builder);

            base.BuildRenderTree(builder);
        }
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            SvgHelper SvgHelper1 = new SvgHelper();

            SvgHelper1.Cmd_Render <g>(Paint_Points(), 0, builder);

            base.BuildRenderTree(builder);
        }
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            if (_parent.ChartSettings.DrawArea)
            {
                SvgHelper SvgHelper1 = new SvgHelper();

                SvgHelper1.Cmd_Render <g>(Paint_Points(), 0, builder);
            }
            base.BuildRenderTree(builder);
        }
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            int k = 0;

            TreeItem item = LocalData.dynamicList.Single(x => x.ID == ParID);

            builder.OpenRegion(k++);
            builder.OpenElement(k++, "div");
            builder.AddAttribute(k++, "id", CompID);
            builder.AddAttribute(k++, "style", "width:400px;max-height:26px;position:relative;");

            builder.OpenRegion(k++);
            SvgHelper1.Cmd_Render(LocalTreeFunctions.CmdCreateDynamicIcon(item), 0, builder, item.ID);
            builder.CloseRegion();


            int marginLeft = 0;

            if (item.HasIcon)
            {
                builder.OpenElement(k++, "img");
                builder.AddAttribute(k++, "width", "20");
                builder.AddAttribute(k++, "height", "20");
                builder.AddAttribute(k++, "src", item.IconSource);
                builder.AddAttribute(k++, "style", "position:absolute;top:0px;cursor:pointer;margin:0px;user-select:none;");
                builder.AddAttribute(k++, "onclick", EventCallback.Factory.Create(this, e => CmdItemSelect(item.ID)));
                builder.CloseElement();

                marginLeft = 25;
            }

            builder.OpenElement(k++, "span");

            if (item.IsSelected)
            {
                builder.AddAttribute(k++, "style", "position:absolute;top:0px;cursor:pointer;margin-left:" + marginLeft + "px;background-color:yellow;color:blue;border-style:solid;border-width:1px;border-color:red;");
            }
            else
            {
                builder.AddAttribute(k++, "style", "position:absolute;top:0px;margin-left:" + marginLeft + "px;cursor:pointer;");
            }


            builder.AddAttribute(k++, "onclick", EventCallback.Factory.Create(this, e => CmdItemSelect(item.ID)));

            builder.AddContent(k++, item.Column);

            builder.CloseElement();

            builder.CloseElement();

            builder.CloseRegion();

            base.BuildRenderTree(builder);
        }
Esempio n. 6
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            ClockSettings.radius_2_Times    = WidthAndHeight;
            ClockSettings.radius_Origin     = WidthAndHeight / 2;
            ClockSettings.radius_90_Percent = ClockSettings.radius_Origin * 0.9;

            Generate_Clock_SVG();


            SvgHelper1.Cmd_Render(_Svg, 0, builder);
        }
Esempio n. 7
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            int k = 0;

            TreeItem item = parent.SourceList.Single(x => x.ID == ParID);

            builder.OpenRegion(k++);
            builder.OpenElement(k++, "div");
            builder.AddAttribute(k++, "id", CompID);
            builder.AddAttribute(k++, "class", parent.CssClasses.Div);
            builder.OpenRegion(k++);
            builder.OpenElement(k++, "div");
            builder.AddAttribute(k++, "class", "hhh");
            SvgHelper1.Cmd_Render(LocalTreeFunctions.CmdCreateDynamicIcon(parent.SourceList, item), 0, builder, item.ID);
            builder.CloseElement();
            builder.CloseRegion();



            if (!string.IsNullOrEmpty(item.IconSource))
            {
                builder.OpenElement(k++, "div");
                builder.AddAttribute(k++, "class", "hhh");
                builder.OpenElement(k++, "img");
                builder.AddAttribute(k++, "src", item.IconSource);
                builder.AddAttribute(k++, "class", parent.CssClasses.Icon);
                builder.AddAttribute(k++, "onclick", EventCallback.Factory.Create(this, e => CmdItemSelect(item.ID)));
                builder.CloseElement();
                builder.CloseElement();
            }

            builder.OpenElement(k++, "div");

            //builder.OpenElement(k++, "span");
            builder.AddAttribute(k++, "class", CmdGetSpanClass(item) + " hhh");
            builder.AddAttribute(k++, "onclick", EventCallback.Factory.Create(this, e => CmdItemSelect(item.ID)));
            builder.AddContent(k++, item.Text);
            //builder.CloseElement();
            builder.CloseElement();

            builder.CloseElement();

            builder.CloseRegion();

            base.BuildRenderTree(builder);
        }
Esempio n. 8
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            SvgHelper SvgHelper1 = new SvgHelper();


            rect r1 = new rect
            {
                x      = 0,
                y      = 0,
                width  = _parent.ChartSettings.ExtendedWidth,
                height = _parent.ChartSettings.InitialHeight,
                fill   = _parent.ChartSettings.BoardBGColor,
            };

            SvgHelper1.Cmd_Render(r1, 0, builder);

            base.BuildRenderTree(builder);
        }
Esempio n. 9
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            g g1 = new g();

            string StrokeColor = ComponentSettings.BigCircle_Color;


            if (ComponentSettings.SelectedCircles_List.Any(x => x == _id))
            {
                StrokeColor = ComponentSettings.SelectCircle_Color;
            }


            g1.Children.Add(new circle
            {
                //id = _id_bigCircle,
                cx           = par_i * ComponentSettings.w + ComponentSettings.w * 0.5,
                cy           = par_j * ComponentSettings.h + ComponentSettings.h * 0.5,
                r            = ComponentSettings.r,
                onclick      = BoolOptionsEnum.Yes,
                stroke_width = ComponentSettings.compWidth * 0.01,
                stroke       = StrokeColor,
                fill         = ComponentSettings.BigCircle_Color,
                //CaptureRef = true,
            });


            g1.Children.Add(new circle
            {
                //id = _id_smallCircle,
                cx      = par_i * ComponentSettings.w + ComponentSettings.w * 0.5,
                cy      = par_j * ComponentSettings.h + ComponentSettings.h * 0.5,
                r       = ComponentSettings.r * 0.4,
                fill    = ComponentSettings.SmallCircle_Color,
                onclick = BoolOptionsEnum.Yes,
                //CaptureRef = true,
            });


            SvgHelper1.Cmd_Render(g1, 0, builder);

            base.BuildRenderTree(builder);
        }
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            int    par_id = (Parent as CompUsedColors).UsedColors_List.IndexOf(Color);
            circle c      = new circle()
            {
                cx           = (9 - par_id) * 30 + 15,
                cy           = 15,
                r            = 10,
                fill         = Color,
                stroke       = "black",
                stroke_width = 1,
                onclick      = "notEmpty",
            };


            SvgHelper1.Cmd_Render(c, 0, builder);

            base.BuildRenderTree(builder);
        }
Esempio n. 11
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            ComponentSettings.radius_2_Times = WidthAndHeight;


            ComponentSettings.radius_Origin      = WidthAndHeight / 2;
            ComponentSettings.radius_BigCircle   = ComponentSettings.radius_Origin * 0.9;
            ComponentSettings.radius_SmallCircle = ComponentSettings.radius_Origin * 0.6;
            ComponentSettings.CircleWidth        = ComponentSettings.radius_BigCircle - ComponentSettings.radius_SmallCircle;


            Initialize_Gradient();

            Generate_SVG();


            SvgHelper1.Cmd_Render(_Svg, 0, builder);


            base.BuildRenderTree(builder);
        }
Esempio n. 12
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            int k = -1;

            TreeItem item = LocalData.dynamic_List.Single(x => x.Tree_ID == Par_ID);

            builder.OpenElement(k++, "div");
            builder.AddAttribute(k++, "id", Comp_ID);
            builder.AddAttribute(k++, "style", "width:400px;max-height:26px;position:relative;");

            SvgHelper1.Cmd_Render(LocalTreeFunctions.Cmd_Create_Dynamic_Icon(item), k, builder, item.Tree_ID);

            builder.OpenElement(k++, "span");


            //Console.WriteLine("abc " + item.Tree_Column + " " + DateTime.Now.ToString("mm:ss.fff"));

            if (item.Tree_IsSelected)
            {
                //Console.WriteLine("abc is selected");
                builder.AddAttribute(k++, "style", "position:absolute;top:0px;cursor:pointer;background-color:yellow;color:blue;border-style:solid;border-width:1px;border-color:red;");
            }
            else
            {
                //Console.WriteLine("abc is not selected");
                builder.AddAttribute(k++, "style", "position:absolute;top:0px;cursor:pointer;");
            }


            builder.AddAttribute(k++, "onclick", EventCallback.Factory.Create(this, e => Cmd_Tree_Item_Select(item.Tree_ID)));

            builder.AddContent(k++, item.Tree_Column);

            builder.CloseElement();

            builder.CloseElement();


            base.BuildRenderTree(builder);
        }
Esempio n. 13
0
        protected override void BuildRenderTree(RenderTreeBuilder builder)
        {
            g g1 = new g();

            int i1;
            int j1;

            int i2;
            int j2;

            for (int m = 0; m < ComponentSettings.SelectedCircles_List.Count - 1; m++)
            {
                string item1 = ComponentSettings.SelectedCircles_List[m];
                string item2 = ComponentSettings.SelectedCircles_List[m + 1];

                i1 = int.Parse(item1.Substring(0, 1));
                j1 = int.Parse(item1.Substring(1, 1));

                i2 = int.Parse(item2.Substring(0, 1));
                j2 = int.Parse(item2.Substring(1, 1));


                g1.Children.Add(new line
                {
                    id           = "line" + item1 + item2,
                    x1           = i1 * ComponentSettings.w + ComponentSettings.w * 0.5,
                    y1           = j1 * ComponentSettings.h + ComponentSettings.h * 0.5,
                    x2           = i2 * ComponentSettings.w + ComponentSettings.w * 0.5,
                    y2           = j2 * ComponentSettings.h + ComponentSettings.h * 0.5,
                    stroke_width = ComponentSettings.compWidth * 0.05,
                    stroke       = ComponentSettings.SmallCircle_Color,
                });
            }

            SvgHelper1.Cmd_Render(g1, 0, builder);

            base.BuildRenderTree(builder);
        }