示例#1
0
        public TimelineStory()
        {
            Opacity = 0;
            this.InitializeComponent();
            Loaded  += TimelineStory_Loaded;
            Loading += TimelineStory_Loading;

            DateContainer.Fade(duration: 0).StartAsync();
            TopLine.Fade(duration: 0).StartAsync();
            SummaryContainer.Fade(duration: 0).StartAsync();
            LikesContainer.Fade(duration: 0).StartAsync();
            ImageContainer.Scale(duration: 0,
                                 centerX: (float)ImageContainer.Width / 2,
                                 centerY: (float)ImageContainer.Height / 2,
                                 scaleX: 0.75f,
                                 scaleY: 0.75f).StartAsync();

            TitleLine.Scale(duration: 0,
                            scaleX: 0.6f,
                            scaleY: 0.6f)
            .Offset(offsetX: -30,
                    offsetY: 35,
                    duration: 0)
            .Fade(0.7f, duration: 0).StartAsync();
        }
示例#2
0
        public void AnimateFocus()
        {
            DateContainer.Fade(duration: _animationDuration + 300, value: 1, delay: 50).StartAsync();
            TopLine.Fade(duration: _animationDuration + 300, value: 1, delay: 50).StartAsync();
            SummaryContainer.Fade(duration: _animationDuration + 300, value: 1, delay: 50).StartAsync();
            LikesContainer.Fade(duration: _animationDuration + 300, value: 1, delay: 50).StartAsync();
            ImageContainer.Scale(duration: _animationDuration,
                                 centerX: (float)ImageContainer.Width / 2,
                                 centerY: (float)ImageContainer.Height / 2,
                                 scaleX: 1.2f,
                                 scaleY: 1.2f).StartAsync();

            TitleLine.Scale(duration: _animationDuration, scaleX: 1f, scaleY: 1f)
            .Offset(duration: _animationDuration)
            .Fade(1f, duration: _animationDuration)
            .StartAsync();
            this.Fade(1, duration: _animationDuration).Start();
        }
示例#3
0
        public void AnimateFocusLost()
        {
            DateContainer.Fade(duration: _animationDuration).StartAsync();
            TopLine.Fade(duration: _animationDuration).StartAsync();
            SummaryContainer.Fade(duration: _animationDuration).StartAsync();
            LikesContainer.Fade(duration: _animationDuration).StartAsync();
            ImageContainer.Scale(duration: _animationDuration,
                                 centerX: (float)ImageContainer.Width / 2,
                                 centerY: (float)ImageContainer.Height / 2,
                                 scaleX: 0.6f,
                                 scaleY: 0.6f).StartAsync();

            TitleLine.Scale(duration: _animationDuration, scaleX: 0.6f, scaleY: 0.6f)
            .Offset(offsetX: -30,
                    offsetY: 35,
                    duration: _animationDuration)
            .Fade(0.7f, duration: _animationDuration)
            .StartAsync();
            this.Fade(0.7f, duration: _animationDuration).Start();
        }
