Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
        private void LockControls(bool disable)
        {
            StateControlledTextbox[] textboxes = new StateControlledTextbox[]
            {
                labeled_first_name.Component,
                labeled_last_name.Component,
                labeled_dob.Component,
                labeled_home_address.Component,
                labeled_citation_street_address.Component,
                labeled_citation_city.Component,
                labeled_vehicle_color.Component,
                labeled_vehicle_model.Component,
                labeled_vehicle_tag.Component,
            };

            if (disable)
            {
                foreach (var textbox in textboxes)
                {
                    textbox.Disable();
                }
                labeled_vehicle_type.Component.Disable();
                labeled_available_citation_reasons.Component.Disable();
                labeled_citation_details.Component.Disable();
            }
            else
            {
                foreach (var textbox in textboxes)
                {
                    textbox.Enable();
                }
                labeled_vehicle_type.Component.Enable();
                labeled_available_citation_reasons.Component.Enable();
                labeled_citation_details.Component.Enable();
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
 internal static void SmallSize(this StateControlledTextbox textbox)
 {
     textbox.SetSize(84, 21);
 }
Ejemplo n.º 5
0
 internal static void MediumSize(this StateControlledTextbox textbox)
 {
     textbox.SetSize(125, 21);
 }
Ejemplo n.º 6
0
 internal static void LongSize(this StateControlledTextbox textbox)
 {
     textbox.SetSize(332, 21);
 }
Ejemplo n.º 7
0
 internal static void NormalSize(this StateControlledTextbox textbox)
 {
     textbox.SetSize(166, 21);
 }
Ejemplo n.º 8
0
        private void InitializeLayout()
        {
            cb_action = new ComboBox(this);
            cb_action.AddItem("Select One", "PlaceHolder", QuickActions.PLACEHOLDER);
            cb_action.AddItem("Create Arrest Report", "ArrestReport", QuickActions.CREATE_ARREST_REPORT);
            if (this.Entity.Ped.LastVehicle != null) //Not using the implicit bool operator for Vehicle because we dont care if it is "valid" any more, we only care that they "had" a vehicle
            {
                cb_action.AddItem("Create Traffic Citation", "TrafficCitation", QuickActions.CREATE_TRAFFIC_CITATION);
            }
            cb_action.ItemSelected += ActionComboBoxItemSelected;
            cb_action.SetSize(200, cb_action.Height);

            lbl_first_name = new Label(this)
            {
                Text = "First Name"
            };
            text_first_name = new StateControlledTextbox(this)
            {
                IsDisabled = true
            };

            lbl_last_name = new Label(this)
            {
                Text = "Last Name"
            };
            text_last_name = new StateControlledTextbox(this)
            {
                IsDisabled = true
            };

            lbl_age = new Label(this)
            {
                Text = "Age"
            };
            text_age = new StateControlledTextbox(this)
            {
                IsDisabled = true
            };

            lbl_home_address = new Label(this)
            {
                Text = "Home Address"
            };
            text_home_address = new StateControlledTextbox(this)
            {
                IsDisabled = true
            };

            lbl_dob = new Label(this)
            {
                Text = "DOB"
            };
            text_dob = new StateControlledTextbox(this)
            {
                IsDisabled = true
            };

            //Gwen.Align.PlaceRightBottom(text_dob, text_home_address, Configs.BaseFormControlSpacing);

            lbl_license_status = new Label(this)
            {
                Text = "License Status"
            };
            text_license_status = new StateControlledTextbox(this)
            {
                IsDisabled = true
            };


            lbl_wanted_status = new Label(this)
            {
                Text = "Wanted Status"
            };
            text_wanted_status = new StateControlledTextbox(this)
            {
                IsDisabled = true
            };

            lbl_times_stopped = new Label(this)
            {
                Text = "Times Stopped"
            };
            text_times_stopped = new StateControlledTextbox(this)
            {
                IsDisabled = true
            };

            ped_image_holder                      = new ImagePanel(this);
            ped_image_holder.ImageName            = Function.DetermineImagePath(Entity.Ped);
            ped_image_holder.ShouldCacheToTexture = true;
        }