UpdateExample() private method

private UpdateExample ( TreeModel model, TreeIter iter ) : void
model TreeModel
iter TreeIter
return void
コード例 #1
0
            public void ComboboxEdited(object o, EditedArgs args)
            {
                TreeIter iter;

                if (model.GetIterFromString(out iter, args.Path))
                {
                    var info = GetProperty(model, iter);
                    if (info == null)
                    {
                        return;
                    }
                    var value = ConvertProperty(info.PropertyType, args.NewText);
                    info.SetValue(dialog.profile, value, null);
                    dialog.UpdateExample(model, iter);
                }
            }
コード例 #2
0
            public void Toggled(object o, ToggledArgs args)
            {
                TreeIter iter;

                if (model.GetIterFromString(out iter, args.Path))
                {
                    var info = GetProperty(model, iter);
                    if (info == null || info.PropertyType != typeof(bool))
                    {
                        return;
                    }
                    bool value = (bool)info.GetValue(dialog.profile, null);
                    info.SetValue(dialog.profile, !value, null);
                    dialog.UpdateExample(model, iter);
                    // When toggeling with the keyboard the tree view doesn't update automatically
                    // see 'Bug 188 - Pressing space to select does not update checkbox'
                    treeView.QueueDraw();
                }
            }