private void GroupProfileHandler(object sender, GroupProfileEventArgs e) { Profile = e.Group; if (Group.InsigniaID != UUID.Zero) Client.Assets.RequestImage(Group.InsigniaID, ImageType.Normal, delegate(TextureRequestState state, AssetTexture assetTexture) { ManagedImage imgData; Image bitmap; if (state != TextureRequestState.Timeout || state != TextureRequestState.NotFound) { OpenJPEG.DecodeToImage(assetTexture.AssetData, out imgData, out bitmap); picInsignia.Image = bitmap; UpdateInsigniaProgressText("Progress..."); } if (state == TextureRequestState.Finished) { UpdateInsigniaProgressText(""); } }, true); if (this.InvokeRequired) this.BeginInvoke(new MethodInvoker(UpdateProfile)); }
private void GroupProfileHandler(object sender, GroupProfileEventArgs e) { if (e.Group.ID != requestedgroupid) return; BeginInvoke(new MethodInvoker(delegate() { client.Groups.GroupProfile -= new EventHandler<GroupProfileEventArgs>(GroupProfileHandler); frmGroupInfo frm = new frmGroupInfo(e.Group, instance); frm.Show(); })); }
/// <summary>Raises the GroupProfile event</summary> /// <param name="e">An GroupProfileEventArgs object containing the /// data returned from the simulator</param> protected virtual void OnGroupProfile(GroupProfileEventArgs e) { EventHandler<GroupProfileEventArgs> handler = m_GroupProfile; if (handler != null) handler(this, e); }
private void GroupProfileHandler(object sender, GroupProfileEventArgs e) { Client.Groups.GroupProfile -= new EventHandler<GroupProfileEventArgs>(GroupProfileHandler); Group selgrp = e.Group; this.BeginInvoke(new MethodInvoker(delegate() { picBusy.Visible = false; gbQuickInfo.Visible = true; label7.Text = "Ttl members: " + selgrp.GroupMembershipCount.ToString(CultureInfo.CurrentCulture); label8.Text = "Ttl roles: " + selgrp.GroupRolesCount.ToString(CultureInfo.CurrentCulture); label9.Text = "Joining fee: L$" + selgrp.MembershipFee.ToString(CultureInfo.CurrentCulture); label10.Text = "Open enrolment: " + selgrp.OpenEnrollment.ToString(CultureInfo.CurrentCulture); })); }
void Groups_GroupProfile(object sender, GroupProfileEventArgs e) { if (group.ID != e.Group.ID) return; if (InvokeRequired) { BeginInvoke(new MethodInvoker(() => Groups_GroupProfile(sender, e))); return; } group = e.Group; if (group.InsigniaID != UUID.Zero && pnlInsignia.Controls.Count == 0) { SLImageHandler insignia = new SLImageHandler(instance, group.InsigniaID, string.Empty); insignia.Dock = DockStyle.Fill; pnlInsignia.Controls.Add(insignia); } tbxCharter.Text = group.Charter; lblFounded.Text = "Founded by: " + instance.Names.Get(group.FounderID); cbxShowInSearch.Checked = group.ShowInList; cbxOpenEnrollment.Checked = group.OpenEnrollment; if (group.MembershipFee > 0) { cbxEnrollmentFee.Checked = true; nudEnrollmentFee.Value = group.MembershipFee; } else { cbxEnrollmentFee.Checked = false; nudEnrollmentFee.Value = 0; } if (group.MaturePublish) { cbxMaturity.SelectedIndex = 1; } else { cbxMaturity.SelectedIndex = 0; } btnJoin.Enabled = btnJoin.Visible = false; if (myGroups.ContainsKey(group.ID)) // I am in this group { cbxReceiveNotices.Checked = myGroups[group.ID].AcceptNotices; cbxListInProfile.Checked = myGroups[group.ID].ListInProfile; cbxReceiveNotices.CheckedChanged += new EventHandler(cbxListInProfile_CheckedChanged); cbxListInProfile.CheckedChanged += new EventHandler(cbxListInProfile_CheckedChanged); } else if (group.OpenEnrollment) // I am not in this group, but I could join it { btnJoin.Text = "Join $L" + group.MembershipFee; btnJoin.Enabled = btnJoin.Visible = true; } RefreshControlsAvailability(); }
void Groups_GroupProfile(object sender, GroupProfileEventArgs e) { if(e.Group.ID!=this.groupkey) return; Gtk.Application.Invoke(delegate { this.entry_enrollmentfee.Text=e.Group.MembershipFee.ToString(); if(e.Group.MembershipFee>0) this.checkbutton_mature.Active=true; if(this.already_member==true) { foreach(AvatarGroup avgroup in MainClass.win.avatarGroups) { if(avgroup.GroupID==this.groupkey) { //this.checkbutton_group_notices.Active= avgroup.AcceptNotices; //this.checkbutton_showinpofile.Active = avgroup.ListInProfile; break; } } } this.checkbutton_openenrolement.Active=e.Group.OpenEnrollment; this.checkbutton_showinsearch.Active=e.Group.ShowInList; this.checkbutton_mature.Active=e.Group.MaturePublish; this.textview_group_charter.Buffer.Text=e.Group.Charter; if((e.Group.Powers & GroupPowers.SendNotices)==GroupPowers.SendNotices) this.button_send_notice.Sensitive=true; else this.button_send_notice.Sensitive=false; TryGetImage img=new TryGetImage(this.image_group_emblem,e.Group.InsigniaID,128,128,false); this.label_name.Text=e.Group.Name; AsyncNameUpdate ud=new AsyncNameUpdate(e.Group.FounderID,false); ud.onNameCallBack += delegate(string namex,object[] values){this.label_foundedby.Text="Founded by "+namex;}; ud.go(); this.entry_enrollmentfee.Text=e.Group.MembershipFee.ToString(); if(e.Group.MembershipFee>0) this.checkbutton_mature.Active=true; this.checkbutton_openenrolement.Active=e.Group.OpenEnrollment; this.checkbutton_showinsearch.Active=e.Group.ShowInList; this.checkbutton_mature.Active=e.Group.MaturePublish; this.textview_group_charter.Buffer.Text=e.Group.Charter; if(!this.already_member) { if(e.Group.OpenEnrollment==true) this.button_join.Sensitive=true; } this.checkbutton_group_notices.Sensitive=this.already_member; this.checkbutton_showinpofile.Sensitive=this.already_member; }); }
void Groups_GroupProfile(object sender, GroupProfileEventArgs e) { if (groupID != e.Group.ID) return; if (instance.MainForm.InvokeRequired) { instance.MainForm.BeginInvoke(new MethodInvoker(() => Groups_GroupProfile(sender, e))); return; } group = e.Group; ShowNotice(); }
public void Groups_GroupProfile(object sender, GroupProfileEventArgs e) { Hashtable hash = new Hashtable(); hash.Add("MessageType", "GroupProfile"); hash.Add("ID", e.Group.ID); hash.Add("Name", e.Group.Name); hash.Add("Charter", e.Group.Charter); hash.Add("Founder", e.Group.FounderID); hash.Add("Insignia", e.Group.InsigniaID); hash.Add("MemberCount", e.Group.GroupMembershipCount); hash.Add("OwnerRole", e.Group.OwnerRole); hash.Add("MemberTitle", e.Group.MemberTitle); hash.Add("Money", e.Group.Money); hash.Add("MembershipFee", e.Group.MembershipFee); hash.Add("OpenEnrollment", e.Group.OpenEnrollment); hash.Add("ShowInList", e.Group.ShowInList); hash.Add("AcceptNotices", e.Group.AcceptNotices); hash.Add("Contribution", e.Group.Contribution); enqueue(hash); }
public virtual void Groups_OnGroupProfile(object sender, GroupProfileEventArgs e) { OnEvent("On-Group-Profile", paramNamesOnGroupProfile, paramTypesOnGroupProfile, e); }