private void CopyToClipboard_Click(object sender, RoutedEventArgs e) { Ginfo.ContactName = !string.IsNullOrEmpty(ContactNameBox.Text) ? ContactNameBox.Text : null; Ginfo.PhoneNumber = !string.IsNullOrEmpty(PhoneNumberBox.Text) ? PhoneNumberBox.Text : null; Ginfo.EmailAddress = !string.IsNullOrEmpty(EmailAddressBox.Text) ? EmailAddressBox.Text : null; Ginfo.CaseNumber = !string.IsNullOrEmpty(CaseNumberBox.Text) ? CaseNumberBox.Text : null; Ginfo.IssueSummary = !string.IsNullOrEmpty(IssueSummaryBox.Text) ? IssueSummaryBox.Text : null; Ginfo.IssueDetails = !string.IsNullOrEmpty(IssueDetailsBox.Text) ? IssueDetailsBox.Text : null; Ginfo.TroubleShootingSteps = !string.IsNullOrEmpty(TroubleshootStepsBox.Text) ? TroubleshootStepsBox.Text : null; Ginfo.ResolutionDetails = !string.IsNullOrEmpty(ResolutionBox.Text) ? ResolutionBox.Text : null; Pinfo.Imaging = ImagingBox.SelectedItem?.ToString(); Pinfo.PMS = PMSBox.SelectedItem?.ToString(); Pinfo.Bridge = BridgesBox.SelectedItem?.ToString(); Pinfo.DatabasePath = !string.IsNullOrEmpty(DatabasePathBox.Text) ? DatabasePathBox.Text : null; Pinfo.DeviceType = DevicesBox.SelectedItem?.ToString(); Pinfo.SerialNumber = !string.IsNullOrEmpty(SerialNumberBox.Text) ? SerialNumberBox.Text : null; Pinfo.Driver = DriversBox.SelectedItem?.ToString(); string computerList = ""; if (!RemoteSessionListBox.Items.IsEmpty) { computerList = "Remote Sessions:\n"; foreach (Computer cp in RemoteSessionListBox.Items) { computerList += $"{cp}\n"; } } string templateString = $"{Ginfo}\n" + "---------- Environment----------\n\n" + $"{Pinfo}\n{computerList}"; LogWriter.AddLogEntry(templateString); TemplatePreviewBox.Text = templateString; ClipboardService.SetText(templateString); }