Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 // 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);
 }