Пример #1
0
 private void paletteList_AfterLabelEdit(object sender, LabelEditEventArgs e)
 {
     // Null e.Label is from a cancelled edit, and empty/whitespace
     // items could confuse the parsers.
     if (appPal.Palette.Colors.Count > e.Item && !string.IsNullOrWhiteSpace(e.Label))
     {
         appPal.RenameColor(e.Item, e.Label);
     }
 }
Пример #2
0
    protected void pcNameRender_Edited(object o, EditedArgs args)
    {
        TreeIter iter;

        if (treeview1.Model.GetIterFromString(out iter, args.Path))
        {
            // get the index
            var pc = GetItemFromIter(iter);
            if (pc.Name != args.NewText)
            {
                appPal.RenameColor(appPal.Palette.Colors.IndexOf(pc), args.NewText);
            }
        }
    }