Ejemplo n.º 1
0
        /// <summary>
        /// Fires the <see cref="ProjectChanged" /> event. This occurs <b>after</b> the events <see cref="ProjectOpened" />,
        /// <see cref="ProjectClosed" />, <see cref="ProjectRenamed" />, and <see cref="ProjectDirtyChanged" /> event. Usefull if
        /// you not want to subscribe to the above mentioned single events.
        /// </summary>
        protected virtual void OnProjectChanged(ProjectEventArgs e)
        {
            switch (e.ProjectEventKind)
            {
            case ProjectEventKind.ProjectOpening:
                break;

            case ProjectEventKind.ProjectOpened:
                ProjectOpened?.Invoke(this, e);
                break;

            case ProjectEventKind.ProjectClosing:
                break;

            case ProjectEventKind.ProjectClosed:
                ProjectClosed?.Invoke(this, e);
                break;

            case ProjectEventKind.ProjectRenamed:
                ProjectRenamed?.Invoke(this, (ProjectRenamedEventArgs)e);
                break;

            case ProjectEventKind.ProjectDirtyChanged:
                ProjectDirtyChanged?.Invoke(this, e);
                break;

            default:
                break;
            }

            ProjectChanged?.Invoke(this, e);
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public void CloseProject()
        {
            if (Project != null)
            {
                ProjectClosing?.Invoke(this, new EventArgs());

                Project = null;

                ProjectClosed?.Invoke(this, new EventArgs());
            }
        }
Ejemplo n.º 3
0
        public void CloseProject()
        {
            Project = null;
            CloseToolStripMenuItem.Enabled = false;
            SaveToolStripMenuItem.Enabled  = false;
            BackBtn.Enabled = false;
            FwdBtn.Enabled  = false;
            Code.Project    = null;
            UpdateTitleBar();
            LabelsBox.Items.Clear();

            ProjectClosed?.Invoke(this, null);
        }
Ejemplo n.º 4
0
        public void Close()
        {
            if (!ProjectLoaded)
            {
                return;
            }

            Rooms.Clear();
            DoorSets.Clear();
            Doors.Clear();
            ScrollSets.Clear();
            PlmSets.Clear();
            ScrollPlmDatas.Clear();
            Backgrounds.Clear();
            Fxs.Clear();
            SaveStations.Clear();
            LevelDatas.Clear();
            EnemySets.Clear();
            EnemyGfxs.Clear();
            ScrollAsms.Clear();
            DoorAsms.Clear();
            SetupAsms.Clear();
            MainAsms.Clear();
            TileSets.Clear();
            TileTables.Clear();
            TileSheets.Clear();
            Palettes.Clear();
            AreaMaps.Clear();
            PlmTypes.Clear();
            EnemyTypes.Clear();

            CurrentRom      = null;
            ProjectPath     = String.Empty;
            RomFileName     = String.Empty;
            ProjectFileName = String.Empty;

            RoomTiles.Clear();
            MapTiles.Clear();
            BackgroundImage = null;

            ChangesMade   = false;
            ProjectLoaded = false;
            ProjectClosed?.Invoke(this, null);
        }
Ejemplo n.º 5
0
 protected virtual void OnProjectClosed()
 {
     ProjectClosed?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 6
0
 protected virtual void OnProjectClosed(ProjectClosedEventArgs e)
 {
     ProjectClosed?.Invoke(this, e);
 }