本文整理汇总了C#中IPreferenceFolder类的典型用法代码示例。如果您正苦于以下问题:C# IPreferenceFolder类的具体用法?C# IPreferenceFolder怎么用?C# IPreferenceFolder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPreferenceFolder类属于命名空间,在下文中一共展示了IPreferenceFolder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: QueryAdapter
public object QueryAdapter(IPreferenceFolder folder, Type type) {
Debug.Assert(_originalFolder.Id == folder.Id);
if (type == typeof(ITerminalSessionOptions))
return folder == _originalFolder ? _originalOptions : new TerminalSessionOptions(folder).Import(_originalOptions);
else
return null;
}
示例2: InitializePreference
public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) {
_schemeTemplate = builder.DefineFolderArray(folder, this, "scheme");
_preferenceFolderArray = folder.FindChildFolderArray("scheme");
Debug.Assert(_preferenceFolderArray != null);
_namePreference = builder.DefineStringValue(_schemeTemplate, "name", "", null);
_promptPreference = builder.DefineStringValue(_schemeTemplate, "prompt", GenericShellScheme.DEFAULT_PROMPT_REGEX, null);
_backspacePreference = builder.DefineStringValue(_schemeTemplate, "backspace", "", null);
_commandListPreference = builder.DefineStringValue(_schemeTemplate, "commands", "", null);
}
示例3: Commit
public override bool Commit(IPreferenceFolder[] values) {
Debug.Assert(_panel != null);
return _panel.Commit((IProtocolOptions)values[0].QueryAdapter(typeof(IProtocolOptions)), (IKeyAgentOptions)values[1].QueryAdapter(typeof(IKeyAgentOptions)));
}
示例4: QueryAdapter
public object QueryAdapter(IPreferenceFolder folder, Type type)
{
return null;
}
示例5: InitiUI
public abstract void InitiUI(IPreferenceFolder[] values);
示例6: QueryAdapter
public override object QueryAdapter(IPreferenceFolder folder, Type adapter)
{
//Snapshotに対するアクションがあるので、folder==_folderの比較ではアウト
if (adapter == typeof(IUserFriendlyInterface)) {
if (_folder == folder)
return this;
else if (folder.Id == _folder.Id)
return this.CloneFor(folder);
}
//失敗ケース
return null;
}
示例7: InitializePreference
public override void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder)
{
base.InitializePreference(builder, folder);
_i = builder.DefineIntValue(folder, "i", 10, new PreferenceItemValidator<int>(ValidateI));
_s = builder.DefineStringValue(folder, "s", "bobo", new PreferenceItemValidator<string>(ValidateS));
}
示例8: OnPreferenceImport
public void OnPreferenceImport(IPreferenceFolder oldvalues, IPreferenceFolder newvalues)
{
_lastImportedFolder = newvalues;
_count++;
}
示例9: InitializePreference
public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder)
{
_modifyCursorKeys = builder.DefineIntValue(folder, "modifyCursorKeys", DEFAULT_MODIFY_CURSOR_KEYS, PreferenceValidatorUtil.PositiveIntegerValidator);
}
示例10: InitPreference
internal static void InitPreference(IPreferenceBuilder builder, IPreferenceFolder window_root)
{
_aboutBoxID = builder.DefineStringValue(window_root, "aboutBoxFactoryID", "default", null);
}
示例11: Commit
public override bool Commit(IPreferenceFolder[] values)
{
Debug.Assert(_panel != null);
return _panel.Commit(OptionDialogPlugin.Instance.CommandManager.GetKeyBinds(values[0]));
}
示例12: InitiUI
public override void InitiUI(IPreferenceFolder[] values)
{
if (_panel == null)
_panel = new CommandOptionPanel();
_panel.InitUI(OptionDialogPlugin.Instance.CommandManager.GetKeyBinds(values[0]));
}
示例13: InitializePreference
//IPreferencesupplier
public void InitializePreference(IPreferenceBuilder builder, IPreferenceFolder folder) {
_originalFolder = folder;
_originalOptions = new TerminalOptions(folder);
_originalOptions.DefineItems(builder);
//defaultRenderProfileのリセットをする
_originalFolder.AddChangeListener(this);
}
示例14: TerminalOptions
public TerminalOptions(IPreferenceFolder folder)
: base(folder) {
}
示例15: OnPreferenceImport
//必ずimportされるという前提なのでちょっと危険
public void OnPreferenceImport(IPreferenceFolder oldvalues, IPreferenceFolder newvalues) {
ITerminalEmulatorOptions opt = (ITerminalEmulatorOptions)newvalues.QueryAdapter(typeof(ITerminalEmulatorOptions));
//DefaultRenderProfile
GEnv.DefaultRenderProfile = opt.CreateRenderProfile();
//必要なTerminalSessionにApplyTerminalOptions
ISessionManager sm = TerminalEmulatorPlugin.Instance.GetSessionManager();
foreach (ISession session in sm.AllSessions) {
IAbstractTerminalHost ts = (IAbstractTerminalHost)session.GetAdapter(typeof(IAbstractTerminalHost));
if (ts != null) {
TerminalControl tc = ts.TerminalControl;
if (tc != null) {
tc.ApplyTerminalOptions(opt);
}
}
}
//ASCIIWordBreakTable
ASCIIWordBreakTable table = ASCIIWordBreakTable.Default;
table.Reset();
foreach (char ch in opt.AdditionalWordElement)
table.Set(ch, ASCIIWordBreakTable.LETTER);
//キーバインド系をリセット
TerminalEmulatorPlugin.Instance.CustomKeySettings.Reset(opt);
//KeepAliveのリフレッシュ
TerminalEmulatorPlugin.Instance.KeepAlive.Refresh(opt.KeepAliveInterval);
_originalOptions.ResetParseKeyFlag();
}