Example #1
0
 private void datasetBindToDataGrid()
 {
     try
     {
         Trace.WriteLine("FPatrols.datasetBindToDataGrid " +
                         "started in thread \"" +
                         Thread.CurrentThread.Name + "\" ( " +
                         Thread.CurrentThread.ManagedThreadId.ToString()
                         + " ) ");
         this.dataGrid1.SetDataBinding(this.patrolsDs, "Patrols");
         this.patrolsDs = null;
     }
     catch (Exception exc)
     {
         Trace.WriteLine(exc.ToString());
     }
     finally
     {
         Trace.WriteLine("FPatrols.datasetBindToDataGrid ended.");
     }
 }
Example #2
0
		private void updatePatrols()
		{
			if (!this.Visible)
				return;

			Trace.WriteLine("FPatrols.updatePatrols() started on thread " +
				Thread.CurrentThread.Name + "\" ( " +
				Thread.CurrentThread.ManagedThreadId.ToString() + " )");

			if (this.updatePatrolThreadsRunning>1)
				return;

			Interlocked.Increment(ref updatePatrolThreadsRunning);

			Trace.WriteLine("FPatrols.updatePatrols() locking \"" +
				"UpdatingPatrols\" on thread \"" +
				Thread.CurrentThread.Name + "\" ( " +
				Thread.CurrentThread.ManagedThreadId.ToString() + " )");

			bool result = Monitor.TryEnter(UpdatingPatrols);
			if (result == false)
				return;

			lock(UpdatingPatrols)
			{
				Trace.WriteLine("FPatrols.updatePatrols() locked \"" +
					"UpdatingPatrols\" on thread \"" +
					Thread.CurrentThread.Name + "\" ( " +
					Thread.CurrentThread.ManagedThreadId.ToString() + " )");
				try
				{
					this.patrolsDs = new Allberg.Shooter.Windows.DatasetPatrols();
					
					this.patrolsDs.Clear();

					foreach(Structs.Patrol patrol in CommonCode.GetPatrols())
					{
						DatasetPatrols.PatrolsRow row = 
							patrolsDs.Patrols.NewPatrolsRow();
						row.Class = patrol.PClass.ToString();
						if (patrol.LockedForAutomatic)
							row.Class += "-S";
						row.Id = patrol.PatrolId;
						row.NumberOfCompetitors = 
							CommonCode.GetCompetitorsCountPatrol(patrol);
						row.NumberOfCompetitorsWithResult =
							CommonCode.GetCompetitorsWithResultCountPatrol(patrol);
						row.Starttime = patrol.StartDateTime;
						row.StartTimeDisplay = patrol.StartDateTimeDisplay;
						row.NrOfArrived = CommonCode.GetCompetitorsArrivedCountPatrol(patrol);
						patrolsDs.Patrols.AddPatrolsRow(row);
					}
					if (this.InvokeRequired)
					{
						this.Invoke(UpdateNrOfPatrols, new object[] { this.patrolsDs.Patrols.Count });
						this.Invoke(DatasetBindToDataGrid);
					}
					else
					{
						UpdateNrOfPatrols(this.patrolsDs.Patrols.Count);
						datasetBindToDataGrid();
					}
				}
				catch(ApplicationException)
				{
					// Occurs where there is no patrol. Do nothing
				}
				catch(Exception exc)
				{
					Console.WriteLine(exc.ToString());
				}
				finally
				{
					Interlocked.Decrement(ref updatePatrolThreadsRunning);
				}
				Trace.WriteLine("FPatrols.updatePatrols() unlocking \"" +
					"UpdatingPatrols\" on thread \"" +
					Thread.CurrentThread.Name + "\" ( " +
					Thread.CurrentThread.ManagedThreadId.ToString() + " )");
				Trace.WriteLine("FPatrols.updatePatrols() ended.");

			}
			Monitor.Exit(UpdatingPatrols);
		}
