Beispiel #1
0
        /// <summary>
        /// Respond to a "Speech..." context menu action
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <param name="target"></param>
        public override void OnInvoke(object sender, EventArgs e, object target)
        {
            string name;
            UUID   id;

            // This action applies to avatars, which can come in
            // various forms.
            if (target is FriendInfo)
            {
                FriendInfo f = target as FriendInfo;
                name = f.Name;
                id   = f.UUID;
            }
            else if (target is Avatar)
            {
                Avatar a = target as Avatar;
                name = a.Name;
                id   = a.ID;
            }
            else if (target is ListViewItem)
            {
                ListViewItem i = target as ListViewItem;
                id   = (UUID)i.Tag;
                name = control.instance.Names.Get(id);
            }
            else
            {
                return;
            }

            System.Windows.Forms.Form va =
                new RadegastSpeech.GUI.VoiceAssignment(control, name, id);
            va.Show();
        }
Beispiel #2
0
        /// <summary>
        /// Respond to a "Speech..." context menu action
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <param name="target"></param>
        public override void OnInvoke(object sender, EventArgs e, object target)
        {
            string name;
            UUID id;

            // This action applies to avatars, which can come in
            // various forms.
            if (target is FriendInfo)
            {
                FriendInfo f = target as FriendInfo;
                name = f.Name;
                id = f.UUID;
            }
            else if (target is Avatar)
            {
                Avatar a = target as Avatar;
                name = a.Name;
                id = a.ID;
            }
            else if (target is ListViewItem)
            {
                ListViewItem i = target as ListViewItem;
                id = (UUID)i.Tag;
                name = control.instance.Names.Get(id);
            }
            else
                return;

            System.Windows.Forms.Form va =
                    new RadegastSpeech.GUI.VoiceAssignment(control, name, id );
            va.Show();
        }
Beispiel #3
0
 /// <summary>
 /// Put up the voice assignment dialog box.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnSpeechMenu( object sender, EventArgs e )
 {
     System.Windows.Forms.Form va =
         new RadegastSpeech.GUI.VoiceAssignment(control, menuFor, id);
     va.Show();
 }
Beispiel #4
0
 /// <summary>
 /// Put up the voice assignment dialog box.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnSpeechMenu(object sender, EventArgs e)
 {
     System.Windows.Forms.Form va =
         new RadegastSpeech.GUI.VoiceAssignment(control, menuFor, id);
     va.Show();
 }