Пример #1
0
        //-------------------------------------------------------------
        /// <summary>
        /// フォーム作成時に呼ばれる
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            //設定ファイルの読み込み
            JsonPref pref = new JsonPref();

            if (pref.Load())
            {
                bool ok = false;
                Size sz = pref.GetSize("Size", out ok);
                if (ok)
                {
                    this.Size = sz;
                }
                Point p = pref.GetPoint("Point", out ok);
                if (ok)
                {
                    this.Location = p;
                }
                string fp = pref.GetString("FilePath", out ok);
                if (ok)
                {
                    refrainSaveFile1.FilePath = fp;
                    this.Text = refrainSaveFile1.FilePath;
                }
            }
        }
Пример #2
0
        //-------------------------------------------------------------
        /// <summary>
        /// フォーム作成時に呼ばれる
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            //設定ファイルの読み込み
            JsonPref pref = new JsonPref();

            if (pref.Load())
            {
                bool ok = false;
                Size sz = pref.GetSize("Size", out ok);
                if (ok)
                {
                    this.Size = sz;
                }
                Point p = pref.GetPoint("Point", out ok);
                if (ok)
                {
                    this.Location = p;
                }
                string[] sa = pref.GetStringArray("Undo", out ok);
                if (ok)
                {
                    UndoList = sa.ToList <string>();
                }
            }
            this.Text        = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
            m_navBar.Caption = this.Text;
        }
Пример #3
0
        //-------------------------------------------------------------
        /// <summary>
        /// フォーム作成時に呼ばれる
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            //設定ファイルの読み込み
            JsonPref pref = new JsonPref();

            if (pref.Load())
            {
                bool ok = false;
                Size sz = pref.GetSize("Size", out ok);
                if (ok)
                {
                    this.Size = sz;
                }
                Point p = pref.GetPoint("Point", out ok);
                if (ok)
                {
                    this.Location = p;
                }
                string s = pref.GetString("Path", out ok);
                if (ok)
                {
                    m_path = s;
                }
                string[] sa = pref.GetStringArray("Ext", out ok);
                if (ok)
                {
                    m_TargetExt.Exts = sa;
                }
            }
            this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
        }
Пример #4
0
        //--------------------------------------------------------------------------------------
        public bool PrefLoad()
        {
            bool ret = false;
            //設定ファイルの保存
            JsonPref pref = new JsonPref();

            if (pref.Load() == true)
            {
                bool  ok = false;
                Point p  = pref.GetPoint("Point", out ok);
                if (ok)
                {
                    this.Location = p;
                }
                int h = pref.GetInt("Height", out ok);
                if (ok)
                {
                    this.Height = h;
                }
                int[] a = pref.GetIntArray("ParamsInt", out ok);
                if (ok)
                {
                    tsGrid1.tsd.ParamsInt = a;
                }
                bool[] b = pref.GetBoolArray("ParamsBool", out ok);
                if (ok)
                {
                    tsGrid1.tsd.ParamsBool = b;
                }
                int[] c = pref.GetIntArray("Colors", out ok);
                if (ok)
                {
                    tsGrid1.cols.ColorInt = c;
                }
                int[] d = pref.GetIntArray("Keys", out ok);
                if (ok)
                {
                    tsGrid1.funcs.FuncTableAll = d;
                }
                ret = true;
            }
            return(ret);
        }
Пример #5
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //設定ファイルの読み込み
            JsonPref pref = new JsonPref();

            if (pref.Load())
            {
                bool ok = false;
                Size sz = pref.GetSize("Size", out ok);
                if (ok)
                {
                    this.Size = sz;
                }
                Point p = pref.GetPoint("Point", out ok);
                if (ok)
                {
                    this.Location = p;
                }
                int v = pref.GetInt("opt", out ok);
                if (ok)
                {
                    ctsScomp1.Option = (OPT)v;
                    rbs[v].Checked   = true;
                }
                string s = pref.GetString("exe", out ok);
                if (ok)
                {
                    tbExe.Text = s;
                }
                s = pref.GetString("pdb", out ok);
                if (ok)
                {
                    tbPdb.Text = s;
                }
                s = pref.GetString("optFile", out ok);
                if (ok)
                {
                    tbAna.Text = s;
                }
            }
        }