Ejemplo n.º 1
0
        public bool IsMatch(Win32Form form)
        {
            bool match = false;

            if (className.active)
            {
                if (!className.IsMatch(form.ClassName))
                {
                    return(false);
                }
                match = true;
            }
            if (title.active)
            {
                if (!title.IsMatch(form.Text))
                {
                    return(false);
                }
                match = true;
            }
            if (file.active)
            {
                if (!file.IsMatch(form.Process.MainModule.FileName))
                {
                    return(false);
                }
                match = true;
            }
            return(match);
        }
Ejemplo n.º 2
0
 public void Update(Win32Form form)
 {
     if (form != null)
     {
         if (current == null || (current != null && current.form != form))
         {
             SetGame(form, agi.Match(form));
         }
     }
 }
Ejemplo n.º 3
0
 public GameInfo Match(Win32Form form)
 {
     foreach (var game in games)
     {
         if (game.IsMatch(form))
         {
             return(game);
         }
     }
     return(null);
 }
Ejemplo n.º 4
0
 public GameInfo Match(Win32Form form)
 {
     foreach (var game in games)
     {
         if (game.IsMatch(form))
         {
             return game;
         }
     }
     return null;
 }
Ejemplo n.º 5
0
 void SetGame(Win32Form form, GameInfo info)
 {
     if (current != null)
     {
         if (info != current.info)
         {
             current.Deactivate();
         }
         else
         {
             return;
         }
     }
     if (info == null)
     {
         current = null;
     }
     else
     {
         current = new GameImmersifier(form, info);
         current.Activate();
     }
 }
Ejemplo n.º 6
0
 public BlackoutForm(Screen screen)
 {
     InitializeComponent();
     Bounds = screen.Bounds;
     Win32Form.Fetch(this.Handle).WindowExStyle |= User32Types.WindowExStyles.ToolWindow;
 }
Ejemplo n.º 7
0
 public bool Equals(Win32Form other)
 {
     return(_handle == other._handle);
 }
Ejemplo n.º 8
0
 private void RemoveBorders(Win32Form form)
 {
     form.WindowStyle   = User32Types.WindowStyles.MinimizeBox | User32Types.WindowStyles.Popup | User32Types.WindowStyles.Tiled | User32Types.WindowStyles.Visible;
     form.WindowExStyle = User32Types.WindowExStyles.Left;
 }
Ejemplo n.º 9
0
 public GameImmersifier(Win32Form form, GameInfo info)
 {
     this.form = form;
     this.info = info;
 }
Ejemplo n.º 10
0
 public bool IsMatch(Win32Form form)
 {
     bool match = false;
     if (className.active)
     {
         if (!className.IsMatch(form.ClassName))
         {
             return false;
         }
         match = true;
     }
     if (title.active)
     {
         if (!title.IsMatch(form.Text))
         {
             return false;
         }
         match = true;
     }
     if (file.active)
     {
         if (!file.IsMatch(form.Process.MainModule.FileName))
         {
             return false;
         }
         match = true;
     }
     return match;
 }
Ejemplo n.º 11
0
 void SetGame(Win32Form form, GameInfo info)
 {
     if (current != null)
     {
         if (info != current.info)
         {
             current.Deactivate();
         }
         else
         {
             return;
         }
     }
     if (info == null)
     {
         current = null;
     }
     else
     {
         current = new GameImmersifier(form, info);
         current.Activate();
     }
 }
Ejemplo n.º 12
0
 public void Update(Win32Form form)
 {
     if (form != null)
     {
         if (current == null || (current != null && current.form != form))
         {
             SetGame(form, agi.Match(form));
         }
     }
 }
Ejemplo n.º 13
0
 private void RemoveBorders(Win32Form form)
 {
     form.WindowStyle = User32Types.WindowStyles.MinimizeBox | User32Types.WindowStyles.Popup | User32Types.WindowStyles.Tiled | User32Types.WindowStyles.Visible;
     form.WindowExStyle = User32Types.WindowExStyles.Left;
 }
Ejemplo n.º 14
0
 public GameImmersifier(Win32Form form, GameInfo info)
 {
     this.form = form;
     this.info = info;
 }
Ejemplo n.º 15
0
 public bool Equals(Win32Form other)
 {
     return _handle == other._handle;
 }