public AverageDPSMeterControl(DDO instance) { this.instance = instance; this.instance.RegisterListener(singletarget); InitializeComponent(); singletarget.Ticked += new DPSMeterTickedDelegate(singletarget_Ticked); singletarget.StateChanged += new DPSMeterStateChangedDelegate(singletarget_StateChanged); }
public TankMeterControl(LibDDO.DDO instance) { this.instance = instance; InitializeComponent(); instance.RegisterListener(stm); instance.RegisterListener(tmb); instance.RegisterListener(tmt); }
private static void PipeThreadHandler(object obj) { DDO me = obj as DDO; try { me.pipe.WaitForConnection(); me.Notify("Hook DLL connected!"); StreamReader reader = new StreamReader(me.pipe, Encoding.Unicode); while (true) { if (!me.pipe.IsConnected) { me.Notify("Client disconnected, or game closed."); return; } string message = reader.ReadLine(); if (message != null) { if (message.StartsWith("MSG:")) { message = message.Substring(4); me.AddMessage(message); } } } } catch (Exception e) { me.Notify("Pipe error:\r\n" + e.ToString()); } }
/// <summary> /// Initialise all loaded plugins. /// </summary> /// <param name="instance">The DDO instance the plugins should base their work on.</param> public void Initialise(DDO instance) { foreach (IPlugin p in loadedplugins) { p.Initialise(instance); } }
public void Initialise(DDO instance) { this.instance = instance; }
void Instance_OnNotify(DDO sender, string message) { mainlogger.Info(message); }
void Instance_OnChatMessage(DDO sender, ChatMessage message) { StringBuilder msg = new StringBuilder(); msg.Append(message.ToString()); msg.Append("\r\n"); combatlog.AppendText(msg.ToString()); }