private static void checkAndMakeProfileDir() { string pdir = ProjectSetting.GetAppProfileDir(); if (!Directory.Exists(pdir)) { Directory.CreateDirectory(pdir); } }
/// <summary> /// 簡易Java出力ボタンのクリックイベント /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ButtonOutputJavaClick(object sender, EventArgs e) { try { Encoding utf8Enc = Encoding.GetEncoding("utf-8"); StreamWriter writer = new StreamWriter(ProjectSetting.GetAppProfileDir() + "\\Test.java", true, utf8Enc); writer.WriteLine(myElement.toDescriptorString()); writer.Close(); MessageBox.Show("Javaソースをファイル出力しました"); } catch (Exception ex) { Console.WriteLine(ex.Message); } }