예제 #1
0
 private void Game_ProcessFound(object sender, ProcessFoundEventArgs e)
 {
     if (!Config.Enabled)
     {
         return;
     }
     _ = SendProcessFoundAsync(e);
 }
예제 #2
0
        async private Task SendProcessFoundAsync(ProcessFoundEventArgs e)
        {
            // always send complete information for this kind of event
            var body = RequestBody.FromProcessFoundEventArgs(e, di);

            body.Headers = Config.Headers;
            await PostJson(RequestBodyToJsonString(body));
        }
예제 #3
0
 public static RequestBody FromProcessFoundEventArgs(ProcessFoundEventArgs e, IDiabloInterface di)
 {
     return(new RequestBody()
     {
         Event = "ProcessFound",
         D2ProcessInfo = e.ProcessInfo,
         DIApplicationInfo = di.appInfo,
     });
 }
예제 #4
0
 void OnProcessFound(object sender, ProcessFoundEventArgs e) =>
 ProcessFound?.Invoke(sender, e);