private async Task SecondClipboardCopyAsync() { var text = await ForegroundInteractor.GetSelectedTextAsync(); _values.Add(text); Env.Notifier.Info($"'{Helper.Truncate(text, 20)}' copied"); }
private async Task SetVarFormattedAsync(string name, [AllowSpaces] string format, string value = null) { if (value == null) { value = await ForegroundInteractor.GetSelectedTextAsync(); } _state.Dict[_currentGroup][name] = string.Format(format, value); Env.Notifier.Info($"{name}: {_state.Dict[_currentGroup][name]} [{_currentGroup}]"); }
private async Task ImportVarsAsync(string text = null) { text = text ?? await ForegroundInteractor.GetSelectedTextAsync(); var dict = JsonConvert.DeserializeObject <Dictionary <string, string> >(text); foreach (var pair in dict) { await SetVarAsync(pair.Key, pair.Value); } }