public InitEx ( ProtectedStringDictionary vStringDict, string strStringName, |
||
vStringDict | ProtectedStringDictionary | String container. Must not be |
strStringName | string | Initial name of the string. May be |
psStringInitialValue | Initial value. May be |
|
pwContext | KeePassLib.PwDatabase | |
return | void |
void btn_popout_Click(object sender, EventArgs e) { Button btn = (Button)sender; EntryTemplate t = (EntryTemplate)btn.Tag; if (form.EntryStrings.Get(t.fieldName) == null) form.EntryStrings.Set(t.fieldName, new ProtectedString(t.type.StartsWith("Protected"), "")); ProtectedString psValue = form.EntryStrings.Get(t.fieldName); Debug.Assert(psValue != null); EditStringForm esf = new EditStringForm(); esf.InitEx(form.EntryStrings, t.fieldName, psValue, m_host.Database); if (esf.ShowDialog() == DialogResult.OK) form.UpdateEntryStrings(false, true); }
private void OnBtnStrEdit(object sender, EventArgs e) { if(m_pwEditMode == PwEditMode.ViewReadOnlyEntry) return; ListView.SelectedListViewItemCollection vSel = m_lvStrings.SelectedItems; if(vSel.Count <= 0) return; UpdateEntryStrings(true, false, false); string strName = vSel[0].Text; ProtectedString psValue = m_vStrings.Get(strName); Debug.Assert(psValue != null); EditStringForm esf = new EditStringForm(); esf.InitEx(m_vStrings, strName, psValue, m_pwDatabase); if(UIUtil.ShowDialogAndDestroy(esf) == DialogResult.OK) UpdateEntryStrings(false, false, true); }
private void OnBtnStrEdit(object sender, EventArgs e) { EditStringForm esf = new EditStringForm(); ListView.SelectedListViewItemCollection vSel = m_lvStrings.SelectedItems; if(vSel.Count <= 0) return; string strName = vSel[0].Text; ProtectedString psValue = m_vStrings.Get(strName); Debug.Assert(psValue != null); esf.InitEx(m_vStrings, strName, psValue, m_pwDatabase); if(esf.ShowDialog() == DialogResult.OK) { UpdateStringsList(); m_bModifiedEntry = true; } }
private void OnBtnStrAdd(object sender, EventArgs e) { if(m_pwEditMode == PwEditMode.ViewReadOnlyEntry) return; UpdateEntryStrings(true, false, false); EditStringForm esf = new EditStringForm(); esf.InitEx(m_vStrings, null, null, m_pwDatabase); if(UIUtil.ShowDialogAndDestroy(esf) == DialogResult.OK) { UpdateEntryStrings(false, false, true); ResizeColumnHeaders(); } }
private void OnBtnStrAdd(object sender, EventArgs e) { EditStringForm esf = new EditStringForm(); esf.InitEx(m_vStrings, null, null, m_pwDatabase); if(esf.ShowDialog() == DialogResult.OK) { UpdateStringsList(); ResizeColumnHeaders(); m_bModifiedEntry = true; } }