/// <summary>
        /// Handles the Click event of the BtnAddNewSet control.
        /// </summary>
        /// <param name="sender">
        /// The source of the event.
        /// </param>
        /// <param name="e">
        /// The <see cref="System.EventArgs"/> instance containing the event data.
        /// </param>
        private void btnAddNewSet_Click(object sender, EventArgs e)
        {
            var enterAValue = new FrmEnterAValue("Enter a new set name");

            enterAValue.ShowDialog();

            if (!string.IsNullOrEmpty(enterAValue.Response))
            {
                MovieSetManager.AddNewSet(enterAValue.Response);
            }
        }
        /// <summary>
        /// Handles the Click event of the BtnAddNewSet control.
        /// </summary>
        /// <param name="sender">
        /// The source of the event.
        /// </param>
        /// <param name="e">
        /// The <see cref="System.EventArgs"/> instance containing the event data.
        /// </param>
        private void btnAddNewSet_Click(object sender, EventArgs e)
        {
            var enterAValue = new FrmEnterAValue("Enter a new set name");

            enterAValue.ShowDialog();

            if (!string.IsNullOrEmpty(enterAValue.Response))
            {
                if (!MovieSetManager.HasSetWithName(enterAValue.Response))
                {
                    MovieSetManager.AddNewSet(enterAValue.Response);
                }
                else
                {
                    var notificationPanel = new FrmShowNotification("There is already a set with this name");
                    notificationPanel.ShowDialog();
                }
            }
        }
示例#3
0
        /// <summary>
        /// Handles the Click event of the BtnAddNewSet control.
        /// </summary>
        /// <param name="sender">
        /// The source of the event.
        /// </param>
        /// <param name="e">
        /// The <see cref="System.EventArgs"/> instance containing the event data.
        /// </param>
        private void btnAddNewSet_Click(object sender, EventArgs e)
        {
            var enterAValue = new FrmEnterAValue("Enter a new set name");

            enterAValue.ShowDialog();

            if (!string.IsNullOrEmpty(enterAValue.Response))
            {
                if (!MovieSetManager.HasSetWithName(enterAValue.Response))
                {
                    MovieSetManager.AddNewSet(enterAValue.Response);
                }
                else
                {
                    XtraMessageBox.Show(
                        string.Format("There is already a set called {0}", enterAValue.Response),
                        string.Format("Set '{0}' already exists", enterAValue.Response),
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Stop);
                }
            }
        }