Пример #1
0
        //-------------------------------------------------------------
        private bool ImportExp(string s)
        {
            bool     ret  = false;
            JsonPref pref = new JsonPref();

            if (pref.Load(s) == false)
            {
                return(ret);
            }
            bool ok = false;

            string[] sa = pref.GetStringArray("expStr", out ok);
            if (ok)
            {
                expStr = sa.ToList <string>();
            }
            string[] sb = pref.GetStringArray("expCap", out ok);
            if (ok)
            {
                expCap = sb.ToList <string>();
                listBox1.Items.Clear();
                listBox1.Items.AddRange(sb);
            }
            return(ret);
        }
Пример #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 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);
        }
Пример #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[] sa = pref.GetStringArray("Undo", out ok);
                if (ok)
                {
                    UndoList = sa.ToList <string>();
                }
            }
            this.Text        = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
            m_navBar.Caption = this.Text;
        }