本文整理汇总了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);
}