• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IActivity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



IActivity类属于命名空间,在下文中一共展示了IActivity类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: AgeResult

        public AgeResult(IActivity activity, float predAge, float currAge, TimeSpan time, double dist)
        {
            this.activity = activity;
            this.Age = predAge;
            this.EstimatedTime = TimeSpan.FromSeconds(PredictWavaTime.WavaPredict(dist, dist, time, predAge, currAge));

            this.EstimatedSpeed = dist / EstimatedTime.TotalSeconds;
        }
开发者ID:jcboliveira,项目名称:gps-running,代码行数:8,代码来源:AgeResult.cs


示例16: TimePredictionSource

 public TimePredictionSource(IActivity activity, double UsedDistance, TimeSpan UsedTime, double StartDistance, double offsetTime)
 {
     this.Activity = activity;
     //this.Distance = Distance;
     this.UsedDistance = UsedDistance;
     this.UsedTime = UsedTime;
     this.StartDistance = StartDistance;
     this.offsetTime = offsetTime;
 }
开发者ID:jcboliveira,项目名称:gps-running,代码行数:9,代码来源:TimePredictionSource.cs


示例17: ActivityDetailsControl

 public ActivityDetailsControl(IActivity activity)
 {
     InitializeComponent();
     //InitialisedActivities = new Collection<IActivity>();
     this.Activity = activity;
     fitnessDataHandler = Plugin.dataHandler;
     RefreshInfo();
     this.PanelChoiceActionBanner.Text = "User Input";
 }
开发者ID:TheProjecter,项目名称:st2funbeat,代码行数:9,代码来源:ActivityDetailsControl.cs


示例18: ASynchTask

 public ASynchTask(IActivity activity, Action<IActivity> action)
 {
     Activity = activity;
     this.action = action;
     backgroundWorker = new BackgroundWorker();
     backgroundWorker.DoWork += BackgroundWorkerDoWork;
     backgroundWorker.WorkerSupportsCancellation = true;
     backgroundWorker.RunWorkerCompleted += BackgroundWorkerRunWorkerCompleted;
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:9,代码来源:ASynchTask.cs


示例19: ActivityModel

        public ActivityModel(IActivity activity)
        {
            Properties = activity.Properties;
            Type = activity.Type.ToString();            
            Message = activity.Message;
            Id = activity.Id;

            Hint = activity.Hint.ToString();
            Source = activity.Source;
        }
开发者ID:anatolilightfoot,项目名称:Dominion,代码行数:10,代码来源:GameViewModel.cs


示例20: GetOrAddActivity

 private HashSet<IActivitySchedulingEvent<IResource>> GetOrAddActivity(IActivity activity)
 {
     HashSet<IActivitySchedulingEvent<IResource>> schedules;
     if (!_activitySchedulingEvents.TryGetValue(activity, out schedules))
     {
         schedules = new HashSet<IActivitySchedulingEvent<IResource>>();
         _activitySchedulingEvents.Add(activity, schedules);
     }
     return schedules;
 }
开发者ID:mikesurface,项目名称:SchedulingManager,代码行数:10,代码来源:ActivitySchedulingEventManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IActivityIOOperationsEndPoint类代码示例发布时间:2022-05-24
下一篇:
C# IActiveView类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap