public async void OpenSecondWindow(string renderedPath) { StatusWindow secondWindow = new StatusWindow(); this.Visibility = Visibility.Hidden; secondWindow.Show(); secondWindow.Title = "Generating Snipe ..."; secondWindow.StatusLabel.Content = "Processing Text ..."; secondWindow.renderBar.Value = 25; await Task.Delay(2000); CMD_EditText(); if (TxtHeader.Text.Length < 25) { secondWindow.StatusLabel.Content = ("Exporting to " + renderedPath); secondWindow.renderBar.Value = 50; await Task.Delay(2000); CMD_AERender1LineHeader(renderedPath); } else { secondWindow.StatusLabel.Content = ("Exporting to " + renderedPath); secondWindow.renderBar.Value = 50; await Task.Delay(2000); CMD_AERender2LineHeader(renderedPath); } secondWindow.renderBar.Value = 100; Process.Start(renderedPath); secondWindow.Visibility = Visibility.Hidden; this.Visibility = Visibility.Visible; }
private async void OpenSecondWindow_Preview() { StatusWindow secondWindow = new StatusWindow(); this.Visibility = Visibility.Hidden; secondWindow.Show(); secondWindow.Title = "Generating Preview ..."; secondWindow.StatusLabel.Content = "Processing Text ..."; secondWindow.renderBar.Value = 25; await Task.Delay(2000); CMD_EditText(); if (TxtHeader.Text.Length < 25) { secondWindow.StatusLabel.Content = "Creating Preview ..."; secondWindow.renderBar.Value = 50; await Task.Delay(2000); CMD_AERender1LineHeader_Preview(); } else { secondWindow.StatusLabel.Content = "Creating Preview ..."; secondWindow.renderBar.Value = 50; await Task.Delay(2000); CMD_AERender2LineHeader_Preview(); } secondWindow.renderBar.Value = 100; secondWindow.Visibility = Visibility.Hidden; this.Visibility = Visibility.Visible; File.Delete(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FTS Graphics Hub", "preview.mov")); }