public void SendTextTo(Destinations destination, String text = null) { var f = Utilities.CreateTemporalFileFromText(text); var res = new SendResults(1, destination); if (f != null) { var fileSet = PrimeFileSet.Create(new[] { f }, new PrimeParameters(Settings.Default)); fileSet.Destination = destination; if (destination == Destinations.Custom) { var fs = new FolderSelectDialog { Title = "Select the destination folder" }; if (!fs.ShowDialog()) { return; // Conversion was cancel } fileSet.CustomDestination = fs.FileName; } else { fileSet.CustomDestination = _emulatorFolder; } SendDataTo(fileSet); res.Add(SendResult.Success); } else { res.Add(SendResult.ErrorInvalidInput); res.ShowMsg(false, this); } }
private void FormMain_Shown(object sender, EventArgs e) { if (!Settings.Default.SkipConflictingProcessChecking) { // Check running processes if (new[] { Constants.ConnectivityKitProcessName, Constants.EmulatorProcessName }.Any(p => Process.GetProcessesByName(p).Length > 0)) { SendResults.ShowMsg("It seems you have either the Connectivity Kit or HP Virtual Prime running, this may conflict with this app to detect your physical calculator.", this); } } }
public void SendTextTo(Destinations destination, String text = null) { var f = Utilities.CreateTemporalFileFromText(text); var res = new SendResults(1, destination); if (f != null) { var fileSet = PrimeFileSet.Create(new[] {f}, new PrimeParameters(Settings.Default)); fileSet.Destination = destination; if (destination == Destinations.Custom) { var fs = new FolderSelectDialog {Title = "Select the destination folder"}; if (!fs.ShowDialog()) return; // Conversion was cancel fileSet.CustomDestination = fs.FileName; } else fileSet.CustomDestination = _emulatorFolder; SendDataTo(fileSet); res.Add(SendResult.Success); } else { res.Add(SendResult.ErrorInvalidInput); res.ShowMsg(false, this); } }