コード例 #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

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

            if (!DesignMode)
            {
                PluginLocalise.Form(this);
                RefreshDisplay();
            }
        }
コード例 #3
0
ファイル: OptionsView.cs プロジェクト: ts295983632/vrs
        /// <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();
            }
        }
コード例 #4
0
ファイル: OptionsView.cs プロジェクト: PhenTse/virtualRadar
        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();
            }
        }