private void btnNpcDic_Click(object sender, RoutedEventArgs e) { JsonFormatWindow window = new JsonFormatWindow(); if (showJson(window, EmulatorHelper.NpcDicFileName)) { window.Show(); } }
private void btnPlaryKpi_Click(object sender, RoutedEventArgs e) { JsonFormatWindow window = new JsonFormatWindow(); if (showJson(window, EmulatorHelper.DescriptionPlayerKpi)) { window.Show(); } }
private void btnApiDebug_Click(object sender, RoutedEventArgs e) { JsonFormatWindow window = new JsonFormatWindow(); if (showJson(window, EmulatorHelper.RequestConfigDebugFileName)) { window.Show(); } }
private void btnDescriptionDic1_Click(object sender, RoutedEventArgs e) { JsonFormatWindow window = new JsonFormatWindow(); if (showJson(window, EmulatorHelper.DescriptionDicFileName1)) { window.Show(); } }
private bool showJson(JsonFormatWindow window, string fileName) { if (File.Exists(path + fileName)) { using (StreamReader reader = new StreamReader(path + fileName)) { string s = reader.ReadToEnd(); window.jsonViewer1.Json = s; return(true); } } else { MessageBox.Show("先导出"); return(false); } }