// ******************************************************* public bool Save(string p = "") { bool ret = false; JsonPref pref = new JsonPref(); try { pref.SetInt("Rows", m_Rows); pref.SetInt("Cols", m_Cols); var colors = new object[Count]; for (int i = 0; i < Count; i++) { colors[i] = Items[i].AE_Color.ToJson(); } pref.SetObject("Colors", colors); if (p == "") { p = Path.GetFileNameWithoutExtension(Application.ExecutablePath); p = Path.Combine(Application.UserAppDataPath, p + "_color.json"); } ret = pref.Save(p); path = p; } catch { ret = false; } return(ret); }
// ***************************************************************************************** private void Form1_FormClosed(object sender, FormClosedEventArgs e) { string filePath = Path.Combine(Application.UserAppDataPath, "AE_Effect.json"); aE_Effect1.Export(filePath); //設定ファイルの保存 JsonPref pref = new JsonPref(); pref.SetSize("Size", this.Size); pref.SetPoint("Point", this.Location); pref.SetInt("SplitDistance1", splitContainer1.SplitterDistance); pref.SetInt("SplitDistance2", splitContainer2.SplitterDistance); pref.SetInt("SplitDistance3", splitContainer3.SplitterDistance); 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("OutputPath", ffmpeg_ctrl1.OutputPath); pref.SetBool("IsSameDir", ffmpeg_ctrl1.IsSameDir); pref.SetInt("CRF", ffmpeg_ctrl1.CRF); pref.SetInt("JobCount", ffmpeg_ctrl1.JobCount); pref.SetBool("IsDNxHD", ffmpeg_ctrl1.IsDNxHD); pref.SetInt("DNxHD_STYLE", (int)ffmpeg_ctrl1.DNxHD_STYLE); 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.SetPoint("Point", this.Location); pref.SetString("TargetDir", iconButtonList1.TargetDir); pref.SetSize("ButtonSize", iconButtonList1.ButtonSize); int[] cols = new int[3]; cols[0] = iconButtonList1.ForeColor.ToArgb(); cols[1] = iconButtonList1.BackColor.ToArgb(); pref.SetIntArray("Color", cols); pref.SetString("Font", iconButtonList1.Font.Name); pref.SetDouble("FontSize", (double)iconButtonList1.Font.Size); pref.SetInt("FontStyle", (int)iconButtonList1.Font.Style); pref.SetBool("RelativePath", iconButtonList1.RelativePath); pref.Save(); iconButtonList1.BackupStore(); }
//******************************************************************** public void SavePref() { JsonPref pref = new JsonPref("pf"); pref.SetSize("Size", this.Size); pref.SetPoint("Point", this.Location); pref.SetInt("pv_now", (int)pv_now); pref.Save(); }
//-------------------------------------------------------------------------------------- public void PrefSave() { //設定ファイルの保存 JsonPref pref = new JsonPref(); pref.SetPoint("Point", this.Location); pref.SetInt("Height", this.Height); pref.SetIntArray("ParamsInt", tsGrid1.tsd.ParamsInt); pref.SetBoolArray("ParamsBool", tsGrid1.tsd.ParamsBool); pref.SetIntArray("Colors", tsGrid1.cols.ColorInt); pref.SetIntArray("Keys", tsGrid1.funcs.FuncTableAll); pref.Save(); }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { //設定ファイルの保存 JsonPref pref = new JsonPref(); pref.SetSize("Size", this.Size); pref.SetPoint("Point", this.Location); pref.SetInt("opt", (int)ctsScomp1.Option); pref.SetString("exe", ctsScomp1.CTSSPath); pref.SetString("pdb", ctsScomp1.PdbPath); pref.SetString("optFile", ctsScomp1.OptionFilePath); pref.Save(); if (rform != null) { rform.Close(); } }