Пример #1
0
        void init()
        {
            this.__ul = new IHTMLUnorderedList();

            this.__ul.name               = "tabs";
            this.__ul.style.marginTop    = "0";
            this.__ul.style.marginRight  = "0";
            this.__ul.style.marginBottom = "-1px";
            this.__ul.style.marginLeft   = "0";

            this.__ul.style.paddingTop    = "0";
            this.__ul.style.paddingRight  = "0";
            this.__ul.style.paddingBottom = "0.3em";
            this.__ul.style.paddingLeft   = "0";

            this.__ul.style.width  = "" + this.Size.Width;
            this.__ul.style.height = "" + __TAB_BAR_HEIGHT;

            this.__ul.style.Float = DOM.IStyle.FloatEnum.left;

            this.__ulContainer                = new IHTMLDiv();
            this.__ulContainer.name           = "ulcontainer";
            this.__ulContainer.style.width    = "" + this.Size.Width;
            this.__ulContainer.style.height   = "" + __TAB_BAR_HEIGHT;
            this.__ulContainer.style.position = DOM.IStyle.PositionEnum.relative;
            this.__ulContainer.style.top      = "0";
            this.__ulContainer.style.bottom   = "0";

            this.__ulContainer.appendChild(this.__ul);

            this.__tabFiller                    = new IHTMLDiv();
            this.__tabFiller.name               = "filler";
            this.__tabFiller.style.height       = "" + __TAB_BAR_HEIGHT;
            this.__tabFiller.style.borderBottom = "1px solid";
            this.__tabFiller.style.borderTop    = "none";
            this.__tabFiller.style.borderRight  = "none";
            this.__tabFiller.style.borderLeft   = "none";
            this.__tabFiller.style.minWidth     = "0";
            this.__tabFiller.style.Float        = DOM.IStyle.FloatEnum.left;

            this.InternalContainer      = new IHTMLDiv();
            this.InternalContainer.name = "tabcontrol";

            this.__tabs          = new Panel();
            this.__tabs.Location = new Point(0, 0);
            this.__tabs.Size     = new Size(this.Size.Width, __TAB_BAR_HEIGHT);

            setTabsSize();

            base.Controls.Add(this.__tabs);
            this.__tabs.GetHTMLTarget().appendChild(this.__ulContainer);

            this.__tabs.GetHTMLTarget().style.SetLocation(0, 0, this.Size.Width, __TAB_BAR_HEIGHT);

            _tabPages = new TabControl.TabPageCollection((TabControl)this);

            FontChanged += OnFontChanged;
        }
Пример #2
0
        private void ShowTasks()
        {
            //Console.WriteLine("<meta http-equiv='refresh' content='60' />");

            var OrderedList = new IHTMLOrderedList();

            IHTMLListHeader Header = "Tasks";

            OrderedList.innerHTML += Header;

            foreach (var Task in this)
            {
                var ListItem = new IHTMLListItem();

                var Details = new IHTMLUnorderedList();

                //Details.Content += (IHTMLListHeader)"Details";
                Details.innerHTML += (IHTMLListItem)(
                    "" + new IHTMLAcronym
                {
                    Title = Task.CounterPath,
                    innerHTML = "Counter is " + Task.Counter
                }.ToString() +
                    " and " + new IHTMLAcronym
                {
                    Title = "memory allows to filter out already happened events",
                    innerHTML = "memory is " + Task.Memory.Count
                }.ToString() +
                    " within context of " + new IHTMLAcronym
                {
                    Title = Task.Context.FullName,
                    innerHTML = Task.Context.Name
                }.ToString()
                    );


                var DepensdsOnText = new IHTMLAcronym {
                    Title = "This task will not execute until dependencies are cleared from work", innerHTML = "Depends on"
                }.ToString();

                foreach (var DependsOn in Task.ActiveDependencies)
                {
                    if (DependsOn.IsActive)
                    {
                        Details.innerHTML += (IHTMLListItem)(DepensdsOnText + " (active) " + DependsOn.Task.Name.ToLink(k => "?" + k));
                    }
                    else
                    {
                        Details.innerHTML += (IHTMLListItem)(DepensdsOnText + " " + DependsOn.Task.Name.ToLink(k => "?" + k));
                    }
                }

                var InputPoolText = new IHTMLAcronym {
                    Title = "Pools are grouped by the intervals they represent. Smaller intervals will be executed before larger intervals", innerHTML = "Input Pool"
                }.ToString();

                foreach (var InputPool in Task.ActiveInputPools)
                {
                    var InputPoolHeader = (InputPoolText + " " + (IHTMLStrong)("" + InputPool.Interval) +
                                           " estimated time " + InputPool.Total + " for " + InputPool.Files.Length + " items");

                    var Files = Task.VisualizedWorkItems(InputPool.Files);


                    if (InputPool.ShouldPreferOthers)
                    {
                        Details.innerHTML += (IHTMLListItem)("<span style='color: gray;'>(blocked) " + InputPoolHeader + Files + "</span>");
                    }
                    else
                    {
                        Details.innerHTML += (IHTMLListItem)(InputPoolHeader + Files);
                    }
                }



                if (Task.HasActiveDependencies)
                {
                    ListItem.innerHTML += "(blocked) ";
                }

                ListItem.innerHTML += Task.Name.ToLink(k => "?" + k);



                if (!string.IsNullOrEmpty(Task.Description))
                {
                    ListItem.innerHTML += "<pre>" + Task.Description.Trim() + "</pre>";
                }


                ListItem.innerHTML += "<textarea style='width: 100%; height: 20%;'>" + Task.Log.Trim() + "</textarea>";


                ListItem.innerHTML += Details;

                if (Task.HasActiveDependencies)
                {
                    OrderedList.innerHTML += "<span style='color: gray;'>" + ListItem + "</span>";
                }
                else
                {
                    OrderedList.innerHTML += ListItem;
                }
            }

            Console.WriteLine(OrderedList);
        }