private void SendFileMenu_Click(object sender, RoutedEventArgs e) { Buddy buddy = SquiggleUtility.SelectContact(Translation.Instance.ContactSelectWindow_Heading_File, this); if (buddy != null) { StartChat(buddy, true, null); } }
private void SendMessageMenu_Click(object sender, RoutedEventArgs e) { IEnumerable <Buddy> buddies = SquiggleUtility.SelectContacts(Translation.Instance.ContactSelectWindow_Heading_InstantMessage, this); if (buddies.Any()) { Buddy buddy = buddies.First(); IChatWindow chatWindow = StartChat(buddy); chatWindow.Invite(buddies.Except(new[] { buddy })); } }
void SetupControls() { StateChanged += Window_StateChanged; chatControl.SignIn.Configure(context.PluginLoader.AuthenticationProvider); chatControl.SignIn.LoginInitiated += SignInControl_LoginInitiated; chatControl.ContactList.BroadcastChatStart += ContactList_BroadcastChatStart; chatControl.ContactList.GroupChatStart += ContactList_GroupChatStart; chatControl.ContactList.ChatStart += ContactList_StartChat; chatControl.ContactList.SignOut += ContactList_SignOut; chatControl.ContactList.OpenAbout += (sender, e) => SquiggleUtility.ShowAboutDialog(this); UpdateSortMenu(); UpdateGroupMenu(); }
void OnTransferInvite(IFileTransferHandler invitation) { Dispatcher.Invoke(() => { FlashWindow(); if (invitation == null) { chatTextBox.AddInfo(Translation.Instance.ChatWindow_FileTransferInviteNotSupported); return; } string downloadsFolder = SquiggleUtility.GetDownloadsFolderPath(); downloadsFolder = Path.Combine(downloadsFolder, PrimaryBuddy.DisplayName); chatTextBox.AddFileReceiveRequest(invitation, downloadsFolder); fileTransfers.Add(invitation); }); chatState.ChatStarted = true; }
void DoBuzzAction() { if (IsGroupChat) { if (!ignore) { AudioAlert.Instance.Play(AudioAlertType.Buzz); } } else { if (!PrimaryBuddy.IsIgnored) { AudioAlert.Instance.Play(AudioAlertType.Buzz); } } SquiggleUtility.ShakeWindow(this); }
protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { if (!forceClose && fileTransfers.Any()) { e.Cancel = !SquiggleUtility.Confirm(ConfirmationDialogType.FileTransferWindowClose, this); if (e.Cancel) { return; } } DestroySession(); var history = chatTextBox.GetHistory(); if (!(IsGroupChat || SettingsProvider.Current.Settings.ChatSettings.ClearChatOnWindowClose)) { chatHistory[PrimaryBuddy] = history; } history.RemoveAll(); base.OnClosing(e); }
private void AboutMenu_Click(object sender, RoutedEventArgs e) { SquiggleUtility.ShowAboutDialog(this); }
private void SettingsMenu_Click(object sender, RoutedEventArgs e) { SquiggleUtility.ShowSettingsDialog(this); }
private void OpenReceivedFilesMenu_Click(object sender, RoutedEventArgs e) { SquiggleUtility.OpenDownloadsFolder(); }
void DoBuzzAction() { AudioAlert.Instance.Play(AudioAlertType.Buzz); SquiggleUtility.ShakeWindow(this); }
private void ChangeFont_Click(object sender, RoutedEventArgs e) { SquiggleUtility.ShowFontDialog(); txtMessageEditBox.GetFocus(); }
private void InviteContactMenu_Click(object sender, RoutedEventArgs e) { IEnumerable <Buddy> buddies = SquiggleUtility.SelectContacts(Translation.Instance.ChatWindow_InviteContact, this, b => Buddies.Contains(b)); Invite(buddies); }