/// <summary> /// Add auto scaling group click event handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddASG_Click(object sender, RoutedEventArgs e) { if (this.vm.IsVpc && this.vm.SelectedVpc == null) { MessageBox.Show("Currently there is no VPC selected. Please select a VPC and then try again.", "No Selected VPC", MessageBoxButton.OK, MessageBoxImage.Information); return; } Window win = new AsgWindow((ViewModel)this.DataContext, false); win.Owner = Window.GetWindow(this); ((AsgWindow)win).AsgAdded += new EventHandler(asgitem_added); win.ShowDialog(); }
/// <summary> /// Event handler for "Update Auto Scaling Group" context menu click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuUpdateAsg(object sender, RoutedEventArgs e) { Window win = new AsgWindow((ViewModel)this.DataContext, true); win.Owner = Window.GetWindow(this); ((AsgWindow)win).AsgUpdated += new EventHandler(asgitem_updated); win.ShowDialog(); }