Example #3
0
		private void datasetBindToDataGrid()
		{
			try
			{
				Trace.WriteLine("FPatrols.datasetBindToDataGrid " + 
					"started in thread \"" + 
					Thread.CurrentThread.Name + "\" ( " +
					Thread.CurrentThread.ManagedThreadId.ToString()
					+ " ) ");
				this.dataGrid1.SetDataBinding(this.patrolsDs, "Patrols");
				this.patrolsDs = null;
			}
			catch(Exception exc)
			{
				Trace.WriteLine(exc.ToString());
			}
			finally
			{
				Trace.WriteLine("FPatrols.datasetBindToDataGrid ended.");
			}
		}
Example #4
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FPatrols));
			this.lblPatrols = new SafeLabel();
			this.btnAddPatrol = new SafeButton();
			this.lblPatrolsCount = new SafeLabel();
			this.btnRemPatrol = new SafeButton();
			this.btnPatrolAutomatic = new SafeButton();
			this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
			this.dataGrid1 = new Allberg.Shooter.Windows.Forms.DataGridCustom();
			this.patrolsDs = new Allberg.Shooter.Windows.DatasetPatrols();
			this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
			this.DataGridTextBoxPatrol = new System.Windows.Forms.DataGridTextBoxColumn();
			this.DataGridTextBoxStartTime = new System.Windows.Forms.DataGridTextBoxColumn();
			this.dataGridTextBoxStartTimeDisplay = new System.Windows.Forms.DataGridTextBoxColumn();
			this.DataGridTextBoxClass = new System.Windows.Forms.DataGridTextBoxColumn();
			this.DataGridTextBoxNrOfCompetitors = new System.Windows.Forms.DataGridTextBoxColumn();
			this.DataGridTextBoxNrOfCompetitorsWithResults = new System.Windows.Forms.DataGridTextBoxColumn();
			this.DataGridTextBoxNrOfCompetitorsArrived = new System.Windows.Forms.DataGridTextBoxColumn();
			this.progressBar1 = new System.Windows.Forms.ProgressBar();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.patrolsDs)).BeginInit();
			this.SuspendLayout();
			// 
			// lblPatrols
			// 
			this.lblPatrols.Location = new System.Drawing.Point(8, 8);
			this.lblPatrols.Name = "lblPatrols";
			this.lblPatrols.Size = new System.Drawing.Size(100, 23);
			this.lblPatrols.TabIndex = 1;
			this.lblPatrols.Text = "Antal patruller";
			// 
			// btnAddPatrol
			// 
			this.btnAddPatrol.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
			this.btnAddPatrol.Location = new System.Drawing.Point(302, 8);
			this.btnAddPatrol.Name = "btnAddPatrol";
			this.btnAddPatrol.Size = new System.Drawing.Size(88, 23);
			this.btnAddPatrol.TabIndex = 2;
			this.btnAddPatrol.Text = "Lägg till patrull";
			this.toolTip1.SetToolTip(this.btnAddPatrol, "Lägger till en ny patrull på slutet");
			this.btnAddPatrol.Click += new System.EventHandler(this.btnAddPatrol_Click);
			// 
			// lblPatrolsCount
			// 
			this.lblPatrolsCount.Location = new System.Drawing.Point(88, 8);
			this.lblPatrolsCount.Name = "lblPatrolsCount";
			this.lblPatrolsCount.Size = new System.Drawing.Size(24, 23);
			this.lblPatrolsCount.TabIndex = 4;
			this.lblPatrolsCount.Text = "0";
			// 
			// btnRemPatrol
			// 
			this.btnRemPatrol.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
			this.btnRemPatrol.Location = new System.Drawing.Point(390, 8);
			this.btnRemPatrol.Name = "btnRemPatrol";
			this.btnRemPatrol.Size = new System.Drawing.Size(88, 23);
			this.btnRemPatrol.TabIndex = 3;
			this.btnRemPatrol.Text = "Ta bort patrull";
			this.toolTip1.SetToolTip(this.btnRemPatrol, "Tar bort den sista patrullen. Kan endast ta bort tomma patruller.");
			this.btnRemPatrol.Click += new System.EventHandler(this.btnRemPatrol_Click);
			// 
			// btnPatrolAutomatic
			// 
			this.btnPatrolAutomatic.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
			this.btnPatrolAutomatic.Location = new System.Drawing.Point(214, 8);
			this.btnPatrolAutomatic.Name = "btnPatrolAutomatic";
			this.btnPatrolAutomatic.Size = new System.Drawing.Size(88, 23);
			this.btnPatrolAutomatic.TabIndex = 1;
			this.btnPatrolAutomatic.Text = "Automat";
			this.toolTip1.SetToolTip(this.btnPatrolAutomatic, "Här raderas samtliga tidigare patruller och skyttarna läggs ut i nya patruller me" +
					"d hänsyn till patrulltid, maxantal, vilotid, skytteklass och klubbtillhörighet");
			this.btnPatrolAutomatic.Click += new System.EventHandler(this.btnPatrolAutomatic_Click);
			// 
			// dataGrid1
			// 
			this.dataGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
						| System.Windows.Forms.AnchorStyles.Left)
						| System.Windows.Forms.AnchorStyles.Right)));
			this.dataGrid1.DataMember = "Patrols";
			this.dataGrid1.DataSource = this.patrolsDs;
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(8, 32);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.ReadOnly = true;
			this.dataGrid1.Size = new System.Drawing.Size(470, 328);
			this.dataGrid1.TabIndex = 5;
			this.dataGrid1.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
			this.dataGridTableStyle1});
			this.toolTip1.SetToolTip(this.dataGrid1, "Här visas en lista på alla patruller och dess klass. Klicka på en patrull för att" +
					" visa dess innehåll.");
			// 
			// patrolsDs
			// 
			this.patrolsDs.DataSetName = "DatasetPatrols";
			this.patrolsDs.Locale = new System.Globalization.CultureInfo("en-US");
			this.patrolsDs.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
			// 
			// dataGridTableStyle1
			// 
			this.dataGridTableStyle1.DataGrid = this.dataGrid1;
			this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
			this.DataGridTextBoxPatrol,
			this.DataGridTextBoxStartTime,
			this.dataGridTextBoxStartTimeDisplay,
			this.DataGridTextBoxClass,
			this.DataGridTextBoxNrOfCompetitors,
			this.DataGridTextBoxNrOfCompetitorsArrived,
			this.DataGridTextBoxNrOfCompetitorsWithResults});
			this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGridTableStyle1.MappingName = "Patrols";
			this.dataGridTableStyle1.ReadOnly = true;
			this.dataGridTableStyle1.RowHeadersVisible = false;
			// 
			// DataGridTextBoxPatrol
			// 
			this.DataGridTextBoxPatrol.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
			this.DataGridTextBoxPatrol.Format = "";
			this.DataGridTextBoxPatrol.FormatInfo = null;
			this.DataGridTextBoxPatrol.HeaderText = "Patrull";
			this.DataGridTextBoxPatrol.MappingName = "Id";
			this.DataGridTextBoxPatrol.ReadOnly = true;
			this.DataGridTextBoxPatrol.Width = 50;
			// 
			// DataGridTextBoxStartTime
			// 
			this.DataGridTextBoxStartTime.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
			this.DataGridTextBoxStartTime.Format = "HH:mm";
			this.DataGridTextBoxStartTime.FormatInfo = null;
			this.DataGridTextBoxStartTime.HeaderText = "Starttid";
			this.DataGridTextBoxStartTime.MappingName = "Starttime";
			this.DataGridTextBoxStartTime.ReadOnly = true;
			this.DataGridTextBoxStartTime.Width = 60;
			// 
			// dataGridTextBoxStartTimeDisplay
			// 
			this.dataGridTextBoxStartTimeDisplay.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
			this.dataGridTextBoxStartTimeDisplay.Format = "HH:mm";
			this.dataGridTextBoxStartTimeDisplay.FormatInfo = null;
			this.dataGridTextBoxStartTimeDisplay.HeaderText = "Visas";
			this.dataGridTextBoxStartTimeDisplay.MappingName = "StartTimeDisplay";
			this.dataGridTextBoxStartTimeDisplay.ReadOnly = true;
			this.dataGridTextBoxStartTimeDisplay.Width = 60;
			// 
			// DataGridTextBoxClass
			// 
			this.DataGridTextBoxClass.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
			this.DataGridTextBoxClass.Format = "";
			this.DataGridTextBoxClass.FormatInfo = null;
			this.DataGridTextBoxClass.HeaderText = "Klass";
			this.DataGridTextBoxClass.MappingName = "Class";
			this.DataGridTextBoxClass.ReadOnly = true;
			this.DataGridTextBoxClass.Width = 65;
			// 
			// DataGridTextBoxNrOfCompetitors
			// 
			this.DataGridTextBoxNrOfCompetitors.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
			this.DataGridTextBoxNrOfCompetitors.Format = "";
			this.DataGridTextBoxNrOfCompetitors.FormatInfo = null;
			this.DataGridTextBoxNrOfCompetitors.HeaderText = "Antal";
			this.DataGridTextBoxNrOfCompetitors.MappingName = "NumberOfCompetitors";
			this.DataGridTextBoxNrOfCompetitors.ReadOnly = true;
			this.DataGridTextBoxNrOfCompetitors.Width = 50;
			// 
			// DataGridTextBoxNrOfCompetitorsWithResults
			// 
			this.DataGridTextBoxNrOfCompetitorsWithResults.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
			this.DataGridTextBoxNrOfCompetitorsWithResults.Format = "";
			this.DataGridTextBoxNrOfCompetitorsWithResults.FormatInfo = null;
			this.DataGridTextBoxNrOfCompetitorsWithResults.HeaderText = "Resultat finns";
			this.DataGridTextBoxNrOfCompetitorsWithResults.MappingName = "NumberOfCompetitorsWithResult";
			this.DataGridTextBoxNrOfCompetitorsWithResults.ReadOnly = true;
			this.DataGridTextBoxNrOfCompetitorsWithResults.Width = 80;
			// 
			// DataGridTextBoxNrOfCompetitorsArrived
			// 
			this.DataGridTextBoxNrOfCompetitorsArrived.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
			this.DataGridTextBoxNrOfCompetitorsArrived.Format = "";
			this.DataGridTextBoxNrOfCompetitorsArrived.FormatInfo = null;
			this.DataGridTextBoxNrOfCompetitorsArrived.HeaderText = "Ankomna";
			this.DataGridTextBoxNrOfCompetitorsArrived.MappingName = "NrOfArrived";
			this.DataGridTextBoxNrOfCompetitorsArrived.NullText = "";
			this.DataGridTextBoxNrOfCompetitorsArrived.ReadOnly = true;
			this.DataGridTextBoxNrOfCompetitorsArrived.Width = 65;
			// 
			// progressBar1
			// 
			this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
						| System.Windows.Forms.AnchorStyles.Right)));
			this.progressBar1.Location = new System.Drawing.Point(8, 32);
			this.progressBar1.Name = "progressBar1";
			this.progressBar1.Size = new System.Drawing.Size(470, 16);
			this.progressBar1.TabIndex = 6;
			this.progressBar1.Visible = false;
			// 
			// FPatrols
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(486, 365);
			this.Controls.Add(this.progressBar1);
			this.Controls.Add(this.btnPatrolAutomatic);
			this.Controls.Add(this.btnRemPatrol);
			this.Controls.Add(this.dataGrid1);
			this.Controls.Add(this.lblPatrolsCount);
			this.Controls.Add(this.btnAddPatrol);
			this.Controls.Add(this.lblPatrols);
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.Name = "FPatrols";
			this.Text = "Patruller";
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.patrolsDs)).EndInit();
			this.ResumeLayout(false);

		}
