Index: DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.Designer.cs =================================================================== diff -u -r6439 -r6857 --- DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.Designer.cs (.../DamNewProjectDialog.Designer.cs) (revision 6439) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.Designer.cs (.../DamNewProjectDialog.Designer.cs) (revision 6857) @@ -67,8 +67,6 @@ this.ProjectionButton = new DevExpress.XtraEditors.SimpleButton(); this.cancelButton = new DevExpress.XtraEditors.SimpleButton(); this.okButton = new DevExpress.XtraEditors.SimpleButton(); - this.DikeRingsCheckedListBox = new DevExpress.XtraEditors.CheckedListBoxControl(); - this.SelectDikeRingsLabel = new DevExpress.XtraEditors.LabelControl(); this.projectionGroupControl = new DevExpress.XtraEditors.GroupControl(); this.projectionMemoEdit = new DevExpress.XtraEditors.MemoEdit(); ((System.ComponentModel.ISupportInitialize)(this.ProjectSpecificationsGroupControl)).BeginInit(); @@ -79,7 +77,6 @@ ((System.ComponentModel.ISupportInitialize)(this.DamCalculationTypeComboBox.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit(); this.panelControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.DikeRingsCheckedListBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.projectionGroupControl)).BeginInit(); this.projectionGroupControl.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.projectionMemoEdit.Properties)).BeginInit(); @@ -227,7 +224,7 @@ this.panelControl1.Controls.Add(this.cancelButton); this.panelControl1.Controls.Add(this.okButton); this.panelControl1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panelControl1.Location = new System.Drawing.Point(0, 652); + this.panelControl1.Location = new System.Drawing.Point(0, 410); this.panelControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelControl1.Name = "panelControl1"; this.panelControl1.Size = new System.Drawing.Size(657, 43); @@ -269,29 +266,12 @@ this.okButton.TabIndex = 0; this.okButton.Text = "Ok"; this.okButton.Click += new System.EventHandler(this.OkButtonClick); + // - // DikeRingsCheckedListBox - // - this.DikeRingsCheckedListBox.Location = new System.Drawing.Point(16, 312); - this.DikeRingsCheckedListBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.DikeRingsCheckedListBox.Name = "DikeRingsCheckedListBox"; - this.DikeRingsCheckedListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.DikeRingsCheckedListBox.Size = new System.Drawing.Size(623, 226); - this.DikeRingsCheckedListBox.TabIndex = 6; - // - // SelectDikeRingsLabel - // - this.SelectDikeRingsLabel.Location = new System.Drawing.Point(16, 289); - this.SelectDikeRingsLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.SelectDikeRingsLabel.Name = "SelectDikeRingsLabel"; - this.SelectDikeRingsLabel.Size = new System.Drawing.Size(90, 16); - this.SelectDikeRingsLabel.TabIndex = 7; - this.SelectDikeRingsLabel.Text = "Select dikerings"; - // // projectionGroupControl // this.projectionGroupControl.Controls.Add(this.projectionMemoEdit); - this.projectionGroupControl.Location = new System.Drawing.Point(16, 547); + this.projectionGroupControl.Location = new System.Drawing.Point(16, 305); this.projectionGroupControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.projectionGroupControl.Name = "projectionGroupControl"; this.projectionGroupControl.Size = new System.Drawing.Size(623, 95); @@ -311,10 +291,8 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(657, 695); + this.ClientSize = new System.Drawing.Size(657, 453); this.Controls.Add(this.projectionGroupControl); - this.Controls.Add(this.SelectDikeRingsLabel); - this.Controls.Add(this.DikeRingsCheckedListBox); this.Controls.Add(this.ProjectSpecificationsGroupControl); this.Controls.Add(this.panelControl1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; @@ -334,7 +312,6 @@ ((System.ComponentModel.ISupportInitialize)(this.DamCalculationTypeComboBox.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit(); this.panelControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.DikeRingsCheckedListBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.projectionGroupControl)).EndInit(); this.projectionGroupControl.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.projectionMemoEdit.Properties)).EndInit(); @@ -355,8 +332,6 @@ private DevExpress.XtraEditors.PanelControl panelControl1; private DevExpress.XtraEditors.SimpleButton cancelButton; private DevExpress.XtraEditors.SimpleButton okButton; - private DevExpress.XtraEditors.CheckedListBoxControl DikeRingsCheckedListBox; - private DevExpress.XtraEditors.LabelControl SelectDikeRingsLabel; private DevExpress.XtraEditors.SimpleButton DestinationProjectFilenameButton; private DevExpress.XtraEditors.LabelControl DestinationProjectFilenameLabel; private DevExpress.XtraEditors.TextEdit DestinationProjectFilenameTextEdit; Index: DamClients/DamUI/trunk/src/Dam/Forms/Translations.xml =================================================================== diff -u -r6793 -r6857 --- DamClients/DamUI/trunk/src/Dam/Forms/Translations.xml (.../Translations.xml) (revision 6793) +++ DamClients/DamUI/trunk/src/Dam/Forms/Translations.xml (.../Translations.xml) (revision 6857) @@ -47,15 +47,13 @@ - + en-US="Cannot read dike ring from the import definition file: {0}"{1}". {2}Message of the unhandled error: {3}"{4}"." + nl-NL="Kan geen dijkring lezen uit het import definitie bestand: {0}"{1}". {2}Melding van de niet afgehandelde fout: {3}"{4}"."/> + en-US="Error importing dike. File: {0}"{1}". {2}Message of the unhandled error: {3}"{4}"." + nl-NL="Fout bij het importeren van dijk. Bestand: {0}"{1}". {2}Melding van de niet afgehandelde fout: {3}"{4}"."/> Index: DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.cs =================================================================== diff -u -r6823 -r6857 --- DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.cs (.../DamNewProjectDialog.cs) (revision 6823) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.cs (.../DamNewProjectDialog.cs) (revision 6857) @@ -71,9 +71,6 @@ // Sensor configuration file BindSupport.BindTextAndValue(this, SensorConfigurationFilenameLabel, SensorConfigurationFilenameTextEdit, typeof(DAMNewProjectData), "SensorConfigurationFileName"); - // Select dikerings - SelectDikeRingsLabel.Text = LocalizationManager.GetTranslatedText(this, "SelectDikerings"); - // projection button & name: BindSupport.Bind(this, ProjectionButton, typeof(DAMNewProjectData), "SelectProjection"); BindSupport.Bind(this, projectionMemoEdit, typeof(DAMNewProjectData), "DataSourceProjectionName"); @@ -213,28 +210,7 @@ if (!IsValidDestinationProjectFileName(damNewProjectData.DamProjectFileName)) { DialogResult = DialogResult.None; - return; } - - // Check if at least 1 dikering is selected - var selectedDikeRings = new List(); - for (var i = 0; i < DikeRingsCheckedListBox.Items.Count; i++) - { - // Add selected items to list - if (DikeRingsCheckedListBox.GetItemChecked(i)) - { - selectedDikeRings.Add(DikeRingsCheckedListBox.GetItemText(i)); - } - } - - if (selectedDikeRings.Count < 1) - { - LocalizedMessageBox.Show(this, "SelectAtLeastOneDikering"); - DialogResult = DialogResult.None; - return; - } - - damNewProjectData.SelectedDikeRingIds = selectedDikeRings; } /// @@ -327,7 +303,6 @@ if (!currentSourceFileName.Equals(sourceFileName)) { DataSourceContainer dataSourceContainer = DataSourceContainer.Deserialize(sourceFileName); - UpdateDikeRingCheckedListbox(sourceFileName, dataSourceContainer); UpdateSensorConfigurationFilename(sourceFileName, dataSourceContainer); } } @@ -362,50 +337,6 @@ } /// - /// Updates the dike ring checked listbox. - /// - /// Name of the source file. - /// The data source container. - private void UpdateDikeRingCheckedListbox(string sourceFileName, DataSourceContainer dataSourceContainer) - { - string damProjectFolder = Path.GetDirectoryName(sourceFileName); - List importLogMessages = null; - string dikeRingId = null; - DataEventPublisher.InvokeWithoutPublishingEvents(() => - { - dikeRingId = WaterBoardImporter.ImportDikeRingIds( - damProjectFolder, dataSourceContainer, - DamNewProjectData.DamProjectType, out importLogMessages); - }); - var dikeRingIds = new List(); - if (dikeRingId != null) - { - dikeRingIds.Add(dikeRingId); - } - - DikeRingsCheckedListBox.Items.Clear(); - if (dikeRingIds.Count > 0) - { - DikeRingsCheckedListBox.Items.AddRange(dikeRingIds.ToArray()); - DikeRingsCheckedListBox.Items[0].CheckState = CheckState.Checked; - } - else - { - string paragraphSepatator = Environment.NewLine + Environment.NewLine; - string openingMessage = LocalizationManager.GetTranslatedText(this, "NoDikeRingsFound"); - var output = new StringBuilder(); - foreach (LogMessage logMessage in importLogMessages) - { - output.Append(logMessage.Message + Environment.NewLine); - } - - LocalizedMessageBox.ShowTranslatedText(null, openingMessage + paragraphSepatator + output); - } - - currentSourceFileName = sourceFileName; - } - - /// /// Browse for destination filename /// ///