コード例 #1
0
ファイル: FormMain.cs プロジェクト: DHunte/chocolate-box
        private void loadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string fablePath = Settings.FableDirectory;

            openFileDialog.InitialDirectory = fablePath;

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                List <Processor> processors = new List <Processor>();

                for (int i = 0; i < openFileDialog.FileNames.Length; ++i)
                {
                    FileController c =
                        myFileDB.Get(openFileDialog.FileNames[i]);

                    if (c == null)
                    {
                        ErrorMessage("Unknown file format");
                        return;
                    }

                    c.LoadProcess(processors);
                }

                FormProcess form = new FormProcess(processors);

                form.ShowDialog();

                form.Dispose();

                form = null;
            }
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: DHunte/chocolate-box
        private FileController LoadFile(string fileName)
        {
            List <Processor> processors = new List <Processor>();

            FileController c = myFileDB.Get(fileName);

            c.LoadProcess(processors, true);

            FormProcess form = new FormProcess(processors);

            form.ShowDialog();

            form.Dispose();

            return(c);
        }
コード例 #3
0
ファイル: FileDatabase.cs プロジェクト: DHunte/chocolate-box
        public FileController AutoLoad(string fileName)
        {
            FileController c = Get(fileName);

            if (c != null && !c.FileLoaded)
            {
                List <Processor> processors = new List <Processor>();

                c.LoadProcess(processors);

                FormProcess form = new FormProcess(processors);

                form.ShowDialog();

                form.Dispose();
            }

            return(c);
        }