예제 #1
0
 private void ContentFrame_Navigated(object sender, NavigationEventArgs e)
 {
     UpdateBackState();
     _HamburgerView.SelectedItem =
         PrimaryList.FirstOrDefault(x => x.Tag == ContentFrame.SourcePageType) ??
         SecondaryList.FirstOrDefault(x => x.Tag == ContentFrame.SourcePageType);
 }
예제 #2
0
        private void PrimaryWhereSQL(DatabaseCore accessor, out string sql, out List <DbParameter> parameters)
        {
            sql = null; parameters = null;
            if (accessor == null)
            {
                return;
            }
            if (PrimaryList == null || PrimaryList.Count <= 0 || PrimaryList.Any(p => p.Value == null))
            {
                return;
            }
            var where = new StringBuilder();
            var list = new List <DbParameter>();

            PrimaryList.ForEach(p =>
            {
                if (where.Length > 0)
                {
                    where.AppendLine(" AND ");
                }
                var parameter = accessor.CreateParameter(p);
                where.Append(string.Format("{0} = {1}", p.ID, parameter.ParameterName));
                list.Add(parameter);
            });
            sql        = where.ToString();
            parameters = list;
        }
예제 #3
0
        // Marks the specified index as a completed task.
        public void MarkAsComplete(int index, int actualTime)
        {
            PrimaryList.SetSelected(index, true);
            Line selected = PrimaryList.SelectedItem.ToString();

            PrimaryList.Items.RemoveAt(index);
            selected.CompleteTask(actualTime);
            HistoryList.Items.Add(selected);
        }