public SettingsViewModal(ISettingsModal modal) { this.modal = modal; this.client = GuiClient.GetInstance; this.modal.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; RemoveHandlerCommand = new DelegateCommand <object>(OnRemoveHandler, CanExecute); }
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) } }; }
/// <summary> /// configuration command constructor. ref to setting modal is given. /// </summary> public ConfigCommand(ISettingsModal modal) { m_modal = modal; }