示例#1
0
        void CloseOpenedProject(bool save)
        {
            if (OpenedProject == null)
            {
                return;
            }

            Log.Debug("Closing project " + OpenedProject.ID);
            if (Capturer != null)
            {
                Capturer.Close();
            }
            if (Player != null)
            {
                Player.Dispose();
            }

            if (save)
            {
                SaveProject(OpenedProject, OpenedProjectType);
            }

            if (OpenedProject != null)
            {
                OpenedProject.Clear();
            }
            OpenedProject     = null;
            OpenedProjectType = ProjectType.None;
            guiToolkit.CloseProject();
            EmitProjectChanged();
        }
示例#2
0
        private void CloseOpenedProject(bool save)
        {
            if (save)
            {
                SaveProject(OpenedProject, OpenedProjectType);
            }

            if (OpenedProjectType != ProjectType.FileProject)
            {
                Capturer.Close();
            }
            else
            {
                Player.Close();
            }

            if (OpenedProject != null)
            {
                OpenedProject.Clear();
            }
            OpenedProject     = null;
            OpenedProjectType = ProjectType.None;
            EmitProjectChanged();
        }