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

C# ICalendar类代码示例

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

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



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

示例1: CronCalendar

 /// <summary>
 /// Create a <see cref="CronCalendar" /> with the given cron expression and 
 /// <see cref="BaseCalendar" />. 
 /// </summary>
 /// <param name="baseCalendar">
 /// the base calendar for this calendar instance 
 /// see BaseCalendar for more information on base
 /// calendar functionality
 /// </param>
 /// <param name="expression">a String representation of the desired cron expression</param>
 /// <param name="timeZone"></param>
 public CronCalendar(ICalendar baseCalendar,
                     string expression,
                     TimeZone timeZone)
     : base(baseCalendar, timeZone)
 {
     cronExpression = new CronExpression(expression);
 }
开发者ID:djvit-iteelabs,项目名称:Infosystem.Scraper,代码行数:18,代码来源:CronCalendar.cs


示例2: Create

        public static TriggerDetailDto Create(ITrigger trigger, ICalendar calendar)
        {
            var simpleTrigger = trigger as ISimpleTrigger;
            if (simpleTrigger != null)
            {
                return new SimpleTriggerDetailDto(simpleTrigger, calendar);
            }
            var cronTrigger = trigger as ICronTrigger;
            if (cronTrigger != null)
            {
                return new CronTriggerDetailDto(cronTrigger, calendar);
            }
            var calendarIntervalTrigger = trigger as ICalendarIntervalTrigger;
            if (calendarIntervalTrigger != null)
            {
                return new CalendarIntervalTriggerDetailDto(calendarIntervalTrigger, calendar);
            }
            var dailyTimeIntervalTrigger = trigger as IDailyTimeIntervalTrigger;
            if (dailyTimeIntervalTrigger != null)
            {
                return new DailyTimeIntervalTriggerDetailDto(dailyTimeIntervalTrigger, calendar);
            }

            return new TriggerDetailDto(trigger, calendar);
        }
开发者ID:quartznet,项目名称:quartznet,代码行数:25,代码来源:TriggerDetailDto.cs


示例3: Start

		/// <summary>
		/// Start this instance.
		/// <para xml:lang="es">
		/// Inicia la instancia del objeto Calendar.
		/// </para>
		/// </summary>
		public override void Start()
		{
			base.Start();

			// Create an Stack
			IStack stack = Platform.Current.Create<IStack>();

			// Creates an Label with text and a specific size and adds it to the stack.
			lblLabel = Platform.Current.Create<ILabel>();
			lblLabel.Text = "Select 1 day";
			lblLabel.Height = 30;
			stack.Children.Add(lblLabel);

			// Creates an Calendar with text specific and adds it to the stack.
			calendar = Platform.Current.Create<ICalendar>();
			calendar.Name = "calendar";
			calendar.Bold = true;
			stack.Children.Add(calendar);

			// Creates the Button cmdChange with text specific, with the event also click and adds it to the stack.
			IButton cmdChange = Platform.Current.Create<IButton>();
			cmdChange.Text = "Change";
			cmdChange.Click += CmdChange_Click;
			stack.Children.Add(cmdChange);

			// Creates the Button cmdClose with text specific, with the event also click and adds it to the stack.
			IButton cmdClose = Platform.Current.Create<IButton>();
			cmdClose.Text = "Close";
			cmdClose.Click += CmdClose_Click;
			stack.Children.Add(cmdClose);

			// Establishes the content and title of the page
			Platform.Current.Page.Title = "Test label";
			Platform.Current.Page.Content = stack;
		}
开发者ID:okhosting,项目名称:OKHOSTING.UI,代码行数:41,代码来源:CalendarController.cs


