本文整理汇总了C#中Dynamo.Models.DynamoModel.TrackAnalytics方法的典型用法代码示例。如果您正苦于以下问题:C# DynamoModel.TrackAnalytics方法的具体用法?C# DynamoModel.TrackAnalytics怎么用?C# DynamoModel.TrackAnalytics使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dynamo.Models.DynamoModel
的用法示例。
在下文中一共展示了DynamoModel.TrackAnalytics方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnModelCommandCompleted
void OnModelCommandCompleted(DynamoModel.RecordableCommand command)
{
var name = command.GetType().Name;
switch (name)
{
case "OpenFileCommand":
this.AddToRecentFiles((command as DynamoModel.OpenFileCommand).XmlFilePath);
break;
case "MutateTestCommand":
var mutatorDriver = new Dynamo.TestInfrastructure.MutatorDriver(this);
mutatorDriver.RunMutationTests();
break;
case "SelectInRegionCommand":
var selectC = command as DynamoModel.SelectInRegionCommand;
CurrentSpaceViewModel.SelectInRegion(selectC.Region, selectC.IsCrossSelection);
break;
case "DragSelectionCommand":
var dragC = command as DynamoModel.DragSelectionCommand;
if (DynamoModel.DragSelectionCommand.Operation.BeginDrag == dragC.DragOperation)
CurrentSpaceViewModel.BeginDragSelection(dragC.MouseCursor);
else
CurrentSpaceViewModel.EndDragSelection(dragC.MouseCursor);
break;
case "DeleteModelCommand":
CurrentSpaceViewModel.CancelActiveState();
RaiseCanExecuteUndoRedo();
break;
case "CreateNodeCommand":
case "CreateProxyNodeCommand":
case "CreateNoteCommand":
case "CreateAnnotationCommand":
case "UndoRedoCommand":
case "ModelEventCommand":
case "UpdateModelValueCommand":
case "ConvertNodesToCodeCommand":
case "UngroupModelCommand":
case "AddModelToGroupCommand":
case "CreateAndConnectNodeCommand":
RaiseCanExecuteUndoRedo();
break;
case "SwitchTabCommand":
if (command.IsInPlaybackMode)
RaisePropertyChanged("CurrentWorkspaceIndex");
break;
case "RunCancelCommand":
case "ForceRunCancelCommand":
case "SelectModelCommand":
case "MakeConnectionCommand":
case "CreateCustomNodeCommand":
case "AddPresetCommand":
case "ApplyPresetCommand":
// for this commands there is no need
// to do anything after execution
break;
default:
throw new InvalidOperationException("Unhandled command name");
}
if (Dynamo.Logging.Analytics.ReportingAnalytics && !command.IsInPlaybackMode)
{
command.TrackAnalytics();
}
}