public override void ViewDidLoad() { base.ViewDidLoad(); CS_Label.Text = "Computer Science" + Environment.NewLine + "Converter"; View.BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile("ConverterBackground.png")); Subnetting_Slider.On = false; Enable_Conversions(); IPaddressToolbarItem = new UIToolbar(new CoreGraphics.CGRect(new nfloat(0.0f), new nfloat(0.0f), this.View.Frame.Size.Width, new nfloat(44.0f))); IPaddressToolbarItem.TintColor = UIColor.White; IPaddressToolbarItem.BarStyle = UIBarStyle.Black; IPaddressToolbarItem.Translucent = true; var myButton = new UIBarButtonItem("IP Address:", UIBarButtonItemStyle.Bordered, AddTLD); IPaddressToolbarItem.Items = new UIBarButtonItem[] { myButton, new UIBarButtonItem(".", UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem(space_bar.ToString(), UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem(":", UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate { this.IPAddress_TextBox.ResignFirstResponder(); }) }; IPAddress_TextBox.KeyboardAppearance = UIKeyboardAppearance.Default; IPAddress_TextBox.InputAccessoryView = IPaddressToolbarItem; //******Subnet IPAddress subnettingToolbarItem = new UIToolbar(new CoreGraphics.CGRect(new nfloat(0.0f), new nfloat(0.0f), this.View.Frame.Size.Width, new nfloat(44.0f))); subnettingToolbarItem.TintColor = UIColor.White; subnettingToolbarItem.BarStyle = UIBarStyle.Black; subnettingToolbarItem.Translucent = true; var myButton2 = new UIBarButtonItem("IP Address:", UIBarButtonItemStyle.Bordered, AddTLD2); subnettingToolbarItem.Items = new UIBarButtonItem[] { myButton2, new UIBarButtonItem(".", UIBarButtonItemStyle.Plain, AddTLD2), new UIBarButtonItem(space_bar.ToString(), UIBarButtonItemStyle.Plain, AddTLD2), new UIBarButtonItem(":", UIBarButtonItemStyle.Plain, AddTLD2), new UIBarButtonItem("/", UIBarButtonItemStyle.Plain, AddTLD2), new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate { this.Subnet_TextBox.ResignFirstResponder(); }) }; Subnet_TextBox.KeyboardAppearance = UIKeyboardAppearance.Default; Subnet_TextBox.InputAccessoryView = subnettingToolbarItem; //********Subnet Mask subnetMaskToolbarItem = new UIToolbar(new CoreGraphics.CGRect(new nfloat(0.0f), new nfloat(0.0f), this.View.Frame.Size.Width, new nfloat(44.0f))); subnetMaskToolbarItem.TintColor = UIColor.White; subnetMaskToolbarItem.BarStyle = UIBarStyle.Black; subnetMaskToolbarItem.Translucent = true; var myButton3 = new UIBarButtonItem("IP Address:", UIBarButtonItemStyle.Bordered, AddTLD3); subnetMaskToolbarItem.Items = new UIBarButtonItem[] { myButton3, new UIBarButtonItem(".", UIBarButtonItemStyle.Plain, AddTLD3), new UIBarButtonItem(space_bar.ToString(), UIBarButtonItemStyle.Plain, AddTLD3), new UIBarButtonItem(":", UIBarButtonItemStyle.Plain, AddTLD3), new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate { this.SubnetMask_TextBox.ResignFirstResponder(); }) }; SubnetMask_TextBox.KeyboardAppearance = UIKeyboardAppearance.Default; SubnetMask_TextBox.InputAccessoryView = subnetMaskToolbarItem; //********Number numberTootlbarItem = new UIToolbar(new CoreGraphics.CGRect(new nfloat(0.0f), new nfloat(0.0f), this.View.Frame.Size.Width, new nfloat(44.0f))); numberTootlbarItem.TintColor = UIColor.White; numberTootlbarItem.BarStyle = UIBarStyle.Black; numberTootlbarItem.Translucent = true; var myButton4 = new UIBarButtonItem("IP Address:", UIBarButtonItemStyle.Bordered, AddTLDNull); numberTootlbarItem.Items = new UIBarButtonItem[] { myButton4, new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate { NumberOfSubnetsTextbox.ResignFirstResponder(); }) }; NumberOfSubnetsTextbox.KeyboardAppearance = UIKeyboardAppearance.Default; NumberOfSubnetsTextbox.InputAccessoryView = numberTootlbarItem; }
void ReleaseDesignerOutlets() { if (ClearText_Button != null) { ClearText_Button.Dispose(); ClearText_Button = null; } if (CS_Label != null) { CS_Label.Dispose(); CS_Label = null; } if (IPAddress_Label != null) { IPAddress_Label.Dispose(); IPAddress_Label = null; } if (IPAddress_TextBox != null) { IPAddress_TextBox.Dispose(); IPAddress_TextBox = null; } if (IPView != null) { IPView.Dispose(); IPView = null; } if (NumberOfSubnetsTextbox != null) { NumberOfSubnetsTextbox.Dispose(); NumberOfSubnetsTextbox = null; } if (NumberSubnetsLabel != null) { NumberSubnetsLabel.Dispose(); NumberSubnetsLabel = null; } if (Results_Label != null) { Results_Label.Dispose(); Results_Label = null; } if (Results_TextBox != null) { Results_TextBox.Dispose(); Results_TextBox = null; } if (Subnet_TextBox != null) { Subnet_TextBox.Dispose(); Subnet_TextBox = null; } if (SubnetMask_Label != null) { SubnetMask_Label.Dispose(); SubnetMask_Label = null; } if (SubnetMask_TextBox != null) { SubnetMask_TextBox.Dispose(); SubnetMask_TextBox = null; } if (Subnetting_Label != null) { Subnetting_Label.Dispose(); Subnetting_Label = null; } if (Subnetting_Slider != null) { Subnetting_Slider.Dispose(); Subnetting_Slider = null; } if (SubnettingResultsLabel != null) { SubnettingResultsLabel.Dispose(); SubnettingResultsLabel = null; } if (SubnettingResultsView != null) { SubnettingResultsView.Dispose(); SubnettingResultsView = null; } if (SubnettingView != null) { SubnettingView.Dispose(); SubnettingView = null; } }