示例#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);