public void Load() { _data.Clear(); IPreferenceFolder[] folders = _preferenceFolderArray.Folders; foreach (IPreferenceFolder content in folders) { GenericShellScheme ss = new GenericShellScheme( _preferenceFolderArray.ConvertItem(content, _namePreference).AsString().Value, _preferenceFolderArray.ConvertItem(content, _promptPreference).AsString().Value); string bs = _preferenceFolderArray.ConvertItem(content, _backspacePreference).AsString().Value; if (bs == "7F") { ss.BackSpaceChar = ss.BackSpaceChar = (char)0x7F; //TODO パースが手抜き } ss.SetCommandList(_preferenceFolderArray.ConvertItem(content, _commandListPreference).AsString().Value); _data.Add(ss); } _defaultScheme = FindShellScheme(DEFAULT_SCHEME_NAME) as GenericShellScheme; if (_defaultScheme == null) { _defaultScheme = new GenericShellScheme(DEFAULT_SCHEME_NAME, GenericShellScheme.DEFAULT_PROMPT_REGEX); //なければこれで _data.Add(_defaultScheme); } }
private void CommandListOne(string input, params string[] expected) { GenericShellScheme g = new GenericShellScheme("generic", ""); g.SetCommandList(input); IntelliSenseItemCollection col = (IntelliSenseItemCollection)g.CommandHistory; Confirm(col.ToStringArray(), expected); Assert.AreEqual(input, g.FormatCommandList()); //再フォーマット }
public void Load() { _data.Clear(); IPreferenceFolder[] folders = _preferenceFolderArray.Folders; foreach (IPreferenceFolder content in folders) { GenericShellScheme ss = new GenericShellScheme( _preferenceFolderArray.ConvertItem(content, _namePreference).AsString().Value, _preferenceFolderArray.ConvertItem(content, _promptPreference).AsString().Value); string bs = _preferenceFolderArray.ConvertItem(content, _backspacePreference).AsString().Value; if (bs == "7F") ss.BackSpaceChar = ss.BackSpaceChar = (char)0x7F; //TODO パースが手抜き ss.SetCommandList(_preferenceFolderArray.ConvertItem(content, _commandListPreference).AsString().Value); _data.Add(ss); } _defaultScheme = FindShellScheme(DEFAULT_SCHEME_NAME) as GenericShellScheme; if (_defaultScheme == null) { _defaultScheme = new GenericShellScheme(DEFAULT_SCHEME_NAME, GenericShellScheme.DEFAULT_PROMPT_REGEX); //なければこれで _data.Add(_defaultScheme); } }