当前位置: 首页>>代码示例>>C#>>正文


C# IActivity类代码示例

本文整理汇总了C#中IActivity的典型用法代码示例。如果您正苦于以下问题:C# IActivity类的具体用法?C# IActivity怎么用?C# IActivity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IActivity类属于命名空间,在下文中一共展示了IActivity类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

 public void SetUp()
 {
     main = new MainBase();
     activity = NewMock<IActivity>();
     Stub.On(activity).GetProperty("Start").Will(Return.Value(DateTime.Parse("7:00:00")));
     Stub.On(activity).GetProperty("Duration").Will(Return.Value(TimeSpan.Parse("0:30:00")));
 }
开发者ID:gayancc,项目名称:lazycure-code,代码行数:7,代码来源:MainBaseTests.cs

示例2: OnBeforeInsertStep1

        public static void OnBeforeInsertStep1( IActivity activity,  ISession session)
        {
            //System.Diagnostics.EventLog appLog = new System.Diagnostics.EventLog() ;
            //appLog.Source = "SalesLogix Web Client";
            //appLog.WriteEntry("Current ActivityId: " + activity.ActivityId);

            //Update the activity id's
            if(String.IsNullOrEmpty(activity.ActivityId) == false) {
                //update the activityid for each activityAttendee record
                foreach(IActivityAttendee aa in activity.ActivityAttendees) {
                    if(String.IsNullOrEmpty(aa.ActivityId) == true || aa.ActivityId.ToString().Trim() == ""
                        || aa.ActivityId == "0") {
                        aa.ActivityId = activity.ActivityId;
                    }
                }

                //update the activityid for each expense record
                foreach(IActivityExpense ae in activity.ActivityExpenses) {
                    if(String.IsNullOrEmpty(ae.ActivityId) == true || ae.ActivityId.ToString().Trim() == ""
                        ||ae.ActivityId == "0") {
                        ae.ActivityId = activity.ActivityId;
                    }
                }
            }
        }
开发者ID:ssommerfeldt,项目名称:TAC_AH,代码行数:25,代码来源:.a96ee906-949f-4e4c-8489-43a992bbf3f6.codesnippet.cs

