예제 #1
0
        private void ExportToHtml_Click(object sender, RoutedEventArgs e)
        {
            var saveFile = new SaveFileDialog
            {
                CheckPathExists = true,
                FileName        = "Oferta Solekro.html",
                Filter          = "HTML (*.html)|*.html|All files (*.*)|*.*",
                FilterIndex     = 0,
                OverwritePrompt = true,
                Title           = "Export to HTML",
            };

            if (saveFile.ShowDialog() == true)
            {
                var offers = new Offers();
                offers.ExportToHtml(VM.Offer, saveFile.FileName);
                Process.Start(@"cmd.exe ", @"/c " + WinPathHelper.GetShortPath(saveFile.FileName));
            }
        }