Beispiel #1
0
        /// <summary>
        /// Called when the form is ready for use but not yet on screen.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!DesignMode)
            {
                toolStripDropDownButtonInvalidPluginCount.Visible    = false;
                toolStripDropDownButtonLaterVersionAvailable.Visible = false;

                Localise.Form(this);
                Localise.ToolStrip(contextMenuStripNotifyIcon);
                notifyIcon.Text = Strings.VirtualRadarServer;

                _OnlineHelp = new OnlineHelpHelper(this, OnlineHelpAddress.WinFormsMainDialog);

                _Presenter = Factory.Singleton.Resolve <IMainPresenter>();
                _Presenter.Initialise(this);
                _Presenter.UPnpManager = _UPnpManager;

                var runtimeEnvironment = Factory.Singleton.ResolveSingleton <IRuntimeEnvironment>();
                if (runtimeEnvironment.Is64BitProcess)
                {
                    Text = String.Format("{0} ({1})", Text, Strings.Title64Bit);
                }
            }
        }
Beispiel #2
0
        public DialogResult ShowView()
        {
            _ViewModel = new ViewModel(this);

            _Presenter = Factory.Singleton.Resolve <IMainPresenter>();
            _Presenter.Initialise(this);
            _Presenter.UPnpManager = _UPnpManager;

            return(DialogResult.OK);
        }
Beispiel #3
0
        /// <summary>
        /// Called when the form is ready for use but not yet on screen.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!DesignMode)
            {
                toolStripDropDownButtonInvalidPluginCount.Visible    = false;
                toolStripDropDownButtonLaterVersionAvailable.Visible = false;

                Localise.Form(this);

                _OnlineHelp = new OnlineHelpHelper(this, OnlineHelpAddress.WinFormsMainDialog);

                _Presenter = Factory.Singleton.Resolve <IMainPresenter>();
                _Presenter.Initialise(this);
                _Presenter.BaseStationAircraftList = _BaseStationAircraftList;
                _Presenter.UPnpManager             = _UPnpManager;
            }
        }
Beispiel #4
0
 public void MainPresenter_Initialise_Throws_If_View_IsNull()
 {
     _Presenter.Initialise(null);
 }
        /// <summary>
        /// Called when the form is ready for use but not yet on screen.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if(!DesignMode) {
                toolStripDropDownButtonInvalidPluginCount.Visible = false;
                toolStripDropDownButtonLaterVersionAvailable.Visible = false;

                Localise.Form(this);

                _OnlineHelp = new OnlineHelpHelper(this, OnlineHelpAddress.WinFormsMainDialog);

                _Presenter = Factory.Singleton.Resolve<IMainPresenter>();
                _Presenter.Initialise(this);
                _Presenter.BaseStationAircraftList = _BaseStationAircraftList;
                _Presenter.UPnpManager = _UPnpManager;
            }
        }
        public void MainPresenter_BaseStationAircraftList_Sets_AircraftCount_On_View_If_Already_Initialised()
        {
            _BaseStationAircraftList.Setup(r => r.Count).Returns(7);

            _Presenter.Initialise(_View.Object);
            _Presenter.BaseStationAircraftList = _BaseStationAircraftList.Object;

            Assert.AreEqual(7, _View.Object.AircraftCount);
        }