예제 #1
0
        public ART1PaintPresenter(IMainForm mainForm, PatternInputPresenter patternInputPresenter, OpenFileDialog openDialog)
        {
            this.mainForm = mainForm;
            this.patternInputPresenter = patternInputPresenter;
            this.openDialog = openDialog;

            patternInputPresenter.PatternPresented += new EventHandler<PatternEventArgs>(patternInputPresenter_PatternPresented);
            mainForm.NewClicked += new EventHandler(mainForm_NewClicked);
            mainForm.ClearClicked += new EventHandler(mainForm_ClearClicked);
            mainForm.LoadClicked += new EventHandler(mainForm_LoadClicked);
        }
예제 #2
0
파일: Program.cs 프로젝트: forkbomb/pikto
        private static ART1PaintForm BuildMainForm()
        {
            ART1PaintForm mainForm = new ART1PaintForm();

            PatternInputTranslator translator = new PatternInputTranslator(mainForm);
            PatternInputProcessor processor = new PatternInputProcessor(translator);
            PatternInputPresenter presenter = new PatternInputPresenter(processor);
            presenter.Renew(50, 50, 0.7f);
            OpenFileDialog openDialog = new OpenFileDialog();
            new ART1PaintPresenter(mainForm, presenter, openDialog);

            return mainForm;
        }