コード例 #1
0
        public void ScrollToLastColumn()
        {
            if (ScrollAnimation.Enabled)
            {
                return;
            }
            if (Columns.Count == 0)
            {
                return;
            }

            ScrollAnimation = new IntAnimation();

            int start = ScrollPanel.HorizontalScroll.Value;
            int end   = LastColumn.Right + ScrollPanel.HorizontalScroll.Value - ScrollPanel.Width;

            end = Math.Max(Math.Min(end, ScrollPanel.HorizontalScroll.Maximum), start);

            ScrollAnimation.Start(start, end).Tick += (_, value) => {
                ScrollPanel.HorizontalScroll.Value = value;
            };
            ScrollAnimation.Complete += (_, e) => {
                if (end != start)
                {
                    UpdateScrollMinSize();
                }
            };
        }
コード例 #2
0
        public ColumnView()
        {
            InitializeComponent();

            Columns         = new ObservableCollection <ColumnControl>();
            ScrollAnimation = new IntAnimation();

            Columns.CollectionChanged += Columns_CollectionChanged;
        }
コード例 #3
0
ファイル: FilterToolbar.cs プロジェクト: yishn/Trail-old
        public void SlideOpen()
        {
            if (animation.Enabled)
            {
                return;
            }

            animation = new IntAnimation();
            animation.Start(0, 30).Tick += (_, value) => {
                this.Height = value;
            };
        }
コード例 #4
0
ファイル: FilterToolbar.cs プロジェクト: yishn/Trail-old
        public void SlideClose()
        {
            if (animation.Enabled)
            {
                return;
            }

            FilterText = "";

            animation = new IntAnimation();
            animation.Start(30, 0).Tick += (_, value) => {
                this.Height = value;
            };
        }
コード例 #5
0
        private void updateProgress(Tuple <int, string> t)
        {
            if (!progressAnimation.Enabled || t.Item1 == 100 || t.Item1 == 0)
            {
                progressAnimation.Stop();
                progressAnimation = new IntAnimation();
                progressAnimation.Start(this.Progress, t.Item1).Tick += (_, value) => {
                    this.Progress = value;
                };
            }

            if (t.Item2 != null)
            {
                this.DescriptionText = t.Item2;
            }
        }
コード例 #6
0
        public void UpdateSize()
        {
            if (animation.Enabled)
            {
                animation.Stop();
            }

            int end = Math.Min(this.Items.Count, 3) * new ProgressControl().Height;

            if (end != 0)
            {
                end += headerLabel.Height;
            }

            animation = new IntAnimation();
            animation.Start(this.Height, end).Tick += (_, value) => {
                this.Height = value;
            };
        }
コード例 #7
0
        public void ScrollToFirstColumn()
        {
            if (ScrollAnimation.Enabled)
            {
                return;
            }
            if (Columns.Count == 0)
            {
                return;
            }

            ScrollAnimation = new IntAnimation();
            int start = ScrollPanel.HorizontalScroll.Value;
            int end   = 0;

            ScrollAnimation.Start(start, end).Tick += (_, value) => {
                ScrollPanel.HorizontalScroll.Value = value;
            };
            ScrollAnimation.Complete += (_, e) => {
                Columns[0].Focus();
                UpdateScrollMinSize();
            };
        }
コード例 #8
0
        public void ApplyIntToText(Text text)
        {
            IntAnimation intAnimation = ((IntAnimation)simpleAnimationsManager.GetAnimation("Int"));

            text.text = intAnimation.intToAnimate.ToString();
        }