示例#1
0
        public Control MakeAccountCodePanel()
        {
            if( ! VmAccountData.Default.HasAccount() ) return null;
            if( ! VmProperties.Default.ShouldShowAccountCode() ) return null;

            Color darkishGray = Color.FromArgb(82,82,82);
            Color borderColor = darkishGray;
            String value = VmAccountData.Default.Account.Code.ToUpper();
            JwTopBottomLayout p = new JwTopBottomLayout();

            Font font = new System.Drawing.Font("Arial", 12f, System.Drawing.FontStyle.Bold);
            JwLabel label = VmUiUtility.MakeLabel(font, value);
            label.AlignCenter();

            label.ForeColor = Color.White;
            p.BottomControl = label;

            JwMargin margin = new JwMargin(2, 2, 0, 0);
            JwEmptyBorder emptyBorder = new JwEmptyBorder(p, margin);

            JwSolidBorder border = new JwSolidBorder(
                emptyBorder,
                1,
                borderColor);
            border.BackColor = VmUiConstants.ORANGISH_BACK_COLOR;
            return border;
        }
示例#2
0
        public Control CreateInfoPanel()
        {
            // kludge (err) - language
            // many times...

            JwVerticalLayout l = new JwVerticalLayout();
            l.AutoScroll = true;
            l.Gap = 1;
            _versionLabel           = AddLabeledLabelControl(l, "Version");
            _accountCodeLabel       = AddLabeledLabelControl(l, "Account Code");
            _userNameLabel          = AddLabeledLabelControl(l, "User Name");
            _airportCodeLabel       = AddLabeledLabelControl(l, "Airport Code");
            _airportProfile         = AddLabeledLabelControl(l, "Airport Profile");
            _lastTransmitDuration   = AddLabeledLabelControl(l, "Time Since Last Transmit");
            _deviceNameLabel        = AddLabeledLabelControl(l, "Device Name");

            JwSolidBorder sb = new JwSolidBorder( l, 1, Color.Black);

            JwMargin m = new JwMargin();
            m.Top = 5;
            m.Bottom = 5;
            JwEmptyBorder eb = new JwEmptyBorder(sb, m);
            return eb;
        }
示例#3
0
 public void SetMargin(JwMargin m)
 {
     _margin = m;
 }
示例#4
0
        public Control CreateBottomControl()
        {
            JwButton b =
                VmUiBuilder.MakeButton(
                    VmLanguage.Default.GetOk(),
                    new System.EventHandler(OkClicked));
            b.SetPreferredSize( new Size(0,VmUiUtility.ScaleToResolution(VmUiBuilder.GetButtonHeight() + 5)));

            JwMargin m = new JwMargin();
            m.Bottom = VmUiUtility.ScaleToResolution(5);
            JwEmptyBorder eb = new JwEmptyBorder(b, m);
            return eb;
        }
示例#5
0
 public JwEmptyBorder(Control e, JwMargin m)
 {
     SetMargin(m);
     Add(e);
 }