예제 #1
0
        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());
            }
        }
예제 #2
0
        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());
            }
        }