//------------------------------------------------------------- private bool ExportExp(string s) { bool ret = false; JsonPref pref = new JsonPref(); pref.SetStringArray("expStr", expStr.ToArray()); pref.SetStringArray("expCap", expCap.ToArray()); ret = pref.Save(s); return(ret); }
//------------------------------------------------------------- /// <summary> /// フォームが閉じられた時 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_FormClosed(object sender, FormClosedEventArgs e) { //設定ファイルの保存 JsonPref pref = new JsonPref(); pref.SetSize("Size", this.Size); pref.SetPoint("Point", this.Location); pref.SetStringArray("Undo", UndoList.ToArray()); pref.Save(); }
//------------------------------------------------------------- /// <summary> /// フォームが閉じられた時 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_FormClosed(object sender, FormClosedEventArgs e) { //設定ファイルの保存 JsonPref pref = new JsonPref(); pref.SetSize("Size", this.Size); pref.SetPoint("Point", this.Location); pref.SetString("Path", m_path); pref.SetStringArray("Ext", m_TargetExt.Exts); pref.Save(); }
private void button1_Click(object sender, EventArgs e) { JsonPref j = new JsonPref(); int[] aaa = new int[] { 78, 9, 12 }; double[] bbb = new double[] { 0.7, 0.01, 0.12 }; string[] ccc = new string[] { "eee", "sfskjbF", "13" }; j.SetIntArray("aa", aaa); j.SetDoubleArray("bb", bbb); j.SetStringArray("cc", ccc); MessageBox.Show(j.ToJson()); }