예제 #1
0
        public MainView(IToolbarView toolbarView, ITextInputView textInputView, IWordCounterView wordCounterView, IStatusBarView statusbarView)
        {
            InitializeComponent();

            ((Form)textInputView).TopLevel        = false;
            ((Form)textInputView).FormBorderStyle = FormBorderStyle.None;
            ((Form)textInputView).Show();
            ((Form)textInputView).Dock = DockStyle.Fill;
            splitContainer1.Panel1.Controls.Add((Form)textInputView);

            ((Form)wordCounterView).TopLevel        = false;
            ((Form)wordCounterView).FormBorderStyle = FormBorderStyle.None;
            ((Form)wordCounterView).Show();
            ((Form)wordCounterView).Dock = DockStyle.Fill;
            splitContainer1.Panel2.Controls.Add((Form)wordCounterView);

            ((Form)toolbarView).TopLevel        = false;
            ((Form)toolbarView).FormBorderStyle = FormBorderStyle.None;
            ((Form)toolbarView).Show();
            ((Form)toolbarView).Dock = DockStyle.Fill;
            panel1.Controls.Add((Form)toolbarView);

            panel1.Height = 96;
            splitContainer1.BringToFront();

            ((Form)statusbarView).TopLevel        = false;
            ((Form)statusbarView).FormBorderStyle = FormBorderStyle.None;
            ((Form)statusbarView).Show();
            ((Form)statusbarView).Dock = DockStyle.Fill;
            panel2.Controls.Add((Form)statusbarView);
            panel2.Height = ((Form)statusbarView).Height;
        }
예제 #2
0
        public TextInputPresenter(ITextInputView textInputView, ITextInputModel textInputModel)
        {
            this.textInputView  = textInputView;
            this.textInputModel = textInputModel;

            textInputView.TextInputChanged += OnViewTextChanged;
            textInputModel.TextInputChange += OnModelTextChanged;
        }