Ejemplo n.º 1
0
        // Include parameter for serialise file handler in Constructor

        /// <summary>
        /// Constructor for FormBasedUI
        /// </summary>
        /// <param name="app">applicantList object</param>
        /// <param name="ser">forceSreviceList object</param>
        /// <param name="trg">text report generator object</param>
        /// <param name="sfh">text report serialize object</param>
        public FormBasedUI(ApplicantList app, ForceServiceList ser, TextReportGenerator trg, SerializeFileHandler sfh)
        {
            InitializeComponent();
            applicantList    = app;
            forceServiceList = ser;
            // Assign parameter textReport file handler object
            textReportGenerator = trg;
            // Assign parameter serilize file handler object
            serializeFileHandler = sfh;
        }
Ejemplo n.º 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // instantiate a ApplicantList objects
            ApplicantList applicantList = new ApplicantList();

            // Instantiate a ForceServiceList object
            ForceServiceList forceServiceList = new ForceServiceList();

            // Instantiate a text report generator
            TextReportGenerator trg = new TextReportGenerator();
            // instantiate a SerializeFileHandler object, to make argument to Run()

            SerializeFileHandler sfh = new SerializeFileHandler();

            SplashForm loader = new SplashForm();

            loader.ShowDialog();

            Application.Run(new FormBasedUI(applicantList, forceServiceList, trg, sfh));
        }