Пример #1
0
        public ImageController(IImageServiceModal image_modal, ILogsServiceModal logging_modal,
                               ISettingsModal settings_modal, ICloseModal close_modal)
        {
            ImageModal    = image_modal;
            LogsModal     = logging_modal;
            SettingsModal = settings_modal;
            CloseModal    = close_modal;

            /// Creates an enum-ICommand dictionary.
            commands = new Dictionary <int, ICommand>()
            {
                { (int)CommandEnum.NewFileCommand, new NewFileCommand(ImageModal) },
                { (int)CommandEnum.CloseCommand, new CloseCommand(CloseModal) },
                { (int)CommandEnum.LogCommand, new LogCommand(LogsModal) },
                { (int)CommandEnum.GetConfigCommand, new ConfigCommand(SettingsModal) }
            };
        }
Пример #2
0
 /// <summary>
 /// close command constructor. ref to close modal is given.
 /// </summary>
 public CloseCommand(ICloseModal modal)
 {
     m_modal = modal;
 }