示例4: ComputeFireTimes

        /// <summary>
        /// Returns a list of Dates that are the next fire times of a
        /// <see cref="ITrigger" />.
        /// The input trigger will be cloned before any work is done, so you need
        /// not worry about its state being altered by this method.
        /// </summary>
        /// <param name="trigg">The trigger upon which to do the work</param>
        /// <param name="cal">The calendar to apply to the trigger's schedule</param>
        /// <param name="numTimes">The number of next fire times to produce</param>
        /// <returns>List of java.util.Date objects</returns>
        public static IList<DateTimeOffset> ComputeFireTimes(IOperableTrigger trigg, ICalendar cal, int numTimes)
        {
            List<DateTimeOffset> lst = new List<DateTimeOffset>();

            IOperableTrigger t = (IOperableTrigger) trigg.Clone();

            if (t.GetNextFireTimeUtc() == null || !t.GetNextFireTimeUtc().HasValue)
            {
                t.ComputeFirstFireTimeUtc(cal);
            }

            for (int i = 0; i < numTimes; i++)
            {
                DateTimeOffset? d = t.GetNextFireTimeUtc();
                if (d.HasValue)
                {
                    lst.Add(d.Value);
                    t.Triggered(cal);
                }
                else
                {
                    break;
                }
            }

            return lst.AsReadOnly();
        }
开发者ID:CharlieBP,项目名称:quartznet,代码行数:37,代码来源:TriggerUtils.cs


示例5: SetCalendar

        /// <summary>
        /// 
        /// </summary>
        /// <param name="calendar"></param>
        public override void SetCalendar(ICalendar calendar) {
            var cal = (HolidayCalendar)calendar;
            if (cal == null)
                return;

            this.Dates = new BindableCollection<DateTime>(cal.ExcludedDates);
            this.NotifyOfPropertyChange(() => this.Dates);
        }
开发者ID:bushadam,项目名称:QM,代码行数:12,代码来源:EditHolidayCalendarViewModel.cs


示例6: Time

		public Time (ulong timestamp, ICalendar calendar)
		{
			if (calendar == null)
				throw new ArgumentNullException ("calendar");

			this.Calendar = calendar;
			this.Calendar.DecodeTimestamp (timestamp, this);
		}
开发者ID:sharpos,项目名称:SharpOS,代码行数:8,代码来源:Time.cs


示例7: ExpenseReportController

 public ExpenseReportController(IExpenseReportBuilder expenseReportBuilder, IUserSession session,
     IWorkflowFacilitator workflowFacilitator, Bus bus, ICalendar calendar)
 {
     _expenseReportBuilder = expenseReportBuilder;
     _session = session;
     _workflowFacilitator = workflowFacilitator;
     _bus = bus;
     _calendar = calendar;
 }
开发者ID:4ROOT,项目名称:ClearMeasureBootcamp,代码行数:9,代码来源:ExpenseReportController.cs


示例8: CalendarDetailDto

 protected CalendarDetailDto(ICalendar calendar)
 {
     CalendarType = calendar.GetType().AssemblyQualifiedNameWithoutVersion();
     Description = calendar.Description;
     if (calendar.CalendarBase != null)
     {
         CalendarBase = Create(calendar.CalendarBase);
     }
 }
开发者ID:jvilalta,项目名称:quartznet,代码行数:9,代码来源:CalendarDetailDto.cs


示例9: Push

 public override IEnumerable<PushedEvent> Push(ICalendar calendar)
 {
     Log.Info(String.Format("Pushing calendar [{0}] to outlook", calendar.Id));
     var result = new List<PushedEvent>();
     foreach (var evt in calendar.Events)
     {
     }
     return result;
 }
开发者ID:OpenNingia,项目名称:OpenCalendarSync,代码行数:9,代码来源:OutlookCalendarManager.cs


示例10: CalendarSynchronizationWorker

 public CalendarSynchronizationWorker(
     ICalendar sourceCalendar,
     ICalendar destinationCalendar,
     ISynchronizationConfiguration synchronizationConfiguration,
     AutoResetEvent saveSynchronizationConfigurationsEvent)
     : this(
         sourceCalendar, destinationCalendar, synchronizationConfiguration, saveSynchronizationConfigurationsEvent,
         new CalendarEventSynchronizer())
 { }
开发者ID:rkeilty,项目名称:RK.Calendar.Sync,代码行数:9,代码来源:CalendarSynchronizationWorker.cs


