Пример #1
0
 /// <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;
 }
Пример #2
0
        /// <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));
        }
Пример #3
0
 /// <summary>
 /// c'tor
 /// </summary>
 /// <param name="convert">the convert</param>
 public GenerateHandleView(IConvertableView convert) : base(convert)
 {
 }
Пример #4
0
 /// <summary>
 /// c'tor
 /// </summary>
 /// <param name="convert">the convert</param>
 public SolveHandleView(IConvertableView convert) : base(convert)
 {
 }
Пример #5
0
 /// <summary>
 /// c'tor
 /// </summary>
 /// <param name="convert">the convert</param>
 public MultiHandleView(IConvertableView convert) : base(convert)
 {
 }
Пример #6
0
 public ClueHandleView(IConvertableView convert) : base(convert)
 {
 }
Пример #7
0
 /// <summary>
 /// the c'tor
 /// </summary>
 /// <param name="convert">the convert to the output</param>
 public GeneralHandleOutput(IConvertableView convert)
 {
     this.convert = convert;
 }
Пример #8
0
 /// <summary>
 /// c'tor
 /// </summary>
 /// <param name="convert">the convert</param>
 public PlayHandleView(IConvertableView convert) : base(convert)
 {
 }