public void InitializeFlips(IEnumerable <MemoItem> memos) { int counter = 0; App.Flips.Clear(); foreach (MemoItem memo in memos) { FrontPageControl fc = new FrontPageControl(); fc.SetKeywords(String.Join(", ", memo.Keywords)); fc.SetAlarmTime(memo.RemindTime); fc.SetMemoDetail(memo.Content); fc.Row = counter / 2; fc.Column = counter % 2; counter++; App.Flips.Add(fc); } }
public static void PinToMain(MemoItem item) { if (Flips.Count < 8) { FrontPageControl fc = new FrontPageControl(); fc.SetKeywords(String.Join(", ", item.Keywords)); fc.SetAlarmTime(item.RemindTime); fc.SetMemoDetail(item.Content); Flips.Add(fc); } else { Flips.RemoveAt(7); FrontPageControl fc = new FrontPageControl(); fc.SetKeywords(String.Join(", ", item.Keywords)); fc.SetAlarmTime(item.RemindTime); fc.SetMemoDetail(item.Content); Flips.Add(fc); } }