Ejemplo n.º 1
0
        private void initModifySaveControl(string TABdirectory, string savesDirectory)
        {
            //statusWriter( "They Are Billions directory:\t" + TABdirectory );

            ReflectorManager reflectorManager = null;
            ModifyManager    modifyManager    = null;

            try
            {
                reflectorManager = new ReflectorManager(TABdirectory);
                modifyManager    = new ModifyManager(TABdirectory, reflectorManager, ModifyManager.DEFAULT_EDITS_DIRECTORY);
                modifySaveC      = new ModifyManagerControls(modifyManager, statusWriter, savesDirectory);
            }
            catch (Exception e)
            {
                statusWriter("Unable to initialise Save Modification control.");
                statusWriter(e.Message);

                modifySaveC = null;
                return;
            }

            modifySaveC.Dock = DockStyle.Fill;
            modifySaveC.Name = "modifySaveC";
            saveEditorTabPage.Controls.Add(modifySaveC);

            reflectorManager.setOutputHandler(modifySaveC.reflectorOutputHandler);
        }
Ejemplo n.º 2
0
        public ModifyManagerControls(ModifyManager m, StatusWriterDelegate sW, string savesDirectory)
        {
            InitializeComponent();

            modifyManager               = m;
            statusWriter                = sW;
            modifySaveControls          = new ModifySaveControls(statusWriter);
            modifySaveControls.Location = new System.Drawing.Point(3, 0);
            modifySaveControls.Anchor   = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
            modifySaveControls.Name     = "modifySaveControls";
            optionsSplitContainer.Panel1.Controls.Add(modifySaveControls);

            saveOpenFileDialog.Filter           = "TAB Save Files|" + TAB.SAVES_FILTER;// + "|Data files|*.dat";
            saveOpenFileDialog.InitialDirectory = savesDirectory;
        }