示例11: AddEvent

        public AddEvent(GoogleCalendar.Data.Event monEvt, EventControler controler, ICalendar parent)
        {
            this.InitializeComponent();

            this.Title.Text = IConstantes.TITLE_ADD_EVT;
            this.Button_Cancel.Content = IConstantes.BUTTON_CANCEL;
            this.Button_Add.Content = IConstantes.BUTTON_ADD;

            this.DataContext = new VIEWMODEL.Event.EventModelView(monEvt, controler,parent);
        }
开发者ID:Delvius,项目名称:KIEPresentationV2,代码行数:10,代码来源:AddEvent.xaml.cs


示例12: ModifEvent

        public ModifEvent(GoogleCalendar.Data.Event monEvt,EventControler controler, ICalendar parent)
        {
            this.InitializeComponent();

            this.Title.Text = IConstantes.TITLE_UPDATE_EVT;
            this.Button_Cancel.Content = IConstantes.BUTTON_CANCEL;
            this.Button_Add.Content = IConstantes.BUTTON_UPDATE;
            this.Button_Delete.Content = IConstantes.BUTTON_DELETE;

            this.DataContext = new EventModelView(monEvt, controler, parent);
        }
开发者ID:Delvius,项目名称:KIEPresentationV2,代码行数:11,代码来源:ModifEvent.xaml.cs


示例13: TriggerDetailDto

 protected TriggerDetailDto(ITrigger trigger, ICalendar calendar)
 {
     Description = trigger.Description;
     TriggerType = trigger.GetType().AssemblyQualifiedNameWithoutVersion();
     Name = trigger.Key.Name;
     Group = trigger.Key.Group;
     CalendarName = trigger.CalendarName;
     Priority = trigger.Priority;
     StartTimeUtc = trigger.StartTimeUtc;
     EndTimeUtc = trigger.EndTimeUtc;
     NextFireTimes = TriggerUtils.ComputeFireTimes((IOperableTrigger) trigger, calendar, 10);
 }
开发者ID:quartznet,项目名称:quartznet,代码行数:12,代码来源:TriggerDetailDto.cs


示例14: PushAsync

 public override async Task<IEnumerable<PushedEvent>> PushAsync(ICalendar calendar)
 {
     Log.Info(String.Format("Pushing calendar to google [{0}]", calendar.Id));
     if (LastCalendar != null)
     {
         var eventsToRemove = LastCalendar.Events.Where(e => !calendar.Events.Any(elc => elc.Id == e.Id));
         RemoveEvents(eventsToRemove);
     }
     LastCalendar = calendar;
     var res = await PushEvents(calendar.Events);
     return res;
 }
开发者ID:OpenNingia,项目名称:OpenCalendarSync,代码行数:12,代码来源:GoogleCalendarManager.cs


示例15: GetForCalendar

 public static PublicItemCollection GetForCalendar(ICalendar calendar)
 {
     var sharingOptions = new PublicItemCollection();
     sharingOptions.Items.Add(new PublicItemWrapper(new ASC.Web.Core.Calendars.SharingOptions.PublicItem()
            {
                Id = calendar.OwnerId,
                IsGroup = false
            },
           calendar.Id.ToString(), calendar.OwnerId));
     foreach (var item in calendar.SharingOptions.PublicItems)            
         sharingOptions.Items.Add(new PublicItemWrapper(item, calendar.Id.ToString(), calendar.OwnerId));
     
     return sharingOptions;
 }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:14,代码来源:PublicItemCollection.cs


