private void OnReedSolomonNoised(object sender, RSEventArgs e) => this.RunOnUIThread(() => { noisedBytes = e.Result.ToArray(); if (e.Code == RSCode.Success) { viewState = ViewState.Noise; noisedBytes = e.Result.ToArray(); noisedText = GetStringFromBytes(noisedBytes); resultTextBox.Text = GetResultTextBoxText(viewState); if (decodedBytes != null) { MessageBox.Show(this, GetStringResource("noise_postponed_message"), GetStringResource("attantion")); } } else { OnReedSolomonError(e.Code); } });
private void OnReedSolomonEncoded(object sender, RSEventArgs e) => this.RunOnUIThread(() => { if (e.Code == RSCode.Success) { viewState = ViewState.Encode; encodedBytes = e.Result.ToArray(); encodedText = GetStringFromBytes(encodedBytes); resultTextBox.Text = GetResultTextBoxText(viewState); serialiseButton.IsEnabled = resetButton.IsEnabled = true; inputTextBox.IsReadOnly = false; #if NOISE_DECODE_ENABLE noiseButton.IsEnabled = decodeButton.IsEnabled = true; #endif } else { OnReedSolomonError(e.Code); } });