示例#1
0
 private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (Clipboard.ContainsData("LPC"))
         {
             var o = (List <PaletteColor>)Clipboard.GetData("LPC");
             appPal.AppendColors(o, action: "Paste Colors");
         }
         else if (Clipboard.ContainsText())
         {
             var clip = Clipboard.GetText();
             appPal.AppendColor(ColorUtils.FromString(clip).ToRgb(), action: "Paste Color");
         }
     }
     catch (ArgumentException) // these are harmless
     {
     }
 }
示例#2
0
 protected void OnAddAllActionActivated(object sender, EventArgs e)
 {
     appPal.AppendColors(app.Results.Select(x => x.ToRgb()));
 }