Example #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            PluginLocalise.Form(this);
            fileNameDatabase.BrowserTitle = PluginStrings.SelectDatabaseFile;
        }
Example #2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!DesignMode)
            {
                PluginLocalise.Form(this);
                RefreshDisplay();
            }
        }
Example #3
0
        /// <summary>
        /// See base docs.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!DesignMode)
            {
                PluginLocalise.Form(this);
                ApplyBindings();
                InitialiseControlBinders();
            }
        }
Example #4
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!DesignMode)
            {
                PluginLocalise.Form(this);
                fileNameDatabase.BrowserTitle = PluginStrings.SelectDatabaseFile;

                _Presenter = new OptionsPresenter();
                _Presenter.Initialise(this);

                AddControlBinder(new CheckBoxBoolBinder <OptionsView>(this, checkBoxEnabled, r => r.PluginEnabled, (r, v) => r.PluginEnabled = v));
                AddControlBinder(new CheckBoxBoolBinder <OptionsView>(this, checkBoxOnlyUpdateDatabasesCreatedByPlugin, r => !r.AllowUpdateOfOtherDatabases, (r, v) => r.AllowUpdateOfOtherDatabases = !v)
                {
                    ModelPropertyName = nameof(OptionsView.AllowUpdateOfOtherDatabases)
                });
                AddControlBinder(new CheckBoxBoolBinder <OptionsView>(this, checkBoxWriteOnlineLookupsToDatabase, r => r.SaveDownloadedAircraftDetails, (r, v) => r.SaveDownloadedAircraftDetails = v)
                {
                    UpdateMode = DataSourceUpdateMode.OnPropertyChanged,
                });
                AddControlBinder(new CheckBoxBoolBinder <OptionsView>(this, checkBoxRefreshOutOfDateAircraft, r => r.RefreshOutOfDateAircraft, (r, v) => r.RefreshOutOfDateAircraft = v)
                {
                    UpdateMode = DataSourceUpdateMode.OnPropertyChanged,
                });

                AddControlBinder(new FileNameStringBinder <OptionsView>(this, fileNameDatabase, r => r.DatabaseFileName, (r, v) => r.DatabaseFileName = v));

                AddControlBinder(new ComboBoxBinder <OptionsView, CombinedFeed, int>(this, comboBoxReceiverId, CombinedFeeds, r => r.ReceiverId, (r, v) => r.ReceiverId = v)
                {
                    GetListItemDescription = r => r.Name,
                    GetListItemValue       = r => r.UniqueId,
                });

                AddControlBinder(new LabelStringBinder <OptionsView>(this, labelWriteOnlineLookupsNotice, r => r.OnlineLookupWriteActionNotice, (r, v) => r.OnlineLookupWriteActionNotice = v));

                InitialiseControlBinders();
                EnableDisableControls();
            }
        }