本文整理汇总了C#中IView.SetBroadcaster方法的典型用法代码示例。如果您正苦于以下问题:C# IView.SetBroadcaster方法的具体用法?C# IView.SetBroadcaster怎么用?C# IView.SetBroadcaster使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IView
的用法示例。
在下文中一共展示了IView.SetBroadcaster方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ElementChooserDialog
public ElementChooserDialog(Type requestedType, string title)
{
base.Modal = true;
base.HeightRequest = 400;
base.WidthRequest = 250;
//TODO: i18n
base.Title = title;
base.AddButton (GettextCatalog.GetString ("_Cancel"), Gtk.ResponseType.Cancel);
base.AddButton (GettextCatalog.GetString ("_Accept"), Gtk.ResponseType.Accept);
base.Response += new Gtk.ResponseHandler(OnResponse);
base.SetResponseSensitive(Gtk.ResponseType.Accept, false);
_requestedType = requestedType;
Tree tree = new Tree();
tree.IsReadOnly = true;
tree.Draw(_elementList);
tree.Show();
_tree = tree;
_tree.SetBroadcaster(this);
Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
sw.Add(tree);
base.VBox.Add(sw);
sw.Show();
}
示例2: AddView
// Adds a view to the hub; the view will be notified when events arise.
public void AddView(IView view)
{
_broadcaster.AddView (view);
Tree tree = view as Tree;
if (tree != null)
{
tree.DiagramNameChanged += DiagramNameChanged;
}
NoteBook nbook = view as NoteBook;
if (nbook != null)
{
_currentNotebook = nbook;
}
view.SetBroadcaster(_eventQueue);
}