Example #5
0
        private void updatePatrols()
        {
            if (!this.Visible)
            {
                return;
            }

            Trace.WriteLine("FPatrols.updatePatrols() started on thread " +
                            Thread.CurrentThread.Name + "\" ( " +
                            Thread.CurrentThread.ManagedThreadId.ToString() + " )");

            if (this.updatePatrolThreadsRunning > 1)
            {
                return;
            }

            Interlocked.Increment(ref updatePatrolThreadsRunning);

            Trace.WriteLine("FPatrols.updatePatrols() locking \"" +
                            "UpdatingPatrols\" on thread \"" +
                            Thread.CurrentThread.Name + "\" ( " +
                            Thread.CurrentThread.ManagedThreadId.ToString() + " )");

            bool result = Monitor.TryEnter(UpdatingPatrols);

            if (result == false)
            {
                return;
            }

            lock (UpdatingPatrols)
            {
                Trace.WriteLine("FPatrols.updatePatrols() locked \"" +
                                "UpdatingPatrols\" on thread \"" +
                                Thread.CurrentThread.Name + "\" ( " +
                                Thread.CurrentThread.ManagedThreadId.ToString() + " )");
                try
                {
                    this.patrolsDs = new Allberg.Shooter.Windows.DatasetPatrols();

                    this.patrolsDs.Clear();

                    foreach (Structs.Patrol patrol in CommonCode.GetPatrols())
                    {
                        DatasetPatrols.PatrolsRow row =
                            patrolsDs.Patrols.NewPatrolsRow();
                        row.Class = patrol.PClass.ToString();
                        if (patrol.LockedForAutomatic)
                        {
                            row.Class += "-S";
                        }
                        row.Id = patrol.PatrolId;
                        row.NumberOfCompetitors =
                            CommonCode.GetCompetitorsCountPatrol(patrol);
                        row.NumberOfCompetitorsWithResult =
                            CommonCode.GetCompetitorsWithResultCountPatrol(patrol);
                        row.Starttime        = patrol.StartDateTime;
                        row.StartTimeDisplay = patrol.StartDateTimeDisplay;
                        row.NrOfArrived      = CommonCode.GetCompetitorsArrivedCountPatrol(patrol);
                        patrolsDs.Patrols.AddPatrolsRow(row);
                    }
                    if (this.InvokeRequired)
                    {
                        this.Invoke(UpdateNrOfPatrols, new object[] { this.patrolsDs.Patrols.Count });
                        this.Invoke(DatasetBindToDataGrid);
                    }
                    else
                    {
                        UpdateNrOfPatrols(this.patrolsDs.Patrols.Count);
                        datasetBindToDataGrid();
                    }
                }
                catch (ApplicationException)
                {
                    // Occurs where there is no patrol. Do nothing
                }
                catch (Exception exc)
                {
                    Console.WriteLine(exc.ToString());
                }
                finally
                {
                    Interlocked.Decrement(ref updatePatrolThreadsRunning);
                }
                Trace.WriteLine("FPatrols.updatePatrols() unlocking \"" +
                                "UpdatingPatrols\" on thread \"" +
                                Thread.CurrentThread.Name + "\" ( " +
                                Thread.CurrentThread.ManagedThreadId.ToString() + " )");
                Trace.WriteLine("FPatrols.updatePatrols() ended.");
            }
            Monitor.Exit(UpdatingPatrols);
        }
