コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            CS_Label.Text        = "Computer Science" + Environment.NewLine + "Converter";
            View.BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile("ConverterBackground.png"));


            //Input1, and Input2  share the same toolbar
            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;
            toolbar.Items       = new UIBarButtonItem[] {
                new UIBarButtonItem("Bitwise:", UIBarButtonItemStyle.Bordered, AddTLD),
                new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace),
                new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate
                {
                    this.InputTextbox1.ResignFirstResponder();
                    InputTextbox2.ResignFirstResponder();
                })
            };
            InputTextbox1.KeyboardAppearance = UIKeyboardAppearance.Default;
            InputTextbox1.InputAccessoryView = toolbar;
            InputTextbox2.KeyboardAppearance = UIKeyboardAppearance.Default;
            InputTextbox2.InputAccessoryView = toolbar;
        }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (BitView != null)
            {
                BitView.Dispose();
                BitView = null;
            }

            if (ClearButton != null)
            {
                ClearButton.Dispose();
                ClearButton = null;
            }

            if (CS_Label != null)
            {
                CS_Label.Dispose();
                CS_Label = null;
            }

            if (Input1Binary != null)
            {
                Input1Binary.Dispose();
                Input1Binary = null;
            }

            if (Input2Binary != null)
            {
                Input2Binary.Dispose();
                Input2Binary = null;
            }

            if (InputLabel1 != null)
            {
                InputLabel1.Dispose();
                InputLabel1 = null;
            }

            if (InputNumber2 != null)
            {
                InputNumber2.Dispose();
                InputNumber2 = null;
            }

            if (InputTextbox1 != null)
            {
                InputTextbox1.Dispose();
                InputTextbox1 = null;
            }

            if (InputTextbox2 != null)
            {
                InputTextbox2.Dispose();
                InputTextbox2 = null;
            }

            if (Results != null)
            {
                Results.Dispose();
                Results = null;
            }

            if (ResultsTextbox != null)
            {
                ResultsTextbox.Dispose();
                ResultsTextbox = null;
            }

            if (SegementedControl != null)
            {
                SegementedControl.Dispose();
                SegementedControl = null;
            }

            if (TypeLabel != null)
            {
                TypeLabel.Dispose();
                TypeLabel = null;
            }
        }