private void SetText(IEnumerable <TwitterAccount> infos, string body, TwitterStatus inReplyTo, CursorPosition cursor, bool focusToInputArea) { CurrentInputData = new InputData(body) { Accounts = infos, InReplyTo = inReplyTo, }; SetCursorRequest.SafeInvoke(cursor ?? CursorPosition.End); if (focusToInputArea) { FocusRequest.SafeInvoke(); } }
private void SetDirectMessage(IEnumerable <TwitterAccount> infos, [NotNull] TwitterUser recipient, bool focusToInputArea) { if (recipient == null) { throw new ArgumentNullException("recipient"); } CurrentInputData = new InputData(String.Empty) { Accounts = infos, MessageRecipient = recipient }; // because text is always empty, setting cursor position can be skipped. if (focusToInputArea) { FocusRequest.SafeInvoke(); } }
private static void SetEventPropagation() { _core.SetCursorRequest += arg => SetCursorRequest.SafeInvoke(arg); _core.FocusRequest += () => FocusRequest.SafeInvoke(); _core.CloseRequest += () => CloseRequest.SafeInvoke(); }