Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        /// <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);
        }