private void Button_Click(object sender, RoutedEventArgs e) { GeraESocial eSocial = new GeraESocial(); eSocial.gerarESocial1000("2016-01", "2016-12"); eSocial.gerarESocial1010("2016-01", "2016-12"); }
private void Button_Click(object sender, RoutedEventArgs e) { try { GeraESocial eSocial = new GeraESocial(); eSocial.gerarESocial1000("2016-01", "2016-12"); eSocial.gerarESocial1010("2016-01", "2016-12"); CaminhoArquivo = "C:\\T2Ti\\Arquivos\\eSocial_info_empregador.xml"; //System.Diagnostics.Process.Start(CaminhoArquivo); - se quiser abrir no editor padrĂ£o do windows PreviewPrincipal janela = new PreviewPrincipal(); PreviewPrincipal.fileName = CaminhoArquivo; Window window = new Window() { Title = "Preview", ShowInTaskbar = false, Topmost = false, ResizeMode = ResizeMode.NoResize, Width = 1010, Height = 740, WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen }; window.Content = janela; JanelaPreview = window; window.ShowDialog(); } catch (Exception ex) { throw ex; } }