Ejemplo n.º 1
0
 /// <summary>
 /// Allows to update ListView with data from selected category
 /// </summary>
 /// <param name="view">current view</param>
 /// <param name="currentCategory">category</param>
 /// <param name="list"></param>
 public static void EntriesChanged(ISnippetView view, string currentCategory, List<Entry> list)
 {
     view.GetTreeView.BeginUpdate();
     PupulateTreeView(view.GetTreeView, list, x => x.Category);
     SelectTreeViewNodeByNodeName(view.GetTreeView, view.EntryItem.Category);
     view.GetTreeView.EndUpdate();
     view.FillCategory(list);
     PopulateListView(list, view.GetListView, x => x.Category == currentCategory);
     SelectListViewItem(view.GetListView, x => Equals(x.Tag, view.EntryItem.ID));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="view">MVC view</param>
 /// <param name="communicator">MVC model's communicate class</param>
 public SnippetPresenter(ISnippetView view, ICommunicator communicator)
 {
     _communicator = communicator;
     _view = view;
     view.SetPresenter(this);
 }