コード例 #1
0
ファイル: ObservableViewModel.cs プロジェクト: Hengle/xenko
        internal void EndCombinedAction(string displayName, string observableNodePath, object value)
        {
            var actions = ActionStack.GetCurrentTransactions();

            if (actions.Count == 0)
            {
                ActionStack.DiscardTransaction();
            }
            else
            {
                ActionStack.EndTransaction(displayName, x => new CombinedValueChangedActionItem(displayName, observableViewModelService, observableNodePath, Identifier, x));
            }
        }
コード例 #2
0
        internal void EndCombinedAction(string displayName, string observableNodePath, object value)
        {
            bool shouldDiscard = true;

            foreach (var singleNode in dirtiableViewModels.Keys)
            {
                if (singleNode.Owner.singleNodeActionRegistered)
                {
                    shouldDiscard = false;
                }

                singleNode.Owner.singleNodeActionRegistered = false;
            }

            if (shouldDiscard)
            {
                ActionStack.DiscardTransaction();
            }
            else
            {
                ActionStack.EndTransaction(displayName, x => new CombinedValueChangedActionItem(displayName, observableViewModelService, observableNodePath, Identifier, x));
            }
        }