private void LogButton_Click(object?sender, EventArgs e) { using var form = new LogMessageForm(); if (ShowDialogForm(form) == DialogResult.OK) { byte[] data = Encoding.UTF8.GetBytes(form.Message); sessionManager.Value.LogData(data); } }
private void LogButton_Click([CanBeNull] object sender, [NotNull] EventArgs e) { using (var form = new LogMessageForm()) { if (form.ShowDialog() == DialogResult.OK) { byte[] data = Encoding.UTF8.GetBytes(form.Message); sessionManager.Value.LogData(data); } } }