public SignUpMenu(ILabelFactory labelFactory, IForumReader reader, ICommandFactory commandFactory) { this.labelFactory = labelFactory; this.commandFactory = commandFactory; this.reader = reader; Open(); }
public LogInMenu(ILabelFactory labelFactory, IForumReader forumReader, ICommandFactory commandFactroy) { this.labelFactory = labelFactory; this.forumReader = forumReader; this.commandFactory = commandFactroy; this.Open(); }
public SignUpMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, IForumReader forumReader) { this.labelFactory = labelFactory; this.forumReader = forumReader; this.commandFactory = commandFactory; Open(); }
public LogInMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, IForumReader reader) { this.labelFactory = labelFactory; this.commandFactory = commandFactory; this.reader = reader; Open(); }
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; }
//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; }
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; }
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(); }
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); }
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); }
public ITextInputArea CreateTextArea(IForumReader reader, int x, int y, bool isPost = true) { ITextInputArea area = new TextInputArea(reader, x, y, isPost); return(area); }