Example #6
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FPatrols));
     this.lblPatrols                                = new SafeLabel();
     this.btnAddPatrol                              = new SafeButton();
     this.lblPatrolsCount                           = new SafeLabel();
     this.btnRemPatrol                              = new SafeButton();
     this.btnPatrolAutomatic                        = new SafeButton();
     this.toolTip1                                  = new System.Windows.Forms.ToolTip(this.components);
     this.dataGrid1                                 = new Allberg.Shooter.Windows.Forms.DataGridCustom();
     this.patrolsDs                                 = new Allberg.Shooter.Windows.DatasetPatrols();
     this.dataGridTableStyle1                       = new System.Windows.Forms.DataGridTableStyle();
     this.DataGridTextBoxPatrol                     = new System.Windows.Forms.DataGridTextBoxColumn();
     this.DataGridTextBoxStartTime                  = new System.Windows.Forms.DataGridTextBoxColumn();
     this.dataGridTextBoxStartTimeDisplay           = new System.Windows.Forms.DataGridTextBoxColumn();
     this.DataGridTextBoxClass                      = new System.Windows.Forms.DataGridTextBoxColumn();
     this.DataGridTextBoxNrOfCompetitors            = new System.Windows.Forms.DataGridTextBoxColumn();
     this.DataGridTextBoxNrOfCompetitorsWithResults = new System.Windows.Forms.DataGridTextBoxColumn();
     this.DataGridTextBoxNrOfCompetitorsArrived     = new System.Windows.Forms.DataGridTextBoxColumn();
     this.progressBar1                              = new System.Windows.Forms.ProgressBar();
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.patrolsDs)).BeginInit();
     this.SuspendLayout();
     //
     // lblPatrols
     //
     this.lblPatrols.Location = new System.Drawing.Point(8, 8);
     this.lblPatrols.Name     = "lblPatrols";
     this.lblPatrols.Size     = new System.Drawing.Size(100, 23);
     this.lblPatrols.TabIndex = 1;
     this.lblPatrols.Text     = "Antal patruller";
     //
     // btnAddPatrol
     //
     this.btnAddPatrol.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.btnAddPatrol.Location = new System.Drawing.Point(302, 8);
     this.btnAddPatrol.Name     = "btnAddPatrol";
     this.btnAddPatrol.Size     = new System.Drawing.Size(88, 23);
     this.btnAddPatrol.TabIndex = 2;
     this.btnAddPatrol.Text     = "Lägg till patrull";
     this.toolTip1.SetToolTip(this.btnAddPatrol, "Lägger till en ny patrull på slutet");
     this.btnAddPatrol.Click += new System.EventHandler(this.btnAddPatrol_Click);
     //
     // lblPatrolsCount
     //
     this.lblPatrolsCount.Location = new System.Drawing.Point(88, 8);
     this.lblPatrolsCount.Name     = "lblPatrolsCount";
     this.lblPatrolsCount.Size     = new System.Drawing.Size(24, 23);
     this.lblPatrolsCount.TabIndex = 4;
     this.lblPatrolsCount.Text     = "0";
     //
     // btnRemPatrol
     //
     this.btnRemPatrol.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.btnRemPatrol.Location = new System.Drawing.Point(390, 8);
     this.btnRemPatrol.Name     = "btnRemPatrol";
     this.btnRemPatrol.Size     = new System.Drawing.Size(88, 23);
     this.btnRemPatrol.TabIndex = 3;
     this.btnRemPatrol.Text     = "Ta bort patrull";
     this.toolTip1.SetToolTip(this.btnRemPatrol, "Tar bort den sista patrullen. Kan endast ta bort tomma patruller.");
     this.btnRemPatrol.Click += new System.EventHandler(this.btnRemPatrol_Click);
     //
     // btnPatrolAutomatic
     //
     this.btnPatrolAutomatic.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.btnPatrolAutomatic.Location = new System.Drawing.Point(214, 8);
     this.btnPatrolAutomatic.Name     = "btnPatrolAutomatic";
     this.btnPatrolAutomatic.Size     = new System.Drawing.Size(88, 23);
     this.btnPatrolAutomatic.TabIndex = 1;
     this.btnPatrolAutomatic.Text     = "Automat";
     this.toolTip1.SetToolTip(this.btnPatrolAutomatic, "Här raderas samtliga tidigare patruller och skyttarna läggs ut i nya patruller me" +
                              "d hänsyn till patrulltid, maxantal, vilotid, skytteklass och klubbtillhörighet");
     this.btnPatrolAutomatic.Click += new System.EventHandler(this.btnPatrolAutomatic_Click);
     //
     // dataGrid1
     //
     this.dataGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.dataGrid1.DataMember      = "Patrols";
     this.dataGrid1.DataSource      = this.patrolsDs;
     this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
     this.dataGrid1.Location        = new System.Drawing.Point(8, 32);
     this.dataGrid1.Name            = "dataGrid1";
     this.dataGrid1.ReadOnly        = true;
     this.dataGrid1.Size            = new System.Drawing.Size(470, 328);
     this.dataGrid1.TabIndex        = 5;
     this.dataGrid1.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
         this.dataGridTableStyle1
     });
     this.toolTip1.SetToolTip(this.dataGrid1, "Här visas en lista på alla patruller och dess klass. Klicka på en patrull för att" +
                              " visa dess innehåll.");
     //
     // patrolsDs
     //
     this.patrolsDs.DataSetName             = "DatasetPatrols";
     this.patrolsDs.Locale                  = new System.Globalization.CultureInfo("en-US");
     this.patrolsDs.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // dataGridTableStyle1
     //
     this.dataGridTableStyle1.DataGrid = this.dataGrid1;
     this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
         this.DataGridTextBoxPatrol,
         this.DataGridTextBoxStartTime,
         this.dataGridTextBoxStartTimeDisplay,
         this.DataGridTextBoxClass,
         this.DataGridTextBoxNrOfCompetitors,
         this.DataGridTextBoxNrOfCompetitorsArrived,
         this.DataGridTextBoxNrOfCompetitorsWithResults
     });
     this.dataGridTableStyle1.HeaderForeColor   = System.Drawing.SystemColors.ControlText;
     this.dataGridTableStyle1.MappingName       = "Patrols";
     this.dataGridTableStyle1.ReadOnly          = true;
     this.dataGridTableStyle1.RowHeadersVisible = false;
     //
     // DataGridTextBoxPatrol
     //
     this.DataGridTextBoxPatrol.Alignment   = System.Windows.Forms.HorizontalAlignment.Center;
     this.DataGridTextBoxPatrol.Format      = "";
     this.DataGridTextBoxPatrol.FormatInfo  = null;
     this.DataGridTextBoxPatrol.HeaderText  = "Patrull";
     this.DataGridTextBoxPatrol.MappingName = "Id";
     this.DataGridTextBoxPatrol.ReadOnly    = true;
     this.DataGridTextBoxPatrol.Width       = 50;
     //
     // DataGridTextBoxStartTime
     //
     this.DataGridTextBoxStartTime.Alignment   = System.Windows.Forms.HorizontalAlignment.Center;
     this.DataGridTextBoxStartTime.Format      = "HH:mm";
     this.DataGridTextBoxStartTime.FormatInfo  = null;
     this.DataGridTextBoxStartTime.HeaderText  = "Starttid";
     this.DataGridTextBoxStartTime.MappingName = "Starttime";
     this.DataGridTextBoxStartTime.ReadOnly    = true;
     this.DataGridTextBoxStartTime.Width       = 60;
     //
     // dataGridTextBoxStartTimeDisplay
     //
     this.dataGridTextBoxStartTimeDisplay.Alignment   = System.Windows.Forms.HorizontalAlignment.Center;
     this.dataGridTextBoxStartTimeDisplay.Format      = "HH:mm";
     this.dataGridTextBoxStartTimeDisplay.FormatInfo  = null;
     this.dataGridTextBoxStartTimeDisplay.HeaderText  = "Visas";
     this.dataGridTextBoxStartTimeDisplay.MappingName = "StartTimeDisplay";
     this.dataGridTextBoxStartTimeDisplay.ReadOnly    = true;
     this.dataGridTextBoxStartTimeDisplay.Width       = 60;
     //
     // DataGridTextBoxClass
     //
     this.DataGridTextBoxClass.Alignment   = System.Windows.Forms.HorizontalAlignment.Center;
     this.DataGridTextBoxClass.Format      = "";
     this.DataGridTextBoxClass.FormatInfo  = null;
     this.DataGridTextBoxClass.HeaderText  = "Klass";
     this.DataGridTextBoxClass.MappingName = "Class";
     this.DataGridTextBoxClass.ReadOnly    = true;
     this.DataGridTextBoxClass.Width       = 65;
     //
     // DataGridTextBoxNrOfCompetitors
     //
     this.DataGridTextBoxNrOfCompetitors.Alignment   = System.Windows.Forms.HorizontalAlignment.Center;
     this.DataGridTextBoxNrOfCompetitors.Format      = "";
     this.DataGridTextBoxNrOfCompetitors.FormatInfo  = null;
     this.DataGridTextBoxNrOfCompetitors.HeaderText  = "Antal";
     this.DataGridTextBoxNrOfCompetitors.MappingName = "NumberOfCompetitors";
     this.DataGridTextBoxNrOfCompetitors.ReadOnly    = true;
     this.DataGridTextBoxNrOfCompetitors.Width       = 50;
     //
     // DataGridTextBoxNrOfCompetitorsWithResults
     //
     this.DataGridTextBoxNrOfCompetitorsWithResults.Alignment   = System.Windows.Forms.HorizontalAlignment.Center;
     this.DataGridTextBoxNrOfCompetitorsWithResults.Format      = "";
     this.DataGridTextBoxNrOfCompetitorsWithResults.FormatInfo  = null;
     this.DataGridTextBoxNrOfCompetitorsWithResults.HeaderText  = "Resultat finns";
     this.DataGridTextBoxNrOfCompetitorsWithResults.MappingName = "NumberOfCompetitorsWithResult";
     this.DataGridTextBoxNrOfCompetitorsWithResults.ReadOnly    = true;
     this.DataGridTextBoxNrOfCompetitorsWithResults.Width       = 80;
     //
     // DataGridTextBoxNrOfCompetitorsArrived
     //
     this.DataGridTextBoxNrOfCompetitorsArrived.Alignment   = System.Windows.Forms.HorizontalAlignment.Center;
     this.DataGridTextBoxNrOfCompetitorsArrived.Format      = "";
     this.DataGridTextBoxNrOfCompetitorsArrived.FormatInfo  = null;
     this.DataGridTextBoxNrOfCompetitorsArrived.HeaderText  = "Ankomna";
     this.DataGridTextBoxNrOfCompetitorsArrived.MappingName = "NrOfArrived";
     this.DataGridTextBoxNrOfCompetitorsArrived.NullText    = "";
     this.DataGridTextBoxNrOfCompetitorsArrived.ReadOnly    = true;
     this.DataGridTextBoxNrOfCompetitorsArrived.Width       = 65;
     //
     // progressBar1
     //
     this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                      | System.Windows.Forms.AnchorStyles.Right)));
     this.progressBar1.Location = new System.Drawing.Point(8, 32);
     this.progressBar1.Name     = "progressBar1";
     this.progressBar1.Size     = new System.Drawing.Size(470, 16);
     this.progressBar1.TabIndex = 6;
     this.progressBar1.Visible  = false;
     //
     // FPatrols
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(486, 365);
     this.Controls.Add(this.progressBar1);
     this.Controls.Add(this.btnPatrolAutomatic);
     this.Controls.Add(this.btnRemPatrol);
     this.Controls.Add(this.dataGrid1);
     this.Controls.Add(this.lblPatrolsCount);
     this.Controls.Add(this.btnAddPatrol);
     this.Controls.Add(this.lblPatrols);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name = "FPatrols";
     this.Text = "Patruller";
     ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.patrolsDs)).EndInit();
     this.ResumeLayout(false);
 }