public LoadingWindow(UIElement parent, ModuleName ctype, Action act_body, bool LoadOnlyDB) { _parent = parent; _ctype = ctype; _act_body = act_body; _LoadOnlyDB = LoadOnlyDB; InitializeComponent(); lblStatus.SetValue(System.Windows.Controls.Label.ContentProperty, "Retrieving data from database..."); ImageBrush myBrush = new ImageBrush(); myBrush.ImageSource = new BitmapImage(new Uri("pack://application:,,,/Resources/back.jpg", UriKind.Absolute)); //Window.GetWindow(Parent). this.Owner = UIExtensionMethods.GetWindowOwner(parent); this.Background = myBrush; pgBar.IsIndeterminate = false; pgBar.Maximum = 100; pgBar.Minimum = 0; }
public LoadingWindow(UIElement parent, ModuleName ctype, IList <int> Installations, Action afterAction) { _parent = parent; _ctype = ctype; _Installations = Installations; _afterAction = afterAction; InitializeComponent(); lblStatus.SetValue(System.Windows.Controls.Label.ContentProperty, "Current Meters"); ImageBrush myBrush = new ImageBrush(); myBrush.ImageSource = new BitmapImage(new Uri("pack://application:,,,/Resources/back.jpg", UriKind.Absolute)); //Window.GetWindow(Parent). this.Owner = UIExtensionMethods.GetWindowOwner(parent); this.Background = myBrush; pgBar.IsIndeterminate = false; pgBar.Maximum = Installations.Count; pgBar.Minimum = 0; SleepTime = Convert.ToInt32(BMC.Common.ConfigurationManagement.ConfigManager.Read("DBRefreshInterval")); }