private void CopyToClipboardInternal() { if (this.HasValidationErrors) { base.ShowValidation(true); } else { IImageSelectionStrategy strategy; if (CopyRange) { int interval = 1; if (CopyRangeAtInterval) { interval = CopyRangeInterval; } strategy = new RangeImageSelectionStrategy(CopyRangeStart, CopyRangeEnd, interval, UseInstanceNumber); } else { strategy = new CustomImageSelectionStrategy(CustomRange, RangeMinimum, RangeMaximum, UseInstanceNumber); } Clipboard.Add(CurrentDisplaySet, strategy); this.Host.Exit(); } }
/// <summary> /// Copies the selected hitobjects to the clipboard /// </summary> public void CopySelectedHitObjects() { var cp = Wobble.Platform.Clipboard.NativeClipboard; // If no objects are selected, just select the time in the track instead if (SelectedHitObjects.Count == 0) { cp.SetText(((int)AudioEngine.Track.Time).ToString()); return; } var copyString = ""; Clipboard.Clear(); foreach (var h in SelectedHitObjects.OrderBy(x => x.Info.StartTime)) { copyString += $"{h.Info.StartTime}|{h.Info.Lane},"; Clipboard.Add(h.Info); } copyString = copyString.TrimEnd(','); cp.SetText(copyString); }
void NodeCopy(object param) { Clipboard.Clear(); var layouts = (List <NodeLayout>)param; foreach (var l in layouts) { var copy = l.Node.Copy(); Clipboard.Add(copy); } }
public ActionResult Index() { Clipboard clipboard = new Clipboard(Server.MapPath("~/App_Data/clipboard.txt")); if (Request.HttpMethod.Equals("POST") && !Request.Form["text"].Equals("")) { clipboard.Add(Request.Form["text"]); } ViewBag.clipboard = clipboard.ClipData; return(View()); }
public void CopyDisplaySet() { try { BlockingOperation.Run( delegate { Clipboard.Add(this.Context.Viewer.SelectedPresentationImage.ParentDisplaySet); }); } catch (Exception e) { ExceptionHandler.Report(e, SR.MessageClipboardCopyFailed, Context.DesktopWindow); } }
/// <summary> /// Copies the selected hitobjects to the clipboard /// </summary> public void CopySelectedHitObjects() { if (SelectedHitObjects.Count == 0) { return; } var copyString = ""; Clipboard.Clear(); foreach (var h in SelectedHitObjects.OrderBy(x => x.Info.StartTime)) { copyString += $"{h.Info.StartTime}|{h.Info.Lane},"; Clipboard.Add(h.Info); } copyString = copyString.TrimEnd(','); var clipboard = new WindowsClipboard(); clipboard.SetText(copyString); }