コード例 #1
0
        internal ArrestReportController(Controls controls,
                                        ISuspectManager suspMgr,
                                        Func <IReporter> reporter,
                                        Type reporterT,
                                        ICrimeList crimeList,
                                        string replyURL = null)
            : base(suspMgr, controls.SuspName, controls.SuspPhone, reporterT)
        {
            this.reporter = reporter;
            this.controls = controls;
            this.replyURL = replyURL;
            btnDict.Add(controls.BtnAttempted, "Attempted ");
            btnDict.Add(controls.BtnAccessory, "Accessory to ");
            btnDict.Add(controls.BtnAggravated, "Aggravated ");
            btnDict.Add(controls.BtnGovEmployee, " Against a Government Employee");

            controls.ArrestingOfficers.Text = reporter().GetPrefill();

            controls.SuspName.AutoCompleteCustomSource  = suspMgr.SuspNames;
            controls.SuspPhone.AutoCompleteCustomSource = suspMgr.SuspPhnes;

            this.crimeList = crimeList;
            foreach (var crime in crimeList.Crimes)
            {
                controls.ChkCrimes.Items.Add(crime);
            }
            controls.SuggestCharge.AutoCompleteCustomSource = crimeList.CrimesAutoCompletion;

            controls.BtnAccessory.Click         += ChargeModifierClicked;
            controls.BtnAggravated.Click        += ChargeModifierClicked;
            controls.BtnAttempted.Click         += ChargeModifierClicked;
            controls.BtnGovEmployee.Click       += ChargeModifierClicked;
            controls.SuggestCharge.KeyUp        += SuggestChargeKeyUp;
            controls.BtnGenArrestReport.MouseUp += GenArrestReportMouseUp;
        }
コード例 #2
0
        public ImpoundReleaseReportController(Controls controls,
                                              ISuspectManager suspMgr,
                                              Type reporterT,
                                              string replyURL = null)
            : base(suspMgr, controls.SuspName, controls.SuspPhone, reporterT)
        {
            this.controls = controls;
            this.replyURL = replyURL;

            controls.VehicleModel.AutoCompleteCustomSource = new VehicleList().Vehicles;

            controls.BtnGenReleaseReport.MouseUp += GenReleaseReportMouseUp;
            controls.ReleaseFee.KeyPress         += NumericHandler;
        }
コード例 #3
0
        public ImpoundReportController(Controls controls,
                                       ISuspectManager suspMgr,
                                       Func <IReporter> reporter,
                                       Type reporterT,
                                       string replyURL = null)
            : base(suspMgr, controls.SuspName, controls.SuspPhone, reporterT)
        {
            this.controls = controls;
            this.reporter = reporter;
            this.replyURL = replyURL;

            controls.Officers.Text = reporter().GetPrefill();

            controls.VehicleModel.AutoCompleteCustomSource = new VehicleList().Vehicles;

            controls.BtnGenImpoundReport.MouseUp    += GenImpoundReportMouseUp;
            controls.TimestampConverter.TextChanged += TimestampTextChanged;
        }
コード例 #4
0
        protected ControllerBase(ISuspectManager suspMgr, TextBox suspName, TextBox suspPhone, Type reporterT)
        {
            Contract.Requires(suspMgr != null);
            Contract.Requires(suspName != null);
            Contract.Requires(suspPhone != null);
            this.suspName  = suspName;
            this.suspPhone = suspPhone;
            this.reporterT = reporterT;
            SuspMgr        = suspMgr;

            suspName.TextChanged += NameTextChanged;
            suspName.AutoCompleteCustomSource = suspMgr.SuspNames;

            suspPhone.TextChanged += PhoneTextChanged;
            suspPhone.AutoCompleteCustomSource = suspMgr.SuspPhnes;
            suspPhone.KeyPress += NumericHandler;

            ClipboardMonitor.ShortTextEvent += ClipboardTextEvent;
        }