Ejemplo n.º 1
0
 /// <summary>
 /// Constructor for doing an update.
 /// </summary>
 /// <param name="cc">Object for holding any displayed dialogs</param>
 /// <param name="editId">The ID of the edit this command deals with.</param>
 /// <param name="updcmd">The update command.</param>
 internal NewCircleUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd)
     : base(cc, editId, updcmd)
 {
     m_Dialog = null;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Destroys any dialogs that are currently displayed.
 /// </summary>
 void KillDialogs()
 {
     if (m_Dialog!=null)
     {
         m_Dialog.Dispose();
         m_Dialog = null;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new <c>NewCircleUI</c>
 /// </summary>
 /// <param name="cc">Object for holding any displayed dialogs</param>
 /// <param name="action">The action that initiated this command</param>
 internal NewCircleUI(IControlContainer cc, IUserAction action)
     : base(cc, action)
 {
     m_Dialog = null;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Starts the user interface (if any) for this command.
        /// </summary>
        /// <returns>True if command started ok.</returns>
        internal override bool Run()
        {
            // Don't run more than once.
            if (m_Dialog!=null)
                throw new InvalidOperationException("NewCircleUI.Run - Command is already running.");

            // Are we doing an update?
            UpdateUI pup = this.Update;

            if (pup!=null)
                m_Dialog = new NewCircleForm(pup);
            else
                m_Dialog = new NewCircleForm(this, this.Recall);

            m_Dialog.Show();
            return true;
        }