public override void ViewDidLoad() { base.ViewDidLoad(); View.BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile("ConverterBackground.png")); CSC_Label.Text = "Computer Science" + Environment.NewLine + "Converter"; TwosComplamentSwitch.On = false; // Perform any additional setup after loading the view, typically from a nib. toolbar = new UIToolbar(new CoreGraphics.CGRect(new nfloat(0.0f), new nfloat(0.0f), this.View.Frame.Size.Width, new nfloat(44.0f))); toolbar.TintColor = UIColor.White; toolbar.BarStyle = UIBarStyle.Black; toolbar.Translucent = true; var myButton = new UIBarButtonItem("Hex:", UIBarButtonItemStyle.Bordered, AddTLD); toolbar.Items = new UIBarButtonItem[] { myButton, new UIBarButtonItem("A", UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem("B", UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem("C", UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem("D", UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem("E", UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem("F", UIBarButtonItemStyle.Plain, AddTLD), new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate { this.Hex_TextBox.ResignFirstResponder(); }) }; Hex_TextBox.KeyboardAppearance = UIKeyboardAppearance.Default; Hex_TextBox.InputAccessoryView = toolbar; //************************************************************** generic = new UIToolbar(new CoreGraphics.CGRect(new nfloat(0.0f), new nfloat(0.0f), this.View.Frame.Size.Width, new nfloat(44.0f))); generic.TintColor = UIColor.White; generic.BarStyle = UIBarStyle.Black; generic.Translucent = true; var myButtong = new UIBarButtonItem("Binary: ", UIBarButtonItemStyle.Bordered, AddNull); generic.Items = new UIBarButtonItem[] { myButtong, new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate { Binary_TextBox.ResignFirstResponder(); }) }; Binary_TextBox.KeyboardAppearance = UIKeyboardAppearance.Default; Binary_TextBox.InputAccessoryView = generic; //************************************************************** generic2 = new UIToolbar(new CoreGraphics.CGRect(new nfloat(0.0f), new nfloat(0.0f), this.View.Frame.Size.Width, new nfloat(44.0f))); generic2.TintColor = UIColor.White; generic2.BarStyle = UIBarStyle.Black; generic2.Translucent = true; var myButtong2 = new UIBarButtonItem("Decimal: ", UIBarButtonItemStyle.Bordered, AddNull); generic2.Items = new UIBarButtonItem[] { myButtong2, new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate { Decimal_TextBox.ResignFirstResponder(); }) }; Decimal_TextBox.KeyboardAppearance = UIKeyboardAppearance.Default; Decimal_TextBox.InputAccessoryView = generic2; //************************************************************** generic3 = new UIToolbar(new CoreGraphics.CGRect(new nfloat(0.0f), new nfloat(0.0f), this.View.Frame.Size.Width, new nfloat(44.0f))); generic3.TintColor = UIColor.White; generic3.BarStyle = UIBarStyle.Black; generic3.Translucent = true; var myButtong3 = new UIBarButtonItem("Octal: ", UIBarButtonItemStyle.Bordered, AddNull); generic3.Items = new UIBarButtonItem[] { myButtong3, new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate { Octal_TextBox.ResignFirstResponder(); }) }; Octal_TextBox.KeyboardAppearance = UIKeyboardAppearance.Default; Octal_TextBox.InputAccessoryView = generic3; }
void ReleaseDesignerOutlets() { if (Binary_Label != null) { Binary_Label.Dispose(); Binary_Label = null; } if (Binary_TextBox != null) { Binary_TextBox.Dispose(); Binary_TextBox = null; } if (Clear_Button != null) { Clear_Button.Dispose(); Clear_Button = null; } if (Converter != null) { Converter.Dispose(); Converter = null; } if (CSC_Label != null) { CSC_Label.Dispose(); CSC_Label = null; } if (Decimal_Label != null) { Decimal_Label.Dispose(); Decimal_Label = null; } if (Decimal_TextBox != null) { Decimal_TextBox.Dispose(); Decimal_TextBox = null; } if (Hex_TextBox != null) { Hex_TextBox.Dispose(); Hex_TextBox = null; } if (Hexadecimal_label != null) { Hexadecimal_label.Dispose(); Hexadecimal_label = null; } if (Octal_Label != null) { Octal_Label.Dispose(); Octal_Label = null; } if (Octal_TextBox != null) { Octal_TextBox.Dispose(); Octal_TextBox = null; } if (TwosComplamentLabel != null) { TwosComplamentLabel.Dispose(); TwosComplamentLabel = null; } if (TwosComplamentSwitch != null) { TwosComplamentSwitch.Dispose(); TwosComplamentSwitch = null; } }