示例16: TriggerFiredBundle

 /// <summary>
 /// Initializes a new instance of the <see cref="TriggerFiredBundle"/> class.
 /// </summary>
 /// <param name="job">The job.</param>
 /// <param name="trigger">The trigger.</param>
 /// <param name="cal">The calendar.</param>
 /// <param name="jobIsRecovering">if set to <c>true</c> [job is recovering].</param>
 /// <param name="fireTimeUtc">The fire time.</param>
 /// <param name="scheduledFireTimeUtc">The scheduled fire time.</param>
 /// <param name="prevFireTimeUtc">The previous fire time.</param>
 /// <param name="nextFireTimeUtc">The next fire time.</param>
 public TriggerFiredBundle(IJobDetail job, IOperableTrigger trigger, ICalendar cal, bool jobIsRecovering,
     DateTimeOffset? fireTimeUtc,
     DateTimeOffset? scheduledFireTimeUtc,
     DateTimeOffset? prevFireTimeUtc,
     DateTimeOffset? nextFireTimeUtc)
 {
     this.job = job;
     this.trigger = trigger;
     this.cal = cal;
     this.jobIsRecovering = jobIsRecovering;
     this.fireTimeUtc = fireTimeUtc;
     this.scheduledFireTimeUtc = scheduledFireTimeUtc;
     this.prevFireTimeUtc = prevFireTimeUtc;
     this.nextFireTimeUtc = nextFireTimeUtc;
 }
开发者ID:vaskosound,项目名称:FantasyLeagueStats,代码行数:26,代码来源:TriggerFiredBundle.cs


示例17: Initialize

 static void Initialize(ICalendar calendar, IXpandJobTrigger trigger) {
     if (calendar is AnnualCalendar) {
         InitializeAnnual(calendar as AnnualCalendar, trigger.Calendar as IAnnualCalendar);
     } else if (calendar is HolidayCalendar) {
         InitializeHoliday(calendar as HolidayCalendar, trigger.Calendar as IHolidayCalendar);
     } else if (calendar is WeeklyCalendar) {
         InitializeWeekly(calendar as WeeklyCalendar, trigger.Calendar as IWeeklyCalendar);
     } else if (calendar is MonthlyCalendar) {
         InitializeMonthly(calendar as MonthlyCalendar, trigger.Calendar as IMonthlyCalendar);
     } else if (calendar is DailyCalendar) {
         InitializeDaily(calendar as DailyCalendar, trigger.Calendar as IDailyCalendar);
     } else if (calendar is CronCalendar) {
         InitializeCron(calendar as CronCalendar, trigger.Calendar as ICronCalendar);
     }
 }
开发者ID:aries544,项目名称:eXpand,代码行数:15,代码来源:CalendarBuilder.cs


示例18: GetCalendar

		public static ICalendar GetCalendar (CalendarType type)
		{
			// Initialize the calendars here

			if (Gregorian == null)
				Gregorian = new GregorianCalendar ();

			// List the calendars here

			switch (type) {
			case CalendarType.Gregorian:
				return Gregorian;
			default:
				return null;
			}
		}
开发者ID:sharpos,项目名称:SharpOS,代码行数:16,代码来源:CalendarManager.cs


示例19: UptimeManagement

        /// <summary>
        /// Initializes a new instance of UptimeManagement
        /// </summary>
        public UptimeManagement(IDeviceConfiguration device, ICalendarFactory calendarFactory)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            if (calendarFactory == null)
            {
                throw new ArgumentNullException(nameof(calendarFactory));
            }

            this.m_Device = device;
            this.m_Calendar = calendarFactory.GetCalendar(m_Device.UptimeCalendarType.ToCalendarCalendarType(),
                m_Device.CalendarProviderSettingsDirectory,
                m_Device.UptimeCalendarName);
        }
开发者ID:ap0llo,项目名称:UptimeManager,代码行数:20,代码来源:UptimeManagement.cs


示例20: CreateFromICalendar

        public static DbCalendar CreateFromICalendar(ICalendar calendar)
        {
            DbCalendar dbCalendar = new DbCalendar();

            byte[] serializedCalendar = null;
            if (calendar != null)
            {
                using (MemoryStream ms = new MemoryStream())
                {
                    BinaryFormatter bf = new BinaryFormatter();
                    bf.Serialize(ms, calendar);
                    serializedCalendar = ms.ToArray();
                }
            }

            dbCalendar.Calendar = serializedCalendar;

            return dbCalendar;
        }
开发者ID:chriswill,项目名称:quartznet-documentdb,代码行数:19,代码来源:DbCalendar.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ICall类代码示例发布时间:2022-05-24
下一篇:
C# ICalculationStatus类代码示例发布时间: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