Exemplo n.º 1
0
        public override void Run(Progress progress)
        {
            int mod = 0;

            if (myTNG.Modified)
            {
                ++mod;
            }

            bool lev =
                Settings.GetBool("Settings", "SaveLEV", false) &&
                myLEV.Modified;

            if (lev)
            {
                ++mod;
            }

            progress.Begin(mod);

            if (myTNG.Modified)
            {
                progress.Info =
                    "Saving " + GetName(myTNG.FileName) + "...";
                myTNG.Save(myTNG.FileName);
                progress.Update();
            }

            if (lev)
            {
                progress.Info =
                    "Saving " + GetName(myLEV.FileName) + "...";
                myLEV.Save(myLEV.FileName, progress);
            }

            progress.End();

            base.Run(progress);
        }