/// <summary> /// Creates new <c>CommandUI</c> for use during an editing update. This doesn't refer to /// the UpdateUI itself, it refers to a command that is the subject of the update. /// </summary> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command (not null) that is controlling this command.</param> protected CommandUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) { if (updcmd == null) { throw new ArgumentNullException(); } m_Container = cc; m_EditId = editId; m_UpdCmd = updcmd; m_Draw = updcmd.ActiveDisplay; //m_Update = updcmd.SelectedObject; m_Recall = null; /* * this.Update = update; * * if (update==null) * { * m_Draw = EditingController.Current.ActiveDisplay; * m_Recall = null; * } */ Debug.Assert(m_Draw != null); }
/// <summary> /// Constructor for doing an update. /// </summary> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command.</param> internal LineSubdivisionUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) : base(cc, editId, updcmd) { // The dialog will be created by Run() m_Dialog = null; m_UpDial = null; // The line being subdivided is known via the update. m_Parent = null; }
/// <summary> /// Constructor for doing an update. /// </summary> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command.</param> internal LineExtensionUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) : base(cc, editId, updcmd) { // The dialog will be created by Run(). m_Dialog = null; // The line we extended is known via the update. m_ExtendLine = null; // And initialize the parameters for the operation's Execute() call. m_Length = null; m_IsExtendFromEnd = true; m_LineType = null; }
/// <summary> /// Creates new <c>CommandUI</c> that isn't an update. /// </summary> /// <param name="cc">The container that may be used to display any sort of /// user dialog (null if no dialog is involved)</param> /// <param name="cmdId">The item used to invoke the command.</param> /// <param name="update">The object (if any) that was selected for update</param> /// <param name="recall">An operation that is being recalled (null if this is an update).</param> protected CommandUI(IControlContainer cc, IUserAction cmdId, ISpatialObject update, Operation recall) { m_Container = cc; m_Draw = EditingController.Current.ActiveDisplay; //m_Update = update; m_UpdCmd = null; m_Recall = recall; if (cmdId is EditingAction) { m_EditId = (cmdId as EditingAction).EditId; } else { m_EditId = EditingActionId.Null; } if (cmdId is RecalledEditingAction) { m_Recall = (cmdId as RecalledEditingAction).RecalledEdit; } Debug.Assert(m_Draw != null); }
/// <summary> /// Constructor for doing an update. /// </summary> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command.</param> internal RadialUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) : base(cc, editId, updcmd) { m_Dialog = null; m_From = null; }
/// <summary> /// Constructor for doing an update. /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command.</param> internal SimpleLineSubdivisionUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) : base(cc, editId, updcmd) { SetInitialValues(); }
/// <summary> /// Constructor for doing an update. /// </summary> /// <param name="cc">The container for any dialog controls</param> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command.</param> internal PathUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) : base(cc, editId, updcmd) { Zero(); }
/// <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("IntersectUI.Run - Command is already running."); } // Are we doing an update? UpdateUI pup = this.Update; // Create the appropriate sort of dialog. EditingActionId edid = this.EditId; if (edid == EditingActionId.DirIntersect) { if (pup == null) { m_Dialog = new IntersectTwoDirectionsForm(this, "Intersect two directions"); } else { m_Dialog = new IntersectTwoDirectionsForm(pup, "Update (intersect two directions)"); } } else if (edid == EditingActionId.DirDistIntersect) { if (pup == null) { m_Dialog = new IntersectDirectionAndDistanceForm(this, "Intersect direction and distance"); } else { m_Dialog = new IntersectDirectionAndDistanceForm(pup, "Update (intersect direction and distance)"); } } else if (edid == EditingActionId.LineIntersect) { if (pup == null) { m_Dialog = new IntersectTwoLinesForm(this, "Intersect two lines"); } else { m_Dialog = new IntersectTwoLinesForm(pup, "Update (intersect two lines)"); } } else if (edid == EditingActionId.DistIntersect) { if (pup == null) { m_Dialog = new IntersectTwoDistancesForm(this, "Intersect two distances"); } else { m_Dialog = new IntersectTwoDistancesForm(pup, "Update (intersect two distances)"); } } else if (edid == EditingActionId.DirLineIntersect) { if (pup == null) { m_Dialog = new IntersectDirectionAndLineForm(this, "Intersect direction and line"); } else { m_Dialog = new IntersectDirectionAndLineForm(pup, "Update (intersect direction and line)"); } } else { throw new Exception("IntersectUI.Run - Unexpected command id."); } m_Dialog.Show(); return(true); }
/// <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; }
void AddEdit( EditingActionId id , ToolStripItem[] items , UserAction.IsActionEnabled isActionEnabled , UserAction.DoAction doAction) { m_Actions.Add(new EditingAction(id, items, isActionEnabled, doAction)); }
/// <summary> /// Constructor for doing an update. /// </summary> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command.</param> internal NewPointUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) : base(cc, editId, updcmd) { m_Dialog = null; }
/// <summary> /// Creates new <c>CommandUI</c> for use during an editing update. This doesn't refer to /// the UpdateUI itself, it refers to a command that is the subject of the update. /// </summary> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command (not null) that is controlling this command.</param> protected CommandUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) { if (updcmd==null) throw new ArgumentNullException(); m_Container = cc; m_EditId = editId; m_UpdCmd = updcmd; m_Draw = updcmd.ActiveDisplay; //m_Update = updcmd.SelectedObject; m_Recall = null; /* this.Update = update; if (update==null) { m_Draw = EditingController.Current.ActiveDisplay; m_Recall = null; } */ Debug.Assert(m_Draw!=null); }
/// <summary> /// Constructor for doing an update. /// </summary> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command.</param> internal IntersectUI(EditingActionId editId, UpdateUI updcmd) : base(null, editId, updcmd) { Initialize(); }
/// <summary> /// Constructor for doing an update. /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command.</param> internal ParallelLineUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) : base(cc, editId, updcmd) { // Just set zero values for everything (we'll pick up stuff in Run). SetZeroValues(); }
/// <summary> /// Copy constructor /// </summary> /// <param name="action">The action to copy</param> protected EditingAction(EditingAction action) : base(action) { m_Id = action.m_Id; }
public EditingAction(EditingActionId id, ToolStripItem[] items, IsActionEnabled isActionEnabled, DoAction doAction) : base(items, isActionEnabled, doAction) { m_Id = id; }
/// <summary> /// Creates new <c>SimpleCommandUI</c> for use during an editing update. This doesn't refer to /// the UpdateUI itself, it refers to a command that is the subject of the update. /// </summary> /// <param name="editId">The ID of the edit this command deals with.</param> /// <param name="updcmd">The update command (not null) that is controlling this command.</param> protected SimpleCommandUI(IControlContainer cc, EditingActionId editId, UpdateUI updcmd) : base(cc, editId, updcmd) { }
/// <summary> /// Creates new <c>CommandUI</c> that isn't an update. /// </summary> /// <param name="cc">The container that may be used to display any sort of /// user dialog (null if no dialog is involved)</param> /// <param name="cmdId">The item used to invoke the command.</param> /// <param name="update">The object (if any) that was selected for update</param> /// <param name="recall">An operation that is being recalled (null if this is an update).</param> protected CommandUI(IControlContainer cc, IUserAction cmdId, ISpatialObject update, Operation recall) { m_Container = cc; m_Draw = EditingController.Current.ActiveDisplay; //m_Update = update; m_UpdCmd = null; m_Recall = recall; if (cmdId is EditingAction) m_EditId = (cmdId as EditingAction).EditId; else m_EditId = EditingActionId.Null; if (cmdId is RecalledEditingAction) m_Recall = (cmdId as RecalledEditingAction).RecalledEdit; Debug.Assert(m_Draw!=null); }