示例#1
0
        // *******************************************************
        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);
        }
示例#2
0
        // *****************************************************************************************
        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();
        }
示例#3
0
文件: Form1.cs 项目: bryful/ffmpeg_ui
        //-------------------------------------------------------------
        /// <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();
        }
示例#4
0
        //-------------------------------------------------------------
        /// <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();
        }
示例#5
0
        //********************************************************************
        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();
        }
示例#6
0
        //--------------------------------------------------------------------------------------
        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();
        }
示例#7
0
        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();
            }
        }