Ejemplo n.º 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;
                Point p  = pref.GetPoint("Point", out ok);
                if (ok)
                {
                    this.Location = p;
                }
                bool[] wl = pref.GetBoolArray("WizLimit", out ok);
                if (ok)
                {
                    this.LimitValues = wl;
                }
                string s = pref.GetString("PictureFolder", out ok);
                if (ok)
                {
                    if (System.IO.Directory.Exists(s) == true)
                    {
                        wizPictureBox1.PicureFolderPath = s;
                    }
                }
            }
            // this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
                }
            }
            int w = this.ClientSize.Width - printInfoPanel1.Left * 2;

            if (printInfoPanel1.Width != w)
            {
                printInfoPanel1.Width = w;
            }
            this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);

            printInfoPanel1.LoadHis();
        }
Ejemplo n.º 4
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;
                }
            }
        }
Ejemplo n.º 5
0
        //-------------------------------------------------------------
        /// <summary>
        /// フォーム作成時に呼ばれる
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            //設定ファイルの読み込み
            JsonPref pref = new JsonPref();
            string   afx  = "";

            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;
                }
                afx = pref.GetString("Afx", out ok);
                if (ok == false)
                {
                    afx = "";
                }
            }
            this.Text    = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
            m_ae.ListBox = edAfx;
            if (afx != "")
            {
                m_ae.AfxPath = afx;
            }
            GetCommand(System.Environment.GetCommandLineArgs());
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
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("WatchFolder", out ok);
                if (ok)
                {
                    WatchFolder = s;
                }
                bool iss = pref.GetBool("IsStartup", out ok);
                if (ok)
                {
                    CbIsStartup.Checked = iss;
                    IsStartup           = iss;
                }
            }
            this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
        }
Ejemplo n.º 8
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("OutputPath", out ok);
                if (ok)
                {
                    ffmpeg_ctrl1.OutputPath = s;
                }
                bool b = pref.GetBool("IsSameDir", out ok);
                if (ok)
                {
                    ffmpeg_ctrl1.IsSameDir = b;
                }
                int v = pref.GetInt("CRF", out ok);
                if (ok)
                {
                    ffmpeg_ctrl1.CRF = v;
                }
                v = pref.GetInt("JobCount", out ok);
                if (ok)
                {
                    ffmpeg_ctrl1.JobCount = v;
                }
                b = pref.GetBool("IsDNxHD", out ok);
                if (ok)
                {
                    ffmpeg_ctrl1.IsDNxHD = b;
                }
                v = pref.GetInt("DNxHD_STYLE", out ok);
                if (ok)
                {
                    if (v < 0)
                    {
                        v = 0;
                    }
                    else if (v > 1)
                    {
                        v = 1;
                    }
                    ffmpeg_ctrl1.DNxHD_STYLE = (DNxHD_STYLE)v;
                }
            }
            this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
        }
Ejemplo n.º 9
0
        // *****************************************************************************************

        private void Form1_Load(object sender, EventArgs e)
        {
            string filePath = Path.Combine(Application.UserAppDataPath, "AE_Effect.json");

            if (File.Exists(filePath))
            {
                aE_Effect1.Import(filePath);
            }
            else
            {
                string pp = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "AE_Effect.json");
                if (File.Exists(pp))
                {
                    aE_Effect1.Import(pp);
                }
                else
                {
                    MessageBox.Show("Please import AE_Effect.h");
                }
            }

            JsonPref pref = new JsonPref();

            if (pref.Load())
            {
                bool ok;
                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 sd = pref.GetInt("SplitDistance1", out ok);
                if (ok)
                {
                    splitContainer1.SplitterDistance = sd;
                }
                sd = pref.GetInt("SplitDistance2", out ok);
                if (ok)
                {
                    splitContainer2.SplitterDistance = sd;
                }
                sd = pref.GetInt("SplitDistance3", out ok);
                if (ok)
                {
                    splitContainer3.SplitterDistance = sd;
                }
            }
        }
