private void Login() { // login animation while loading data *** nacitani animace behem toho co se nacitaji data DoubleAnimation da = new DoubleAnimation(360, 0, new Duration(TimeSpan.FromSeconds(7))); DoubleAnimation fade = new DoubleAnimation(1, new Duration(TimeSpan.FromSeconds(1))); RotateTransform rt = new RotateTransform(); loadingImage.Visibility = Visibility.Visible; pointerImage.Visibility = Visibility.Visible; loadingImage.RenderTransform = rt; loadingImage.RenderTransformOrigin = new Point(0.5, 0.5); da.From = 0; da.To = 737; da.AccelerationRatio = 0.19; da.DecelerationRatio = 0.79; da.Completed += new EventHandler(Wait); rt.BeginAnimation(RotateTransform.AngleProperty, da); loadingImage.BeginAnimation(Image.OpacityProperty, fade); pointerImage.BeginAnimation(Image.OpacityProperty, fade); backGroundImageBrush.ImageSource = new BitmapImage(new Uri(System.IO.Path.Combine(currentDir, "Images/worldBackgroundBlur.jpg"))); load = new LoadingData(filename, ID); window = new Window1(this); window.WindowStartupLocation = WindowStartupLocation.CenterScreen; }
public listViewGridView(Window1 window, LoadingData load) { window.InitializeComponent(); items = load.items; users = load.users; events = load.events; window.listViewStocks.ItemsSource = load.items; List <Stocks> itemsPortfolio = new List <Stocks>(); foreach (var item in items) { if (item.Holding > 0) { itemsPortfolio.Add(item); } } window.listViewPortfolio.ItemsSource = itemsPortfolio; }