Ejemplo n.º 1
0
        private static async Task PasteRandomPrettyMatrixAsync()
        {
            var w = await Helper.GetIntAsync("Width", "167", 1);

            var h = await Helper.GetIntAsync("Height", "52", 1);

            var boundary = 3;
            var batch    = 5;
            var sb       = new StringBuilder();

            GenerateHorizontalNumberLine(sb, w, boundary, batch);
            var matrix = Helper.GetRandomName(w * h);
            var reader = new StringReader(matrix);

            for (int i = 0; i < h - 2; i++)
            {
                AddBoundary(sb, i, boundary, false);
                for (int j = 0; j < w - boundary * 2; j++)
                {
                    sb.Append((j + 1) % (batch + 1) == 0 ? ' ' : (char)reader.Read());
                }
                AddBoundary(sb, i, boundary, true);
                sb.AppendLine();
            }
            GenerateHorizontalNumberLine(sb, w, boundary, batch);
            await ForegroundInteractor.PasteAsync(sb.ToString());
        }
Ejemplo n.º 2
0
        private Task SecondClipboardPasteAsync()
        {
            var text = string.Join("  ", _values);

            if (text.Length > 0)
            {
                return(ForegroundInteractor.PasteAsync(text));
            }
            return(Task.CompletedTask);
        }
Ejemplo n.º 3
0
 private Task ExportVars()
 {
     return(ForegroundInteractor.PasteAsync(Helper.JsonSerialize(_state.Dict[_currentGroup], Formatting.Indented)));
 }
Ejemplo n.º 4
0
        private Task SecondClipboardPasteReverse()
        {
            var text = string.Join("  ", _values.Reverse <string>());

            return(ForegroundInteractor.PasteAsync(text));
        }