Exemple #1
0
        // シーケンスファイルを指定して読み込む.
        public void SetSequence(string FileName, PlayViewer v)
        {
            seqlist    = new List <string>();
            seqcount   = 0;
            nextperiod = 0;
            viewer     = v;
            camrotate  = new Vector3(0, 0, 0);

            string line = "";

            using (StreamReader sr = new StreamReader(FileName, Encoding.GetEncoding("Shift_JIS")))
            {
                while ((line = sr.ReadLine()) != null)
                {
                    seqlist.Add(line);
                }
            }
        }
Exemple #2
0
        public TSOForm(TSOConfig tso_config, string[] args)
        {
            InitializeComponent();
            this.ClientSize = tso_config.ClientSize;

            for (int i = 0; i < keysEnabled.Length; i++)
            {
                keysEnabled[i] = true;
            }
            this.KeyDown += new KeyEventHandler(form_OnKeyDown);
            this.KeyUp   += new KeyEventHandler(form_OnKeyUp);

            this.DragDrop += new DragEventHandler(form_OnDragDrop);
            this.DragOver += new DragEventHandler(form_OnDragOver);

            this.viewer = new PlayViewer();

            if (viewer.InitializeApplication(this, true))
            {
                // シーケンスファイルか?
                if (args.Length == 2)
                {
                    if (args[0].ToLower() == "-seq")
                    {
                        seq.SetSequence(args[1], viewer);
                    }
                }
                else
                {
                    foreach (string arg in args)
                    {
                        viewer.LoadAnyFile(arg, true);
                    }
                    if (viewer.FigureList.Count == 0)
                    {
                        viewer.LoadAnyFile(Path.Combine(save_path, "system.tdcgsav.png"), true);
                    }
                    viewer.Camera.SetTranslation(0.0f, +10.0f, +44.0f);
                }

                this.timer1.Enabled = true;
            }
        }