コード例 #1
0
        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();
            }
        }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
ファイル: VisualEditor.cs プロジェクト: KellyeAnnora/GGJ2020
        void NodeCopy(object param)
        {
            Clipboard.Clear();
            var layouts = (List <NodeLayout>)param;

            foreach (var l in layouts)
            {
                var copy = l.Node.Copy();
                Clipboard.Add(copy);
            }
        }
コード例 #4
0
        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());
        }
コード例 #5
0
 public void CopyDisplaySet()
 {
     try
     {
         BlockingOperation.Run(
             delegate
         {
             Clipboard.Add(this.Context.Viewer.SelectedPresentationImage.ParentDisplaySet);
         });
     }
     catch (Exception e)
     {
         ExceptionHandler.Report(e, SR.MessageClipboardCopyFailed, Context.DesktopWindow);
     }
 }
コード例 #6
0
ファイル: EditorRulesetKeys.cs プロジェクト: staravia/Quaver
        /// <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);
        }