コード例 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory + "UserImage.bmp"))
            {
                TX.Background = new ImageBrush(new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "UserImage.bmp", UriKind.Absolute)));
            }
            NM.Text = Settings.Default.RobotName;
            DoubleAnimation da = new DoubleAnimation(0.2, 1, TimeSpan.FromSeconds(1));

            da.AutoReverse    = true;
            da.RepeatBehavior = RepeatBehavior.Forever;
            Js.BeginAnimation(OpacityProperty, da);
            Rect bounds = Properties.Settings.Default.Hatop;

            Top  = bounds.Top;
            Left = bounds.Left;
        }