Пример #1
0
        private void AddNewActivity(object sender, TappedRoutedEventArgs e)
        {
            if (Validation())
            {
                MappedActivity activity = new MappedActivity()
                {
                    Name     = NameTextBox.Text,
                    WorkTime = Int32.Parse(WorkTimeTextBox.Text),
                    RestTime = Int32.Parse(RestTimeTextBox.Text),
                    Color    = _color.Value
                };

                _service.AddActivity(activity);
                _parent.RefreshActivityList();
                ClosePopup();
            }
        }