internal FPatrols(ref Common.Interface newCommon)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			CommonCode = newCommon;

			Trace.WriteLine("FPatrols: Creating");
			try
			{
				height = this.Size.Height;
				width = this.Size.Width;

				this.dataGrid1.MouseUp +=new MouseEventHandler(dataGrid1_MouseUp);

				myPatrolWindow = new FPatrol(ref CommonCode, this);
				myPatrolWindow.EnablePatrols += 
					new MethodInvoker(enableMe);
				DatasetBindToDataGrid += new MethodInvoker(datasetBindToDataGrid);
				UpdateNrOfPatrols += new UpdateNrOfPatrolsHandler(FPatrols_UpdateNrOfPatrols);
				CommonCode.UpdatedPatrolAddAutomaticCompetitors +=
					new UpdatedPatrolAddAutomaticCompetitorsHandler(
						updatePatrolAddAutomaticCompetitors);

				EnableAndStartProgressbar += new MethodInvoker(enableAndStartProgressbar);


				updatedPatrolsThread = new Thread(
					new ThreadStart(updatedPatrolsWithThread));
				updatedPatrolsThread.IsBackground = true;
				updatedPatrolsThread.Name = "FPatrols:updatedPatrolsThread";
				updatedCompetitorsThread = new Thread(
					new ThreadStart(updatedCompetitorsWithThread));
				updatedCompetitorsThread.Name = "FPatrols:updatedCompetitorsThread";
				updatedCompetitorsThread.IsBackground = true;
			}
			catch(Exception exc)
			{
				Trace.WriteLine("FPatrols: Exception: " + exc.ToString());
				throw;
			}
			finally
			{
				Trace.WriteLine("FPatrols: Created.");
			}
		}
Beispiel #2
0
        internal FPatrols(ref Common.Interface newCommon)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            CommonCode = newCommon;

            Trace.WriteLine("FPatrols: Creating");
            try
            {
                height = this.Size.Height;
                width  = this.Size.Width;

                this.dataGrid1.MouseUp += new MouseEventHandler(dataGrid1_MouseUp);

                myPatrolWindow = new FPatrol(ref CommonCode, this);
                myPatrolWindow.EnablePatrols +=
                    new MethodInvoker(enableMe);
                DatasetBindToDataGrid += new MethodInvoker(datasetBindToDataGrid);
                UpdateNrOfPatrols     += new UpdateNrOfPatrolsHandler(FPatrols_UpdateNrOfPatrols);
                CommonCode.UpdatedPatrolAddAutomaticCompetitors +=
                    new UpdatedPatrolAddAutomaticCompetitorsHandler(
                        updatePatrolAddAutomaticCompetitors);

                EnableAndStartProgressbar += new MethodInvoker(enableAndStartProgressbar);


                updatedPatrolsThread = new Thread(
                    new ThreadStart(updatedPatrolsWithThread));
                updatedPatrolsThread.IsBackground = true;
                updatedPatrolsThread.Name         = "FPatrols:updatedPatrolsThread";
                updatedCompetitorsThread          = new Thread(
                    new ThreadStart(updatedCompetitorsWithThread));
                updatedCompetitorsThread.Name         = "FPatrols:updatedCompetitorsThread";
                updatedCompetitorsThread.IsBackground = true;
            }
            catch (Exception exc)
            {
                Trace.WriteLine("FPatrols: Exception: " + exc.ToString());
                throw;
            }
            finally
            {
                Trace.WriteLine("FPatrols: Created.");
            }
        }