public BusPageWidget(TabWidget tab) { this.Build(); this.busContent = new BusContentView(this); this.tab = tab; this.informationViewPlaceholder.Add(infoView); this.tvPlaceholder.Add(busContent); busContent.ElementUpdated += delegate (object sender, ElementUpdatedEventArgs e) { infoView.FillBottom(e.Element); }; }
public BusPageWidget(TabWidget tab) { this.Build(); this.busContent = new BusContentView(this); this.tab = tab; this.informationViewPlaceholder.Add(infoView); this.tvPlaceholder.Add(busContent); busContent.ElementUpdated += delegate(object sender, ElementUpdatedEventArgs e) { infoView.FillBottom(e.Element); }; }
protected virtual void OnNewTabActionActivated(object sender, System.EventArgs e) { TabWidget tab = new TabWidget(Mono.Unix.Catalog.GetString("(No Title)"), buses_Nb, buses_Nb.NPages); BusPageWidget page = new BusPageWidget(tab); page.ShowAll(); page.Explorator = DBusExplorator.SessionExplorator; FeedBusComboBox(page.Explorator.AvailableBusNames, page); buses_Nb.AppendPage(page, tab); // Switch to the newly append page which trigger the normal events buses_Nb.CurrentPage = buses_Nb.NPages - 1; }
void UpdateView(string busName) { BusContentView view = this.currentPageWidget.BusContent; DBusExplorator explorator = currentPageWidget.Explorator; TabWidget tab = this.currentPageWidget.Tab; tab.TabName = busName; view.Reinitialize(); try { IEnumerable <PathContainer> elements = explorator.GetElementsFromBus(busName); foreach (PathContainer path in elements) { view.AddPath(path); } } catch (Exception e) { LoggingEventHandler(LogType.Error, "Error while retrieving bus elements", e, null); } }