Esempio n. 1
0
        public MainPresenter(IEditorForm view, IFileManager manager, IMessageService message)
        {
            _view    = view;
            _manager = manager;
            _message = message;

            _view.SetSymbolCount(0);

            _view.ContentChanged += _view_ContentChanged;
            _view.FileOpenClick  += _view_FileOpenClick;
            _view.FileSaveClick  += _view_FileSaveClick;
        }
Esempio n. 2
0
        public MainPresenter(IFileManager fileManager, IEditorForm editorForm,
                             IMessageService messageService)
        {
            manager             = fileManager;
            view                = editorForm;
            this.messageService = messageService;

            view.ContentChanged += EditorForm_ContentChanged;
            view.FileOpenClick  += View_FileOpenClick;
            view.FileSaveClick  += View_FileSaveClick;

            view.SetCharactersCount(0);
        }
Esempio n. 3
0
        public IEditorForm OpenEditor(string editorType) //System.Type editorType)
        {
            IEditorForm editor = null;

            if (editorType == "CamControl")
            {
                if (this.CamControl == null)
                {
                    this.CamControl                    = (ILocScaleRotEdit)EditorFactory.CreateEditor("LocScaleRotEdit");
                    this.CamControl.EditSprite         = Stage.Camera;
                    this.CamControl.AutoswitchToSprite = false;
                    this.CamControl.Disposed          += new EventHandler(editor_Disposed);
                }
                editor = this.CamControl;
            }
            else
            {
                editor           = EditorFactory.CreateEditor(editorType);
                editor.Disposed += new EventHandler(editor_Disposed);
            }

            this.ShowEditor(editor);
            return(editor);
        }