private void ShowJsonForm()
        {
            var json = GetHierarcyJson(Formatting.Indented);

            using (var jsonFormViewer = new JsonViewerForm(json))
            {
                jsonFormViewer.ShowDialog(this);
            }
        }
示例#2
0
        private void btn_OpenJson_Click(object sender, EventArgs e)
        {
            MachineProfile current = MachineProfile.GetByName(cb_Profile.SelectedItem.ToString());

            ofd_OpenJson.InitialDirectory = current.ProfileRoot;
            if (ofd_OpenJson.ShowDialog() == DialogResult.OK)
            {
                JsonViewerForm.CreateFromFile(ofd_OpenJson.FileName).ShowDialog();
            }
        }