Beispiel #1
0
        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;
        }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
 void Add(LMDashboardVM dashboardVM)
 {
     dashboardsStore.AppendValues(dashboardVM, dashboardVM.Editable);
 }