public ShowHelp(string key, Window originator) { InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; string path = string.Format("{0}/Resources/Documentation/{1}.html", Directory.GetCurrentDirectory(), key); if (!File.Exists(path)) { key = "Error"; } Uri url = new Uri(string.Format("file:///{0}/Resources/Documentation/{1}.html", Directory.GetCurrentDirectory(), key)); HelpBrowser.Navigate(url); }
public HtmlHelp(string key, Window originator) { InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; Console.WriteLine("TRENUTNI FOLDER:" + Directory.GetCurrentDirectory()); string path = string.Format("{0}/Html/{1}.html", Directory.GetCurrentDirectory(), key); Console.WriteLine("OVDE SAM OVO MI JE PUTANJA:" + path); if (!File.Exists(path)) { key = "Error"; } Uri url = new Uri(string.Format("file:///{0}/Html/{1}.html", Directory.GetCurrentDirectory(), key)); HelpBrowser.Navigate(url); }
private void HelpSearchButton_Click(object sender, RoutedEventArgs e) { DataTable dataTable = readerVM.Search(HelpSearchBox.Text); if (dataTable.Rows.Count > 0) { HelpBrowser.Navigated -= HelpBrowser_Navigated; HelpBrowser.Navigated += HelpBrowser_Navigated; HelpBrowser.Navigate(dataTable.Rows[0]["URL"].ToString()); ErrorBlock.Visibility = Visibility.Collapsed; } else { HelpBrowser.Navigate("about:blank"); ErrorBlock.Visibility = Visibility.Visible; } }
public HelpView(string key) { InitializeComponent(); string path = string.Format("..\\..\\resources\\documentation\\{0}.html", key); if (!File.Exists(path)) { key = "Error"; } Console.WriteLine(key); string absolutePath = System.IO.Path.GetFullPath(string.Format("..\\..\\resources\\documentation\\{0}.html", key)); Uri url = new Uri(string.Format("file:///{0}", absolutePath)); HelpBrowser.Navigate(url); }
public ShowHelp(string key, Window originator) { InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; string putanja = Directory.GetCurrentDirectory(); putanja = putanja.Remove(putanja.Length - 10, 10); // ovo radimo da bi obrisali //bin//Debug jer tu nam nisu html kodovi string path = string.Format("{0}\\Resources\\Documentation\\{1}.html", putanja, key); if (!File.Exists(path)) { key = "Error"; } Uri url = new Uri(string.Format("file:///{0}\\Resources\\Documentation\\{1}.html", putanja, key)); HelpBrowser.Navigate(url); }