コード例 #1
0
        private void CalendarTypeListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            int          _height   = _menuIsOpen ? -(int)CalendarTypePanel.ActualHeight : (int)CalendarTypePanel.ActualHeight;
            GuiAnimation animation = new GuiAnimation(CalendarTypePanel, AnimationType.Size);

            animation.AddStep(CalendarTypePanel.ActualWidth, 0, 20);
            _animations.Add(animation);

            GuiAnimation animation2 = new GuiAnimation(CalendarTypePanel, AnimationType.Position);

            animation2.AddStep(0, Canvas.GetTop(CalendarTypeCanvas.Children[0]) - _height, 20);
            _animations.Add(animation2);
            _menuIsOpen = false;
            if (CalendarTypeListView.SelectedItem.GetType() == typeof(Activity))
            {
                List <Object> Parameter = new List <object>()
                {
                    CalendarTypeListView.SelectedItem,
                };
                if (ViewModel.SelectedDate != null)
                {
                    Parameter.Add((DateTime)ViewModel.SelectedDate);
                }

                NavigationService.NavigateToPage(typeof(HandleActivityView), Parameter);
            }
            else if (CalendarTypeListView.SelectedItem.GetType() == typeof(Notification))
            {
                NavigationService.NavigateToPage(typeof(HandleNotificationView), ViewModel.SelectedDate);
            }
        }
コード例 #2
0
        private void ActivityTypeListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ViewModel.SelectedSortType = (KeyValueItem)NotificationDateListView.SelectedItems[0];
            GuiAnimation animation = new GuiAnimation(NotificationDatePanel, AnimationType.Size);

            animation.AddStep(NotificationDatePanel.ActualWidth, 0, 20);
            _animations.Add(animation);
            _menuIsOpen = false;
        }
コード例 #3
0
        private void CalendarTypeListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ViewModel.SelectedCalendarType = (ICalendarItem)CalendarTypeListView.SelectedItems[0];
            GuiAnimation animation = new GuiAnimation(CalendarTypePanel, AnimationType.Size);

            animation.AddStep(CalendarTypePanel.ActualWidth, 0, 20);
            _animations.Add(animation);
            _menuIsOpen = false;
            InitializeCalendar();
        }
コード例 #4
0
        private void Grid_Tapped(object sender, TappedRoutedEventArgs e)
        {
            _height = _menuIsOpen ? 0 : (int)CalendarTypePanel.ActualHeight;

            GuiAnimation animation = new GuiAnimation(CalendarTypePanel, AnimationType.Size);

            animation.AddStep(CalendarTypePanel.ActualWidth, _height, 20);
            _animations.Add(animation);
            timer.Start();
            _menuIsOpen = !_menuIsOpen;
        }
コード例 #5
0
        private void ButtonAdd_Tapped(object sender, TappedRoutedEventArgs e)
        {
            _height = _menuIsOpen ? 0 : (int)CalendarTypePanel.ActualHeight;
            int _height2 = _menuIsOpen ? -(int)CalendarTypePanel.ActualHeight : (int)CalendarTypePanel.ActualHeight;

            GuiAnimation animation = new GuiAnimation(CalendarTypePanel, AnimationType.Size);

            animation.AddStep(CalendarTypePanel.ActualWidth, _height, 20);
            _animations.Add(animation);

            GuiAnimation animation2 = new GuiAnimation(CalendarTypePanel, AnimationType.Position);

            animation2.AddStep(0, Canvas.GetTop(CalendarTypeCanvas.Children[0]) - _height2, 20);
            _animations.Add(animation2);
            timer.Start();
            _menuIsOpen = !_menuIsOpen;
        }
コード例 #6
0
        private void CloseButton_Click(object sender, RoutedEventArgs e)
        {
            _isOpen = false;
            GuiAnimation sizeAnimation = new GuiAnimation(new Point(_desiredWidth - 2, _desiredHeight - 2));

            sizeAnimation.AddStep(0, 0, 20);
            _sizeAnimations.Add(sizeAnimation);

            GuiAnimation positionAnimation = new GuiAnimation(new Point(0, 0));

            positionAnimation.AddStep(300, _desiredHeight, 20);
            _positionAnimations.Add(positionAnimation);

            if (!_timer.IsEnabled)
            {
                _timer.Start();
            }
        }
コード例 #7
0
        public void Trigger()
        {
            if (!_isOpen && _currentTutorial != null)
            {
                GuiAnimation sizeAnimation = new GuiAnimation(new Point(0, 0));
                sizeAnimation.AddStep(_desiredWidth, _desiredHeight, 20);
                _sizeAnimations.Add(sizeAnimation);

                GuiAnimation positionAnimation = new GuiAnimation(new Point(300, _desiredHeight));
                positionAnimation.AddStep(0, 0, 20);
                _positionAnimations.Add(positionAnimation);

                if (!_timer.IsEnabled)
                {
                    _timer.Start();
                }
            }
        }
コード例 #8
0
        private void ActivityTypeListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            int          _height   = _menuIsOpen ? -(int)ActivityTypePanel.ActualHeight : (int)ActivityTypePanel.ActualHeight;
            GuiAnimation animation = new GuiAnimation(ActivityTypePanel, AnimationType.Size);

            animation.AddStep(ActivityTypePanel.ActualWidth, 0, 20);
            _animations.Add(animation);

            GuiAnimation animation2 = new GuiAnimation(ActivityTypePanel, AnimationType.Position);

            animation2.AddStep(0, Canvas.GetTop(ActivityTypeCanvas.Children[0]) - _height, 20);
            _animations.Add(animation2);
            _menuIsOpen = false;
            if (ActivityTypeListView.SelectedItem.GetType() == typeof(Activity))
            {
                NavigationService.NavigateToPage(typeof(HandleActivityView), ActivityTypeListView.SelectedItem);
            }
        }