예제 #1
0
        public static async Task SaveAsync()
        {
            var file = await FileStorageProvider.GetFileAsync();

            var lines = Actions.OrderBy(i => i.Index).Select(i => ActionItemAdapter.ToString(i));
            await FileIO.WriteLinesAsync(file, lines);
        }
예제 #2
0
        public ActionItem(string raw, int index)
        {
            this.raw            = string.Empty;
            this.body           = string.Empty;
            this.priority       = string.Empty;
            this.completionDate = DateTime.MaxValue;
            this.creationDate   = DateTime.Today;
            this.isComplete     = false;
            this.Index          = index;

            this.Contexts       = new List <string>();
            this.PrimaryContext = string.Empty;
            this.Projects       = new List <string>();
            this.PrimaryProject = string.Empty;

            this.DueDate = DateTime.MaxValue;

            ActionItemAdapter.Parse(raw, this);
        }
예제 #3
0
 public void Restring()
 {
     this.Raw = ActionItemAdapter.ToString(this);
 }
예제 #4
0
 public void Reparse()
 {
     ActionItemAdapter.Parse(this.Raw, this);
 }
예제 #5
0
 public static ActionItem Create()
 {
     return(new ActionItem(ActionItemAdapter.ToString(DateTime.Today, string.Empty), 0));
 }