/// <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);
        }
예제 #2
0
 /// <summary>
 /// Create a new BlackListListener that knows about an IModeratorPanel
 /// </summary>
 /// <param name="moderatorPanel">An IModeratorPanel with a blacklist in it.</param>
 public BlackListListener(IModeratorPanel moderatorPanel)
 {
     this.ModeratorPanel = moderatorPanel;
 }
예제 #3
0
 /// <summary>
 /// Create a new ReportListener that knows about an IModeratorPanel
 /// </summary>
 /// <param name="moderatorPanel">An IModeratorPanel with reported QAs in it.</param>
 public ReportListener(IModeratorPanel moderatorPanel)
 {
     this.ModeratorPanel = moderatorPanel;
 }
 /// <summary>
 /// Create a new BlockedListener that knows about an IModeratorPanel
 /// </summary>
 /// <param name="moderatorPanel">An IModeratorPanel with blocked users in it.</param>
 public BlockedListener(IModeratorPanel moderatorPanel)
 {
     this.ModeratorPanel = moderatorPanel;
 }