本文整理汇总了C#中Calendar类的典型用法代码示例。如果您正苦于以下问题:C# Calendar类的具体用法?C# Calendar怎么用?C# Calendar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Calendar类属于命名空间,在下文中一共展示了Calendar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:NiDaSilva,项目名称:PPE4-STARS-UP,代码行数:13,代码来源:CalendarRendererEventArgs.cs
示例2: AuditoriumEvent
public AuditoriumEvent(string name, Calendar calendar, Ring ring, Auditorium auditorium)
{
Name = name;
Calendar = calendar;
Ring = ring;
Auditorium = auditorium;
}
开发者ID:BesuglovS,项目名称:UchOtd,代码行数:7,代码来源:AuditoriumEvent.cs
示例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);
}
开发者ID:ammachado,项目名称:QLNet,代码行数:7,代码来源:Zerocouponbond.cs
示例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);
}
开发者ID:Pawel-Marcin-Chojnacki,项目名称:FERS_Calendarar_sync_service,代码行数:12,代码来源:User.cs
示例5: AddItemFromCalendar
private void AddItemFromCalendar(Calendar calendar)
{
ListViewItem item = new ListViewItem();
item.Tag = calendar;
UpdateItemFromCalendar(item);
calendarList.Items.Add(item);
}
开发者ID:izzatbek099,项目名称:gminder,代码行数:7,代码来源:Calendars.cs
示例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;
}
开发者ID:NiDaSilva,项目名称:PPE4-STARS-UP,代码行数:14,代码来源:CalendarItem.cs
示例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();
}
开发者ID:Astaelan,项目名称:Fusion,代码行数:31,代码来源:DateTimeFormatInfo.cs
示例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);
}
}
开发者ID:khoingo,项目名称:KhoiRepository,代码行数:35,代码来源:ApiOffice365CalendarController.cs
示例9: YoYInflationLeg
public YoYInflationLeg(Schedule schedule, Calendar cal, YoYInflationIndex index, Period observationLag)
{
schedule_ = schedule;
index_ = index;
observationLag_ = observationLag;
paymentAdjustment_ = BusinessDayConvention.ModifiedFollowing;
paymentCalendar_ = cal;
}
开发者ID:ammachado,项目名称:QLNet,代码行数:8,代码来源:YoYInflationLeg.cs
示例10: Lesson
public Lesson(TeacherForDiscipline teacherForDiscipline, Calendar calendar,
Ring ring, Auditorium auditorium)
{
TeacherForDiscipline = teacherForDiscipline;
Calendar = calendar;
Ring = ring;
Auditorium = auditorium;
}
开发者ID:BesuglovS,项目名称:UchOtd,代码行数:8,代码来源:Lesson.cs
示例11: OnApplyTemplate
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
_calendar = (Calendar)GetTemplateChild("Part_Calendar");
_calendar.SelectedDatesChanged += Calendar_SelectedDatesChanged;
_calendar.SelectedDate = Value ?? null;
}
开发者ID:zzilla,项目名称:ONVIF-Device-Manager,代码行数:8,代码来源:DateTimePicker.cs
示例12: AddEditor
protected override Control AddEditor(Control container)
{
Calendar datePicker = new Calendar();
container.Controls.Add(datePicker);
return datePicker;
}
开发者ID:phobos-consulting,项目名称:toodyaystone,代码行数:8,代码来源:EditableDatePicker.cs
示例13: VisitCalendar
public override object VisitCalendar(Calendar calendar)
{
if (!calendar.SupportsDataType(_currentDataType))
{
Report.AddError(calendar.Position, MessageFormat, "calendar", StringEnum.GetStringValue(_currentDataType));
}
return null;
}
开发者ID:javachengwc,项目名称:many-ql,代码行数:8,代码来源:WidgetTypeChecker.cs
示例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;
}
开发者ID:agzagrean,项目名称:MyCalendar,代码行数:8,代码来源:CalendarItem.cs
示例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);
}
开发者ID:mcshaz,项目名称:SimPlanner,代码行数:9,代码来源:CreateCourseAppointment.cs
示例16: CalendarAdapter
public CalendarAdapter(Context c, Calendar monthCalendar) {
month = monthCalendar;
selectedDate = (Calendar)monthCalendar.Clone();
mContext = c;
month.Set(Calendar.DayOfMonth, 1);
this.items = new ArrayList();
refreshDays();
}
开发者ID:jeedey93,项目名称:xamarin-android-samples,代码行数:9,代码来源:CalendarAdapter.cs
示例17: GetExpectedFourDigitYear
private static int GetExpectedFourDigitYear(Calendar calendar, int twoDigitYear)
{
int expectedFourDigitYear = calendar.TwoDigitYearMax - calendar.TwoDigitYearMax % 100 + twoDigitYear;
if (expectedFourDigitYear > calendar.TwoDigitYearMax)
{
expectedFourDigitYear -= 100;
}
return expectedFourDigitYear;
}
开发者ID:ESgarbi,项目名称:corefx,代码行数:9,代码来源:GregorianCalendarToFourDigitYear.cs
示例18: Create
public ActionResult Create(Calendar calendar)
{
db.Calendar.Add(calendar);
db.SaveChanges();
var day = calendar.StartDate.Day;
var month = calendar.StartDate.Month;
var year = calendar.StartDate.Year;
return Redirect("/Calendar/Index?Year=" + year + "&Month=" + month + "&Day=" + day);
}
开发者ID:sevilturner,项目名称:Calendar,代码行数:10,代码来源:CalendarController.cs
示例19: TestInitialize
public void TestInitialize ()
{
calendar = new Calendar ();
calendar.Height = 200;
calendar.Width = 200;
DateTime date = new DateTime (2000, 2, 2);
calendar.DisplayDate = date;
calendar.SelectedDate = date;
}
开发者ID:dfr0,项目名称:moon,代码行数:10,代码来源:CalendarDayButtonAutomationPeerTest.cs
示例20: MinCalendarYearInEra
private static int MinCalendarYearInEra(Calendar calendar, int era)
{
int[] eras = calendar.Eras;
Assert.InRange(era, 0, eras[0]);
if (eras.Length == 1 || era == eras[eras.Length - 1] || era == 0)
{
return calendar.GetYear(calendar.MinSupportedDateTime);
}
return calendar.GetYear(calendar.ToDateTime(1, 1, 1, 0, 0, 0, 0, era));
}
开发者ID:SGuyGe,项目名称:corefx,代码行数:10,代码来源:CalendarHelpers.cs
注:本文中的Calendar类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论