本文整理汇总了C#中WebControl.CloseStream方法的典型用法代码示例。如果您正苦于以下问题:C# WebControl.CloseStream方法的具体用法?C# WebControl.CloseStream怎么用?C# WebControl.CloseStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebControl
的用法示例。
在下文中一共展示了WebControl.CloseStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MsdnView
public MsdnView()
: base("Msdn View")
{
DefaultSize = new Gdk.Size (1024,1024);
HPaned hb = new HPaned ();
Store = new NodeStore (typeof (TreeNode));
WebControl wc = new WebControl ();
ScrolledWindow sw = new ScrolledWindow ();
NodeView view = new NodeView (Store);
view.HeadersVisible = false;
view.AppendColumn ("Name", new CellRendererText (), "text", 0);
sw.WidthRequest = 300;
InitTree ();
Add (hb);
hb.Add (sw);
hb.Add (wc);
sw.Add (view);
// Events
DeleteEvent += delegate {
Application.Quit ();
};
view.NodeSelection.Changed += delegate {
TreeNode n = (TreeNode) view.NodeSelection.SelectedNode;
if (n == null)
return;
//
// Fool msdn's code that tries to detect if it
// is in a frame
//
string html = @"
<frameset>
<frame src='" + n.Href + @"?frame=true' />
</frameset>";
wc.OpenStream (MsdnClient.BaseUrl, "text/html");
wc.AppendData (html);
wc.CloseStream ();
};
view.RowExpanded += delegate (object o, RowExpandedArgs args) {
TreeNode n = (TreeNode) Store.GetNode (args.Path);
n.PopulateChildrenAsync ();
};
}