Amoeba.Windows.MulticastMessageEditWindow._okButton_Click C# (CSharp) Method

_okButton_Click() private method

private _okButton_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void
        private void _okButton_Click(object sender, RoutedEventArgs e)
        {
            var digitalSignature = _signatureComboBox.SelectedItem as DigitalSignature;

            int limit = 0;
            if (!Inspect.ContainTrustSignature(digitalSignature.ToString())) limit = -1;

            var comment = _commentTextBox.Text.Substring(0, Math.Min(_commentTextBox.Text.Length, Message.MaxCommentLength));
            var message = new Message(comment);

            _amoebaManager.MulticastUpload(_tag, message, limit, Settings.Instance.Global_MiningTime, digitalSignature);

            this.Close();
        }