Ejemplo n.º 10
0
        //-------------------------------------------------------------
        /// <summary>
        /// フォーム作成時に呼ばれる
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            //設定ファイルの読み込み
            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 exp = pref.GetString("ExportFile", out ok);
                if (ok)
                {
                    ExportFile = exp;
                }
                if (File.Exists(ExportFile) == false)
                {
                    string dd = System.Environment.GetFolderPath(Environment.SpecialFolder.Personal);
                    ExportFile = Path.Combine(dd, "expression.json");
                }
            }
            this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);

            string appName   = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
            string _filePath = Path.Combine(Application.UserAppDataPath, appName + "_exp.json");
            string _exp      = ExportFile;

            ImportExp(_filePath);
            _exp = ExportFile;

            if (listBox1.Items.Count <= 0)
            {
                AddExp("effect(\"open\")(1)");
                AddExp("p = effect(\"open\")/100; \r\n if (p<0) {p=0;} else if (p>1){p=1;}\r\n");
                AddExp("value * effect(\"open\") / 100");
                AddExp("if (effect(\"open\")(1) <0){\r\n0;\r\n}else{\r\nvalue;\r\n}\r\n");
                AddExp("v = value;\r\nv[0] *= p;\r\nv;\r\n");
                AddExp("* Math.PI/180");
                AddExp("Math.sin(r * Math.PI/180)");
                AddExp("Math.cos(r * Math.PI/180)");
                AddExp("Math.tan(r * Math.PI/180)");
            }
        }
Ejemplo n.º 11
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;
                Point p  = pref.GetPoint("Point", out ok);
                if (ok)
                {
                    this.Location = p;
                }
            }
            this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
        }
Ejemplo n.º 12
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);
        }
Ejemplo n.º 13
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;
                }
            }
        }
Ejemplo n.º 14
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;
                }
            }
            this.Text    = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
            cppl.TextBox = edProgress;
            cppl.Form    = this;
        }
Ejemplo n.º 15
0
        //********************************************************************
        public void LoadPref()
        {
            JsonPref pref = new JsonPref("pf");

            bool  ok = false;
            Point p  = pref.GetPoint("Point", out ok);

            if (ok)
            {
                this.Location = p;
            }
            Size sz = pref.GetSize("Size", out ok);

            if (ok)
            {
                this.Size = sz;
            }
            int pn = pref.GetInt("pv_now", out ok);

            if (ok)
            {
                pv_now = (pv_Mode)pn;
            }
        }
Ejemplo n.º 16
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //設定ファイルの読み込み
            JsonPref pref = new JsonPref();

            if (pref.Load())
            {
                bool  ok = false;
                Point p  = pref.GetPoint("Point", out ok);
                if (ok)
                {
                    if (p.X < 0)
                    {
                        p.X = 0;
                    }
                    if (p.Y < 0)
                    {
                        p.Y = 0;
                    }

                    this.Location = p;
                }
            }
        }
Ejemplo n.º 17
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("ffmpeg", out ok);
                if (ok)
                {
                    sequenceFileTo1.ffmpegPath = s;
                }
                s = pref.GetString("FrameRate", out ok);
                if (ok)
                {
                    sequenceFileTo1.FRAME_RATE_STR = s;
                }
                s = pref.GetString("Codec", out ok);
                if (ok)
                {
                    sequenceFileTo1.MOVIE_CODEC_STR = s;
                }
                s = pref.GetString("SequenceFile", out ok);
                if (ok)
                {
                    AddInputFile(s);
                }
                s = pref.GetString("ExportDir", out ok);
                if (ok)
                {
                    sequenceFileTo1.ExportDir = s;
                    tbExportDir.Text          = sequenceFileTo1.ExportDir;
                }
                s = pref.GetString("SoundFile", out ok);
                if (ok)
                {
                    sequenceFileTo1.SoundFile = s;
                    tbSound.Text = sequenceFileTo1.SoundFile;
                }
                bool b = pref.GetBool("IsSound", out ok);
                if (ok)
                {
                    sequenceFileTo1.IsSound = b;
                    cbIsSound.Checked       = sequenceFileTo1.IsSound;
                }
            }
            this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
            if (sequenceFileTo1.ffmpegPath == "")
            {
                OpenFFmpeg();
            }
        }
