Exemple #1
0
        private async void sendMessageButton_Click(object sender, EventArgs e)
        {
            if (serverAnnouncementCheckBox.Checked)
            {
                if (!string.IsNullOrEmpty(communicationsTextBox.Text))
                {
                    AddMessage(String.Format("Server Announcement: {0}", communicationsTextBox.Text + Environment.NewLine), Color.DodgerBlue);
                }

                await TCAction.AnnounceToServer(communicationsTextBox.Text);
            }
            else if (serverNotificationCheckBox.Checked)
            {
                if (!string.IsNullOrEmpty(communicationsTextBox.Text))
                {
                    AddMessage(String.Format("Notification: {0}", communicationsTextBox.Text + Environment.NewLine), Color.DodgerBlue);
                }

                await TCAction.NotifiyServer(communicationsTextBox.Text);
            }
            else if (gmAnnouncementCheckBox.Checked)
            {
                if (!string.IsNullOrEmpty(communicationsTextBox.Text))
                {
                    AddMessage(String.Format("GM Notification: {0}", communicationsTextBox.Text + Environment.NewLine), Color.DodgerBlue);
                }

                await TCAction.NotifyGMs(communicationsTextBox.Text);
            }

            communicationsTextBox.Text = String.Empty;
        }
Exemple #2
0
        private async void SendMessage()
        {
            if (!string.IsNullOrEmpty(MessageText))
            {
                if (TCManager.Instance.Online)
                {
                    if (AnnouncementSelected)
                    {
                        await TCAction.AnnounceToServer(MessageText);
                    }
                    else if (ServerNotificationSelected)
                    {
                        await TCAction.NotifiyServer(MessageText);
                    }
                    else if (GMAnnouncementSelected)
                    {
                        await TCAction.NotifyGMs(MessageText);
                    }
                }

                MessageText = String.Empty;
            }
        }