当前位置: 首页>>代码示例>>C#>>正文


C# IHTMLElement.AttachTo方法代码示例

本文整理汇总了C#中IHTMLElement.AttachTo方法的典型用法代码示例。如果您正苦于以下问题:C# IHTMLElement.AttachTo方法的具体用法?C# IHTMLElement.AttachTo怎么用?C# IHTMLElement.AttachTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IHTMLElement的用法示例。


在下文中一共展示了IHTMLElement.AttachTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ScheduleController

        public ScheduleController(Action<td, DateTime> ApplyStyle, DateTime date)
        {
            this.date = date;
            this.ApplyStyle = ApplyStyle;

            TotalPersentageStates = new[]
                {
                    new ToggleButtonState {  Percentage = 2 },
                    new ToggleButtonState {  Percentage = 2.5 },
                    new ToggleButtonState {  Percentage = 3 },
                    new ToggleButtonState {  Percentage = 3.5 },
                    new ToggleButtonState {  Percentage = 4 },
                    new ToggleButtonState {  Percentage = 0 },
                    new ToggleButtonState {  Percentage = 1 },
                    new ToggleButtonState {  Percentage = 1.5 },
                };

            WorkerStates = new[]
                {
                    new ToggleButtonState { Text = "·", Hours = 11.5, Percentage = 1 },
                    new ToggleButtonState { Text = "P", Hours = 0, Percentage = 0 },
                    new ToggleButtonState { Text = "17", Hours = 17 - 9.5, Percentage = 0.5 },
                    new ToggleButtonState { Text = "13", Hours = 21 - 13, Percentage = 0.5 },
                };

            days = date.DaysInMonth();

            this.ScheduleTable.style.border = "1px solid gray";
            this.ScheduleTable.border = 0;
            this.ScheduleTable.cellSpacing = 0;
            this.ScheduleTable.cellPadding = 0;

            this.Body = this.ScheduleTable.AddBody();







            this.RowOfDateNumbers = this.Body.AddRow();
            this.RowOfDayNames = this.Body.AddRow();

            //Console.WriteLine(DateTime.Now + " step 2");

            BuildTop();

            //Console.WriteLine(DateTime.Now + " step 3");

            BuildBottom();

            //Console.WriteLine(DateTime.Now + " step 4");


            Control.style.padding = "2em";

            Header = new IHTMLElement(IHTMLElement.HTMLElementEnum.h2);
            Header.innerText = "work schedule".Localize();

            var h4 = new IHTMLElement(IHTMLElement.HTMLElementEnum.h4);
            h4.style.Float = IStyle.FloatEnum.right;
            h4.innerText = date.Year + " / " + date.Month;

            var br = new IHTMLBreak();
            br.style.clear = "both";

            var close = new IHTMLAnchor("close!".Localize());
            close.className = "noprint";

            close.onclick +=
                ev =>
                {
                    ev.PreventDefault();

                    this.Control.Dispose();
                };

            close.style.Float = IStyle.FloatEnum.right;

            var c = new IHTMLElement(IHTMLElement.HTMLElementEnum.center, close, Header, h4, br, this.ScheduleTable);

            c.AttachTo(this.Control);


        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:85,代码来源:ScheduleController.cs


注:本文中的IHTMLElement.AttachTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。