示例#4
0
        //private static void TesteArrayRealoc(int objectCount, int alocStep) {
        //	var array = new DateTime[alocStep];

        //	DateTime now = DateTime.Now;

        //	int arrayIndex = 0;
        //	int arrayLength = array.Length;
        //	for (int i = 0; i < objectCount; i++) {
        //		array[arrayIndex] = now.AddSeconds(i);

        //		if (arrayIndex + 1 == arrayLength) {
        //			var newArray = new DateTime[arrayLength + alocStep];
        //			Array.Copy(array, newArray, arrayLength);

        //			array = newArray;
        //			arrayLength = array.Length;
        //		}

        //		arrayIndex++;
        //	}
        //}

        //private static void TesteArrayResize(int objectCount, int alocStep) {
        //	var array = new DateTime[alocStep];

        //	DateTime now = DateTime.Now;

        //	int arrayIndex = 0;
        //	int arrayLength = array.Length;
        //	for (int i = 0; i < objectCount; i++) {
        //		array[arrayIndex] = now.AddSeconds(i);

        //		if (arrayIndex + 1 == arrayLength) {
        //			//var newArray = new DateTime[arrayLength + alocStep];
        //			Array.Resize(ref array, arrayLength + alocStep);
        //			arrayLength = array.Length;
        //		}

        //		arrayIndex++;
        //	}
        //}

        private static List <DateContainer[]> TesteListArray(int objectCount, int alocStep)
        {
            var array      = new DateContainer[alocStep];
            var listArrays = new List <DateContainer[]>(10000);

            //var x =MemoryMappedFile.CreateNew("teste", 2 * 1000 * 1000 * 1000);
            //x.CreateViewAccessor().


            //https://www.infoq.com/articles/Big-Memory-Part-2
            //https://github.com/aumcode/nfx/tree/master/Source/NFX/ApplicationModel/Pile

            DateTime now      = DateTime.Now;
            decimal  decValue = 123.45m;

            int arrayIndex  = 0;
            int arrayLength = array.Length;

            for (int i = 0; i < objectCount; i++)
            {
                array[arrayIndex] = new DateContainer(now.AddSeconds(i), now.AddSeconds(i + 1), decValue + i, i);

                if (arrayIndex + 1 == arrayLength)
                {
                    listArrays.Add(array);
                    array      = new DateContainer[alocStep];
                    arrayIndex = 0;
                }
                else
                {
                    arrayIndex++;
                }
            }

            return(listArrays);
        }
        void ReleaseDesignerOutlets()
        {
            if (ScrollView != null)
            {
                ScrollView.Dispose();
                ScrollView = null;
            }

            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

            if (DateContainer != null)
            {
                DateContainer.Dispose();
                DateContainer = null;
            }

            if (DateLbl != null)
            {
                DateLbl.Dispose();
                DateLbl = null;
            }

            if (DatePicker != null)
            {
                DatePicker.Dispose();
                DatePicker = null;
            }

            if (DatepickerStackView != null)
            {
                DatepickerStackView.Dispose();
                DatepickerStackView = null;
            }

            if (InfoButton != null)
            {
                InfoButton.Dispose();
                InfoButton = null;
            }

            if (NextBtn != null)
            {
                NextBtn.Dispose();
                NextBtn = null;
            }

            if (NoBtn != null)
            {
                NoBtn.Dispose();
                NoBtn = null;
            }

            if (NoLargeBtn != null)
            {
                NoLargeBtn.Dispose();
                NoLargeBtn = null;
            }

            if (NoLbl != null)
            {
                NoLbl.Dispose();
                NoLbl = null;
            }

            if (SkipBtn != null)
            {
                SkipBtn.Dispose();
                SkipBtn = null;
            }

            if (SkipLargeBtn != null)
            {
                SkipLargeBtn.Dispose();
                SkipLargeBtn = null;
            }

            if (SkipLbl != null)
            {
                SkipLbl.Dispose();
                SkipLbl = null;
            }

            if (SubtitleLbl != null)
            {
                SubtitleLbl.Dispose();
                SubtitleLbl = null;
            }

            if (TitleLbl != null)
            {
                TitleLbl.Dispose();
                TitleLbl = null;
            }

            if (YesButBtn != null)
            {
                YesButBtn.Dispose();
                YesButBtn = null;
            }

            if (YesButLargeBtn != null)
            {
                YesButLargeBtn.Dispose();
                YesButLargeBtn = null;
            }

            if (YesButLbl != null)
            {
                YesButLbl.Dispose();
                YesButLbl = null;
            }

            if (YesLbl != null)
            {
                YesLbl.Dispose();
                YesLbl = null;
            }

            if (YesSinceBtn != null)
            {
                YesSinceBtn.Dispose();
                YesSinceBtn = null;
            }

            if (YesSinceLargeBtn != null)
            {
                YesSinceLargeBtn.Dispose();
                YesSinceLargeBtn = null;
            }
        }