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

C# iCalObject类代码示例

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

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



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

示例1: AddChild

        public override void AddChild(iCalObject child)
        {
            if (child is TimeZoneInfo)
                TimeZoneInfos.Add(child);

            base.AddChild(child);
        }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:7,代码来源:TimeZone.cs


示例2: RemoveChild

        public override void RemoveChild(iCalObject child)
        {
            if (child is TimeZoneInfo &&
                TimeZoneInfos.Contains(child))
                TimeZoneInfos.Remove(child);

            base.RemoveChild(child);
        }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:8,代码来源:TimeZone.cs


示例3: Create

 static public new ComponentBase Create(iCalObject parent, string name)
 {
     switch (name)
     {
         case "VEVENT": return new CustomEvent1(parent);
         default: return ComponentBase.Create(parent, name);
     }
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:8,代码来源:Custom1.cs


示例4: AddChild

 /// <summary>
 /// Adds an <see cref="iCalObject"/>-based component to the
 /// appropriate collection.  Currently, the TimeZone component
 /// supports the following components:
 ///     <list type="bullet">
 ///         <item>Standard</item>
 ///         <item>Daylight</item>
 ///     </list>
 /// </summary>
 /// <param name="child"></param>
 public override void AddChild(iCalObject child)
 {
     Type type = child.GetType();
     switch (type.Name)
     {
         case "Standard": TimeZoneInfos.Add(child); StandardTimes.Add(child); break;
         case "Daylight": TimeZoneInfos.Add(child); DaylightTimes.Add(child); break;
         default: break;
     }
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:20,代码来源:TimeZone.cs


示例5: Copy

            /// <summary>
            /// Creates a copy of the <see cref="TimeZoneInfo"/> object.
            /// </summary>
            public override iCalObject Copy(iCalObject parent)
            {
                // Create a copy
                iCalObject obj = base.Copy(parent);

                // Copy the name, since the .ctor(iCalObject) constructor
                // doesn't handle it
                obj.Name = this.Name;
                
                return obj;
            }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:14,代码来源:TimeZoneInfo.cs


示例6: AddChild

 /// <summary>
 /// Adds an <see cref="iCalObject"/>-based component to the
 /// appropriate collection.  Currently, the iCalendar component
 /// supports the following components:
 ///     <list>
 ///         <item>Event</item>
 ///         <item>FreeBusy</item>
 ///         <item>Journal</item>
 ///         <item>TimeZone</item>
 ///         <item>Todo</item>
 ///     </list>
 /// </summary>
 /// <param name="child"></param>
 public override void AddChild(iCalObject child)
 {
     Type type = child.GetType();
     switch (type.Name)
     {
         case "Event": Events.Add(child); break;
         case "FreeBusy": FreeBusy.Add(child); break;
         case "Journal": Journals.Add(child); break;
         case "TimeZone": TimeZones.Add(child); break;
         case "Todo": Todos.Add(child); break;
         default: break;
     }                
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:26,代码来源:iCalendar.cs


示例7: Create

 static public ComponentBase Create(iCalObject parent, string name)
 {
     switch(name.ToUpper())
     {
         case "VALARM": return new Alarm(parent); break;
         case "VEVENT": return new Event(parent); break;
         case "VFREEBUSY": return new FreeBusy(parent); break;
         case "VJOURNAL": return new Journal(parent); break;
         case "VTIMEZONE": return new DDay.iCal.Components.TimeZone(parent); break;
         case "VTODO": return new Todo(parent); break;
         default: return new ComponentBase(parent, name); break;
     }
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:13,代码来源:ComponentBase.cs


示例8: Create

 public static new ComponentBase Create(iCalObject parent, string name)
 {
     switch (name.ToUpper())
     {
         //case ALARM: return new Alarm(parent);
         case EVENT: return new McEvent(parent);
         //case FREEBUSY: return new FreeBusy(parent);
         //case JOURNAL: return new Journal(parent);
         //case TIMEZONE: return new iCalTimeZone(parent);
         //case TODO: return new Todo(parent);
         case DAYLIGHT:
         case STANDARD:
             return new TimeZoneInfo(name.ToUpper(), parent);
         default: return new McComponentBase(parent, name);
     }
 }
开发者ID:0anion0,项目名称:IBN,代码行数:16,代码来源:McComponentBase.cs


示例9: Event

 /// <summary>
 /// Constructs an Event object, with an <see cref="iCalObject"/>
 /// (usually an iCalendar object) as its parent.
 /// </summary>
 /// <param name="parent">An <see cref="iCalObject"/>, usually an iCalendar object.</param>
 public Event(iCalObject parent) : base(parent)
 {
     this.Name = "VEVENT";
     Periods = new ArrayList();
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:10,代码来源:Event.cs


示例10: Event

 /// <summary>
 /// Constructs an Event object, with an <see cref="iCalObject"/>
 /// (usually an iCalendar object) as its parent.
 /// </summary>
 /// <param name="parent">An <see cref="iCalObject"/>, usually an iCalendar object.</param>
 public Event(iCalObject parent) : base(parent)
 {
     this.Name = "VEVENT";            
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:9,代码来源:Event.cs


示例11: RemoveChild

        /// <summary>
        /// Removes an <see cref="iCalObject"/>-based component from all
        /// of the collections that this object may be contained in within
        /// the iCalendar.
        /// </summary>
        /// <param name="child"></param>
        public override void RemoveChild(iCalObject child)
        {
            base.RemoveChild(child);

            if (child is UniqueComponent)
                UniqueComponents.Remove((UniqueComponent)child);

            Type type = child.GetType();
            if (type == typeof(Event) || type.IsSubclassOf(typeof(Event))) Events.Remove((Event)child);
            else if (type == typeof(FreeBusy) || type.IsSubclassOf(typeof(FreeBusy))) FreeBusy.Remove((FreeBusy)child);
            else if (type == typeof(Journal) || type.IsSubclassOf(typeof(Journal))) Journals.Remove((Journal)child);
            else if (type == typeof(DDay.iCal.Components.TimeZone) || type.IsSubclassOf(typeof(DDay.iCal.Components.TimeZone))) TimeZones.Remove((DDay.iCal.Components.TimeZone)child);
            else if (type == typeof(Todo) || type.IsSubclassOf(typeof(Todo))) Todos.Remove((Todo)child);
        }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:20,代码来源:iCalendar.cs


示例12: UniqueComponent

 public UniqueComponent(iCalObject parent) : base(parent) {}
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:1,代码来源:UniqueComponent.cs


示例13: param

	public void param(
		iCalObject o
	) //throws RecognitionException, TokenStreamException
{
		
		Parameter p; string n; string v;
		
		try {      // for error handling
			n=param_name();
			p = new Parameter(o, n);
			match(EQUAL);
			v=param_value();
			p.Values.Add(v);
			{    // ( ... )*
				for (;;)
				{
					if ((LA(1)==COMMA))
					{
						match(COMMA);
						v=param_value();
						p.Values.Add(v);
					}
					else
					{
						goto _loop45_breakloop;
					}
					
				}
_loop45_breakloop:				;
			}    // ( ... )*
		}
		catch (RecognitionException ex)
		{
			reportError(ex);
			recover(ex,tokenSet_6_);
		}
	}
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:37,代码来源:iCalParser.cs


示例14: x_prop

	public void x_prop(
		iCalObject o
	) //throws RecognitionException, TokenStreamException
{
		
		IToken  n = null;
		Property p; string v;
		
		try {      // for error handling
			n = LT(1);
			match(X_NAME);
			p = new Property(o);
			{    // ( ... )*
				for (;;)
				{
					if ((LA(1)==SEMICOLON))
					{
						match(SEMICOLON);
						xparam(p);
					}
					else
					{
						goto _loop37_breakloop;
					}
					
				}
_loop37_breakloop:				;
			}    // ( ... )*
			match(COLON);
			v=text();
			p.Name = n.getText(); p.Value = v; p.AddToParent();
			match(CRLF);
		}
		catch (RecognitionException ex)
		{
			reportError(ex);
			recover(ex,tokenSet_5_);
		}
	}
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:39,代码来源:iCalParser.cs


示例15: calendarline

	public void calendarline(
		iCalObject o
	) //throws RecognitionException, TokenStreamException
{
		
		
		try {      // for error handling
			switch ( LA(1) )
			{
			case IANA_TOKEN:
			case X_NAME:
			{
				contentline(o);
				break;
			}
			case BEGIN:
			{
				component(o);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			 }
		}
		catch (RecognitionException ex)
		{
			reportError(ex);
			recover(ex,tokenSet_4_);
		}
	}
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:32,代码来源:iCalParser.cs


示例16: component

	public void component(
		iCalObject o
	) //throws RecognitionException, TokenStreamException
{
		
		
		try {      // for error handling
			{ // ( ... )+
				int _cnt9=0;
				for (;;)
				{
					if ((LA(1)==BEGIN) && (LA(2)==COLON) && (LA(3)==IANA_TOKEN))
					{
						iana_comp(o);
					}
					else if ((LA(1)==BEGIN) && (LA(2)==COLON) && (LA(3)==X_NAME)) {
						x_comp(o);
					}
					else
					{
						if (_cnt9 >= 1) { goto _loop9_breakloop; } else { throw new NoViableAltException(LT(1), getFilename());; }
					}
					
					_cnt9++;
				}
_loop9_breakloop:				;
			}    // ( ... )+
		}
		catch (RecognitionException ex)
		{
			reportError(ex);
			recover(ex,tokenSet_4_);
		}
	}
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:34,代码来源:iCalParser.cs


示例17: Alarm

 public Alarm(iCalObject parent)
     : base(parent)
 {            
     this.Name = "VALARM";
     Occurrences = new List<AlarmOccurrence>();
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:6,代码来源:Alarm.cs


示例18: TimeZoneInfo

 public TimeZoneInfo(string name, iCalObject parent)
     : base(parent)
 {
     this.Name = name;
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:5,代码来源:TimeZoneInfo.cs


示例19: x_comp

	public void x_comp(
		iCalObject o
	) //throws RecognitionException, TokenStreamException
{
		
		IToken  n = null;
		ComponentBase c;
		
		try {      // for error handling
			match(BEGIN);
			match(COLON);
			n = LT(1);
			match(X_NAME);
			c = o.iCalendar.Create(o, n.getText());
			match(CRLF);
			{ // ( ... )+
				int _cnt15=0;
				for (;;)
				{
					if ((LA(1)==BEGIN||LA(1)==IANA_TOKEN||LA(1)==X_NAME))
					{
						calendarline(c);
					}
					else
					{
						if (_cnt15 >= 1) { goto _loop15_breakloop; } else { throw new NoViableAltException(LT(1), getFilename());; }
					}
					
					_cnt15++;
				}
_loop15_breakloop:				;
			}    // ( ... )+
			match(END);
			match(COLON);
			match(X_NAME);
			match(CRLF);
			c.OnLoad(EventArgs.Empty);
		}
		catch (RecognitionException ex)
		{
			reportError(ex);
			recover(ex,tokenSet_4_);
		}
	}
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:44,代码来源:iCalParser.cs


示例20: ComponentBase

 public ComponentBase(iCalObject parent, string name) : base(parent, name) { }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:1,代码来源:ComponentBase.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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