public virtual void SetBlockedListener(IBlockedListener blockedListener)
 {
     BlockedListener = blockedListener;
     if (PublisherConnectionFactory != null)
     {
         AbstractPublisherConnectionFactory.SetBlockedListener(blockedListener);
     }
 }
        /// <summary>
        /// Create a new MainForm. This is the actual GUI moderator panel that is accessed after the user logged in.
        /// </summary>
        /// <param name="moderatorPanel">The interface to access the data stored remotely on cluster.</param>
        /// <param name="username">The username of the user.</param>
        public MainForm(IModeratorPanel moderatorPanel, string username)
        {
            InitializeComponent();
            // Set the username
            this.lblUserName.Text = username;

            // Set the moderator panel
            this.ModeratorPanel = moderatorPanel;

            // Create a listener for the blacklistControl panel and add it to the control
            this.BlackListListener = new BlackListListener(moderatorPanel);
            this.blacklistControl.AddListener(this.BlackListListener);

            // Create a listener for the reportedQAControl panel and add it to the control
            this.ReportListener = new ReportListener(moderatorPanel);
            this.reportedQAControl.AddListener(this.ReportListener);

            // Create a listener for the blockedUsersControl panel and add it to the control
            this.BlockedListener = new BlockedListener(moderatorPanel);
            this.blockedUsersControl.AddListener(this.BlockedListener);
        }
 public bool RemoveBlockedListener(IBlockedListener listener)
 {
     return(Target.RemoveBlockedListener(listener));
 }
 public void AddBlockedListener(IBlockedListener listener)
 {
     Target.AddBlockedListener(listener);
 }
 public bool RemoveBlockedListener(IBlockedListener listener)
 {
     _connection.ConnectionBlocked   -= listener.HandleBlocked;
     _connection.ConnectionUnblocked -= listener.HandleUnblocked;
     return(true);
 }
 public void AddBlockedListener(IBlockedListener listener)
 {
     _connection.ConnectionBlocked   += listener.HandleBlocked;
     _connection.ConnectionUnblocked += listener.HandleUnblocked;
 }
 public bool RemoveBlockedListener(IBlockedListener listener)
 {
     return(Delegate.RemoveBlockedListener(listener));
 }
 public void AddBlockedListener(IBlockedListener listener)
 {
     Delegate.AddBlockedListener(listener);
 }