public FileController(IMapHandler newMapHandler, IFileView newFileView, IFileHandler newFileHandler, IValidator newValidator)
 {
     maphandler = newMapHandler;
     fileView = newFileView;
     fileHandler = newFileHandler;
     validator = newValidator;
 }
Beispiel #2
0
        internal void Setup(IFilePathView filePathView, IFileView fileView)
        {
            _filePathView = filePathView;
            _fileView     = fileView;

            _filePathView.LoadFile += LoadFile;
        }
Beispiel #3
0
        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);
                }
            }
        }
Beispiel #4
0
 public MainPresenter(IMainView mainView, IFileView fileView)
 {
     MainView = mainView;
     FileView = fileView;
     MainView.OpenFileEvent += OnOpenFile;
     MainView.Show();
 }
Beispiel #5
0
 public FilePresenter(IFileView impConfigView, IFileReader fileReader)
 {
     FileView = impConfigView;
     FileView.FileLoadEvent += OnFileLoad;
     FileReader              = fileReader;
     MasterPreviewContent    = new List <string[]>();
     TestPreviewContent      = new List <string[]>();
 }
Beispiel #6
0
 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;
 }
Beispiel #7
0
 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);
 }
Beispiel #8
0
 protected FileViewController(IFileView view)
 {
     _view = view;
 }
Beispiel #9
0
 protected FileViewController(IFileView view)
 {
     _view = view;
 }