Beispiel #1
0
        private void ReSize()
        {
            if (Controls.Contains((UserControl)_loginPresenter.GetView()))
            {
                UserControl loginView = (UserControl)_loginPresenter.GetView();
                loginView.Left = (this.ClientSize.Width - loginView.Width) / 2;
                loginView.Top  = (this.ClientSize.Height - loginView.Height) / 2;
            }
            if (_mainPresenter != null && Controls.Contains((UserControl)_mainPresenter.GetView()))
            {
                UserControl mainView = (UserControl)_mainPresenter.GetView();
                mainView.Width  = this.ClientSize.Width;
                mainView.Height = this.ClientSize.Height;
            }

            if (_videoPresenter != null && Controls.Contains((UserControl)_videoPresenter.GetView()))
            {
                UserControl mainView = (UserControl)_videoPresenter.GetView();
                mainView.Width  = this.ClientSize.Width;
                mainView.Height = this.ClientSize.Height;
            }
        }
Beispiel #2
0
        private void ActiveXComponent_Load(object sender, EventArgs e)
        {
            ComposContainer.Instance().Compose(this);

            _initModel.Init();

            _loginPresenter            = new LoginPresenter(new LoginControl());
            _loginPresenter.Connected += ConnectionCompleted;

            LoadLoginView(_loginPresenter.GetView());
            //_loginPresenter.Connect();

            _videoPresenter = new VideoPresenter(new CameraViewer(), CloseVideoControl);
        }