si hay que hacer cambios no hay problema alguno solo pido que funcione.
Código:
namespace CaptureWPF
{
public partial class MainWindow : Window
{
SpeechSynthesizer habla = new SpeechSynthesizer();
public MainWindow()
{
InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
VistaFolderBrowserDialog dlg = new VistaFolderBrowserDialog();
dlg.SelectedPath = Properties.Settings.Default.StoreFolder;
dlg.ShowNewFolderButton = true;
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
string path = dlg.SelectedPath;
string targetName2 = (DateTime.Now.ToString("dd-MM-yy---h-mm-sst"));
//Carpeta de destino
string pathDestination = @"C:\ComprimidosAsistente\";
ProcessStartInfo p = new ProcessStartInfo();
p.FileName = @"Procesos\7z.exe";
p.Arguments = "a " + pathDestination + targetName2 + " @listfile.lst" + " -t7z -mx=9";
p.WindowStyle = ProcessWindowStyle.Hidden;
Process x = Process.Start(p);
habla.SpeakAsync("Esto puede tardar, dependiendo del tamaño del archivo");
x.WaitForExit();
File.Delete("listfile.lst");
} //if
}
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
DragMove();
} //Mover ventana
private void Salir_Click(object sender, RoutedEventArgs e)
{
Close();
} //Boton cerrar
private void button1_Click(object sender, RoutedEventArgs e)
{
try
{
var ret = Process.Start(@"C:\ComprimidosAsistente");
if (ret == null)
{ }
}
catch (Exception)
{
habla.Speak("La carpeta no se encuentra, se crea automáticamente al comprimir el archivo, o puede crearla manualmente en la siguiente dirección:");
System.Windows.MessageBox.Show("Crea una carpeta en el disco C: llamada: ComprimidosAsistentes");
}
} //Boton ir a carpetas de comprimidos
}
}
{
public partial class MainWindow : Window
{
SpeechSynthesizer habla = new SpeechSynthesizer();
public MainWindow()
{
InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
VistaFolderBrowserDialog dlg = new VistaFolderBrowserDialog();
dlg.SelectedPath = Properties.Settings.Default.StoreFolder;
dlg.ShowNewFolderButton = true;
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
string path = dlg.SelectedPath;
string targetName2 = (DateTime.Now.ToString("dd-MM-yy---h-mm-sst"));
//Carpeta de destino
string pathDestination = @"C:\ComprimidosAsistente\";
ProcessStartInfo p = new ProcessStartInfo();
p.FileName = @"Procesos\7z.exe";
p.Arguments = "a " + pathDestination + targetName2 + " @listfile.lst" + " -t7z -mx=9";
p.WindowStyle = ProcessWindowStyle.Hidden;
Process x = Process.Start(p);
habla.SpeakAsync("Esto puede tardar, dependiendo del tamaño del archivo");
x.WaitForExit();
File.Delete("listfile.lst");
} //if
}
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
DragMove();
} //Mover ventana
private void Salir_Click(object sender, RoutedEventArgs e)
{
Close();
} //Boton cerrar
private void button1_Click(object sender, RoutedEventArgs e)
{
try
{
var ret = Process.Start(@"C:\ComprimidosAsistente");
if (ret == null)
{ }
}
catch (Exception)
{
habla.Speak("La carpeta no se encuentra, se crea automáticamente al comprimir el archivo, o puede crearla manualmente en la siguiente dirección:");
System.Windows.MessageBox.Show("Crea una carpeta en el disco C: llamada: ComprimidosAsistentes");
}
} //Boton ir a carpetas de comprimidos
}
}
eso esta malo podrian corregirlo por favor estare muy muy agradecido. buen dia