本文整理汇总了C#中Calendar类的典型用法代码示例。如果您正苦于以下问题:C# Calendar类的具体用法?C# Calendar怎么用?C# Calendar使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Calendar类属于命名空间,在下文中一共展示了Calendar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalendarRendererEventArgs
/// <summary>
/// Creates a new <see cref="CalendarRendererEventArgs"/>
/// </summary>
/// <param name="calendar">Calendar where painting</param>
/// <param name="g">Device where to paint</param>
/// <param name="clip">Paint event clip area</param>
public CalendarRendererEventArgs(Calendar calendar, Graphics g, Rectangle clipRectangle, object tag)
{
_calendar = calendar;
_graphics = g;
_clip = clipRectangle;
_tag = tag;
}
示例2: AuditoriumEvent
public AuditoriumEvent(string name, Calendar calendar, Ring ring, Auditorium auditorium)
{
Name = name;
Calendar = calendar;
Ring = ring;
Auditorium = auditorium;
}
示例3: ZeroCouponBond
public ZeroCouponBond(int settlementDays, Calendar calendar, double faceAmount, Date maturityDate, BusinessDayConvention paymentConvention, double redemption, Date issueDate)
: base(settlementDays, calendar, issueDate)
{
maturityDate_ = maturityDate;
Date redemptionDate = calendar_.adjust(maturityDate, paymentConvention);
setSingleRedemption(faceAmount, redemption, redemptionDate);
}
示例4: User
/// <summary>
/// Konkstruktor. Tworzy kalendarz użytkownika, pozwalając na jego autoryzację.
/// </summary>
/// <param name="userName">Nazwa użytkownika.</param>
/// <param name="uId">Id użytkownika.</param>
public User(string userName, int uId)
{
UserEmail = userName;
Logs.WriteErrorLog("Konstruktor USER, pole UserId: " + UserId.ToString());
UserId = uId;
Calendar = new Calendar(UserEmail, uId);
}
示例5: AddItemFromCalendar
private void AddItemFromCalendar(Calendar calendar)
{
ListViewItem item = new ListViewItem();
item.Tag = calendar;
UpdateItemFromCalendar(item);
calendarList.Items.Add(item);
}
示例6: CalendarItem
/// <summary>
/// Creates a new item with the specified date range and text
/// </summary>
/// <param name="calendar">Calendar to reference item</param>
/// <param name="startDate">Start date of the item</param>
/// <param name="endDate">End date of the item</param>
/// <param name="text">Text of the item</param>
public CalendarItem(Calendar calendar, DateTime startDate, DateTime endDate, string text)
: this(calendar)
{
StartDate = startDate;
EndDate = endDate;
Text = text;
}
示例7: DateTimeFormatInfo
public DateTimeFormatInfo()
{
// Construct an invariant culture DateTimeFormatInfo
char[] comma = new char[] { ',' };
mIsReadOnly = true;
mAbbreviatedDayNames = "Sun,Mon,Tue,Wed,Thu,Fri,Sat".Split(comma);
mAbbreviatedMonthGenitiveNames = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,".Split(comma);
mAbbreviatedMonthNames = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,".Split(comma);
mAMDesignator = "AM";
mCalendarWeekRule = CalendarWeekRule.FirstDay;
mDateSeparator = "/";
mDayNames = "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".Split(comma);
mFirstDayOfWeek = DayOfWeek.Sunday;
mFullDateTimePattern = "dddd, dd MMMM yyyy HH:mm:ss";
mLongDatePattern = "dddd, dd MMMM yyyy";
mLongTimePattern = "HH:mm:ss";
mMonthDayPattern = "MMMM dd";
mMonthGenitiveNames = "January,February,March,April,May,June,July,August,September,October,November,December,".Split(comma);
mMonthNames = "January,February,March,April,May,June,July,August,September,October,November,December,".Split(comma);
mNativeCalendarName = "Gregorian Calendar";
mPMDesignator = "PM";
mRFC1123Pattern = "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'";
mShortDatePattern = "MM/dd/yyyy";
mShortestDayNames = "Su,Mo,Tu,We,Th,Fr,Sa".Split(comma);
mShortTimePattern = "HH:mm";
mSortableDateTimePattern = "yyyy'-'MM'-'dd'T'HH':'mm':'ss";
mTimeSeparator = ":";
mUniversalSortableDateTimePattern = "yyyy'-'MM'-'dd HH':'mm':'ss'Z'";
mYearMonthPattern = "yyyy MMMM";
mCalendar = new GregorianCalendar();
}
示例8: PostCalendar
public HttpResponseMessage PostCalendar(List<ApiCalendarModels> apiCalendars)
{
if (ModelState.IsValid)
{
var calendars = CalendarService.Get();
foreach (var apiCalendar in apiCalendars)
{
if (calendars.Any(c => c.ApiId == apiCalendar.Id))
continue;
//Insert to database
var calendar = new Calendar
{
ApiId = apiCalendar.Id,
Attendee = apiCalendar.Attendee,
Body = apiCalendar.Body,
Subject = apiCalendar.Subject,
Date = apiCalendar.Date.HasValue ? apiCalendar.Date.Value.DateTime : (Nullable<DateTime>)null,
End = apiCalendar.End.HasValue ? apiCalendar.End.Value.DateTime : (Nullable<DateTime>)null
};
CalendarService.Insert(calendar);
}
HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created);
//response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = calendar.Id }));
return response;
}
else
{
return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
}
}
示例9: YoYInflationLeg
public YoYInflationLeg(Schedule schedule, Calendar cal, YoYInflationIndex index, Period observationLag)
{
schedule_ = schedule;
index_ = index;
observationLag_ = observationLag;
paymentAdjustment_ = BusinessDayConvention.ModifiedFollowing;
paymentCalendar_ = cal;
}
示例10: Lesson
public Lesson(TeacherForDiscipline teacherForDiscipline, Calendar calendar,
Ring ring, Auditorium auditorium)
{
TeacherForDiscipline = teacherForDiscipline;
Calendar = calendar;
Ring = ring;
Auditorium = auditorium;
}
示例11: OnApplyTemplate
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
_calendar = (Calendar)GetTemplateChild("Part_Calendar");
_calendar.SelectedDatesChanged += Calendar_SelectedDatesChanged;
_calendar.SelectedDate = Value ?? null;
}
示例12: AddEditor
protected override Control AddEditor(Control container)
{
Calendar datePicker = new Calendar();
container.Controls.Add(datePicker);
return datePicker;
}
示例13: VisitCalendar
public override object VisitCalendar(Calendar calendar)
{
if (!calendar.SupportsDataType(_currentDataType))
{
Report.AddError(calendar.Position, MessageFormat, "calendar", StringEnum.GetStringValue(_currentDataType));
}
return null;
}
示例14: CalendarItem
public CalendarItem(CalendarItem lastItem)
{
// TODO: Complete member initialization
this._owningCalendar = lastItem._owningCalendar;
this.DayNumber = lastItem.DayNumber;
this.EventsForDay = lastItem.EventsForDay;
this.ItemDate = lastItem.ItemDate;
}
示例15: AppendFacultyMeetingEvent
public static void AppendFacultyMeetingEvent(Calendar cal, Course course)
{
if (!course.FacultyMeetingUtc.HasValue) { return; }
//CalendarMethods.Request is only valid for single event per calendar
cal.Method = course.Cancelled ? CalendarMethods.Cancel : CalendarMethods.Publish;
var courseEvent = cal.Events.First();
var facultyMeet = CreateFacultyMeetingEvent(course);
cal.Events.Add(facultyMeet);
}