AutoPuTTY.popupImport.ToggleDuplicateWarning C# (CSharp) Method

ToggleDuplicateWarning() public method

public ToggleDuplicateWarning ( bool s, string n ) : void
s bool
n string
return void
        public void ToggleDuplicateWarning(bool s, string n)
        {
            if (lWarning.InvokeRequired) Invoke(new MethodInvoker(delegate
            {
                lWarning.Text = n;
            }));
            else
            {
                lWarning.Text = n;
            }
            SwitchDuplicateWarning(s);
        }

Usage Example

Example #1
0
 public bool ImportAskDuplicate(string n)
 {
     importpopup.ToggleDuplicateWarning(true, "Duplicate found: " + n);
     lock (locker) while (importreplace == "" && !importcancel)
         {
             Monitor.Wait(locker);
         }
     if (importreplace == "replace")
     {
         return(true);
     }
     return(false);
 }