AGS.Editor.Utilities.IsThisApplicationCurrentlyActive C# (CSharp) Метод

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

public static IsThisApplicationCurrentlyActive ( ) : bool
Результат bool
        public static bool IsThisApplicationCurrentlyActive()
        {
            return (GetProcessForActiveApplication().Id == Process.GetCurrentProcess().Id);
        }

Usage Example

Пример #1
0
 private void Events_FileChangedInGameFolder(string fileName)
 {
     if (fileName.ToLower() == _script.FileName.ToLower())
     {
         if (DateTime.Now.Subtract(_script.LastSavedAt).TotalSeconds > 2)
         {
             if (Utilities.IsThisApplicationCurrentlyActive())
             {
                 PromptUserThatFileHasChangedExternally();
             }
             else
             {
                 _fileChangedExternally = true;
             }
         }
     }
 }
All Usage Examples Of AGS.Editor.Utilities::IsThisApplicationCurrentlyActive