Inheritance: System.Windows.Forms.Form
Esempio n. 1
0
        private bool openFile()
        {
            if (!UtilsGui.askToSave(ref dirty, saveToFile, returnCbLevelIndex))
            {
                updateSaveVisibility();
                return(false);
            }
            updateSaveVisibility();
            var f = new OpenFile();

            if (f.ShowDialog() == DialogResult.OK)
            {
                Globals.loadData(OpenFile.FileName, OpenFile.DumpName, OpenFile.ConfigName);
                curScale   = ConfigScript.isBuildScreenFromSmallBlocks() ? 1 : 2;
                fileLoaded = true;
                resetControls();
                setWindowText();
            }
            if (!fileLoaded)
            {
                return(false);
            }
            return(true);
        }
Esempio n. 2
0
 private bool openFile()
 {
     if (!Utils.askToSave(ref dirty, saveToFile, returnCbLevelIndex))
     {
         updateSaveVisibility();
         return false;
     }
     updateSaveVisibility();
     var f = new OpenFile();
     if (f.ShowDialog() == DialogResult.OK)
     {
         Globals.loadData(OpenFile.FileName, OpenFile.DumpName, OpenFile.ConfigName);
         fileLoaded = true;
         resetControls();
     }
     if (!fileLoaded)
         return false;
     return true;
     
 }