public EventMucRoom(TypicalEvent typicalEvent, MucRoom mucRoom, MucContact mucContact, string message) : base(message, EventSeverity.Info) { _typicalEvent = typicalEvent; _mucRoom = mucRoom; _mucContact = mucContact; }
internal ChangeNickInRoom(MucRoom mucRoom) : base(_keyBase, mucRoom.Service.Jid.Bare) { InitializeComponent(); DataContext = mucRoom; }
internal MucOptions(MucRoom mucRoom) : base(_keyBase, mucRoom.Service.Jid.Bare) { InitializeComponent(); _mucRoom = mucRoom; DataContext = mucRoom; _muc.Setup(mucRoom); _affOwner.AffContacts.SetupAffiliations(mucRoom, Affiliation.owner); _affOwner.AffContacts.OnChange += OnChange; _affAdmin.AffContacts.SetupAffiliations(mucRoom, Affiliation.admin); _affAdmin.AffContacts.OnChange += OnChange; _affBanned.AffContacts.SetupAffiliations(mucRoom, Affiliation.outcast); _affBanned.AffContacts.OnChange += OnChange; _affMembers.AffContacts.SetupAffiliations(mucRoom, Affiliation.member); _affMembers.AffContacts.OnChange += OnChange; _affMembers.Loaded += _affMembers_Loaded; _tabForm.IsEnabled = (_mucRoom.Me.Affiliation == Affiliation.owner); }
public EventMucRoom(TypicalEvent typicalEvent, MucRoom mucRoom, User user, string message) : base(message, EventSeverity.Info) { _typicalEvent = typicalEvent; _mucRoom = mucRoom; _user = user; }
internal RoomTopic(MucRoom mucRoom) : base(_keyBase, mucRoom.Service.Jid.Bare) { InitializeComponent(); DataContext = mucRoom; }
/// <summary> /// </summary> /// <param name="name"> /// </param> /// <param name="description"> /// </param> /// <returns> /// </returns> internal MucRoom CreateRoom(Jid roomJid, string description) { MucRoom room = new MucRoom(roomJid, roomJid.User, this, context); room.ParentService = this; ServiceManager.RegisterService(room); return(room); }
public void DisplayTopic(MucRoom mucRoom) { RoomTopic topic = new RoomTopic(mucRoom); topic.Activate(); if ((bool) topic.ShowDialog()) { mucRoom.ChangeMucTopic(topic.Topic); } }
public void DisplayNick(MucRoom mucRoom) { ChangeNickInRoom room = new ChangeNickInRoom(mucRoom); room.Activate(); if ((bool) room.ShowDialog()) { mucRoom.ChangeNickname(room.Nick); } }
protected void MucOptionsOpen(MucRoom mucRoom) { try { UI.MucOptions mucOptions = new UI.MucOptions(mucRoom); mucOptions.Show(); mucOptions.Activate(); } catch (WindowExistsException e) { e.ActivateControl(); } }
/// <summary> /// </summary> /// <returns> /// </returns> internal static MucRoomSettings CreateDefault(MucRoom room) { return(new MucRoomSettings { Title = room != null ? room.Name : null, Logging = true, CanChangeSubject = true, CanInvite = true, HistoryCountOnEnter = 10, PresenceBroadcastedFrom = Role.visitor | Role.moderator | Role.participant, CanSeeMemberList = Role.moderator | Role.participant, UserNamesOnly = false, Visible = true, Anonymous = false, Room = room, IsNew = true, Members = new List <MucRoomMemberInfo>(), Persistent = false }); }
public MucRoomMember(MucRoom room, Jid memberJid, Jid realJid, XmppStream stream, XmppHandlerContext context) { if (room == null) { throw new ArgumentNullException("room"); } if (memberJid == null) { throw new ArgumentNullException("memberJid"); } if (realJid == null) { throw new ArgumentNullException("realJid"); } if (context == null) { throw new ArgumentNullException("sender"); } this.room = room; this.stream = stream; this.context = context; this.sender = context.Sender; //Register disconect context.SessionManager.SessionUnavailable += SessionManager_SessionUnavailable; ParentService = room; RealJid = realJid; Jid = memberJid; Name = memberJid.Resource; presenceType = PresenceType.unavailable; //Create handler lock (Handlers) { Handlers.Add(new MucRoomMemberStanzaHandler(this)); Handlers.Add(new MucRoomMemberDiscoHandler(Jid, RealJid)); } DiscoInfo.AddIdentity(new DiscoIdentity("text", Name, "member")); DiscoInfo.AddFeature(new DiscoFeature(Core.protocol.Uri.DISCO_INFO)); DiscoInfo.AddFeature(new DiscoFeature(Core.protocol.Uri.DISCO_ITEMS)); }
internal void MucConversationInit(Service service, string nick, string password) { _mucRoom = Account.Instance.JoinMuc(service, nick, password); _mucRoom.OnClickMucContact += _mucRoom_OnClickMucContact; DataContext = _mucRoom; new MucNikcnames(_text, _mucRoom); Loaded += MucConversation_Loaded; SizeChanged += new SizeChangedEventHandler(MucConversation_SizeChanged); _text.Loaded += _text_Loaded; Account.Instance.Self.PropertyChanged += Self_PropertyChanged; _timer.Interval = new TimeSpan(0,0,0,0,750); _timer.Tick += _timer_Tick; }
public void RemoveRoom(MucRoom room) { ServiceManager.UnregisterService(room.Jid); MucStorage.RemoveMuc(room.Jid); }
internal void SetupAffiliations(MucRoom mucRoom, Affiliation affiliation) { lock (_affContacts._syncObject) { _affContacts.Clear(); } _affiliation = affiliation; _mucRoom = mucRoom; NotifyPropertyChanged("Affiliation"); _manager = Account.Instance.GetMucManager(); _manager.RequestList(_affiliation, mucRoom.Service.Jid, OnRequestResult, null); }
public EventMucRoom(MucRoom mucRoom, User user, string message) : base(message, EventSeverity.Info) { _mucRoom = mucRoom; _user = user; }
public MucNikcnames(TextBox textBox, MucRoom mucRoom) { textBox.PreviewKeyDown += textBox_KeyDown; _mucRoom = mucRoom; }
/// <summary> /// </summary> /// <param name="name"> /// </param> /// <param name="description"> /// </param> /// <returns> /// </returns> internal MucRoom CreateRoom(Jid roomJid, string description) { MucRoom room = new MucRoom(roomJid, roomJid.User, this, context); room.ParentService = this; ServiceManager.RegisterService(room); return room; }
public void RemoveRoom(MucRoom room) { ServiceManager.UnregisterService(room.Jid); MucStorage.RemoveMuc(room.Jid); }
/// <summary> /// </summary> /// <returns> /// </returns> internal static MucRoomSettings CreateDefault(MucRoom room) { return new MucRoomSettings { Title = room != null ? room.Name : null, Logging = true, CanChangeSubject = true, CanInvite = true, HistoryCountOnEnter = 10, PresenceBroadcastedFrom = Role.visitor | Role.moderator | Role.participant, CanSeeMemberList = Role.moderator | Role.participant, UserNamesOnly = false, Visible = true, Anonymous = false, Room = room, IsNew = true, Members = new List<MucRoomMemberInfo>(), Persistent = false }; }
public void DisplayMucOptions(MucRoom mucRoom) { App.InvokeSafe(App._dispatcherPriority, new DisplayCallback(MucOptionsOpen), mucRoom); }