コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: FurC0de/Foxon
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.Width = 0;
            this.BeginAnimation(Window.WidthProperty, Animations.logChangeSize);
            this.BeginAnimation(Window.OpacityProperty, Animations.sFadeinAnimation);

            Aero.AutoApply(this);

            lL.Opacity          = 0;
            pL.Opacity          = 0;
            G.Opacity           = 0;
            LogLabel.Opacity    = 0;
            loginAnimation      = new DoubleAnimation();
            loginAnimation.From = 0;
            loginAnimation.To   = 1;
            loginAnimation.AccelerationRatio = 0.5;
            loginAnimation.DecelerationRatio = 0.5;
            loginAnimation.Duration          = TimeSpan.FromSeconds(1);
            loginAnimation.Completed        += LoginAnimation_Completed;
            G.BeginAnimation(Rectangle.OpacityProperty, loginAnimation);
            lB.BeginAnimation(TextBox.OpacityProperty, loginAnimation);
            pB.BeginAnimation(PasswordBox.OpacityProperty, loginAnimation);
        }
コード例 #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //TimerCallback tm = new TimerCallback(drawLoading);
            // создаем таймер
            //Timer timer = new Timer(drawLoading, null, 0, Int32.MaxValue);
            Aero.AutoApply(this);
            var sAnim = Animations.logChangeSize;

            sAnim.To   = 1000;
            this.Width = 0;
            this.BeginAnimation(Window.WidthProperty, sAnim);
            this.BeginAnimation(Window.OpacityProperty, Animations.sFadeinAnimation);

            UIMessage mtest1 = new UIMessage(AnswerGrid.Width - 160, 160, false);

            mainGrid.Children.Add(mtest1.Self);
            Grid.SetRow(mtest1.Self, 0);
            Grid.SetColumn(mtest1.Self, 0);
            mtest1.setText("Помню\r\nНе зря\r\nПятый день ноября\r\nИ заговор\r\nПороховой\r\n since \r\n 1487\r\n  487\r\n   87\r\n    7");

            UIMessage mtest2 = new UIMessage(AnswerGrid.Width - 160, 160, true);

            mainGrid.Children.Add(mtest2.Self);
            Grid.SetRow(mtest2.Self, 0);
            Grid.SetColumn(mtest2.Self, 0);
            mtest2.setText("3141\r\n5926\r\n3318\r\n1930\r\n5893\r\n3223");

            UIMessage mtest3 = new UIMessage(AnswerGrid.Width - 160, 160, false);

            mainGrid.Children.Add(mtest3.Self);
            Grid.SetRow(mtest3.Self, 0);
            Grid.SetColumn(mtest3.Self, 0);
            mtest3.setText("3141\r\n5926\r\n3318\r\n1930\r\n5893\r\n3223");

            mPositioner p = new mPositioner(mainGrid);

            p.addToList(mtest1);
            p.addToList(mtest2);
            p.addToList(mtest3);
            mainGrid.Height = p.messageCoordinatesCounter;

            /*
             * UIMessage mtest = new UIMessage();
             * mainGrid.Children.Add(mtest.Make(AnswerGrid.Width-160, 160));
             * Grid.SetRow(mtest.Self, 0);
             * Grid.SetColumn(mtest.Self, 0);
             * mtest.setText("3141\r\n5926\r\n3318\r\n1930\r\n5893\r\n3223");
             *
             * UIMessage mtest2 = new UIMessage();
             * mainGrid.Children.Add(mtest2.Make(AnswerGrid.Width - 160, AnswerGrid.ActualHeight));
             * Grid.SetRow(mtest2.Self, 0);
             * Grid.SetColumn(mtest2.Self, 0);
             * mtest2.setText("answernumber2\r\n fuckitfuckifuckitfuckitfuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit");
             *
             * UIMessage mtest3 = new UIMessage();
             * mainGrid.Children.Add(mtest3.Make(AnswerGrid.Width - 160, AnswerGrid.ActualHeight+400));
             * Grid.SetRow(mtest3.Self, 0);
             * Grid.SetColumn(mtest3.Self, 0);
             * mtest3.setText("answernumber3\r\n fuckitfuckifuckitfuckitfuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit\r\n fuckit");
             * mainGrid.Height = 1500;
             */
        }