コード例 #1
0
        internal void PresentSet()
        {
            if (string.IsNullOrEmpty(CurrentSet.setName))
            {
                Helpers.PopupMessages.ShowErrorMessage(this, "Please select a set first");
                return;
            }

            if (CurrentSet.getSongSetSize() == 0)
            {
                Helpers.PopupMessages.ShowErrorMessage(this, "Please add one or more songs to the set");
                return;
            }


            if (SetChanged && Helpers.PopupMessages.ShowConfirmationMessage(this, "Save changes to set '{0}' before presenting?", CurrentSet.setName))
            {
                saveSet();
            }
            else
            {
                revertSet();
            }
            CurrentSet.reloadSet();
            var frmPresent = new frmPresent(CurrentSet, DisplayAndPrintSettings.loadSettings(DisplayAndPrintSettingsType.DisplaySettings), lbSongs.SelectedIndex);

            saveCurrentSongInSet();
            frmPresent.Show();
        }
コード例 #2
0
        internal void PresentSong()
        {
            if (SongChanged)
            {
                updateSongObjectFromGui();
                if (Helpers.PopupMessages.ShowConfirmationMessage(this, "Save changes to song '{0}' before presenting?", CurrentSong.title))
                {
                    this.SaveSong();
                }
            }
            if (CurrentSong == null || CurrentSong.title == "")
            {
                Helpers.PopupMessages.ShowErrorMessage(this, "No song selected");
                return;
            }
            var frmPresent = new frmPresent(CurrentSong, DisplayAndPrintSettings.loadSettings(DisplayAndPrintSettingsType.DisplaySettings));

            frmPresent.Closing += FrmPresent_Closing;
            frmPresent.Show();
        }