本文整理匯總了C#中Server.Multis.DesignState.FreezeFixtures方法的典型用法代碼示例。如果您正苦於以下問題:C# DesignState.FreezeFixtures方法的具體用法?C# DesignState.FreezeFixtures怎麽用?C# DesignState.FreezeFixtures使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Multis.DesignState
的用法示例。
在下文中一共展示了DesignState.FreezeFixtures方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Designer_Revert
public static void Designer_Revert( NetState state, IEntity e, EncodedReader pvSrc )
{
Mobile from = state.Mobile;
DesignContext context = DesignContext.Find( from );
if ( context != null )
{
/* Client chose to revert design state to currently visible state
* - Revert design state
* - Construct a copy of the current visible state
* - Freeze fixtures in constructed state
* - Assign constructed state to foundation
* - If a signpost is needed, add it
* - Update revision
* - Update client with new state
*/
// Revert design state : Construct a copy of the current visible state
DesignState copyState = new DesignState( context.Foundation.CurrentState );
// Revert design state : Freeze fixtures in constructed state
copyState.FreezeFixtures();
// Revert design state : Assign constructed state to foundation
context.Foundation.DesignState = copyState;
// Revert design state : If a signpost is needed, add it
context.Foundation.CheckSignpost();
// Update revision
copyState.OnRevised();
// Update client with new state
context.Foundation.SendInfoTo( state );
copyState.SendDetailedInfoTo( state );
}
}