public SSHKnownHosts() { _dataForSSH1 = new TypedHashtable <string, string>(); _dataForSSH2 = new TypedHashtable <string, string>(); _modified = false; _loaded = false; }
private void OnOK(object sender, EventArgs args) { try { TypedHashtable <IShellScheme, IShellScheme> table = new TypedHashtable <IShellScheme, IShellScheme>(); List <IShellScheme> newscheme = new List <IShellScheme>(); IShellScheme newdefault = null; foreach (ItemTag tag in _tags) { if (tag.Original != null) { table.Add(tag.Original, tag.ShellScheme); } newscheme.Add(tag.ShellScheme); if (tag.ShellScheme.IsGeneric) { newdefault = tag.ShellScheme; } } foreach (ItemTag tag in _removing) { table.Add(tag.Original, newdefault); } _schemeCollection.UpdateAll(newscheme.ToArray(), table); } catch (Exception ex) { RuntimeUtil.ReportException(ex); } }
private void InitItems() { _idToWorkPreference = new TypedHashtable <string, WorkPreference>(); IPreferences preferences = OptionDialogPlugin.Instance.RootPreferences; int y = 8; for (int i = 0; i < _entries.Length; i++) { IOptionPanelExtension e = _entries[i].Extension; foreach (string pref_id in e.PreferenceFolderIDsToEdit) { WorkPreference wp = _idToWorkPreference[pref_id]; if (wp == null) //add entry { IPreferenceFolder folder = preferences.FindPreferenceFolder(pref_id); if (folder == null) { throw new Exception(pref_id + " not found"); } _idToWorkPreference.Add(pref_id, new WorkPreference(folder)); } } PanelItem item = new PanelItem(this, i, e.Icon, e.Caption); item.Location = new Point(4, y); _categoryItems.Controls.Add(item); y += 52; } this.ClientSize = new Size(this.ClientSize.Width, y + 42); //項目が増えたら高さが増える }
public SSHKnownHosts() { _dataForSSH1 = new TypedHashtable<string, string>(); _dataForSSH2 = new TypedHashtable<string, string>(); _modified = false; _loaded = false; }
public override void InitializePlugin(IPoderosaWorld poderosa) { base.InitializePlugin(poderosa); _instance = this; _idToHosts = new TypedHashtable <string, PlugInHost>(); poderosa.PluginManager.FindExtensionPoint("org.poderosa.root").RegisterExtension(this); _extensionPoint = poderosa.PluginManager.CreateExtensionPoint(EXTENSIONPOINT_NAME, typeof(IPreferenceSupplier), this); }
//型から検索する。まあ個数は多くないだろうからリニアサーチでいいだろう。どうしても、という場合にはこの中でキャッシュするくらいか private ISerializeServiceElement FindServiceElement(string tag) { if (_nameToSerializer == null) { _nameToSerializer = new TypedHashtable<string, ISerializeServiceElement>(); ISerializeServiceElement[] t = (ISerializeServiceElement[])_serviceElements.GetExtensions(); foreach (ISerializeServiceElement e in t) { _nameToSerializer.Add(e.ConcreteType.FullName, e); } } return _nameToSerializer[tag]; }
public override void InitializePlugin(IPoderosaWorld poderosa) { _instance = this; base.InitializePlugin(poderosa); _sessionMap = new TypedHashtable<ISession, SessionHost>(); _documentMap = new TypedHashtable<IPoderosaDocument, DocumentHost>(); _docViewRelationHandler = poderosa.PluginManager.CreateExtensionPoint("org.poderosa.core.sessions.docViewRelationHandler", typeof(IDocViewRelationEventHandler), this); _activeDocumentChangeListeners = new ListenerList<IActiveDocumentChangeListener>(); _activeDocumentChangeListeners.Add(new WindowCaptionManager()); _sessionListeners = new ListenerList<ISessionListener>(); }
public override void InitializePlugin(IPoderosaWorld poderosa) { base.InitializePlugin(poderosa); _instance = this; _commands = new List<IGeneralCommand>(); _idToCommand = new TypedHashtable<string, IGeneralCommand>(); _keyBind = new KeyBindConfiguration(); _keyBindChangeListener = new ListenerList<IKeyBindChangeListener>(); BasicCommandImplementation.Build(); poderosa.PluginManager.FindExtensionPoint(PreferencePlugin.EXTENSIONPOINT_NAME).RegisterExtension(this); }
public override void InitializePlugin(IPoderosaWorld poderosa) { _instance = this; base.InitializePlugin(poderosa); _sessionMap = new TypedHashtable <ISession, SessionHost>(); _documentMap = new TypedHashtable <IPoderosaDocument, DocumentHost>(); _docViewRelationHandler = poderosa.PluginManager.CreateExtensionPoint("org.poderosa.core.sessions.docViewRelationHandler", typeof(IDocViewRelationEventHandler), this); _activeDocumentChangeListeners = new ListenerList <IActiveDocumentChangeListener>(); _activeDocumentChangeListeners.Add(new WindowCaptionManager()); _sessionListeners = new ListenerList <ISessionListener>(); }
//型から検索する。まあ個数は多くないだろうからリニアサーチでいいだろう。どうしても、という場合にはこの中でキャッシュするくらいか private ISerializeServiceElement FindServiceElement(string tag) { if (_nameToSerializer == null) { _nameToSerializer = new TypedHashtable <string, ISerializeServiceElement>(); ISerializeServiceElement[] t = (ISerializeServiceElement[])_serviceElements.GetExtensions(); foreach (ISerializeServiceElement e in t) { _nameToSerializer.Add(e.ConcreteType.FullName, e); } } return(_nameToSerializer[tag]); }
public override void InitializePlugin(IPoderosaWorld poderosa) { base.InitializePlugin(poderosa); _instance = this; _commands = new List <IGeneralCommand>(); _idToCommand = new TypedHashtable <string, IGeneralCommand>(); _keyBind = new KeyBindConfiguration(); _keyBindChangeListener = new ListenerList <IKeyBindChangeListener>(); BasicCommandImplementation.Build(); poderosa.PluginManager.FindExtensionPoint(PreferencePlugin.EXTENSIONPOINT_NAME).RegisterExtension(this); }
public void UpdateAll(IShellScheme[] values, TypedHashtable <IShellScheme, IShellScheme> table) { _data.Clear(); foreach (IShellScheme ss in values) { _data.Add(ss); if (ss.IsGeneric) { _defaultScheme = ss; } } //変更通知 これは_dataの更新後でないと、ハンドラから再検索等きたときに困る foreach (IShellSchemeDynamicChangeListener l in _listeners) { l.OnShellSchemeCollectionChanged(values, table); } }
private void Load() { _idToPlugin = new TypedHashtable <string, Plugin>(); foreach (Plugin p in _allPlugins) { if (p.TryToLoad() == GenericResult.Failed) { _tracer.Trace("PluginManager.Messages.BootWithoutThisPlugin", p.TypeName); continue; } string id = p.PluginInfo.ID; if (_idToPlugin.Contains(id)) { _tracer.Trace("PluginManager.Messages.IDDuplication", p.TypeName, p.PluginInfo.ID); continue; } _idToPlugin.Add(id, p); } }
private void InitItems() { _idToWorkPreference = new TypedHashtable <string, WorkPreference>(); IPreferences preferences = OptionDialogPlugin.Instance.RootPreferences; int y = 8; for (int i = 0; i < _entries.Length; i++) { IOptionPanelExtension e = _entries[i].Extension; foreach (string pref_id in e.PreferenceFolderIDsToEdit) { WorkPreference wp = _idToWorkPreference[pref_id]; if (wp == null) //add entry { IPreferenceFolder folder = preferences.FindPreferenceFolder(pref_id); if (folder == null) { throw new Exception(pref_id + " not found"); } _idToWorkPreference.Add(pref_id, new WorkPreference(folder)); } } PanelItem item = new PanelItem(this, i, e.Icon, e.Caption); item.Location = new Point(3, y); _categoryItems.Controls.Add(item); y += 52; } // 項目が増えた場合はパネルにスクロールを表示させてパネル幅/フォーム幅を変更する // ※項目数が増えれば増えるほどフォーム自体が縦長になってしまい表示しきれない懸念がある // ※今後プラグインでどれだけ項目数を増やしてもスクロールを表示することで対応 if (y > _categoryItems.ClientSize.Height) { _categoryItems.AutoScroll = true; _categoryItems.Width += SystemInformation.VerticalScrollBarWidth; this.Width += SystemInformation.VerticalScrollBarWidth; } }
private void InitKeyConfigUI() { _keyConfigList.Items.Clear(); //列挙してソート TypedHashtable <ICommandCategory, List <IGeneralCommand> > category_list = new TypedHashtable <ICommandCategory, List <IGeneralCommand> >(); foreach (IGeneralCommand cmd in _keybinds.Commands) { ICommandCategory cat = cmd.CommandCategory; if (cat != null && cat.IsKeybindCustomizable) { if (category_list.Contains(cat)) { category_list[cat].Add(cmd); } else { List <IGeneralCommand> l = new List <IGeneralCommand>(); l.Add(cmd); category_list.Add(cat, l); } } } ICollection result = PositionDesignationSorter.SortItems(category_list.Keys); foreach (ICommandCategory cat in result) { foreach (IGeneralCommand cmd in category_list[cat]) { ListViewItem li = new ListViewItem(cat.Name); li = _keyConfigList.Items.Add(li); li.SubItems.Add(cmd.Description); li.SubItems.Add(FormatKey(_keybinds.GetKey(cmd))); li.Tag = cmd; } } }
public KeyBindConfiguration() { _data = new List<Tag>(); _keyToTag = new TypedHashtable<Keys, Tag>(); _commandToTag = new TypedHashtable<IGeneralCommand, Tag>(); }
public TerminalToolBar() { _toolbarInstances = new TypedHashtable <IPoderosaMainWindow, TerminalToolBarInstance>(); }
public KeyBindConfiguration() { _data = new List <Tag>(); _keyToTag = new TypedHashtable <Keys, Tag>(); _commandToTag = new TypedHashtable <IGeneralCommand, Tag>(); }
public void UpdateAll(IShellScheme[] values, TypedHashtable<IShellScheme, IShellScheme> table) { _data.Clear(); foreach (IShellScheme ss in values) { _data.Add(ss); if (ss.IsGeneric) _defaultScheme = ss; } //変更通知 これは_dataの更新後でないと、ハンドラから再検索等きたときに困る foreach (IShellSchemeDynamicChangeListener l in _listeners) l.OnShellSchemeCollectionChanged(values, table); }
private void Load() { _idToPlugin = new TypedHashtable<string, Plugin>(); foreach (Plugin p in _allPlugins) { if (p.TryToLoad() == GenericResult.Failed) { _tracer.Trace("PluginManager.Messages.BootWithoutThisPlugin", p.TypeName); continue; } string id = p.PluginInfo.ID; if (_idToPlugin.Contains(id)) { _tracer.Trace("PluginManager.Messages.IDDuplication", p.TypeName, p.PluginInfo.ID); continue; } _idToPlugin.Add(id, p); } }
public AdapterManager() { _classToFactoryList = new TypedHashtable <Type, List <IDualDirectionalAdapterFactory> >(); }
public void UpdateAll(IShellScheme[] values, TypedHashtable<IShellScheme, IShellScheme> table) { _data.Clear(); foreach (IShellScheme ss in values) { _data.Add(ss); if (ss.IsGeneric) _defaultScheme = ss; } //�ύX�ʒm �����_data�̍X�V��łȂ��ƁA�n���h������Č����������Ƃ��ɍ��� foreach (IShellSchemeDynamicChangeListener l in _listeners) l.OnShellSchemeCollectionChanged(values, table); }
public PluginManager(InternalPoderosaWorld pw) { _world = pw; _idToExtensionPoint = new TypedHashtable <string, ExtensionPoint>(); }
public TerminalToolBar() { _toolbarInstances = new TypedHashtable<IPoderosaMainWindow, TerminalToolBarInstance>(); }
/// <summary> /// 服务标准化的通用实现 /// </summary> public void Initialize(IUserSession session, DateTime currentTime, TypedHashtable cachingStates) { _CurrentSession = session; _CurrentTime = currentTime; _Cache = cachingStates; }
private void InitItems() { _idToWorkPreference = new TypedHashtable<string, WorkPreference>(); IPreferences preferences = OptionDialogPlugin.Instance.RootPreferences; int y = 8; for (int i = 0; i < _entries.Length; i++) { IOptionPanelExtension e = _entries[i].Extension; foreach (string pref_id in e.PreferenceFolderIDsToEdit) { WorkPreference wp = _idToWorkPreference[pref_id]; if (wp == null) { //add entry IPreferenceFolder folder = preferences.FindPreferenceFolder(pref_id); if (folder == null) throw new Exception(pref_id + " not found"); _idToWorkPreference.Add(pref_id, new WorkPreference(folder)); } } PanelItem item = new PanelItem(this, i, e.Icon, e.Caption); item.Location = new Point(4, y); _categoryItems.Controls.Add(item); y += 52; } this.ClientSize = new Size(this.ClientSize.Width, y + 42); //項目が増えたら高さが増える }
private void InitKeyConfigUI() { _keyConfigList.Items.Clear(); //列挙してソート TypedHashtable<ICommandCategory, List<IGeneralCommand>> category_list = new TypedHashtable<ICommandCategory, List<IGeneralCommand>>(); foreach (IGeneralCommand cmd in _keybinds.Commands) { ICommandCategory cat = cmd.CommandCategory; if (cat != null && cat.IsKeybindCustomizable) { if (category_list.Contains(cat)) category_list[cat].Add(cmd); else { List<IGeneralCommand> l = new List<IGeneralCommand>(); l.Add(cmd); category_list.Add(cat, l); } } } ICollection result = PositionDesignationSorter.SortItems(category_list.Keys); foreach (ICommandCategory cat in result) { foreach (IGeneralCommand cmd in category_list[cat]) { ListViewItem li = new ListViewItem(cat.Name); li = _keyConfigList.Items.Add(li); li.SubItems.Add(cmd.Description); li.SubItems.Add(FormatKey(_keybinds.GetKey(cmd))); li.Tag = cmd; } } }
private void InitItems() { _idToWorkPreference = new TypedHashtable<string, WorkPreference>(); IPreferences preferences = OptionDialogPlugin.Instance.RootPreferences; int y = 8; for (int i = 0; i < _entries.Length; i++) { IOptionPanelExtension e = _entries[i].Extension; foreach (string pref_id in e.PreferenceFolderIDsToEdit) { WorkPreference wp = _idToWorkPreference[pref_id]; if (wp == null) { //add entry IPreferenceFolder folder = preferences.FindPreferenceFolder(pref_id); if (folder == null) throw new Exception(pref_id + " not found"); _idToWorkPreference.Add(pref_id, new WorkPreference(folder)); } } PanelItem item = new PanelItem(this, i, e.Icon, e.Caption); item.Location = new Point(3, y); _categoryItems.Controls.Add(item); y += 52; } // 項目が増えた場合はパネルにスクロールを表示させてパネル幅/フォーム幅を変更する // ※項目数が増えれば増えるほどフォーム自体が縦長になってしまい表示しきれない懸念がある // ※今後プラグインでどれだけ項目数を増やしてもスクロールを表示することで対応 if (y > _categoryItems.ClientSize.Height) { _categoryItems.AutoScroll = true; _categoryItems.Width += SystemInformation.VerticalScrollBarWidth; this.Width += SystemInformation.VerticalScrollBarWidth; } }
public PassphraseCache() { _data = new TypedHashtable <string, string>(); }
public void Clear() { _dataForSSH1 = new TypedHashtable <string, string>(); _dataForSSH2 = new TypedHashtable <string, string>(); }
private void OnOK(object sender, EventArgs args) { try { TypedHashtable<IShellScheme, IShellScheme> table = new TypedHashtable<IShellScheme, IShellScheme>(); List<IShellScheme> newscheme = new List<IShellScheme>(); IShellScheme newdefault = null; foreach (ItemTag tag in _tags) { if (tag.Original != null) table.Add(tag.Original, tag.ShellScheme); newscheme.Add(tag.ShellScheme); if (tag.ShellScheme.IsGeneric) newdefault = tag.ShellScheme; } foreach (ItemTag tag in _removing) { table.Add(tag.Original, newdefault); } _schemeCollection.UpdateAll(newscheme.ToArray(), table); } catch (Exception ex) { RuntimeUtil.ReportException(ex); } }
public PluginManager(InternalPoderosaWorld pw) { _world = pw; _idToExtensionPoint = new TypedHashtable<string, ExtensionPoint>(); }
public void Clear() { _dataForSSH1 = new TypedHashtable<string, string>(); _dataForSSH2 = new TypedHashtable<string, string>(); }
public PassphraseCache() { _data = new TypedHashtable<string, string>(); }