Beispiel #1
0
        public override void InitializeLayout()
        {
            base.InitializeLayout();
            PopulatePartyTypeComboBox();
            tb_firstName = new StateControlledTextbox(this);
            tb_lastName  = new StateControlledTextbox(this);
            tb_dob       = new StateControlledTextbox(this);
            lb_additional_parties.Dock = Gwen.Pos.Right;

            tb_firstName.SetPosition(111, 94);
            tb_firstName.SetSize(166, 20);

            tb_lastName.SetPosition(111, 129);
            tb_lastName.SetSize(166, 20);

            tb_dob.SetPosition(111, 168);
            tb_dob.SetSize(100, 20);

            labels    = new Label[] { lbl_dob, lbl_first_name, lbl_last_name, lbl_party_type };
            textBoxes = new StateControlledTextbox[] { tb_dob, tb_firstName, tb_lastName };

            //lbl_error.SetPosition(94, 223);
            //lbl_error.SetSize((lb_additional_parties.X - (btn_addPartyToReport.X + btn_addPartyToReport.Width)) / 2, (this.Window.Height - (btn_addPartyToReport.Y + btn_addPartyToReport.Height)) / 2);

            btn_addPartyToReport.Clicked  += AddPartyToReportClicked;
            lb_additional_parties.Clicked += AdditionalPartyListItemClicked;
            PopulateListBoxFromReport();
        }
        public override void InitializeLayout()
        {
            base.InitializeLayout();
            this.Window.IsClosable = false;

            text_arrestee_first_name = new StateControlledTextbox(this);
            text_arrestee_first_name.SetSize(166, 21);
            text_arrestee_first_name.SetPosition(25, 65);
            text_arrestee_first_name.TextChanged += TextInputChanged;

            text_arrestee_last_name = new StateControlledTextbox(this);
            text_arrestee_last_name.SetSize(166, 21);
            text_arrestee_last_name.SetPosition(215, 65);
            text_arrestee_last_name.TextChanged += TextInputChanged;

            text_arrestee_dob = new StateControlledTextbox(this);
            text_arrestee_dob.SetSize(100, 21);
            text_arrestee_dob.SetPosition(405, 65);
            text_arrestee_dob.TextChanged += TextInputChanged;

            text_arrestee_home_address = new StateControlledTextbox(this);
            text_arrestee_home_address.SetSize(355, 21);
            text_arrestee_home_address.SetPosition(25, 150);
            text_arrestee_home_address.TextChanged += TextInputChanged;



            text_arrest_street = new StateControlledTextbox(this);
            text_arrest_street.SetSize(355, 21);
            text_arrest_street.SetPosition(22, 273);
            text_arrest_street.TextChanged += TextInputChanged;

            text_arrest_city = new StateControlledTextbox(this);
            text_arrest_city.SetSize(166, 21);
            text_arrest_city.SetPosition(25, 325);
            text_arrest_city.TextChanged += TextInputChanged;

            text_arrest_time = new StateControlledTextbox(this);
            text_arrest_time.SetSize(100, 21);
            text_arrest_time.SetPosition(405, 316);
            text_arrest_time.TextChanged += TextInputChanged;

            text_arrest_date = new StateControlledTextbox(this);
            text_arrest_date.SetSize(100, 21);
            text_arrest_date.SetPosition(405, 274);
            text_arrest_date.TextChanged += TextInputChanged;

            labelsWithState    = new Label[] { lbl_dob, lbl_first_name, lbl_last_name };
            textboxesWithState = new StateControlledTextbox[] { text_arrestee_dob, text_arrestee_first_name, text_arrestee_last_name };

            btn_auto_location.LocationIcon();
            btn_auto_location.Clicked += ButtonClicked;

            //lbl_error = new RichLabel(this);
            //lbl_error.SetPosition(text_arrestee_dob.X + text_arrestee_dob.Width + 10f, text_arrestee_dob.Y);
            //lbl_error.SetSize(((this.Window.Width - (text_arrestee_dob.X + text_arrestee_dob.Width)) / 2) + 50, ((this.Window.Height - (text_arrestee_dob.Y + text_arrestee_dob.Height)) / 2) + 50);

            PopulateInputs(Report);
            LockControls();
            if (Report.ReadOnly)
            {
                LockPedDetails(true);
            }
        }
 internal static void SmallSize(this StateControlledTextbox textbox)
 {
     textbox.SetSize(84, 21);
 }
 internal static void MediumSize(this StateControlledTextbox textbox)
 {
     textbox.SetSize(125, 21);
 }
 internal static void LongSize(this StateControlledTextbox textbox)
 {
     textbox.SetSize(332, 21);
 }
 internal static void NormalSize(this StateControlledTextbox textbox)
 {
     textbox.SetSize(166, 21);
 }