protected virtual void OnScriptDialogReceived(OpenMetaverse.ScriptDialogEventArgs e) { if (ScriptDialogReceived != null) { ScriptDialogReceived(this, e); } }
public override void Self_OnScriptDialog(object sender, ScriptDialogEventArgs e) { var objectName = e.ObjectName; var buttons = e.ButtonLabels; EventQueue.Enqueue( () => { client.SendPersonalEvent(SimEventType.SCRIPT, "On-Script-Dialog", e.Message, objectName, e.ImageID, e.ObjectID, e.FirstName, e.LastName, e.Channel, buttons); if (AcceptOffersAnimationsObjects && buttons.Count > 0) { int buttonIndex = (new Random()).Next(buttons.Count); string buttonlabel = buttons[buttonIndex]; int maxTries = buttons.Count * 2; string buttonlabelToLower = buttonlabel.ToLower(); while (maxTries-- > 0 && (buttonlabelToLower.Contains("cancel") || buttonlabelToLower.Contains("ignore") || buttonlabelToLower.Contains("mute"))) { buttonIndex = (new Random()).Next(buttons.Count); buttonlabel = buttons[buttonIndex]; buttonlabelToLower = buttonlabel.ToLower(); } client.Self.ReplyToScriptDialog(e.Channel, buttonIndex, buttonlabel, e.ObjectID); } } ); }
private void Self_OnDialog(object sender, OpenMetaverse.ScriptDialogEventArgs ea) { try { if (netcomSync != null) { netcomSync.BeginInvoke(new OnScriptDialogRaise(OnScriptDialogReceived), new object[] { ea }); } else { OnScriptDialogReceived(ea); } } catch { ; } }
/// <summary>Raises the ScriptDialog event</summary> /// <param name="e">A SctriptDialogEventArgs object containing the /// data returned from the data server</param> protected virtual void OnScriptDialog(ScriptDialogEventArgs e) { EventHandler<ScriptDialogEventArgs> handler = m_ScriptDialog; if (handler != null) handler(this, e); }
void Self_ScriptDialog(object sender, ScriptDialogEventArgs e) { if (instance.MainForm.InvokeRequired) { instance.MainForm.BeginInvoke(new MethodInvoker(() => Self_ScriptDialog(sender, e))); return; } // Is this object muted if (null != client.Self.MuteList.Find(m => (m.Type == MuteType.Object && m.ID == e.ObjectID) // muted object by id || (m.Type == MuteType.ByName && m.Name == e.ObjectName) // object muted by name )) return; instance.MainForm.AddNotification(new ntfScriptDialog(instance, e.Message, e.ObjectName, e.ImageID, e.ObjectID, e.FirstName, e.LastName, e.Channel, e.ButtonLabels)); }
void Self_ScriptDialog(object sender, ScriptDialogEventArgs e) { if(Dialogs.ContainsKey(e.ObjectID))Dialogs.Remove(e.ObjectID); Dialogs.Add(e.ObjectID,new DialogMenu(e)); httpCallback(CallBackEvent.dialog, e.ObjectID.ToString(), Dialogs[e.ObjectID]); total_dialogs = Dialogs.Count; }
public DialogMenu(ScriptDialogEventArgs e) { buttons = e.ButtonLabels; channel = e.Channel; name = e.ObjectName; uuid = e.ObjectID.ToString(); owner_uuid = e.OwnerID.ToString(); message = e.Message; }
public void Self_ScriptDialog(object sender, ScriptDialogEventArgs e) { Hashtable item = new Hashtable(); item.Add("MessageType", "ScriptDialog"); item.Add("Message", e.Message); item.Add("ObjectName", e.ObjectName); item.Add("ImageID", e.ImageID); item.Add("ObjectID", e.ObjectID); item.Add("FirstName", e.FirstName); item.Add("LastName", e.LastName); item.Add("ChatChannel", e.Channel); item.Add("Buttons", e.ButtonLabels); enqueue(item); }
void Self_ScriptDialog(object sender, ScriptDialogEventArgs e) { Gtk.Application.Invoke(delegate { ScriptDialogue d = new ScriptDialogue(e.Message, e.ObjectName, e.ImageID, e.ObjectID, e.FirstName, e.LastName, e.Channel, e.ButtonLabels); d.Show(); }); }
public virtual void Self_OnScriptDialog(object sender, ScriptDialogEventArgs e) { OnEvent("On-Script-Dialog", paramNamesOnScriptDialog, paramTypesOnScriptDialog, e); }