Example #1
0
        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;
            }
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }