public override void InitializeLayout() { base.InitializeLayout(); if (Report.IsNew) { ShowLabels(); ShowButtons(); chargesTree = new TreeControl(this); chargesTree.SelectionChanged += TreeNodeSelected; chargesTree.SetSize(314, 307); chargesTree.SetPosition(12, 72); chargesTree.Dock = Gwen.Pos.Left; chargesTree.Margin = new Gwen.Margin(0, 30, 0, 0); lb_charges.Dock = Gwen.Pos.Right; lb_charges.Margin = new Gwen.Margin(0, 30, 0, 100); tb_notes = new LabeledComponent <StateControlledMultilineTextbox>(this, "Notes for Charge", new StateControlledMultilineTextbox(this), RelationalPosition.TOP, RelationalSize.NONE, Configs.BaseFormControlSpacingHalf, lbl_addedCharges.Font, lbl_addedCharges.TextColor); tb_notes.Component.ForceWordWrap = false; tb_notes.Component.SetSize((lb_charges.X - chargesTree.Right), 250); tb_notes.Component.AlignTopWith(lb_charges); tb_notes.PlaceRightOf(chargesTree, 5).AlignTopWith(lbl_addedCharges); tb_notes.Component.TextChanged += OnTextChanged; lbl_addedCharges.SetPosition((lb_charges.X + 30), lbl_addedCharges.Y); btnAddCharge.AddIcon(); btnAddCharge.Disable(); btnRemoveSelectedCharge.Disable(); PopulateChargesTree(Globals.ChargeDefinitions); btnAddCharge.Clicked += ButtonClicked; btnRemoveSelectedCharge.Clicked += ButtonClicked; btnRemoveSelectedCharge.DeleteIcon(); btnRemoveSelectedCharge.SetPosition(lb_charges.X + btnRemoveSelectedCharge.Width / 2 + 10, (lb_charges.Y + lb_charges.Height) + btnRemoveSelectedCharge.Height / 2 + 50); } else { HideButtons(); HideLabels(); AddReportCharges(); lb_charges.Dock = Gwen.Pos.Right; if (Report.Charges.Count > 0) { lb_charges.SelectRow(0, true); SetNotesByCharge(Report.Charges[0]); } } LockControls(); }
private void InitializeLayout() { Function.LogDebug("InitializeLayout ComputerPedView"); labelFont = this.Skin.DefaultFont.Copy(); labelFont.Size = 14; labelFont.Smooth = true; cb_action = new ComboBox(this); pedInformation = new FormSection(this, "Person Information"); pedContent = new Base(this); text_first_name = LabeledComponent.StatefulTextbox(pedContent, "First Name", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); text_last_name = LabeledComponent.StatefulTextbox(pedContent, "Last Name", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); text_age = LabeledComponent.StatefulTextbox(pedContent, "Age", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); text_home_address = LabeledComponent.StatefulTextbox(pedContent, "Home Address", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); text_dob = LabeledComponent.StatefulTextbox(pedContent, "DOB", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); text_license_status = LabeledComponent.StatefulTextbox(pedContent, "License Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); text_times_stopped = LabeledComponent.StatefulTextbox(pedContent, "Times Stopped", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); text_wanted_status_false = LabeledComponent.StatefulTextbox(pedContent, "Wanted Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); text_wanted_status_true = LabeledComponent.StatefulMultilineTextBox(pedContent, "Wanted Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); ped_image_holder = new ImagePanel(pedContent); ped_image_holder.SetSize(155, 217); ped_image_holder.ImageName = Function.DetermineImagePath(ThePed); ped_image_holder.ShouldCacheToTexture = true; text_first_name.Component.Disable(); text_last_name.Component.Disable(); text_age.Component.Disable(); text_home_address.Component.Disable(); text_dob.Component.Disable(); text_license_status.Component.Disable(); text_times_stopped.Component.Disable(); text_wanted_status_false.Component.Disable(); text_wanted_status_false.Component.Hide(); text_wanted_status_true.Component.Disable(); text_wanted_status_true.Component.Hide(); cb_action.ItemSelected += ActionSelected; }
public void InitializeLayout() { labelFont = this.Skin.DefaultFont.Copy(); labelFont.Size = 14; labelFont.Smooth = true; headerSection = new Base(this); labeled_arrest_report_id = LabeledComponent.Label(headerSection, "Arrest Report"); arresteeInformationSection = new FormSection(this, "Arrestee Information"); arrestInformationContent = (new Base(this) { }); labeled_first_name = LabeledComponent.Label(arrestInformationContent, "First Name", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_last_name = LabeledComponent.Label(arrestInformationContent, "Last Name", new Label(arrestInformationContent), RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_dob = LabeledComponent.Label(arrestInformationContent, "DOB", new Label(arrestInformationContent), RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_home_address = LabeledComponent.Label(arrestInformationContent, "Home Address", new Label(arrestInformationContent), RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); arrestLocationSection = new FormSection(this, "Arrest Location"); arrestLocationContent = (new Base(this) { }); labeled_arrest_street_address = LabeledComponent.Label(arrestLocationContent, "Street Address", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_arrest_city = LabeledComponent.Label(arrestLocationContent, "City", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_arrest_date = LabeledComponent.Label(arrestLocationContent, "Date", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_arrest_time = LabeledComponent.Label(arrestLocationContent, "Time", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); lb_charges = new ListBox(this); lb_charges.Height = 100; labeledCharges = new LabeledComponent <ListBox>(this, "Charges", lb_charges, RelationalPosition.TOP, RelationalSize.NONE, Configs.BaseFormControlSpacingHalf, labelFont, labelColor); lb_additional_parties = new ListBox(this); lb_additional_parties.Height = 100; labeledAdditionalParties = new LabeledComponent <ListBox>(this, "Additional Parties", lb_additional_parties, RelationalPosition.TOP, RelationalSize.NONE, Configs.BaseFormControlSpacingHalf, labelFont, labelColor); tb_report_details = LabeledComponent.Label(this, "Details", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); BindNeeded = true; }
public void InitializeLayout() { Function.Log("inside ComputerVehicleDetails.InitializeLayout()"); labelFont = this.Skin.DefaultFont.Copy(); labelFont.Size = 14; labelFont.Smooth = true; cb_action = new ComboBox(this); registrationInformation = new FormSection(this, "Registration Information"); registrationContent = new Base(this); labeled_vehicle_model = LabeledComponent.StatefulTextbox(registrationContent, "Model", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_vehicle_license = LabeledComponent.StatefulTextbox(registrationContent, "License Plate", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_vehicle_insurance_status = LabeledComponent.StatefulTextbox(registrationContent, "Insurance Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); //BPS does not have registration if (ComputerPlusEntity.PersonaType == PersonaTypes.BPS) { labeled_vehicle_registration_status = LabeledComponent.StatefulTextbox(registrationContent, "Taxed Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_vehicle_extra_1 = LabeledComponent.StatefulTextbox(registrationContent, "MOT Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_vehicle_extra_2 = LabeledComponent.StatefulTextbox(registrationContent, "SORN Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); } else { labeled_vehicle_registration_status = LabeledComponent.StatefulTextbox(registrationContent, "Registration Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); } image_vehicle_image_holder = new ImagePanel(registrationContent); image_vehicle_image_holder.SetSize(400, 160); labeled_alpr = new LabeledComponent <Label>(registrationContent, "ALPR", new Label(registrationContent), RelationalPosition.LEFT, RelationalSize.MEDIUM, Configs.BaseFormControlSpacingDouble, labelFont, System.Drawing.Color.Red); labeled_owner_alert = new LabeledComponent <Label>(registrationContent, "Alert", new Label(registrationContent), RelationalPosition.LEFT, RelationalSize.MEDIUM, Configs.BaseFormControlSpacingDouble, labelFont, System.Drawing.Color.Red); ownerInformation = new FormSection(this, "Owner Information"); ownerContent = new Base(this); labeled_first_name = LabeledComponent.StatefulTextbox(ownerContent, "First Name", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_last_name = LabeledComponent.StatefulTextbox(ownerContent, "Last Name", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_age = LabeledComponent.StatefulTextbox(ownerContent, "Age", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_home_address = LabeledComponent.StatefulTextbox(ownerContent, "Home Address", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_dob = LabeledComponent.StatefulTextbox(ownerContent, "DOB", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_license_status = LabeledComponent.StatefulTextbox(ownerContent, "License Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_wanted_status = LabeledComponent.StatefulTextbox(ownerContent, "Wanted Status", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_times_stopped = LabeledComponent.StatefulTextbox(ownerContent, "Times Stopped", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); if (ComputerPlusEntity.PersonaType == PersonaTypes.BPS) { labeled_ped_extra_1 = LabeledComponent.StatefulTextbox(ownerContent, "Insured To Drive", RelationalPosition.LEFT, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); } image_ped_image_holder = new ImagePanel(ownerContent); image_ped_image_holder.SetSize(155, 217); labeled_first_name.Component.Disable(); labeled_last_name.Component.Disable(); labeled_age.Component.Disable(); labeled_home_address.Component.Disable(); labeled_dob.Component.Disable(); labeled_license_status.Component.Disable(); labeled_wanted_status.Component.Disable(); labeled_times_stopped.Component.Disable(); labeled_vehicle_model.Component.Disable(); labeled_vehicle_license.Component.Disable(); labeled_vehicle_insurance_status.Component.Disable(); labeled_vehicle_registration_status.Component.Disable(); if (ComputerPlusEntity.PersonaType == PersonaTypes.BPS) { labeled_vehicle_extra_1.Component.Disable(); labeled_vehicle_extra_2.Component.Disable(); labeled_ped_extra_1.Component.Disable(); } if (Owner) { image_ped_image_holder.ImageName = DetermineImagePath(Owner); image_ped_image_holder.ShouldCacheToTexture = true; } if (Vehicle) { image_vehicle_image_holder.ImageName = DetermineImagePath(Vehicle); image_vehicle_image_holder.ShouldCacheToTexture = true; } cb_action.ItemSelected += ActionSelected; }
public void InitializeLayout() { labelFont = this.Skin.DefaultFont.Copy(); labelFont.Size = 14; labelFont.Smooth = true; headerSection = new Base(this); labeled_citation_report_id = LabeledComponent.StatefulTextbox(headerSection, "Traffic Citation", RelationalPosition.LEFT, Configs.BaseFormControlSpacing); LabeledInputs.Add(labeled_citation_report_id); citationeeInformationSection = new FormSection(this, "Person Information"); citationInformationContent = (new Base(this) { }); labeled_first_name = LabeledComponent.StatefulTextbox(citationInformationContent, "First Name", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_last_name = LabeledComponent.StatefulTextbox(citationInformationContent, "Last Name", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_dob = LabeledComponent.StatefulTextbox(citationInformationContent, "DOB", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_home_address = LabeledComponent.StatefulTextbox(citationInformationContent, "Home Address", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); LabeledInputs.AddRange(new LabeledComponent <StateControlledTextbox>[] { labeled_first_name, labeled_last_name, labeled_dob, labeled_home_address }); vehicleInformationSection = new FormSection(this, "Vehicle Information"); vehicleInformationContent = new Base(this); labeled_vehicle_type = new LabeledComponent <ComboBox>(vehicleInformationContent, "Type", new ComboBox(vehicleInformationContent), RelationalPosition.TOP, RelationalSize.NONE, Configs.BaseFormControlSpacingHalf, labelFont, labelColor); labeled_vehicle_type.Component.AddItem("Select One", "PlaceHolder", String.Empty); labeled_vehicle_type.Component.AddItem("N/A", "N/A", "N/A"); Globals.VehicleDefinitions.Types.Categories.ForEach(x => { labeled_vehicle_type.Component.AddItem(x.Value, x.Value, x.Value); }); labeled_vehicle_model = LabeledComponent.StatefulTextbox(vehicleInformationContent, "Model", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_vehicle_color = LabeledComponent.StatefulTextbox(vehicleInformationContent, "Color", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_vehicle_tag = LabeledComponent.StatefulTextbox(vehicleInformationContent, "Tag", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); LabeledInputs.AddRange(new LabeledComponent <StateControlledTextbox>[] { labeled_vehicle_model, labeled_vehicle_color, labeled_vehicle_tag }); citationLocationSection = new FormSection(this, "Violation Location"); citationLocationContent = (new Base(this) { }); labeled_citation_street_address = LabeledComponent.StatefulTextbox(citationLocationContent, "Street Address", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_citation_city = LabeledComponent.StatefulTextbox(citationLocationContent, "City", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_citation_date = LabeledComponent.StatefulTextbox(citationLocationContent, "Date", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); labeled_citation_time = LabeledComponent.StatefulTextbox(citationLocationContent, "Time", RelationalPosition.TOP, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); LabeledInputs.AddRange(new LabeledComponent <StateControlledTextbox>[] { labeled_citation_street_address, labeled_citation_city, labeled_citation_date, labeled_citation_time }); violationSection = new FormSection(this, "Violation"); violationContent = new Base(this); labeled_available_citation_reasons = new LabeledComponent <TreeControl>(violationContent, "Citation", new TreeControl(violationContent), RelationalPosition.TOP, RelationalSize.NONE, Configs.BaseFormControlSpacingHalf, labelFont, labelColor); labeled_available_citation_reasons.Component.AllowMultiSelect = false; if (ViewType == ViewTypes.CREATE) { btn_finish = LabeledComponent.Button(headerSection, "Finish", RelationalPosition.BOTTOM, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); btn_finish.Component.SaveIcon(); btn_finish.Component.Clicked += ButtonClicked; btn_finish_new = LabeledComponent.Button(headerSection, "Add New", RelationalPosition.BOTTOM, Configs.BaseFormControlSpacingHalf, labelColor, labelFont); btn_finish_new.Component.PlusOneIcon(); btn_finish_new.Component.Clicked += ButtonClicked; PopulateCitationCategories(Globals.CitationDefinitions); } else { PopulateCitationCategories(null); } labeled_citation_details = new LabeledComponent <StateControlledMultilineTextbox>(violationContent, "Details", new StateControlledMultilineTextbox(violationContent), RelationalPosition.TOP, RelationalSize.NONE, Configs.BaseFormControlSpacingHalf, labelFont, labelColor); labeled_vehicle_type.Component.ItemSelected += ComponentPropChanged; labeled_available_citation_reasons.Component.SelectionChanged += ComponentPropChanged; LabeledInputs.ForEach(x => x.Component.TextChanged += ComponentPropChanged); labeled_citation_details.Component.TextChanged += ComponentPropChanged; LockControls(ReadOnly); //The below components should always be "read only" labeled_citation_report_id.Component.Disable(); labeled_citation_date.Component.Disable(); labeled_citation_time.Component.Disable(); }