Пример #1
0
        public SignUpMenu(ILabelFactory labelFactory, IForumReader reader, ICommandFactory commandFactory)
        {
            this.labelFactory   = labelFactory;
            this.commandFactory = commandFactory;
            this.reader         = reader;

            Open();
        }
Пример #2
0
        public LogInMenu(ILabelFactory labelFactory, IForumReader forumReader, ICommandFactory commandFactroy)
        {
            this.labelFactory   = labelFactory;
            this.forumReader    = forumReader;
            this.commandFactory = commandFactroy;

            this.Open();
        }
Пример #3
0
        public SignUpMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, IForumReader forumReader)
        {
            this.labelFactory   = labelFactory;
            this.forumReader    = forumReader;
            this.commandFactory = commandFactory;

            Open();
        }
Пример #4
0
        public LogInMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, IForumReader reader)
        {
            this.labelFactory   = labelFactory;
            this.commandFactory = commandFactory;
            this.reader         = reader;

            Open();
        }
Пример #5
0
 public AddReplyMenu(ILabelFactory labelFactory, ITextAreaFactory textAreaFactory, IForumReader reader, ICommandFactory commandFactory, IPostService postService)
 {
     this.labelFactory    = labelFactory;
     this.textAreaFactory = textAreaFactory;
     this.reader          = reader;
     this.commandFactory  = commandFactory;
     this.postService     = postService;
 }
Пример #6
0
        //TODO: Inject Dependencies
        public LogInMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, ISession session, IUserService userService, IForumReader forumReader)
        {
            this.labelFactory   = labelFactory;
            this.commandFactory = commandFactory;
            this.session        = session;
            this.userService    = userService;
            this.forumReader    = forumReader;

            this.Open();
        }
        public AddPostMenu(ILabelFactory labelFactory, ITextAreaFactory textAreaFactory, IForumReader reader, ICommandFactory commandFactory)
        {
            this.labelFactory    = labelFactory;
            this.textAreaFactory = textAreaFactory;
            this.reader          = reader;
            this.commandFactory  = commandFactory;

            this.InitializeTextArea();
            this.Open();
        }
 public AddReplyMenu(ILabelFactory labelFactory, ITextAreaFactory textAreaFactory,
                     IForumReader reader, ICommandFactory commandFactory, IPostService postServive, ISession session)
 {
     this.labelFactory    = labelFactory;
     this.textAreaFactory = textAreaFactory;
     this.reader          = reader;
     this.commandFactory  = commandFactory;
     this.postServive     = postServive;
     this.session         = session;
 }
Пример #9
0
        public TextInputArea(IForumReader reader, int x, int y, bool isPost = true)
        {
            this.reader = reader;

            this.x             = x;
            this.y             = y;
            this.displayCursor = new Position(x, y);

            this.height    = isPost ? postAreaHeight : replyAreaHeight;
            this.maxLength = isPost ? postMaxLength : replyMaxLength;
        }
Пример #10
0
        public TextInputArea(IForumReader reader, int x, int y, bool isPost = true)
        {
            this.reader = reader;

            this.x             = x;
            this.y             = y;
            this.displayCursor = new Position(x, y);

            this.height    = isPost ? POST_AREA_HEIGHT : REPLY_AREA_HEIGHT;
            this.maxLength = isPost ? POST_MAX_LENGTH : REPLY_MAX_LENGTH;
        }
        // private IUserService userService;

        public SignUpMenu(ILabelFactory labelFactory, ICommandFactory commandFactory,
                          ISession session, IForumReader forumReader)// IUserService userService)

        {
            this.labelFactory   = labelFactory;
            this.commandFactory = commandFactory;
            this.session        = session;
            this.forumReader    = forumReader;
            // this.userService = userService;

            Open();
        }
Пример #12
0
        public ITextInputArea CreateTextArea(IForumReader reader, int x, int y, bool isPost = true)
        {
            Assembly assembly    = Assembly.GetExecutingAssembly();
            Type     commandType = assembly.GetTypes().FirstOrDefault(t => typeof(ITextInputArea).IsAssignableFrom(t));

            if (commandType == null)
            {
                throw new InvalidOperationException("TextArea not found!");
            }

            object[] args = new object[] { reader, x, y, isPost };

            ITextInputArea commandInstance = (ITextInputArea)Activator.CreateInstance(commandType, args);

            return(commandInstance);
        }
Пример #13
0
    public ITextInputArea CreateTextArea(IForumReader reader, int x, int y, bool isPost = true)
    {
        Type commandType = Assembly
                           .GetExecutingAssembly()
                           .GetTypes()
                           .Where(t => t.GetInterfaces()
                                  .Contains(typeof(ITextInputArea)) &&
                                  !t.IsAbstract)
                           .FirstOrDefault();

        if (commandType == null)
        {
            throw new InvalidOperationException("TextArea not found!");
        }

        object[] args = new object[] { reader, x, y, isPost };

        ITextInputArea commandInstance = (ITextInputArea)Activator.CreateInstance(commandType, args);

        return(commandInstance);
    }
Пример #14
0
        public ITextInputArea CreateTextArea(IForumReader reader, int x, int y, bool isPost = true)
        {
            ITextInputArea area = new TextInputArea(reader, x, y, isPost);

            return(area);
        }