public FileController(IMapHandler newMapHandler, IFileView newFileView, IFileHandler newFileHandler, IValidator newValidator) { maphandler = newMapHandler; fileView = newFileView; fileHandler = newFileHandler; validator = newValidator; }
internal void Setup(IFilePathView filePathView, IFileView fileView) { _filePathView = filePathView; _fileView = fileView; _filePathView.LoadFile += LoadFile; }
private void toolStripButtonExportAll_Click(object sender, EventArgs e) { bool b = true; folderBrowserDialog.Description = string.Format(Translator.Instance.T("请选择{0}导出目录"), this.ShortCutText); DialogResult r = folderBrowserDialog.ShowDialog(); if (DialogResult.OK == r && this.folderBrowserDialog.SelectedPath != null && this.folderBrowserDialog.SelectedPath.Length > 0) { foreach (Control t in this.CameraPanel.Controls) { IFileView fv = t as IFileView; if (fv != null) { if (false == fv.FileClass.ExportToPath(this.folderBrowserDialog.SelectedPath)) { b = false; break; } } } if (b == true) { string msg = string.Format(Translator.Instance.T("执行完毕!\n导出目录: {0}"), folderBrowserDialog.SelectedPath); MessageBox.Show(msg, MotionPreference.Instance.MessageBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
public MainPresenter(IMainView mainView, IFileView fileView) { MainView = mainView; FileView = fileView; MainView.OpenFileEvent += OnOpenFile; MainView.Show(); }
public FilePresenter(IFileView impConfigView, IFileReader fileReader) { FileView = impConfigView; FileView.FileLoadEvent += OnFileLoad; FileReader = fileReader; MasterPreviewContent = new List <string[]>(); TestPreviewContent = new List <string[]>(); }
public FilePresenter(IFileView view, IMessageService service, IFile file) { this.view = view; this.service = service; this.file = file; view.OpenFileClick += View_OpenFileClick; view.SaveFileAsClick += View_SaveFileAsClick; view.AddEntryClick += View_AddEntryClick; view.RemoveEntryClick += View_RemoveEntryClick; view.EditEntryClick += View_EditEntryClick; }
public bool Remove(IFileClass c) { foreach (Control t in this.CameraPanel.Controls) { IFileView v = t as IFileView; if (v != null && v.FileClass.ID.Equals(c.ID)) { if (t is IVideoView) { IVideoView x = t as IVideoView; x.Stop(); } this.CameraPanel.Controls.Remove(t); this.ShortcutRemove(t as IView); break; } } return(true); }
protected FileViewController(IFileView view) { _view = view; }