Пример #1
0
 private void LoadWowWindowPosition()
 {
     if (AccountName.Length > 0)
     {
         try
         {
             if (Config.WowWindowRect != new Rect()
             {
                 Left = -1, Top = -1, Right = -1, Bottom = -1
             })
             {
                 XMemory.SetWindowPosition(XMemory.Process.MainWindowHandle, Config.WowWindowRect);
                 AmeisenLogger.Instance.Log($"Loaded wow window position: {Config.WowWindowRect}", LogLevel.Verbose);
             }
         }
         catch (Exception e)
         {
             AmeisenLogger.Instance.Log($"Failed to set wow window position:\n{e.ToString()}", LogLevel.Error);
         }
     }
 }
Пример #2
0
 private void LoadBotWindowPosition()
 {
     if (AccountName.Length > 0)
     {
         try
         {
             if (Config.BotWindowRect != new Rect()
             {
                 Left = -1, Top = -1, Right = -1, Bottom = -1
             })
             {
                 XMemory.SetWindowPosition(Process.GetCurrentProcess().MainWindowHandle, Config.BotWindowRect, false);
                 AmeisenLogger.Instance.Log("AmeisenBot", $"Loaded bot window position: {Config.BotWindowRect}", LogLevel.Verbose);
             }
         }
         catch (Exception e)
         {
             AmeisenLogger.Instance.Log("AmeisenBot", $"Failed to set bot window position:\n{e.ToString()}", LogLevel.Error);
         }
     }
 }