Example #1
0
        private void OnAddFromClipboardClick(object sender, EventArgs e)
        {
            string patch = null;

            try
            {
                patch = Clipboard.GetText();
            }
            catch (Exception exc) when(!exc.IsCritical())
            {
            }
            if (!string.IsNullOrWhiteSpace(patch))
            {
                var src = new PatchFromString("Patch from clipboard", patch);
                AddPatchSource(src);
            }
        }
Example #2
0
 private void OnAddFromClipboardClick(object sender, EventArgs e)
 {
     string patch = null;
     try
     {
         patch = Clipboard.GetText();
     }
     catch(Exception exc)
     {
         if(exc.IsCritical())
         {
             throw;
         }
     }
     if(!string.IsNullOrWhiteSpace(patch))
     {
         var src = new PatchFromString("Patch from clipboard", patch);
         AddPatchSource(src);
     }
 }