示例#1
0
 /// <summary>
 /// Subscribes to child view's events
 /// </summary>
 /// <param name="child">Child view</param>
 protected virtual void SubscribeToChildEvents(BaseView child)
 {
     child.Closed += OnChildClosed;
     BaseDetailsView detailsView = child as BaseDetailsView;
     if (detailsView != null)
     {
         detailsView.Saved += OnChildSaved;
         detailsView.Deleted += OnChildDeleted;
     }
     BaseSearchView searchView = child as BaseSearchView;
     if (searchView != null)
     {
         searchView.Selected += OnChildSelection;
     }
 }
示例#2
0
 /// <summary>
 /// Navigate from the current view to the specified view.
 /// </summary>
 /// <param name="view">View to navigate to</param>
 /// <param name="query">Query parameters to pass</param>
 /// <param name="mode">Navigation mode (BaseView.ModePopup or BaseView.ModeInline)</param>
 public void NavigateTo(BaseView view, NameValueCollection query, string mode = null)
 {
     view.Mode = mode;
     if (view.Activate(query))
         view.Show();
 }