private void toolStripButtonDelSelected_Click(object sender, EventArgs e) { try { ListView.SelectedListViewItemCollection selitems = lsvCacheCookie.SelectedItems; if (selitems.Count == 0) { return; } if (!AllForms.AskForConfirmation( "Proceed to delete " + selitems.Count.ToString() + " selected items?", this)) { return; } foreach (ListViewItem item in selitems) { WinApis.DeleteUrlCacheEntry(item.SubItems[0].Text); lsvCacheCookie.Items.Remove(item); } AdjustThisText(); } catch (Exception ee) { AllForms.m_frmLog.AppendToLog("toolStripButtonDelSelected_Click:\r\n" + ee.ToString()); } }
private void toolStripButtonDelChecked_Click(object sender, EventArgs e) { try { ListView.CheckedListViewItemCollection checkeditems = lsvCacheCookie.CheckedItems; if (checkeditems.Count == 0) { return; } if (!AllForms.AskForConfirmation(string.Format(Properties.Resources.DeleteCheckedItems, checkeditems.Count), this)) { return; } foreach (ListViewItem item in checkeditems) { WinApis.DeleteUrlCacheEntry(item.SubItems[0].Text); lsvCacheCookie.Items.Remove(item); } AdjustThisText(); } catch (Exception ee) { AllForms.m_frmLog.AppendToLog("toolStripButtonDelChecked_Click:\r\n" + ee.ToString()); } }
private void toolStripButtonDelAll_Click(object sender, EventArgs e) { try { if (lsvCacheCookie.Items.Count == 0) { return; } if (!AllForms.AskForConfirmation( "Proceed to delete all " + lsvCacheCookie.Items.Count.ToString() + " items?", this)) { return; } foreach (ListViewItem item in lsvCacheCookie.Items) { WinApis.DeleteUrlCacheEntry(item.SubItems[0].Text); } lsvCacheCookie.Items.Clear(); AdjustThisText(); } catch (Exception ee) { AllForms.m_frmLog.AppendToLog("toolStripButtonDelAll_Click:\r\n" + ee.ToString()); } }
private void tsBtnSaveLog_Click(object sender, EventArgs e) { if (AllForms.ShowStaticSaveDialogForText(this) == DialogResult.OK) { using (StreamWriter sw = new StreamWriter(AllForms.m_dlgSave.FileName)) { sw.Write(txtLog.Text); } } }
void toolStripButtonSave_Click(object sender, EventArgs e) { if (AllForms.ShowStaticSaveDialogForText(this) == DialogResult.OK) { using (StreamWriter sw = new StreamWriter(AllForms.m_dlgSave.FileName)) { sw.Write(richTextBox1.Text); } } }
private void frmCacheCookie_Load(object sender, EventArgs e) { //Add some icons this.Icon = AllForms.BitmapToIcon(5); toolStripButtonDelSelected.Image = AllForms.m_imgListMain.Images[29]; toolStripButtonDelChecked.Image = AllForms.m_imgListMain.Images[39]; toolStripButtonDelAll.Image = AllForms.m_imgListMain.Images[40]; //To demonstrate of handling of a listviewitem dragdrop on a csEXWB control lsvCacheCookie.ItemDrag += new ItemDragEventHandler(lsvCacheCookie_ItemDrag); }
private void frmFileDownload_Load(object sender, EventArgs e) { this.Icon = AllForms.BitmapToIcon(45); m_pb = new ProgressBar(); m_pb.Name = "DownloadPB"; //m_pb.Visible = false; m_pb.Parent = lvDownloads; m_pb.Style = ProgressBarStyle.Continuous; m_pb.Value = 50; m_pb.Bounds = lvDownloads.Items[0].SubItems[4].Bounds; }
private void saveToolStripMenuItem_Click(object sender, EventArgs e) { try { //Save as text if (AllForms.ShowStaticSaveDialogForText(this) == DialogResult.OK) { using (StreamWriter sw = new StreamWriter(AllForms.m_dlgSave.FileName)) { sw.Write(txtDocInfo.Text); } } } catch (Exception ee) { AllForms.m_frmLog.AppendToLog("frmDocInfo::saveToolStripMenuItem_Click\r\n" + ee.ToString()); } }
public int ClearAllCache(string FromSite) { int ideleted = 0; System.Collections.ArrayList results = WinApis.FindUrlCacheEntries( AllForms.SetupCookieCachePattern(FromSite, AllForms.VISITED)); foreach (INTERNET_CACHE_ENTRY_INFO entry in results) { //Avoid Null or empty entries if ((!string.IsNullOrEmpty(entry.lpszSourceUrlName)) && (entry.lpszSourceUrlName.Trim().Length > 0)) { WinApis.DeleteUrlCacheEntry(entry.lpszSourceUrlName); ideleted++; } } return(ideleted); }
private void saveTreeToolStripMenuItem_Click(object sender, EventArgs e) { try { if (treeDOM.Nodes.Count == 0) { return; } if (AllForms.ShowStaticSaveDialogForXML(this) == DialogResult.OK) { TreeViewSerializer savetree = new TreeViewSerializer(); savetree.SerializeTreeView(treeDOM, AllForms.m_dlgSave.FileName); } } catch (Exception ee) { AllForms.m_frmLog.AppendToLog("frmDOM::saveTreeToolStripMenuItem_Click\r\n" + ee.ToString()); } }
private void frmFileDownload_Load(object sender, EventArgs e) { this.Icon = AllForms.BitmapToIcon(45); }
private void frmDOM_Load(object sender, EventArgs e) { this.Icon = AllForms.BitmapToIcon(34); }
private void frmAuthenticate_Load(object sender, EventArgs e) { this.Icon = AllForms.BitmapToIcon(14); }