本文整理汇总了C#中ScriptCoreLib.JavaScript.DOM.HTML.IHTMLDiv.Show方法的典型用法代码示例。如果您正苦于以下问题:C# IHTMLDiv.Show方法的具体用法?C# IHTMLDiv.Show怎么用?C# IHTMLDiv.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScriptCoreLib.JavaScript.DOM.HTML.IHTMLDiv
的用法示例。
在下文中一共展示了IHTMLDiv.Show方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Application
/// <summary>
/// This is a javascript application.
/// </summary>
/// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
public Application(IApp page)
{
content.AttachControlToDocument();
var ss = new DataGridView
{
DataSource = Book1.GetDataSet(),
DataMember = "Assets"
};
content.Controls.Add(ss);
var x = new IHTMLDiv();
x.style.backgroundColor = "rgba(255,255,255,1.0)";
x.style.position = IStyle.PositionEnum.absolute;
x.style.height = "auto";
x.style.width = "100%";
x.style.top = "100%";
x.style.zIndex = 999;
var temp = ss.Rows[1];
var sss = temp.Cells[0].AsHTMLElementContainer();
sss.style.backgroundColor = "red";
new TheOtherOption { }.With(
o =>
{
o.BackColor = Color.White;
o.GetHTMLTarget().With(
div =>
{
div.AttachTo(x);
div.style.position = IStyle.PositionEnum.absolute;
}
);
}
);
x.AttachTo(sss.parentNode);
x.Hide();
sss.onmouseover += delegate
{
x.Show();
};
sss.onmouseout += delegate
{
x.Hide();
};
//that.GotFocus += delegate
//{
// x.Show();
//};
//that.Leave += delegate
//{
// x.Hide();
//};
}
示例2: AddSection11
//.........这里部分代码省略.........
//Save.AttachSpriteTo(SaveContainer);
var s = new { VisualStudioTemplates.VisualCSharpProject };
EditorFrame.WhenContentReady(
body =>
{
var t = (IHTMLTextArea)EditorFrame.contentWindow.document.createElement("textarea");
t.AttachTo(body);
t.value = s.ToString();
}
);
//Save.WhenReady(
// i =>
// {
// i.FileName = "Project1.zip";
// i.Add("Project1.txt", "x");
// i.Add("Project1.csproj", s.VisualCSharpProject);
// }
//);
ToolbarContent.Add(new RTA_separator_horizontal());
var RTAButtons = new Dictionary<string, IHTMLImage>
{
// http://trac.symfony-project.org/browser/plugins/dmCkEditorPlugin/web/js/ckeditor/_source/plugins?rev=27455
{"Bold", new RTA_bold()},
{"Underline", new RTA_underline()},
{"Strikethrough", new RTA_strikethrough()},
{"Italic", new RTA_italic()},
{"JustifyLeft", new RTA_justifyleft()},
{"JustifyCenter", new RTA_justifycenter()},
{"JustifyRight", new RTA_justifyright()},
{"JustifyFull", new RTA_justifyfull()},
{"Indent", new RTA_indent()},
{"Outdent", new RTA_outdent()},
{"Superscript", new RTA_superscript()},
{"Subscript", new RTA_sub()},
{"Removeformat", new RTA_removeformat()},
{"InsertOrderedList", new RTA_numberedlist()},
{"InsertUnorderedList", new RTA_numberedlist()},
{"undo", new RTA_undo()},
{"redo", new RTA_redo()},
}.ToDictionary(
k => k.Key,
k => AddButton(k.Value, k.Key)
);
var ButtonDesign = default(IHTMLButton);
var ButtonHTML = default(IHTMLButton);
ButtonDesign = AddButtonAction(new RTA_mode_design(),
delegate
{
ButtonDesign.Hide();
ButtonHTML.Show();
EditorContainer.Show();
PreviewContainer.Hide();
}
);
ButtonHTML = AddButtonAction(new RTA_mode_html(),
delegate
{
ButtonHTML.Hide();
PreviewFrame.WithContent(
body =>
{
body.style.backgroundColor = Color.Transparent;
body.innerHTML = EditorFrame.contentWindow.document.body.innerHTML;
EditorContainer.Hide();
PreviewContainer.Show();
ButtonDesign.Show();
}
);
}
);
ButtonDesign.Hide();
AddSection(
"Editor with toolbar with background and preview",
Content
);
}
示例3: MatrixTransformBExample
//.........这里部分代码省略.........
{
ro_matrix.style.paddingTop = 0 + "px";
ro_matrix.style.paddingBottom = oy * -2 + "px";
}
if (ox > 0)
{
r_matrix.style.paddingLeft = ox * 2 + "px";
r_matrix.style.paddingRight = 0 + "px";
}
else
{
r_matrix.style.paddingLeft = 0 + "px";
r_matrix.style.paddingRight = ox * -2 + "px";
}
if (oy > 0)
{
r_matrix.style.paddingTop = oy * 2 + "px";
r_matrix.style.paddingBottom = 0 + "px";
}
else
{
r_matrix.style.paddingTop = 0 + "px";
r_matrix.style.paddingBottom = oy * -2 + "px";
}
};
m.Visual1.CheckedChanged +=
delegate
{
r_matrix.Show(m.Visual1.Checked);
};
m.Visual2.CheckedChanged +=
delegate
{
ro_matrix.Show(m.Visual2.Checked);
};
m.Debug1.CheckedChanged +=
delegate
{
if (m.Debug1.Checked)
{
ro_matrix.style.backgroundColor = "#8080ff";
r_matrix.style.backgroundColor = "#80ff80";
return;
}
ro_matrix.style.backgroundColor = "";
r_matrix.style.backgroundColor = "";
};
Action<int, int> InteractiveSetOrigin =
(ox, oy) =>
{
var dx = InteractiveSetOrigin_x - ox;
var dy = InteractiveSetOrigin_y - oy;
InteractiveSetOrigin_x = ox;
InteractiveSetOrigin_y = oy;
示例4: AddDropDownOptions
public static IHTMLDiv AddDropDownOptions(this TextBox that, params object[] e)
{
var x = new IHTMLDiv();
x.style.backgroundColor = "rgba(255,255,255,1.0)";
x.style.position = IStyle.PositionEnum.absolute;
x.style.height = "auto";
x.style.width = "100%";
x.style.top = "100%";
x.style.zIndex = 999;
var c = that.GetHTMLTarget();
x.AttachTo(c);
x.Hide();
that.GotFocus += delegate
{
x.Show();
};
that.Leave += delegate
{
x.Hide();
};
e.AsEnumerable().WithEach(
k =>
{
{
//var o = k as UserControl;
var o = k as Control;
if (o != null)
{
o.BackColor = Color.Transparent;
o.GetHTMLTarget().With(
div =>
{
div.AttachTo(x);
div.style.width = "auto";
div.style.position = IStyle.PositionEnum.relative;
}
);
return;
}
}
{
var o = (INodeConvertible<IHTMLDiv>)k;
{
o.AttachTo(x);
//o.div.css.hover.style.backgroundColor = "yellow";
}
}
}
);
return x;
}
示例5: AddTypeProperty
private static void AddTypeProperty(
IHTMLDiv parent,
CompilationProperty type,
Action<string> UpdateLocation
)
{
var div = new IHTMLDiv().AttachTo(parent);
div.style.marginTop = "0.1em";
div.style.fontFamily = ScriptCoreLib.JavaScript.DOM.IStyle.FontFamilyEnum.Verdana;
div.style.whiteSpace = ScriptCoreLib.JavaScript.DOM.IStyle.WhiteSpaceEnum.nowrap;
var i = new PublicProperty().AttachTo(div);
i.style.verticalAlign = "middle";
i.style.marginRight = "0.5em";
var s = new IHTMLAnchor { innerText = type.Name }.AttachTo(div);
s.href = "#";
s.style.textDecoration = "none";
s.style.color = JSColor.System.WindowText;
Action onclick = delegate
{
};
s.onclick +=
e =>
{
e.PreventDefault();
s.focus();
UpdateLocation(type.Name);
onclick();
};
s.onfocus +=
delegate
{
s.style.backgroundColor = JSColor.System.Highlight;
s.style.color = JSColor.System.HighlightText;
};
s.onblur +=
delegate
{
s.style.backgroundColor = JSColor.None;
s.style.color = JSColor.System.WindowText;
};
onclick =
delegate
{
var children = new IHTMLDiv().AttachTo(div);
children.style.paddingLeft = "2em";
AddTypeMethod(children, type.GetGetMethod(), UpdateLocation);
AddTypeMethod(children, type.GetSetMethod(), UpdateLocation);
//a.GetTypes().ForEach(
// (Current, Next) =>
// {
// AddType(GetNamespaceContainer(children, Current), Current, UpdateLocation);
// ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay(
// 50,
// Next
// );
// }
//);
var NextClickHide = default(Action);
var NextClickShow = default(Action);
NextClickHide =
delegate
{
children.Hide();
onclick = NextClickShow;
};
NextClickShow =
delegate
{
children.Show();
onclick = NextClickHide;
//.........这里部分代码省略.........
示例6: AddTypeEvent
private static void AddTypeEvent(
IHTMLDiv parent,
CompilationEvent type,
Action<string> UpdateLocation
)
{
var div = new IHTMLDiv().AttachTo(parent);
div.style.marginTop = "0.1em";
div.style.fontFamily = ScriptCoreLib.JavaScript.DOM.IStyle.FontFamilyEnum.Verdana;
div.style.whiteSpace = ScriptCoreLib.JavaScript.DOM.IStyle.WhiteSpaceEnum.nowrap;
var i = new PublicEvent().AttachTo(div);
i.style.verticalAlign = "middle";
i.style.marginRight = "0.5em";
var s = new IHTMLAnchor { innerText = type.Name }.AttachTo(div);
s.href = "#";
s.style.textDecoration = "none";
s.style.color = JSColor.System.WindowText;
Action onclick = delegate
{
};
s.onclick +=
e =>
{
e.PreventDefault();
s.focus();
UpdateLocation(type.Name);
onclick();
};
s.onfocus +=
delegate
{
s.style.backgroundColor = JSColor.System.Highlight;
s.style.color = JSColor.System.HighlightText;
};
s.onblur +=
delegate
{
s.style.backgroundColor = JSColor.None;
s.style.color = JSColor.System.WindowText;
};
onclick =
delegate
{
var children = new IHTMLDiv().AttachTo(div);
children.style.paddingLeft = "2em";
AddTypeMethod(children, type.GetAddMethod(), UpdateLocation);
AddTypeMethod(children, type.GetRemoveMethod(), UpdateLocation);
var NextClickHide = default(Action);
var NextClickShow = default(Action);
NextClickHide =
delegate
{
children.Hide();
onclick = NextClickShow;
};
NextClickShow =
delegate
{
children.Show();
onclick = NextClickHide;
};
onclick = NextClickHide;
};
}
示例7: AddType
//.........这里部分代码省略.........
HiddenMethods.Add(SourceMethod.MetadataToken);
};
Action AfterEvents = delegate
{
type.GetMethods().ForEach(
(Current, Next) =>
{
if (!HiddenMethods.Contains(Current.MetadataToken))
{
AddTypeMethod(Groups.Methods, Current, UpdateLocation);
}
ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay(
50,
Next
);
}
);
};
Action AfterProperties = delegate
{
type.GetEvents().ForEach(
(Current, Next) =>
{
AddIfAny(Current.GetAddMethod());
AddIfAny(Current.GetRemoveMethod());
AddTypeEvent(Groups.Events, Current, UpdateLocation);
ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay(
50,
Next
);
}
)(AfterEvents);
};
type.GetProperties().ForEach(
(Current, Next) =>
{
AddIfAny(Current.GetSetMethod());
AddIfAny(Current.GetGetMethod());
AddTypeProperty(Groups.Properties, Current, UpdateLocation);
ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay(
50,
Next
);
}
)(AfterProperties);
type.GetFields().ForEach(
(Current, Next) =>
{
AddTypeField(Groups.Fields, Current, UpdateLocation);
ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay(
50,
Next
);
}
);
var NextClickHide = default(Action);
var NextClickShow = default(Action);
NextClickHide =
delegate
{
children.Hide();
onclick = NextClickShow;
};
NextClickShow =
delegate
{
children.Show();
onclick = NextClickHide;
};
onclick = NextClickHide;
};
}
示例8: AddNamespace
private static IHTMLDiv AddNamespace(IHTMLDiv parent, IHTMLDiv NextNamespaceOrDefault, string Namespace, Action<string> UpdateLocation)
{
var div = new IHTMLDiv();
if (NextNamespaceOrDefault == null)
div.AttachTo(parent);
else
NextNamespaceOrDefault.insertPreviousSibling(div);
div.style.marginTop = "0.1em";
div.style.fontFamily = ScriptCoreLib.JavaScript.DOM.IStyle.FontFamilyEnum.Verdana;
div.style.whiteSpace = ScriptCoreLib.JavaScript.DOM.IStyle.WhiteSpaceEnum.nowrap;
var i = new Namespace().AttachTo(div);
i.style.verticalAlign = "middle";
i.style.marginRight = "0.5em";
if (Namespace == "")
Namespace = "<Module>";
var s = new IHTMLAnchor { innerText = Namespace }.AttachTo(div);
s.href = "#";
s.style.textDecoration = "none";
s.style.color = JSColor.System.WindowText;
Action onclick = delegate
{
};
s.onclick +=
e =>
{
e.PreventDefault();
s.focus();
UpdateLocation(Namespace);
onclick();
};
s.onfocus +=
delegate
{
s.style.backgroundColor = JSColor.System.Highlight;
s.style.color = JSColor.System.HighlightText;
};
s.onblur +=
delegate
{
s.style.backgroundColor = JSColor.None;
s.style.color = JSColor.System.WindowText;
};
var children = new IHTMLDiv().AttachTo(div);
children.style.paddingLeft = "1em";
children.Hide();
var NextClickHide = default(Action);
var NextClickShow = default(Action);
NextClickHide =
delegate
{
children.Hide();
onclick = NextClickShow;
};
NextClickShow =
delegate
{
children.Show();
onclick = NextClickHide;
};
onclick = NextClickShow;
return children;
}
示例9: RenderAssemblies
//.........这里部分代码省略.........
s.style.color = JSColor.System.Highlight;
Action done_ = delegate
{
done();
};
item.WhenReady(
a =>
{
Console.WriteLine("enter WhenReady");
s.style.color = JSColor.System.WindowText;
Console.WriteLine("before GetTypes ToArray");
var TypesArray = a.GetTypes().ToArray();
//Console.WriteLine("before TypesByName");
//var TypesByName = TypesArray.OrderBy(k => k.Name);
//Console.WriteLine("before TypesByName ToArray");
//// chokes on android?
//var TypesByNameArray = TypesByName.ToArray();
//Console.WriteLine("before ForEach");
TypesArray.ForEach(
(Current, Index, Next) =>
{
Console.WriteLine("AddType");
if (!Current.IsNested)
{
AddType(
GetNamespaceContainer(children, Current),
Current,
UpdateLocation
);
AddType(
AllTypes(Current.Namespace),
Current,
UpdateLocation
);
}
if (Index % 8 == 0)
{
ScriptCoreLib.Shared.Avalon.Extensions.AvalonSharedExtensions.AtDelay(
7,
Next
);
}
else
{
Next();
}
}
)(done_);
Console.WriteLine("exit WhenReady");
}
);
};
Console.WriteLine("before YieldLoadAction");
YieldLoadAction(LoadAction);
Console.WriteLine("after YieldLoadAction");
var NextClickHide = default(Action);
var NextClickShow = default(Action);
NextClickHide =
delegate
{
children.Hide();
onclick = NextClickShow;
};
NextClickShow =
delegate
{
children.Show();
onclick = NextClickHide;
};
NextClickHide();
}
}