wManager.Wow.Helpers Namespace
WRobot

ReloggerPlugin Class

Class ReloggerPlugin. Save plugin in the folder "WRobot\Plugins\Relogger\". Support .dll and .cs file

Namespace:  Relogger
Assembly:  Relogger (in Relogger.exe)

Syntax


public abstract class ReloggerPlugin
Public MustInherit Class ReloggerPlugin
public ref class ReloggerPlugin abstract

Examples



C#
using System;
   using System.Windows.Forms;

   namespace MyNamespace
   {
       public class MyPlugin : Relogger.ReloggerPlugin
       {
           public override string Name { get { return "My test plugin"; } }

           bool IsRunning { get; set; }

           public override void OnStart()
           {
               IsRunning = true;
               while (IsRunning)
               {
                   try
                   {
                       for (int i = 0; i < Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles.Count; i++)
                       {
                           var p = Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles[i];
                           if (p.Status == Relogger.Classes.Status.Running && p.ExistWowProcess() && p.ExistWRobotProcess())
                           {
                               robotManager.Helpful.Logging.Write(Name + " > Wow pid = " + p.WowProcessId() + " - Bot pid = " + p.WRobotProcessId());
                           }
                       }
                   }
                   catch (Exception e)
                   {
                       robotManager.Helpful.Logging.WriteError(Name + " > " + e);
                   }
                   System.Threading.Thread.Sleep(500);
               }
           }
           public override void OnStop()
           {
               IsRunning = false;
           }

           public override void OnButtonPress()
           {
               MessageBox.Show("TEST");
               base.OnButtonPress();
           }
       }
   }

Inheritance Hierarchy


Object
  Relogger..::..ReloggerPlugin