简体   繁体   English

Windows Phone 8创建日历应用程序

[英]Windows Phone 8 creating Calendar Application

I am new to creating Windows Phone 8 application. 我是创建Windows Phone 8应用程序的新手。 I want to create a Calendar application that tracks my daily activity. 我想创建一个跟踪我的日常活动的日历应用程序。 I know there is already a build in Calendar application but I want to try to create my self in my own User Interface. 我知道Calendar应用程序中已经有一个构建,但是我想尝试在自己的用户界面中创建自己的自我。

Is there a way to get the date of the calendar. 有没有一种方法可以获取日历的日期。 For example, a build in API to access the date where I don't have to create it my self such as create a whole new calendar application in my own function. 例如,一个内置的API可以访问我不必自己创建的日期,例如在我自己的函数中创建一个全新的日历应用程序。 I will have to think of the leap year and also which month has 31 days and which doesn't. 我将不得不考虑the年,以及哪个月份有31天,而哪个月份没有。 I did some research but most I get was to be able to access appointments from the build in Calendar. 我做了一些研究,但是我得到的最多是能够从Calendar中的版本访问约会。 If there is anything wrong regarding my theory do correct me. 如果我的理论有任何错误,请纠正我。

I will have to think of the leap year and also which month has 31 days and which doesn't. 我将不得不考虑the年,以及哪个月份有31天,而哪个月份没有。

You shouldn't need to write any code for yourself which does that. 您不需要自己编写任何代码来执行此操作。 You can either use the existing DateTime type, or potentially use my Noda Time library which separates out the various "kinds" of date and time values you might have into different types. 您可以使用现有的DateTime类型,也可以使用我的Noda Time库 ,该将您可能拥有的各种日期和时间值“分离”为不同的类型。 Either way, there are methods which already understand month lengths etc - you should make sure that you don't reinvent the wheel. 无论哪种方式,都有一些已经了解月份长度的方法等-您应该确保不要重新发明轮子。 Instead, think about what your data model looks like, what the user interactions are, what the presentation should look like etc. (One thing to think about really early is what you want to do about time zones.) 相反,想想你的数据模型看起来像什么,什么用户交互,演示应该是什么样子等。(一件事想真正的早期是你想做的事有关时区的内容。)

I would personally suggest not trying to integrate with the existing calendar, at least to start with. 我个人建议不要尝试与现有日历集成,至少要从头开始。 The more code you integrate with, the harder it's going to be. 您集成的代码越多,难度就越大。 It really depends on how much this app is aimed at creating a full real solution, and how much it's a learning process. 这实际上取决于该应用旨在创建一个完整的,真正的解决方案的程度,以及它是一个学习过程的程度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM