ACAT.Lib.Core.Utility.Windows.SetText C# (CSharp) Метод

SetText() публичный статический Метод

Sets the text for the control. This is just a helper function that takes care of cross-thread invokations that would result in .NET exceptions.
public static SetText ( Control control, String text ) : void
control System.Windows.Forms.Control
text String text to set
Результат void
        public static void SetText(Control control, String text)
        {
            if (control.InvokeRequired)
            {
                control.Invoke(new setText(SetText), control, text);
            }
            else
            {
                control.Text = text;
            }
        }

Usage Example

Пример #1
0
 /// <summary>
 /// Delete the file
 /// </summary>
 /// <param name="fileInfo">info about the file</param>
 private void handleDeleteFile(FileInfo fileInfo)
 {
     if (DialogUtils.ConfirmScanner(String.Format(R.GetString("DeleteFileQ"), fileInfo.Name)))
     {
         Windows.SetText(SearchFilter, String.Empty);
         File.Delete(fileInfo.FullName);
         loadFiles();
     }
 }
All Usage Examples Of ACAT.Lib.Core.Utility.Windows::SetText