private void SourceGDID_TextChanged(object sender, EventArgs e) { var str = SourceGDID.Text.Trim(); if (str.IsNullOrEmpty()) { ResultGDIDs.Text = string.Empty; return; } try { ResultGDIDs.Text = AgnivoHelper.ParseGDID(str); } catch (Exception error) { ResultGDIDs.Text = error.Message; } }
private void btnBase64Json_Click(object sender, EventArgs e) { var jsonBsonText = tbBase64Json.Text; if (jsonBsonText.IsNullOrWhiteSpace()) { return; } try { var json = AgnivoHelper.Base64ToJson(jsonBsonText); var form = new DecodedBSONForm(json); form.Show(); } catch (Exception error) { MessageBox.Show(error.ToMessageWithType()); } }
private void DecodeBSONButton_Click(object sender, EventArgs e) { var bsonText = SourceBSONText.Text; if (bsonText.IsNullOrWhiteSpace()) { return; } try { var json = AgnivoHelper.Base64BSONToJSON(bsonText); var form = new DecodedBSONForm(json); form.Show(); } catch (Exception error) { MessageBox.Show(error.ToMessageWithType()); } }