Ejemplo n.º 1
0
 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();
     }
 }
Ejemplo n.º 2
0
 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();
     }
 }
Ejemplo n.º 3
0
 private static void SetEventPropagation()
 {
     _core.SetCursorRequest += arg => SetCursorRequest.SafeInvoke(arg);
     _core.FocusRequest     += () => FocusRequest.SafeInvoke();
     _core.CloseRequest     += () => CloseRequest.SafeInvoke();
 }