Ejemplo n.º 18
0
        //-------------------------------------------------------------
        /// <summary>
        /// フォーム作成時に呼ばれる
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Form1_Load(object sender, EventArgs e)
        {
            string pp = "";

            //設定ファイルの読み込み
            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;
                }

                Size sz = pref.GetSize("ButtonSize", out ok);
                if (ok)
                {
                    iconButtonList1.ButtonSize = sz;
                }

                int[] cols = pref.GetIntArray("Color", out ok);
                if (ok)
                {
                    if (cols.Length >= 2)
                    {
                        iconButtonList1.ForeColor = Color.FromArgb(cols[0]);
                        iconButtonList1.BackColor = Color.FromArgb(cols[1]);
                    }
                }
                bool b = pref.GetBool("RelativePath", out ok);
                if (ok)
                {
                    iconButtonList1.RelativePath = b;
                }


                string ss = pref.GetString("TargetDir", out ok);
                if (ok)
                {
                    if (Directory.Exists(ss) == true)
                    {
                        pp = ss;
                    }
                }
                Font      f   = iconButtonList1.Font;
                string    fn  = f.Name;
                float     fsz = f.Size;
                FontStyle sty = f.Style;


                ss = pref.GetString("Font", out ok);
                if (ok)
                {
                    fn = ss;
                }
                double dd = pref.GetDouble("FontSize", out ok);
                if (ok)
                {
                    fsz = (float)dd;
                }
                int vv = pref.GetInt("FontStyle", out ok);
                if (ok)
                {
                    sty = (FontStyle)vv;
                }

                iconButtonList1.Font = new Font(fn, fsz, sty);
            }
            iconButtonList1.ChkJsxTemplate();


            string[] cmds = System.Environment.GetCommandLineArgs();
            if (cmds.Length > 1)
            {
                AnalysisCommand(cmds);
                pp = "";
            }

            if (pp != "")
            {
                iconButtonList1.TargetDir = pp;
                this.Text = iconButtonList1.MenuName;
            }
            else
            {
                this.Text = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
            }
        }
Ejemplo n.º 19
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)
                {
                    Screen s = Screen.FromControl(this);
                    int    h = s.Bounds.Height;
                    int    w = s.Bounds.Width;
                    if (p.X < 0)
                    {
                        p.X = 0;
                    }
                    if (p.Y < 0)
                    {
                        p.Y = 0;
                    }
                    if (p.X > w - this.Width)
                    {
                        p.X = w - this.Width;
                    }
                    if (p.Y > h - this.Height)
                    {
                        p.Y = h - this.Height;
                    }
                    this.Location = p;
                }

                bool b = pref.GetBool("IsFront", out ok);
                if (ok)
                {
                    m_navBar.IsFront = b;
                }
                b = pref.GetBool("IsLocked", out ok);
                if (ok)
                {
                    m_ColorBoxs.IsLocked          = b;
                    lockToolStripMenuItem.Checked = b;
                }
                b = pref.GetBool("IsLocked2", out ok);
                if (ok)
                {
                    if (b == true)
                    {
                        m_ColorBoxs.IsLocked          = true;
                        lockToolStripMenuItem.Checked = true;
                    }
                    lock2ToolStripMenuItem.Checked = b;
                }

                string path = pref.GetString("PalettePath", out ok);
                if (ok)
                {
                    PalettePath = path;
                }
            }
            m_ColorBoxs.Load();
            //this.Text = m_ColorBoxs.path;

            this.Text        = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
            m_navBar.Caption = this.Text;
        }