示例3: Insert

 public void Insert(IActivity activity)
 {
     if (activity == null)
         return;
     activity.Queue(NextActivity);
     NextActivity = activity;
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例4: SwitchActivities

 public void SwitchActivities(IActivity newActivity)
 {
     currentActivity.Unload();
     currentActivity = newActivity;
     currentActivity.Initalize();
     currentActivity.LoadContent();
 }
开发者ID:rocketeer13,项目名称:KinderKinect,代码行数:7,代码来源:ActivityManager.cs

示例5: GetTrailsResultsForActivity

        public static Dictionary<string, List<ITrailResult>> GetTrailsResultsForActivity(IActivity activity)
        {
            object[] parameters = new object[1];
            parameters[0] = activity;

            Dictionary<string, List<ITrailResult>> list = null;

            try
            {
                Version version;
                Type type = GetType("TrailsPlugin.Export.Integration", "TrailsPlugin", out version);
                if ((type != null)) //&& (version.CompareTo(this.minVersion) >= 0))
                {
                    list = (Dictionary<string, List<ITrailResult>>)type.GetMethod("GetTrailsResultsForActivity").Invoke(null, parameters);
                    //throw new Exception(list.Count.ToString() + "fero");
                }
            }
            catch (Exception e)
            {
                string error = e.Message;
                if (e.InnerException != null)
                {
                    error += "\n\n" + e.InnerException.Message;
                }
                throw new Exception(error);
            }

            return list;
        }
开发者ID:gerhardol,项目名称:calculatedfields,代码行数:29,代码来源:Trails.cs

示例6: Queue

 public void Queue( IActivity activity )
 {
     if( NextActivity != null )
         NextActivity.Queue( activity );
     else
         NextActivity = activity;
 }
开发者ID:patthoyts,项目名称:OpenRA,代码行数:7,代码来源:Sell.cs

示例7: GetUniqueRoutesForActivity

        public static IList<IActivity> GetUniqueRoutesForActivity(IActivity activity, System.Windows.Forms.ProgressBar progressBar)
        {
            IList<IActivity> results = null;

            try
            {
                if (progressBar == null)
                    progressBar = new System.Windows.Forms.ProgressBar();

                if (GetUniqueRoutes != null)
                {
                    MethodInfo methodInfo = GetUniqueRoutes.GetMethod(findSimilarRoutes);
                    object resultFromURPlugIn = methodInfo.Invoke(activity, new object[] { activity, progressBar });
                    results = (IList<IActivity>)resultFromURPlugIn;
                }
            }
            catch (Exception e)
            {
                // Log error?
                throw new Exception(string.Format(IntegrationUtility.OtherPluginExceptionText,
            UniquePlugin + ".dll", UniqueRoutesPluginName) + Environment.NewLine, e);
            }

            if (GetUniqueRoutes == null)
            {
                throw new Exception(string.Format(IntegrationUtility.OtherPluginExceptionText,
        UniquePlugin + ".dll", UniqueRoutesPluginName) + Environment.NewLine);
            }

            return results;
        }
开发者ID:jcboliveira,项目名称:gps-running,代码行数:31,代码来源:UniqueRoutes.cs

示例8: IntervalResult

 public IntervalResult(IActivity activity, IntervalResultCache resultCache, double distance)
 {
     this.activity = activity;
     this.resultCache = resultCache;
     this.Distance = distance;
     this.factor = 1000.0 / distance;
 }
开发者ID:jcboliveira,项目名称:gps-running,代码行数:7,代码来源:IntervalResult.cs

示例9: findSimilarRoutes

 public static IList<IActivity> findSimilarRoutes(IActivity refActivity, IList<IActivity> activities, bool activityCompare, bool catCheck, System.Windows.Forms.ProgressBar progressBar)
 {
     if (refActivity == null ||
         refActivity.GPSRoute == null ||
         activityCompare && (false/*catCheck && !isAllowedActivity(refActivity)*/))
         return new List<IActivity>();
     return findSimilarRoutes(refActivity.GPSRoute, refActivity.ReferenceId, activities, activityCompare, progressBar);
 }
开发者ID:jcboliveira,项目名称:gps-running,代码行数:8,代码来源:UniqueRoutes.cs

示例10: TemperatureResult

 public TemperatureResult(IActivity activity, float temperature, float actual, TimeSpan time, double dist)
 {
     this.activity = activity;
     double f = getTemperatureFactor(temperature) / getTemperatureFactor(actual);
     this.EstimatedTime = Predict.scaleTime(time, f);
     this.Distance = dist;
     this.Temperature = temperature;
 }
开发者ID:jcboliveira,项目名称:gps-running,代码行数:8,代码来源:TemperatureResult.cs

示例11: Insert

		/// <summary>
		/// Inserts an element into the ActivityCollection at the specified index
		/// </summary>
		/// <param name="index">
		/// The index at which the IActivity is to be inserted.
		/// </param>
		/// <param name="value">
		/// The IActivity to insert.
		/// </param>
		public virtual void Insert(int index, IActivity value)
		{
			CheckParent();

			mList.Insert(index, value);

			value.Parent = mParentActivity;
		}
开发者ID:wsrf2009,项目名称:KnxUiEditor,代码行数:17,代码来源:ActivityCollection.cs

示例12: ActivityModel

 public ActivityModel(IActivity activity)
 {
     Properties = activity.Properties;
     Type = activity.Type.ToString();            
     Message = activity.Message;
     Id = activity.Id;
     
 }
开发者ID:trentkerin,项目名称:Dominion,代码行数:8,代码来源:GameViewModel.cs

示例13: Calculate

 public static void Calculate(IActivity activity, double vdot, TimeSpan time, double distance, double maxHr)
 {
     Predict.SetAgeSexFromActivity(activity);
     m_zones = getZones();
     m_percentages = getPercentages(vdot);
     m_hrs = getHeartRates(maxHr, m_percentages);
     m_paces = getSpeeds(vdot, time, distance, m_percentages);
 }
开发者ID:jcboliveira,项目名称:gps-running,代码行数:8,代码来源:TrainingResult.cs

示例14: TrainingResult

 public TrainingResult(IActivity activity, string ZoneDistance, double PercentOfMax, double TrainRaceHR, double Speed)
 {
     this.activity = activity;
     this.ZoneDistance = ZoneDistance;
     this.PercentOfMax = PercentOfMax;
     this.TrainRaceHR = TrainRaceHR;
     this.Speed = Speed;
 }
开发者ID:jcboliveira,项目名称:gps-running,代码行数:8,代码来源:TrainingResult.cs

示例15: Cancel

        public void Cancel( Actor self )
        {
            var unit = self.traits.Get<Unit>();

            desiredFacing = unit.Facing;
            NextActivity = null;
        }
开发者ID:comradpara,项目名称:OpenRA,代码行数:7,代码来源:Turn.cs


注:本文中的IActivity类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。