private void GetPinsFromClipboard() { var clipboard = Clipboard.GetText(); var pins = Chime.GetPinsFromText(clipboard); if (pins.Count > 0) { txtPin.Text = pins[0]; } }
private void btnJoin_Click(object sender, RoutedEventArgs e) { var pins = Chime.GetPinsFromText(txtPin.Text); // unlikely to be multiple pins, just take the first one if (pins.Count > 0) { Chime.Join(pins[0]); } else if (!string.IsNullOrEmpty(txtPin.Text)) { // if there are no extracted pins, but there is text then just use that text Chime.Join(txtPin.Text); } Close(); }
private static HashSet <string> GetPins(AppointmentItem appointment) { var rv = new List <string>(); rv.AddRange(Chime.GetPinsFromAttendees(appointment.OptionalAttendees)); rv.AddRange(Chime.GetPinsFromAttendees(appointment.RequiredAttendees)); rv.AddRange(Chime.GetPinsFromText(appointment.Location)); rv.AddRange(Chime.GetPinsFromText(appointment.Body)); /* * Debug.WriteLine(appointment.Start + " -> " + appointment.End + ": " + appointment.Subject + "\n\tLocation: " + appointment.Location + * "\n\tRequired Attendees: " + appointment.RequiredAttendees + "\n\tOptional Attendees: " + appointment.OptionalAttendees); * Debug.WriteLine("\tPins: " + string.Join("\n\t", rv)); */ return(new HashSet <string>(rv)); }