void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.contentControl = ((ZooSimulation.CageControl)(target)); return; case 2: this.grid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.grid1 = ((System.Windows.Controls.Grid)(target)); return; case 4: this.MyCanvas = ((System.Windows.Controls.Canvas)(target)); return; case 5: this.minusbtn = ((System.Windows.Controls.Button)(target)); #line 28 "..\..\..\CageControl.xaml" this.minusbtn.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 6: this.addbtn = ((System.Windows.Controls.Button)(target)); #line 33 "..\..\..\CageControl.xaml" this.addbtn.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; } this._contentLoaded = true; }
private static void UpdateCageWithSetVals(CageControl cage) { int i = 0; while (cage.CageControlModel != null && i < cage.CageControlModel.AnimalCount) { Animal t = cage.CageControlModel.GetAnimal(); AnimalFactory.Setup(t,i); cage.MyCanvas.Children.Add(t); i++; } }
private static void SetupCageWithDefaults(CageControl cage) { var animal = cage.CageControlModel.Animal; int i = 0; while (cage.CageControlModel != null && i < cage.CageControlModel.Animal.PreferedCageMates) { Animal t = cage.CageControlModel.GetAnimal(); AnimalFactory.Setup(t,i); cage.CageControlModel.AnimalCount++; cage.MyCanvas.Children.Add(t); i++; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.contentControl = ((ZooSimulation.CageControl)(target)); #line 2 "..\..\..\..\Views\CageControl.xaml" this.contentControl.Loaded += new System.Windows.RoutedEventHandler(this.CageControl_Loaded); #line default #line hidden return; case 2: this.mywrappercanvas = ((System.Windows.Controls.Canvas)(target)); return; case 3: this.grid = ((System.Windows.Controls.Grid)(target)); return; case 4: this.grid1 = ((System.Windows.Controls.Grid)(target)); return; case 5: this.MyCanvas = ((System.Windows.Controls.Canvas)(target)); return; case 6: this.actionsmenu = ((System.Windows.Controls.Grid)(target)); return; } this._contentLoaded = true; }