예제 #1
0
 /// <summary>
 /// This is basic asynchronous structure impl. with task result usage.
 /// </summary>
 /// <param name="debug"></param>
 /// <param name="gameProcess"></param>
 /// <param name="precision">Is used for thread sleep. Lover -> faster but needs more resources.</param>
 protected BaseAsync(BaseDebug debug, GameProcess.GameProcess gameProcess, int precision = 33)
 {
     Precision   = precision;
     Debug       = debug;
     GameProcess = gameProcess;
     DoWork();
 }
예제 #2
0
 public Notifications(BaseDebug baseDebug)
 {
     NotificationManager = new NotificationManager()
     {
     };
     _baseDebug = baseDebug;
     baseDebug.OnMessageAdded += OnMessageAdded;
 }
예제 #3
0
 public VxAceModule(BaseDebug baseDebug, IServiceProvider serviceProvider, ProcessMethods processMethods, Action updatables, int precision = 33)
     : base(baseDebug, serviceProvider, processMethods, "RGSS301.dll", updatables, precision)
 {
     if (updatables is null)
     {
         InitUpdatables();
     }
 }
예제 #4
0
 /// <summary>
 /// OffsetLoader for loading offsets based on defined/undefined types.
 /// You can define type that has been (dumped / set up) by config/class file.
 /// </summary>
 /// <param name="debug">debug</param>
 /// <param name="processMethods">Methods for accessing process</param>
 /// <param name="plugin">Defined plugin suited for set engine</param>
 /// <param name="precision">Async precision.</param>
 /// <param name="objName">Has to be defined literal name of config file if type is dynamic.</param>
 /// <param name="props">Props of expando obj. Fields & methods</param>
 public OffsetLoader(BaseDebug debug, ProcessMethods processMethods, PluginBase plugin, int precision = 33, string objName = "", IEnumerable <string> props = null)
     : base(debug, processMethods._gameProcess, precision)
 {
     _plugin = plugin;
     if (objName == "")
     {
         Type = (T)Activator.CreateInstance(typeof(T));
         if (Type.Equals(default))
예제 #5
0
        public GameProcess(BaseDebug debug, Process process)
        {
            if (Process == null)
            {
                throw new ArgumentNullException(nameof(Process));
            }

            _process = process;
        }
예제 #6
0
        //private EventHandler<KeyEventArgs> _debugKeys;


        public KeyboardListener(BaseDebug debug)
        {
            InitEvents(debug);
            Interceptor = new KeyboardInterceptor();

            //todo: find viable keyboard hook
            //Interceptor.KeyDown += _debugKeys;
            Interceptor?.StartCapturing();
        }
예제 #7
0
 public Controller(IServiceProvider serviceProvider, BaseDebug debug, Config config) : base(serviceProvider)
 {
     this._debug                   = debug;
     this._notifications           = new Model.Notifications.Notifications(debug);
     this._config                  = config;
     GameProcess                   = new GameProcess(debug);
     _gameWindow                   = new GameWindow(debug, config, GameProcess);
     GameProcess.OnNoProcessFound += GameProcessOnOnNoProcessFound;
     GameProcess.OnProcessFound   += GameProcessOnOnProcessFound;
 }
예제 #8
0
        public Config(BaseDebug debug) : base(debug, null)
        {
            var tsk = new Task <List <object> >(() =>
            {
                if (File.Exists("appsettings.json") && CheckConfigIntegrityAsync())
                {
                    //todo: Check if GetSection serialized types are readonly and refs to the actual config.
                }
                else
                {
                    //todo: fix this shit
                    //ReplaceJsonConfig();
                }
                return(null !);
            });

            AddWork(tsk);
            tsk.ConfigureAwait(false);
        }
예제 #9
0
 public ScheduleService(BaseDebug baseDebug, Client client)
     : base(baseDebug, client)
 {
 }
예제 #10
0
 public ComonScheduleActionManager(BaseDebug debug, AllServices allServices)
 {
     this._debug       = debug;
     this._allServices = allServices;
     DoWork();
 }
예제 #11
0
 public Core(BaseDebug debug, Config config)
 {
     SetupServices(_services, config);
     Controller = new Controller(_services.BuildServiceProvider(), debug, config);
 }
예제 #12
0
 protected BaseService(BaseDebug debug, Client client)
 {
     this.Debug  = debug;
     this.Client = client;
     DoWork();
 }
예제 #13
0
 public PluginService(BaseDebug debug, GameProcess.GameProcess gameProcess, List <IPluginBase> pluginBases, int precision = 33)
     : base(debug, gameProcess, precision)
 {
     ServiceCollection = pluginBases.Cast <PluginBase>().ToList();
     DebugTest();
 }
예제 #14
0
 public GameProcess(BaseDebug debug)
 {
     _debug = debug;
 }
예제 #15
0
 public GameWindow(BaseDebug debug, Config config, GameProcess.GameProcess gameProcess)
     : base(debug, gameProcess)
 {
     _config = config;
 }
예제 #16
0
 public TeacherService(BaseDebug baseDebug, Client client)
     : base(baseDebug, client)
 {
 }
예제 #17
0
 public StudentService(BaseDebug debug, Client client)
     : base(debug, client)
 {
     this.Client = client;
     this.Debug  = debug;
 }
예제 #18
0
 private void InitEvents(BaseDebug debug)
 {
     //_debugKeys = (sender, args) => debug.AddMessage<object>(
     //    new Message<object>("Key: [" + args.KeyCode + "] handled:[" + args.Handled.ToString() + "]"));
 }