コード例 #1
0
ファイル: MiscOptions.cs プロジェクト: zhangguanjiong/dnSpy
        public IEnumerable <ISimpleAppOption> Create()
        {
            yield return(new SimpleAppOptionCheckBox(WindowsExplorerIntegration, (saveSettings, appRefreshSettings, newValue) => {
                if (!saveSettings)
                {
                    return;
                }
                WindowsExplorerIntegration = newValue;
            })
            {
                Order = AppSettingsConstants.ORDER_MISC_EXPLORERINTEGRATION,
                Text = dnSpy_Resources.Options_Misc_ExplorerIntegration,
                ToolTip = dnSpy_Resources.Options_Misc_ExplorerIntegration_ToolTip,
            });

            yield return(new SimpleAppOptionButton()
            {
                Order = AppSettingsConstants.ORDER_MISC_ENABLEALLWARNINGS,
                Text = dnSpy_Resources.Options_Misc_Button_EnableAllWarnings,
                Command = new RelayCommand(a => messageBoxManager.EnableAllWarnings(), a => messageBoxManager.CanEnableAllWarnings),
            });

            yield return(new SimpleAppOptionUserContent <UseNewRendererVM>(new UseNewRendererVM(appSettings), (saveSettings, appRefreshSettings, vm) => {
                if (saveSettings)
                {
                    vm.Save();
                }
            })
            {
                Order = AppSettingsConstants.ORDER_MISC_USENEWRENDERER,
            });
        }