/// <summary> /// c'tor of the command and the handlers /// </summary> /// <param name="convert">the view that convert to spesific format to view</param> /// <param name="model">the model</param> public MainPresentor(IConvertableView convert, IMainView view, IModel model) { this.view = view; view.newListen += this.AddListens; this.model = model; this.convert = convert; }
/// <summary> /// c'tor of the command handler /// </summary> /// <param name="convert">how to convert</param> /// <param name="model">the model</param> /// <param name="command">the command </param> /// <param name="view">who send</param> public CommandHandler(IConvertableView convert, IModel model, string command, ISendableView view) { this.nextCommand = command; this.whoSend = view; //create the dict this.commands = new Dictionary <string, ICommandable>(); PlayCommand playCommander = new PlayCommand(new PlayHandleView(convert), model); this.commands.Add(generateCommand, new GenerateCommand(new GenerateHandleView(convert), model)); this.commands.Add(solveCommand, new SolveCommand(new SolveHandleView(convert), model)); this.commands.Add(multiCommand, new MultiplayerCommand(new MultiHandleView(convert), playCommander, model)); this.commands.Add(clueCommand, new ClueCommand(new ClueHandleView(convert), model)); this.commands.Add(playCommand, playCommander); this.commands.Add(closeCommand, new CloseCommand(null, model)); }
/// <summary> /// c'tor /// </summary> /// <param name="convert">the convert</param> public GenerateHandleView(IConvertableView convert) : base(convert) { }
/// <summary> /// c'tor /// </summary> /// <param name="convert">the convert</param> public SolveHandleView(IConvertableView convert) : base(convert) { }
/// <summary> /// c'tor /// </summary> /// <param name="convert">the convert</param> public MultiHandleView(IConvertableView convert) : base(convert) { }
public ClueHandleView(IConvertableView convert) : base(convert) { }
/// <summary> /// the c'tor /// </summary> /// <param name="convert">the convert to the output</param> public GeneralHandleOutput(IConvertableView convert) { this.convert = convert; }
/// <summary> /// c'tor /// </summary> /// <param name="convert">the convert</param> public PlayHandleView(IConvertableView convert) : base(convert) { }