void RenderTemplateName(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) { string name; LMDashboardVM dashboardVM = (LMDashboardVM)model.GetValue(iter, COL_DASHBOARD); name = dashboardVM.Name; if (!dashboardVM.Editable) { name += " (" + Catalog.GetString("System") + ")"; } (cell as CellRendererText).Text = name; }
void Select(LMDashboardVM dashboardVM) { TreeIter iter; dashboardsStore.GetIterFirst(out iter); while (dashboardsStore.IterIsValid(iter)) { if ((dashboardsStore.GetValue(iter, COL_DASHBOARD) as LMDashboardVM).Model.Equals(dashboardVM.Model)) { dashboardseditortreeview.Selection.SelectIter(iter); break; } dashboardsStore.IterNext(ref iter); } }
void Remove(LMDashboardVM dashboardVM) { TreeIter iter; dashboardsStore.GetIterFirst(out iter); while (dashboardsStore.IterIsValid(iter)) { if (dashboardsStore.GetValue(iter, COL_DASHBOARD) == dashboardVM) { dashboardsStore.Remove(ref iter); break; } dashboardsStore.IterNext(ref iter); } }
void Add(LMDashboardVM dashboardVM) { dashboardsStore.AppendValues(dashboardVM, dashboardVM.Editable); }