示例#1
0
        private Controllers.FormOptionCtrl InitOptionCtrl()
        {
            var ctrl = new Controllers.FormOptionCtrl();

            ctrl.Plug(
                new Controllers.OptionComponent.Import(
                    flyImportPanel,
                    btnImportAdd));

            ctrl.Plug(
                new Controllers.OptionComponent.Subscription(
                    flySubsUrlContainer,
                    btnAddSubsUrl,
                    btnUpdateViaSubscription,
                    chkSubsIsUseProxy,
                    chkSubsIsAutoPatch,
                    btnSubsUseAll,
                    btnSubsInvertSelection));

            ctrl.Plug(
                new Controllers.OptionComponent.TabPlugin(
                    flyPluginsItemsContainer));

            ctrl.Plug(
                new Controllers.OptionComponent.TabSetting(
                    cboxSettingLanguage,
                    cboxSettingPageSize,
                    chkSetServAutotrack,
                    tboxSettingsMaxCoreNum,
                    chkSetSysPortable,
                    chkSetUseV4,
                    chkSetServStatistics,
                    chkSetUpgradeUseProxy,
                    chkSetCheckWhenStart));
            ctrl.Plug(
                new Controllers.OptionComponent.TabDefaults(

                    // def import share link mode
                    cboxDefImportMode,
                    tboxDefImportAddr,
                    chkDefImportSsShareLink,
                    chkDefImportBypassCnSite,
                    chkDefImportInjectGlobalImport,

                    // speedtest
                    chkDefSpeedtestIsUse,
                    tboxDefSpeedtestUrl,
                    tboxDefSpeedtestCycles,
                    tboxDefSpeedtestExpectedSize,
                    tboxDefSpeedtestTimeout)
                );

            return(ctrl);
        }
示例#2
0
        private Controllers.FormOptionCtrl InitOptionCtrl()
        {
            var ctrl = new Controllers.FormOptionCtrl();

            ctrl.Plug(
                new Controllers.OptionComponent.TabMultiConf(
                    flyMultiConfPanel,
                    btnMultiConfAdd));

            ctrl.Plug(
                new Controllers.OptionComponent.TabImport(
                    flyImportPanel,
                    btnImportAdd));

            ctrl.Plug(
                new Controllers.OptionComponent.Subscription(
                    flySubsUrlContainer,
                    btnAddSubsUrl,
                    btnUpdateViaSubscription,
                    chkSubsIsUseProxy,
                    chkSubsIsAutoPatch,
                    btnSubsUseAll,
                    btnSubsInvertSelection));

            ctrl.Plug(
                new Controllers.OptionComponent.TabPlugin(
                    flyPluginsItemsContainer));

            ctrl.Plug(
                new Controllers.OptionComponent.TabSetting(
                    cboxSettingLanguage,
                    cboxSettingPageSize,
                    chkSetServAutotrack,
                    tboxSettingsMaxCoreNum,
                    cboxSettingsRandomSelectServerLatency,
                    chkSetSysPortable,
                    chkSetUseV4,
                    chkSetSelfSignedCert,
                    chkSetServStatistics,
                    chkSetUpgradeUseProxy,
                    chkSetCheckVgcUpdateWhenStart,
                    chkSetCheckV2RayCoreUpdateWhenStart,

                    btnSetBrowseDebugFile,
                    tboxSetDebugFilePath,
                    chkSetEnableDebugFile));

            ctrl.Plug(
                new Controllers.OptionComponent.TabDefaults(

                    // def import share link mode
                    cboxDefImportMode,
                    tboxDefImportAddr,

                    chkDefImportSsShareLink,
                    chkDefImportBypassCnSite,
                    chkDefImportInjectGlobalImport,

                    // speedtest
                    chkDefSpeedtestIsUse,
                    cboxDefSpeedTestUrl,
                    tboxDefSpeedtestCycles,
                    cboxDefSpeedTestExpectedSize,
                    tboxDefSpeedtestTimeout,

                    tboxDefImportVmessDecodeTemplateUrl,
                    chkDefImportIsUseVmessDecodeTemplate,

                    exRTBoxDefCustomInbounds)
                );

            return(ctrl);
        }