protected override void OnClose(swPropertyManagerPageCloseReasons_e reason) { if (reason == swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay) { MacroFeature.Commit(); } else if (reason == swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Cancel) { MacroFeature.Cancel(); } }
private void OnCylPageClosed(swPropertyManagerPageCloseReasons_e reason) { if (reason == swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay) { try { ModelDocx.CreateCylinder(mCylinderData.Reference, App.IActiveDoc2, 10, 10); } catch (Exception e) { App.SendMsgToUser2(e.Message, (int)swMessageBoxIcon_e.swMbStop, (int)swMessageBoxBtn_e.swMbOk); } } }
private void OnClosed(swPropertyManagerPageCloseReasons_e reason) { m_OffsetBuilder.HidePreview(); if (reason == swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay) { var offsetBody = m_OffsetBuilder.CreateOffset(m_Data.Segments, m_Data.Offset, m_Data.InnerTipsRadius, m_Data.OuterTipsRadius, m_Data.Reverse); m_OffsetBuilder.ConvertToSketchSegments(m_App.IActiveDoc2, offsetBody); } m_OffsetBuilder.Dispose(); }
private PageCloseReasons_e ConvertReason(swPropertyManagerPageCloseReasons_e reason) { switch (reason) { case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay: return(PageCloseReasons_e.Okay); case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Cancel: return(PageCloseReasons_e.Cancel); case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Apply: return(PageCloseReasons_e.Apply); default: return(PageCloseReasons_e.Unknown); } }
protected override void OnClose(swPropertyManagerPageCloseReasons_e reason) { switch (reason) { case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Cancel: case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_UnknownReason: case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_UserEscape: OnCancel(); break; case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay: case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Apply: case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Closed: // renders as green tick, so I guess it means "save" case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_ParentClosed: // don't know what this is, maybe it applies to `swPropertyManagerPageOptions_e .swPropertyManagerOptions_MultiplePages` default: OnCommit(); break; } }
protected virtual void OnClose(swPropertyManagerPageCloseReasons_e reason) { _Disposable.Dispose(); switch (reason) { case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Cancel: case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_UnknownReason: case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_UserEscape: OnCancel(); _CloseTaskSource.SetResult(false); break; case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay: case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Apply: case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Closed: // renders as green tick, so I guess it means "save" case swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_ParentClosed: // don't know what this is, maybe it applies to `swPropertyManagerPageOptions_e .swPropertyManagerOptions_MultiplePages` default: OnCommit(); _CloseTaskSource.SetResult(true); break; } _Deselect.Dispose(); }
public void OnClose(int Reason) { m_CloseReason = (swPropertyManagerPageCloseReasons_e)Reason; var arg = new ClosingArg(); Closing?.Invoke(m_CloseReason, arg); if (arg.Cancel) { if (!string.IsNullOrEmpty(arg.ErrorTitle) || !string.IsNullOrEmpty(arg.ErrorMessage)) { var title = !string.IsNullOrEmpty(arg.ErrorTitle) ? arg.ErrorTitle : "Error"; m_App.ShowBubbleTooltipAt2(0, 0, (int)swArrowPosition.swArrowLeftTop, title, arg.ErrorMessage, (int)swBitMaps.swBitMapTreeError, "", "", 0, (int)swLinkString.swLinkStringNone, "", ""); } const int S_FALSE = 1; throw new COMException(arg.ErrorMessage, S_FALSE); } }
private void OnClosing(swPropertyManagerPageCloseReasons_e reason, ClosingArg arg) { if (reason == swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay) { try { m_OffsetBuilder.CreateOffset(m_Data.Segments, m_Data.Offset, m_Data.InnerTipsRadius, m_Data.OuterTipsRadius, m_Data.Reverse); } catch (UserException ex) { arg.Cancel = true; arg.ErrorMessage = ex.Message; arg.ErrorTitle = "Offset Failed"; } catch (Exception ex) { arg.Cancel = true; arg.ErrorMessage = "Failed to generate the offset"; arg.ErrorTitle = "Offset Failed"; } } }
private void OnClosed(swPropertyManagerPageCloseReasons_e reason) { }
private void OnClosing(swPropertyManagerPageCloseReasons_e reason, PageClosingArg arg) { Closing?.Invoke(ConvertReason(reason), arg); }
private void OnClosed(swPropertyManagerPageCloseReasons_e reason) { Closed?.Invoke(ConvertReason(reason)); }
protected abstract void OnClose(swPropertyManagerPageCloseReasons_e reason);
protected override void OnClose(swPropertyManagerPageCloseReasons_e reason) { }
private void OnPageClosed(swPropertyManagerPageCloseReasons_e reason) { PageClosed?.Invoke(m_Model, m_Feat, m_FeatData, m_Data, reason == swPropertyManagerPageCloseReasons_e.swPropertyManagerPageClose_Okay); }
private void OnCylPageClosing(swPropertyManagerPageCloseReasons_e reason, SwEx.PMPage.Base.ClosingArg arg) { ValidateReference(m_CurCylData.Reference, reason, arg); }