private void LoadFile(string Filename, int Page, bool NewSumatraInstance) { if (fw != null) { fw.EnableRaisingEvents = false; fw.Dispose(); } SumatraPDFControl.LoadFile(Filename, Page, NewSumatraInstance); fw = new System.IO.FileSystemWatcher(System.IO.Path.GetDirectoryName(Filename)) { NotifyFilter = System.IO.NotifyFilters.LastWrite, Filter = System.IO.Path.GetFileName(Filename), IncludeSubdirectories = true }; fw.Changed += Fw_Changed; fw.EnableRaisingEvents = true; }
private void toolStripButton7_Click(object sender, EventArgs e) { SumatraPDFControl.TextSearchNext(true); }
private void toolStripButton5_Click(object sender, EventArgs e) { SumatraPDFControl.TextSearch(toolText.Text, true); }
private void toolStripCopySelection_Click(object sender, EventArgs e) { SumatraPDFControl.CopySelection(); }
private void btnReload_Click(object sender, EventArgs e) { SumatraPDFControl.ReloadCurrentFile(); }
private void buttonGotoLast_Click(object sender, EventArgs e) { SumatraPDFControl.GoToLastPage(); }
public void OpenPrintDialog() { SumatraPDFControl.OpenPrintDialog(); }
public void CopySelection() { SumatraPDFControl.CopySelection(); }
public void SelectAll() { SumatraPDFControl.SelectAll(); }
private void toolStripSelectAllText_Click(object sender, EventArgs e) { SumatraPDFControl.SelectAll(); }
private void toolOpenPrintDialog_Click(object sender, EventArgs e) { SumatraPDFControl.OpenPrintDialog(); }
private void toolSetRotation_Click(object sender, EventArgs e) { SumatraPDFControl.RotateBy((RotationEnum)int.Parse(toolText.Text)); }
private void Fw_Changed(object sender, System.IO.FileSystemEventArgs e) { SumatraPDFControl.ReloadCurrentFile(); }