From 39901f5ac060b1ec09119570570b383fd8dcf5db Mon Sep 17 00:00:00 2001 From: Duke Jones Date: Thu, 30 Apr 2015 21:49:47 +0200 Subject: [PATCH] 1.84_0.17_5 * it's possible to add new stations * default value for EDDN is no longer because it's only for dev testing * set value for EDDN schema from to and add a hint for users who have EDDN active --- RegulatedNoise/EDDB_Data/EDMilkyway.cs | 27 ++- RegulatedNoise/EDDB_Data/EDSystems.cs | 11 ++ .../RegulatedNoiseSettings.cs | 32 +-- RegulatedNoise/Form1.Designer.cs | 183 +++++++++--------- RegulatedNoise/Form1.cs | 69 +++++-- RegulatedNoise/ProgressView.cs | 2 +- RegulatedNoise/Properties/AssemblyInfo.cs | 4 +- RegulatedNoise/RegulatedNoise.csproj | 2 +- ToDo.txt | 6 + 9 files changed, 196 insertions(+), 140 deletions(-) diff --git a/RegulatedNoise/EDDB_Data/EDMilkyway.cs b/RegulatedNoise/EDDB_Data/EDMilkyway.cs index 22d8b87..e8a4512 100644 --- a/RegulatedNoise/EDDB_Data/EDMilkyway.cs +++ b/RegulatedNoise/EDDB_Data/EDMilkyway.cs @@ -65,7 +65,22 @@ public List getStations(enDataType Stationtype) /// /// /// + /// public EDStation getStation(string systemName, string stationName) + { + EDSystem tempSystem; + + return getStation(systemName, stationName, out tempSystem); + } + + /// + /// returns a station in a system by name + /// + /// + /// + /// + /// + public EDStation getStation(string systemName, string stationName, out EDSystem System) { EDStation retValue; @@ -76,6 +91,8 @@ public EDStation getStation(string systemName, string stationName) else retValue = null; + System = SystemData; + return retValue; } @@ -93,7 +110,7 @@ public Int32 getStationDistance(string systemName, string stationName) { EDStation retValue = getStation(systemName, stationName); - if (retValue != null) + if ((retValue != null) && (retValue.DistanceToStar != null)) { Distance = (int)(retValue.DistanceToStar); } @@ -497,7 +514,7 @@ public Point3D getSystemCoordinates(string Systemname) if (mySystem != null) { - retValue = new Point3D((float)mySystem.X, (float)mySystem.Y, (float)mySystem.Z); + retValue = mySystem.SystemCoordinates(); m_cachedLocations.Add(Systemname, retValue); } @@ -775,7 +792,7 @@ internal void ChangeAddSystem(EDSystem m_currentSystemdata, string oldSystemName List ownSystems = getSystems(enDataType.Data_Own); int newSystemIndex; - if(oldSystemName == null) + if(String.IsNullOrEmpty(oldSystemName.Trim())) oldSystemName = m_currentSystemdata.Name; if(!oldSystemName.Equals(m_currentSystemdata.Name)) @@ -842,7 +859,7 @@ internal void ChangeAddStation(string Systemname, EDStation m_currentStationdata EDStation Station; int newStationIndex; - if(oldStationName == null) + if(String.IsNullOrEmpty(oldStationName.Trim())) oldStationName = m_currentStationdata.Name; List ownSystems = getSystems(enDataType.Data_Own); @@ -943,7 +960,7 @@ internal void ChangeAddStation(string Systemname, EDStation m_currentStationdata newStationIndex = mergedStations.Max(X => X.Id) + 1; // add the new station in the merged station dictionary - ownStations.Add(new EDStation(newStationIndex, System.Id, m_currentStationdata)); + mergedStations.Add(new EDStation(newStationIndex, System.Id, m_currentStationdata)); } } diff --git a/RegulatedNoise/EDDB_Data/EDSystems.cs b/RegulatedNoise/EDDB_Data/EDSystems.cs index 0850b74..bf8721e 100644 --- a/RegulatedNoise/EDDB_Data/EDSystems.cs +++ b/RegulatedNoise/EDDB_Data/EDSystems.cs @@ -6,6 +6,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using RegulatedNoise.Enums_and_Utility_Classes; +using System.Windows.Forms.DataVisualization.Charting; namespace RegulatedNoise.EDDB_Data { @@ -151,5 +152,15 @@ public void clear() UpdatedAt = 0; } + + /// + /// return the coordinates of the system + /// + /// + internal System.Windows.Forms.DataVisualization.Charting.Point3D SystemCoordinates() + { + return new Point3D((float)X, (float)Y, (float)Z); + } + } } diff --git a/RegulatedNoise/Enums and Utility Classes/RegulatedNoiseSettings.cs b/RegulatedNoise/Enums and Utility Classes/RegulatedNoiseSettings.cs index c37170c..12be781 100644 --- a/RegulatedNoise/Enums and Utility Classes/RegulatedNoiseSettings.cs +++ b/RegulatedNoise/Enums and Utility Classes/RegulatedNoiseSettings.cs @@ -59,7 +59,7 @@ public class RegulatedNoiseSettings #if DukeJones - public readonly decimal VersionDJ = 0.16m; + public readonly decimal VersionDJ = 0.17m; #endif private int _isFirstRun = -1; @@ -77,8 +77,7 @@ public class RegulatedNoiseSettings public bool IncludeExtendedCSVInfo = true; public bool PostToEddnOnImport = false; public bool DeleteScreenshotOnImport = false; - public bool WarnedAboutEddnSchema = false; - public bool UseEddnTestSchema = true; + public bool UseEddnTestSchema = false; public string UiColour = "#FF8419"; public string ForegroundColour = null; public string BackgroundColour = null; @@ -107,8 +106,9 @@ public class RegulatedNoiseSettings public bool AutoActivateOCRTab = true; public bool AutoActivateSystemTab = true; public string PilotsName = String.Empty; - public bool IncludeUnknownDTS = false; - public bool LoadStationsJSON = false; + public bool IncludeUnknownDTS = true; + public bool LoadStationsJSON = false; + public SerializableDictionary WindowBaseData = new SerializableDictionary() { {"Form1", new WindowData()}, @@ -405,27 +405,7 @@ private void cbDeleteScreenshotOnImport_CheckedChanged(object sender, EventArgs private void cbUseEddnTestSchema_CheckedChanged(object sender, EventArgs e) { - if (RegulatedNoiseSettings.WarnedAboutEddnSchema == false) - { - var result = MessageBox.Show( - "Are you sure? It's very important to get your System Names correct before uploading to the live schema...", "Are you sure?", - MessageBoxButtons.YesNo); - - if (result == DialogResult.Yes) - { - RegulatedNoiseSettings.UseEddnTestSchema = cbUseEddnTestSchema.Checked; - RegulatedNoiseSettings.WarnedAboutEddnSchema = true; - } - else - { - RegulatedNoiseSettings.UseEddnTestSchema = true; - cbUseEddnTestSchema.CheckedChanged -= cbUseEddnTestSchema_CheckedChanged; - cbUseEddnTestSchema.Checked = true; - cbUseEddnTestSchema.CheckedChanged += cbUseEddnTestSchema_CheckedChanged; - } - } - else - RegulatedNoiseSettings.UseEddnTestSchema = cbUseEddnTestSchema.Checked; + RegulatedNoiseSettings.UseEddnTestSchema = cbUseEddnTestSchema.Checked; } #region Theming diff --git a/RegulatedNoise/Form1.Designer.cs b/RegulatedNoise/Form1.Designer.cs index 18d0372..50c6b5a 100644 --- a/RegulatedNoise/Form1.Designer.cs +++ b/RegulatedNoise/Form1.Designer.cs @@ -30,10 +30,10 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea4 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.rbSortByDistance = new System.Windows.Forms.RadioButton(); @@ -80,6 +80,7 @@ private void InitializeComponent() this.lblRegulatedNoise = new System.Windows.Forms.Label(); this.tabSystemData = new System.Windows.Forms.TabPage(); this.groupBox14 = new System.Windows.Forms.GroupBox(); + this.cmbStationStations = new System.Windows.Forms.ComboBox_ro(); this.paEconomies = new System.Windows.Forms.Panel(); this.button8 = new System.Windows.Forms.Button(); this.cbStationEcoTourism = new System.Windows.Forms.CheckBox_ro(); @@ -378,7 +379,6 @@ private void InitializeComponent() this.removeEconomyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.dsCommodities = new RegulatedNoise.Enums_and_Utility_Classes.dsCommodities(); this.namesBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.cmbStationStations = new System.Windows.Forms.ComboBox_ro(); this.contextMenuStrip1.SuspendLayout(); this.tabCtrlMain.SuspendLayout(); this.tabHelpAndChangeLog.SuspendLayout(); @@ -997,6 +997,19 @@ private void InitializeComponent() this.groupBox14.TabStop = false; this.groupBox14.Text = "Station Data"; // + // cmbStationStations + // + this.cmbStationStations.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.cmbStationStations.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.cmbStationStations.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbStationStations.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cmbStationStations.Location = new System.Drawing.Point(114, 31); + this.cmbStationStations.Name = "cmbStationStations"; + this.cmbStationStations.ReadOnly = false; + this.cmbStationStations.Size = new System.Drawing.Size(236, 23); + this.cmbStationStations.TabIndex = 130; + this.cmbStationStations.Visible_ro = false; + // // paEconomies // this.paEconomies.Controls.Add(this.button8); @@ -1255,7 +1268,7 @@ private void InitializeComponent() // cbStationHasRepair // this.cbStationHasRepair.AutoSize = true; - this.cbStationHasRepair.Location = new System.Drawing.Point(328, 306); + this.cbStationHasRepair.Location = new System.Drawing.Point(424, 197); this.cbStationHasRepair.Name = "cbStationHasRepair"; this.cbStationHasRepair.ReadOnly = false; this.cbStationHasRepair.Size = new System.Drawing.Size(57, 17); @@ -1266,7 +1279,7 @@ private void InitializeComponent() // cbStationHasRearm // this.cbStationHasRearm.AutoSize = true; - this.cbStationHasRearm.Location = new System.Drawing.Point(328, 260); + this.cbStationHasRearm.Location = new System.Drawing.Point(424, 151); this.cbStationHasRearm.Name = "cbStationHasRearm"; this.cbStationHasRearm.ReadOnly = false; this.cbStationHasRearm.Size = new System.Drawing.Size(61, 17); @@ -1277,7 +1290,7 @@ private void InitializeComponent() // cbStationHasRefuel // this.cbStationHasRefuel.AutoSize = true; - this.cbStationHasRefuel.Location = new System.Drawing.Point(328, 283); + this.cbStationHasRefuel.Location = new System.Drawing.Point(424, 174); this.cbStationHasRefuel.Name = "cbStationHasRefuel"; this.cbStationHasRefuel.ReadOnly = false; this.cbStationHasRefuel.Size = new System.Drawing.Size(57, 17); @@ -1335,24 +1348,24 @@ private void InitializeComponent() this.cmdStationSave.TabIndex = 22; this.cmdStationSave.Text = "Save Changes"; this.cmdStationSave.UseVisualStyleBackColor = true; - this.cmdStationSave.Click += new System.EventHandler(this.cmdStationChange_Click); + this.cmdStationSave.Click += new System.EventHandler(this.cmdStationSave_Click); // // cmbStationType // - this.cmbStationType.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbStationType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbStationType.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cmbStationType.Location = new System.Drawing.Point(127, 307); + this.cmbStationType.Location = new System.Drawing.Point(127, 202); this.cmbStationType.Name = "cmbStationType"; this.cmbStationType.ReadOnly = false; this.cmbStationType.Size = new System.Drawing.Size(151, 23); this.cmbStationType.TabIndex = 9; - this.cmbStationType.Visible_ro = true; + this.cmbStationType.Visible_ro = false; // // label75 // this.label75.AutoSize = true; this.label75.ForeColor = System.Drawing.SystemColors.WindowText; - this.label75.Location = new System.Drawing.Point(22, 310); + this.label75.Location = new System.Drawing.Point(22, 205); this.label75.Name = "label75"; this.label75.Size = new System.Drawing.Size(31, 13); this.label75.TabIndex = 86; @@ -1360,14 +1373,14 @@ private void InitializeComponent() // // cmbStationState // - this.cmbStationState.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbStationState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbStationState.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbStationState.Location = new System.Drawing.Point(127, 281); this.cmbStationState.Name = "cmbStationState"; this.cmbStationState.ReadOnly = false; this.cmbStationState.Size = new System.Drawing.Size(151, 23); this.cmbStationState.TabIndex = 8; - this.cmbStationState.Visible_ro = true; + this.cmbStationState.Visible_ro = false; // // label76 // @@ -1381,14 +1394,14 @@ private void InitializeComponent() // // cmbStationAllegiance // - this.cmbStationAllegiance.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbStationAllegiance.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbStationAllegiance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbStationAllegiance.Location = new System.Drawing.Point(127, 255); this.cmbStationAllegiance.Name = "cmbStationAllegiance"; this.cmbStationAllegiance.ReadOnly = false; this.cmbStationAllegiance.Size = new System.Drawing.Size(151, 23); this.cmbStationAllegiance.TabIndex = 7; - this.cmbStationAllegiance.Visible_ro = true; + this.cmbStationAllegiance.Visible_ro = false; // // label77 // @@ -1402,14 +1415,14 @@ private void InitializeComponent() // // cmbStationGovernment // - this.cmbStationGovernment.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbStationGovernment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbStationGovernment.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbStationGovernment.Location = new System.Drawing.Point(127, 229); this.cmbStationGovernment.Name = "cmbStationGovernment"; this.cmbStationGovernment.ReadOnly = false; this.cmbStationGovernment.Size = new System.Drawing.Size(151, 23); this.cmbStationGovernment.TabIndex = 6; - this.cmbStationGovernment.Visible_ro = true; + this.cmbStationGovernment.Visible_ro = false; // // label78 // @@ -1424,16 +1437,16 @@ private void InitializeComponent() // txtStationFaction // this.txtStationFaction.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtStationFaction.Location = new System.Drawing.Point(127, 203); + this.txtStationFaction.Location = new System.Drawing.Point(127, 308); this.txtStationFaction.Name = "txtStationFaction"; - this.txtStationFaction.Size = new System.Drawing.Size(151, 21); + this.txtStationFaction.Size = new System.Drawing.Size(352, 21); this.txtStationFaction.TabIndex = 5; // // label79 // this.label79.AutoSize = true; this.label79.ForeColor = System.Drawing.SystemColors.WindowText; - this.label79.Location = new System.Drawing.Point(22, 208); + this.label79.Location = new System.Drawing.Point(22, 313); this.label79.Name = "label79"; this.label79.Size = new System.Drawing.Size(42, 13); this.label79.TabIndex = 78; @@ -1460,14 +1473,14 @@ private void InitializeComponent() // // cmbStationMaxLandingPadSize // - this.cmbStationMaxLandingPadSize.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbStationMaxLandingPadSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbStationMaxLandingPadSize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbStationMaxLandingPadSize.Location = new System.Drawing.Point(127, 174); this.cmbStationMaxLandingPadSize.Name = "cmbStationMaxLandingPadSize"; this.cmbStationMaxLandingPadSize.ReadOnly = false; this.cmbStationMaxLandingPadSize.Size = new System.Drawing.Size(68, 23); this.cmbStationMaxLandingPadSize.TabIndex = 4; - this.cmbStationMaxLandingPadSize.Visible_ro = true; + this.cmbStationMaxLandingPadSize.Visible_ro = false; // // label81 // @@ -1635,13 +1648,14 @@ private void InitializeComponent() // this.cmbSystemsAllSystems.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; this.cmbSystemsAllSystems.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.cmbSystemsAllSystems.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSystemsAllSystems.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbSystemsAllSystems.Location = new System.Drawing.Point(89, 33); this.cmbSystemsAllSystems.Name = "cmbSystemsAllSystems"; this.cmbSystemsAllSystems.ReadOnly = false; this.cmbSystemsAllSystems.Size = new System.Drawing.Size(254, 23); this.cmbSystemsAllSystems.TabIndex = 0; - this.cmbSystemsAllSystems.Visible_ro = true; + this.cmbSystemsAllSystems.Visible_ro = false; this.cmbSystemsAllSystems.SelectedIndexChanged += new System.EventHandler(this.cmbAllStations_SelectedIndexChanged); // // label88 @@ -1714,24 +1728,23 @@ private void InitializeComponent() this.label63.Size = new System.Drawing.Size(48, 13); this.label63.TabIndex = 58; this.label63.Text = "Updated"; - this.label63.Click += new System.EventHandler(this.label63_Click); // // cmbSystemPrimaryEconomy // - this.cmbSystemPrimaryEconomy.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbSystemPrimaryEconomy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSystemPrimaryEconomy.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cmbSystemPrimaryEconomy.Location = new System.Drawing.Point(295, 309); + this.cmbSystemPrimaryEconomy.Location = new System.Drawing.Point(295, 201); this.cmbSystemPrimaryEconomy.Name = "cmbSystemPrimaryEconomy"; this.cmbSystemPrimaryEconomy.ReadOnly = false; this.cmbSystemPrimaryEconomy.Size = new System.Drawing.Size(151, 23); this.cmbSystemPrimaryEconomy.TabIndex = 13; - this.cmbSystemPrimaryEconomy.Visible_ro = true; + this.cmbSystemPrimaryEconomy.Visible_ro = false; // // label65 // this.label65.AutoSize = true; this.label65.ForeColor = System.Drawing.SystemColors.WindowText; - this.label65.Location = new System.Drawing.Point(203, 312); + this.label65.Location = new System.Drawing.Point(203, 204); this.label65.Name = "label65"; this.label65.Size = new System.Drawing.Size(88, 13); this.label65.TabIndex = 54; @@ -1739,14 +1752,14 @@ private void InitializeComponent() // // cmbSystemSecurity // - this.cmbSystemSecurity.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbSystemSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSystemSecurity.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbSystemSecurity.Location = new System.Drawing.Point(295, 174); this.cmbSystemSecurity.Name = "cmbSystemSecurity"; this.cmbSystemSecurity.ReadOnly = false; this.cmbSystemSecurity.Size = new System.Drawing.Size(151, 23); this.cmbSystemSecurity.TabIndex = 8; - this.cmbSystemSecurity.Visible_ro = true; + this.cmbSystemSecurity.Visible_ro = false; // // label66 // @@ -1760,14 +1773,14 @@ private void InitializeComponent() // // cmbSystemState // - this.cmbSystemState.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbSystemState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSystemState.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbSystemState.Location = new System.Drawing.Point(295, 283); this.cmbSystemState.Name = "cmbSystemState"; this.cmbSystemState.ReadOnly = false; this.cmbSystemState.Size = new System.Drawing.Size(151, 23); this.cmbSystemState.TabIndex = 12; - this.cmbSystemState.Visible_ro = true; + this.cmbSystemState.Visible_ro = false; // // label67 // @@ -1781,14 +1794,14 @@ private void InitializeComponent() // // cmbSystemAllegiance // - this.cmbSystemAllegiance.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbSystemAllegiance.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSystemAllegiance.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cmbSystemAllegiance.Location = new System.Drawing.Point(295, 257); + this.cmbSystemAllegiance.Location = new System.Drawing.Point(295, 256); this.cmbSystemAllegiance.Name = "cmbSystemAllegiance"; this.cmbSystemAllegiance.ReadOnly = false; this.cmbSystemAllegiance.Size = new System.Drawing.Size(151, 23); this.cmbSystemAllegiance.TabIndex = 11; - this.cmbSystemAllegiance.Visible_ro = true; + this.cmbSystemAllegiance.Visible_ro = false; // // label68 // @@ -1802,14 +1815,14 @@ private void InitializeComponent() // // cmbSystemGovernment // - this.cmbSystemGovernment.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.cmbSystemGovernment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSystemGovernment.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbSystemGovernment.Location = new System.Drawing.Point(295, 228); this.cmbSystemGovernment.Name = "cmbSystemGovernment"; this.cmbSystemGovernment.ReadOnly = false; this.cmbSystemGovernment.Size = new System.Drawing.Size(151, 23); this.cmbSystemGovernment.TabIndex = 10; - this.cmbSystemGovernment.Visible_ro = true; + this.cmbSystemGovernment.Visible_ro = false; // // label69 // @@ -1847,17 +1860,16 @@ private void InitializeComponent() // txtSystemFaction // this.txtSystemFaction.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSystemFaction.Location = new System.Drawing.Point(295, 203); + this.txtSystemFaction.Location = new System.Drawing.Point(89, 310); this.txtSystemFaction.Name = "txtSystemFaction"; - this.txtSystemFaction.ReadOnly = true; - this.txtSystemFaction.Size = new System.Drawing.Size(151, 21); + this.txtSystemFaction.Size = new System.Drawing.Size(357, 21); this.txtSystemFaction.TabIndex = 9; // // label61 // this.label61.AutoSize = true; this.label61.ForeColor = System.Drawing.SystemColors.WindowText; - this.label61.Location = new System.Drawing.Point(203, 208); + this.label61.Location = new System.Drawing.Point(41, 313); this.label61.Name = "label61"; this.label61.Size = new System.Drawing.Size(42, 13); this.label61.TabIndex = 42; @@ -2015,7 +2027,6 @@ private void InitializeComponent() this.cmbStationToStar.TabIndex = 16; this.cmbStationToStar.SelectedIndexChanged += new System.EventHandler(this.cmbStationToStar_SelectedIndexChanged); this.cmbStationToStar.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cmbStationToStarInput_KeyPress); - this.cmbStationToStar.LostFocus += new System.EventHandler(this.cmbStationToStarInput_LostFocus); // // gbSorting // @@ -2115,7 +2126,6 @@ private void InitializeComponent() this.cmbLightYears.TabIndex = 11; this.cmbLightYears.SelectedIndexChanged += new System.EventHandler(this.cmbLightYears_SelectedIndexChanged); this.cmbLightYears.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cmbLightYearsInput_KeyPress); - this.cmbLightYears.LostFocus += new System.EventHandler(this.cmbLightYearsInput_LostFocus); // // tabControl2 // @@ -2126,10 +2136,10 @@ private void InitializeComponent() this.tabControl2.Controls.Add(this.tabPage1); this.tabControl2.Controls.Add(this.tabPage2); this.tabControl2.Controls.Add(this.tabStationToStation); - this.tabControl2.Location = new System.Drawing.Point(0, 56); + this.tabControl2.Location = new System.Drawing.Point(0, 54); this.tabControl2.Name = "tabControl2"; this.tabControl2.SelectedIndex = 0; - this.tabControl2.Size = new System.Drawing.Size(1048, 530); + this.tabControl2.Size = new System.Drawing.Size(1048, 532); this.tabControl2.TabIndex = 10; // // tabPage3 @@ -2137,7 +2147,7 @@ private void InitializeComponent() this.tabPage3.Controls.Add(this.splitContainer2); this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; - this.tabPage3.Size = new System.Drawing.Size(1040, 504); + this.tabPage3.Size = new System.Drawing.Size(1040, 506); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "All Commodities"; this.tabPage3.UseVisualStyleBackColor = true; @@ -2160,7 +2170,7 @@ private void InitializeComponent() // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.splitContainer1); - this.splitContainer2.Size = new System.Drawing.Size(1040, 501); + this.splitContainer2.Size = new System.Drawing.Size(1040, 503); this.splitContainer2.SplitterDistance = 822; this.splitContainer2.SplitterWidth = 6; this.splitContainer2.TabIndex = 8; @@ -2173,7 +2183,7 @@ private void InitializeComponent() this.lvAllComms.FullRowSelect = true; this.lvAllComms.Location = new System.Drawing.Point(0, 0); this.lvAllComms.Name = "lvAllComms"; - this.lvAllComms.Size = new System.Drawing.Size(821, 503); + this.lvAllComms.Size = new System.Drawing.Size(821, 505); this.lvAllComms.Sorting = System.Windows.Forms.SortOrder.Ascending; this.lvAllComms.TabIndex = 4; this.lvAllComms.UseCompatibleStateImageBehavior = false; @@ -2198,7 +2208,7 @@ private void InitializeComponent() // this.splitContainer1.Panel2.Controls.Add(this.label9); this.splitContainer1.Panel2.Controls.Add(this.chart2); - this.splitContainer1.Size = new System.Drawing.Size(212, 501); + this.splitContainer1.Size = new System.Drawing.Size(212, 503); this.splitContainer1.SplitterDistance = 226; this.splitContainer1.SplitterWidth = 6; this.splitContainer1.TabIndex = 7; @@ -2215,14 +2225,14 @@ private void InitializeComponent() // // chart1 // - chartArea3.Name = "ChartArea1"; - this.chart1.ChartAreas.Add(chartArea3); + chartArea1.Name = "ChartArea1"; + this.chart1.ChartAreas.Add(chartArea1); this.chart1.Dock = System.Windows.Forms.DockStyle.Fill; this.chart1.Location = new System.Drawing.Point(0, 0); this.chart1.Name = "chart1"; - series3.ChartArea = "ChartArea1"; - series3.Name = "Series1"; - this.chart1.Series.Add(series3); + series1.ChartArea = "ChartArea1"; + series1.Name = "Series1"; + this.chart1.Series.Add(series1); this.chart1.Size = new System.Drawing.Size(210, 224); this.chart1.TabIndex = 5; this.chart1.Text = "chart1"; @@ -2240,15 +2250,15 @@ private void InitializeComponent() // // chart2 // - chartArea4.Name = "ChartArea1"; - this.chart2.ChartAreas.Add(chartArea4); + chartArea2.Name = "ChartArea1"; + this.chart2.ChartAreas.Add(chartArea2); this.chart2.Dock = System.Windows.Forms.DockStyle.Fill; this.chart2.Location = new System.Drawing.Point(0, 0); this.chart2.Name = "chart2"; - series4.ChartArea = "ChartArea1"; - series4.Name = "Series1"; - this.chart2.Series.Add(series4); - this.chart2.Size = new System.Drawing.Size(210, 267); + series2.ChartArea = "ChartArea1"; + series2.Name = "Series1"; + this.chart2.Series.Add(series2); + this.chart2.Size = new System.Drawing.Size(210, 269); this.chart2.TabIndex = 6; this.chart2.Text = "chart2"; this.chart2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseMove); @@ -2266,7 +2276,7 @@ private void InitializeComponent() this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(1040, 504); + this.tabPage1.Size = new System.Drawing.Size(1040, 506); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "By Station"; this.tabPage1.UseVisualStyleBackColor = true; @@ -2351,7 +2361,7 @@ private void InitializeComponent() this.lbPrices.ImeMode = System.Windows.Forms.ImeMode.Off; this.lbPrices.Location = new System.Drawing.Point(0, 71); this.lbPrices.Name = "lbPrices"; - this.lbPrices.Size = new System.Drawing.Size(1040, 427); + this.lbPrices.Size = new System.Drawing.Size(1040, 429); this.lbPrices.Sorting = System.Windows.Forms.SortOrder.Ascending; this.lbPrices.TabIndex = 3; this.lbPrices.UseCompatibleStateImageBehavior = false; @@ -2415,7 +2425,7 @@ private void InitializeComponent() this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(1040, 504); + this.tabPage2.Size = new System.Drawing.Size(1040, 506); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "By Commodity"; this.tabPage2.UseVisualStyleBackColor = true; @@ -2624,7 +2634,7 @@ private void InitializeComponent() this.lbCommodities.FullRowSelect = true; this.lbCommodities.Location = new System.Drawing.Point(0, 47); this.lbCommodities.Name = "lbCommodities"; - this.lbCommodities.Size = new System.Drawing.Size(1040, 451); + this.lbCommodities.Size = new System.Drawing.Size(1040, 453); this.lbCommodities.Sorting = System.Windows.Forms.SortOrder.Ascending; this.lbCommodities.TabIndex = 4; this.lbCommodities.UseCompatibleStateImageBehavior = false; @@ -2647,7 +2657,7 @@ private void InitializeComponent() this.tabStationToStation.Controls.Add(this.bShowStationToStationRouteAtStarchartDotClub); this.tabStationToStation.Location = new System.Drawing.Point(4, 22); this.tabStationToStation.Name = "tabStationToStation"; - this.tabStationToStation.Size = new System.Drawing.Size(1040, 504); + this.tabStationToStation.Size = new System.Drawing.Size(1040, 506); this.tabStationToStation.TabIndex = 8; this.tabStationToStation.Text = "Station-To-Station"; this.tabStationToStation.UseVisualStyleBackColor = true; @@ -2667,7 +2677,7 @@ private void InitializeComponent() // splitContainer4.Panel2 // this.splitContainer4.Panel2.Controls.Add(this.lvStationToStationReturn); - this.splitContainer4.Size = new System.Drawing.Size(609, 458); + this.splitContainer4.Size = new System.Drawing.Size(609, 460); this.splitContainer4.SplitterDistance = 228; this.splitContainer4.TabIndex = 19; // @@ -2694,7 +2704,7 @@ private void InitializeComponent() this.lvStationToStationReturn.ImeMode = System.Windows.Forms.ImeMode.Off; this.lvStationToStationReturn.Location = new System.Drawing.Point(0, 3); this.lvStationToStationReturn.Name = "lvStationToStationReturn"; - this.lvStationToStationReturn.Size = new System.Drawing.Size(606, 220); + this.lvStationToStationReturn.Size = new System.Drawing.Size(606, 222); this.lvStationToStationReturn.Sorting = System.Windows.Forms.SortOrder.Ascending; this.lvStationToStationReturn.TabIndex = 18; this.lvStationToStationReturn.UseCompatibleStateImageBehavior = false; @@ -2714,7 +2724,7 @@ private void InitializeComponent() this.groupBox7.Controls.Add(this.btnBestRoundTrip); this.groupBox7.Location = new System.Drawing.Point(624, 34); this.groupBox7.Name = "groupBox7"; - this.groupBox7.Size = new System.Drawing.Size(409, 458); + this.groupBox7.Size = new System.Drawing.Size(409, 460); this.groupBox7.TabIndex = 17; this.groupBox7.TabStop = false; this.groupBox7.Text = "Find Round-Trips"; @@ -2781,7 +2791,7 @@ private void InitializeComponent() this.lbAllRoundTrips.FormattingEnabled = true; this.lbAllRoundTrips.Location = new System.Drawing.Point(6, 52); this.lbAllRoundTrips.Name = "lbAllRoundTrips"; - this.lbAllRoundTrips.Size = new System.Drawing.Size(397, 355); + this.lbAllRoundTrips.Size = new System.Drawing.Size(397, 394); this.lbAllRoundTrips.TabIndex = 13; this.lbAllRoundTrips.SelectedIndexChanged += new System.EventHandler(this.lbAllRoundTrips_SelectedIndexChanged); // @@ -3333,8 +3343,6 @@ private void InitializeComponent() // cbUseEddnTestSchema // this.cbUseEddnTestSchema.AutoSize = true; - this.cbUseEddnTestSchema.Checked = true; - this.cbUseEddnTestSchema.CheckState = System.Windows.Forms.CheckState.Checked; this.cbUseEddnTestSchema.Location = new System.Drawing.Point(169, 471); this.cbUseEddnTestSchema.Name = "cbUseEddnTestSchema"; this.cbUseEddnTestSchema.Size = new System.Drawing.Size(89, 17); @@ -4016,7 +4024,7 @@ private void InitializeComponent() // cbLoadStationsJSON // this.cbLoadStationsJSON.AutoSize = true; - this.cbLoadStationsJSON.Location = new System.Drawing.Point(32, 116); + this.cbLoadStationsJSON.Location = new System.Drawing.Point(32, 131); this.cbLoadStationsJSON.Name = "cbLoadStationsJSON"; this.cbLoadStationsJSON.Size = new System.Drawing.Size(308, 30); this.cbLoadStationsJSON.TabIndex = 6; @@ -4029,7 +4037,7 @@ private void InitializeComponent() // this.label74.AutoSize = true; this.label74.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label74.Location = new System.Drawing.Point(49, 144); + this.label74.Location = new System.Drawing.Point(49, 159); this.label74.Name = "label74"; this.label74.Size = new System.Drawing.Size(269, 36); this.label74.TabIndex = 7; @@ -4053,10 +4061,11 @@ private void InitializeComponent() this.cbIncludeUnknownDTS.AutoSize = true; this.cbIncludeUnknownDTS.Location = new System.Drawing.Point(32, 80); this.cbIncludeUnknownDTS.Name = "cbIncludeUnknownDTS"; - this.cbIncludeUnknownDTS.Size = new System.Drawing.Size(249, 30); + this.cbIncludeUnknownDTS.Size = new System.Drawing.Size(349, 43); this.cbIncludeUnknownDTS.TabIndex = 4; - this.cbIncludeUnknownDTS.Text = "include station if is unknown \r\n(otherwise it will be excluded" + - ")"; + this.cbIncludeUnknownDTS.Text = "include station on search if a filter-by property is unknown \r\n(otherwise it wil" + + "l be excluded, properties can be , \r\n and so o" + + "n)"; this.cbIncludeUnknownDTS.UseVisualStyleBackColor = true; this.cbIncludeUnknownDTS.CheckedChanged += new System.EventHandler(this.cbIncludeUnknownDTS_CheckedChanged); // @@ -4073,7 +4082,7 @@ private void InitializeComponent() // // button6 // - this.button6.Location = new System.Drawing.Point(32, 202); + this.button6.Location = new System.Drawing.Point(32, 217); this.button6.Name = "button6"; this.button6.Size = new System.Drawing.Size(226, 23); this.button6.TabIndex = 2; @@ -4310,11 +4319,11 @@ private void InitializeComponent() // cmdLoadCurrentSystem // this.cmdLoadCurrentSystem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cmdLoadCurrentSystem.Location = new System.Drawing.Point(949, 57); + this.cmdLoadCurrentSystem.Location = new System.Drawing.Point(929, 57); this.cmdLoadCurrentSystem.Name = "cmdLoadCurrentSystem"; - this.cmdLoadCurrentSystem.Size = new System.Drawing.Size(128, 23); + this.cmdLoadCurrentSystem.Size = new System.Drawing.Size(148, 23); this.cmdLoadCurrentSystem.TabIndex = 60; - this.cmdLoadCurrentSystem.Text = "Show System Data"; + this.cmdLoadCurrentSystem.Text = "Show Current System Data"; this.cmdLoadCurrentSystem.UseVisualStyleBackColor = true; this.cmdLoadCurrentSystem.Click += new System.EventHandler(this.cmdLoadCurrentSystem_Click); // @@ -4358,16 +4367,6 @@ private void InitializeComponent() this.namesBindingSource.DataMember = "Names"; this.namesBindingSource.DataSource = this.dsCommodities; // - // cmbStationStations - // - this.cmbStationStations.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cmbStationStations.Location = new System.Drawing.Point(114, 31); - this.cmbStationStations.Name = "cmbStationStations"; - this.cmbStationStations.ReadOnly = false; - this.cmbStationStations.Size = new System.Drawing.Size(236, 23); - this.cmbStationStations.TabIndex = 130; - this.cmbStationStations.Visible_ro = true; - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/RegulatedNoise/Form1.cs b/RegulatedNoise/Form1.cs index cbcbc94..9b4af49 100644 --- a/RegulatedNoise/Form1.cs +++ b/RegulatedNoise/Form1.cs @@ -106,8 +106,8 @@ public partial class Form1 : RNBaseForm private String _AppPath = string.Empty; private String _oldSystemName = null; private String _oldStationName = null; - + [SecurityPermission(SecurityAction.Demand, ControlAppDomain = true)] public Form1() { @@ -1583,6 +1583,9 @@ private string CombinedNameToSystemName(string combinedName) private void SetupGui(bool force= false) { + System.Windows.Forms.Cursor oldCursor = Cursor; + Cursor = Cursors.WaitCursor; + //_cbIncludeWithinRegionOfStation_IndexChanged = false; if (!_InitDone && !force) @@ -1610,8 +1613,6 @@ private void SetupGui(bool force= false) _pt.PrintAndReset("3"); - Cursor = Cursors.WaitCursor; - BaseList = getDropDownStationsItems(ref _StationIndices); formatter.Serialize(SerialListCopy, BaseList); @@ -1729,8 +1730,6 @@ private void SetupGui(bool force= false) _pt.PrintAndReset("10"); - Cursor = Cursors.Default; - cmbStation.EndUpdate(); cmbStationToStationFrom.EndUpdate(); cmbStationToStationTo.EndUpdate(); @@ -1739,6 +1738,8 @@ private void SetupGui(bool force= false) UpdateStationToStation(); _pt.PrintAndReset("12"); + + Cursor = oldCursor; } @@ -1785,7 +1786,7 @@ private int GetTextLengthInPixels(string myText) // get the relevant stations SelectionRaw = StationDirectory.Where(x => getStationSelection(x)).ToList(); - + if (rbSortBySystem.Checked) { // get the list ordered as wanted -> order by system @@ -4833,6 +4834,8 @@ private void Form_Shown(object sender, System.EventArgs e) showSystemNumbers(); + SetupGui(); + } private void Form_Load(object sender, EventArgs e) @@ -4903,6 +4906,22 @@ private void doSpecial() RegulatedNoiseSettings.EBPixelThreshold = 0.6f; RegulatedNoiseSettings.EBPixelAmount = 22; } + + // do all the things that must be done for the new versions + if ((RegulatedNoiseSettings.Version == 1.84m) && (RegulatedNoiseSettings.VersionDJ == 0.17m)) + { + if(RegulatedNoiseSettings.UseEddnTestSchema) + { + RegulatedNoiseSettings.UseEddnTestSchema = false; + SaveSettings(); + if(RegulatedNoiseSettings.PostToEddnOnImport) + { + MessageBox.Show("Set EDDN-mode uniquely to -mode. \n" + + "If you know, what you're doing (e.g. you're developer) you can change it back again to -mode", + "Changing a mistakable setting", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + } } } @@ -5161,7 +5180,7 @@ private void btnBestRoundTrip_Click(object sender, EventArgs e) ProgressView progress = new ProgressView(); List> allRoundTrips = new List>(); - var selectedStations = StationDirectory.Where(x => getStationSelection(x)); + var selectedStations = StationDirectory.Where(x => getStationSelection(x)); Int32 Total = getCalculations(selectedStations.Count()); Int32 Current = 0; @@ -5178,7 +5197,7 @@ private void btnBestRoundTrip_Click(object sender, EventArgs e) Current+=1; progress.progressUpdate(Current, Total); - Debug.Print(Current +"/"+ Total); + Debug.Print(Current +"/"+ Total); int bestThisTrip; GetBestRoundTripForTwoStations(a.Key, b.Key, out bestThisTrip); @@ -5266,19 +5285,25 @@ private int getCalculations(int Total) private void checkboxLightYears_CheckedChanged(object sender, EventArgs e) { + Cursor = Cursors.WaitCursor; RegulatedNoiseSettings.limitLightYears = cbLimitLightYears.Checked; SetupGui(); + Cursor = Cursors.Default; } private void cbStationToStar_CheckedChanged(object sender, EventArgs e) { + Cursor = Cursors.WaitCursor; RegulatedNoiseSettings.StationToStar = cbStationToStar.Checked; SetupGui(); + Cursor = Cursors.Default; } private void cbIncludeWithinRegionOfStation_SelectionChangeCommitted(object sender, System.EventArgs e) { + Cursor = Cursors.WaitCursor; SetupGui(); + Cursor = Cursors.Default; } private void button24_Click(object sender, EventArgs e) @@ -6100,7 +6125,7 @@ private bool getStationSelection(CsvRow x, bool noRestriction=false) private void label63_Click(object sender, EventArgs e) { - } + } #region System / Station Tab @@ -6186,7 +6211,7 @@ private void loadSystemData(string Systemname, bool isNew=false) cmdSystemSave.Enabled = false; cmdSystemCancel.Enabled = cmdSystemSave.Enabled; - cmdStationNew.Enabled = false; + cmdStationNew.Enabled = true; cmdStationEdit.Enabled = false; cmdStationSave.Enabled = false; cmdStationCancel.Enabled = cmdStationSave.Enabled; @@ -6349,7 +6374,7 @@ private void loadStationData(string Systemname, string Stationname, bool isNew=f setStationEditable(false); - cmdStationNew.Enabled = true; + cmdStationNew.Enabled = cmdStationNew.Enabled; cmdStationEdit.Enabled = false; cmdStationSave.Enabled = false; @@ -6851,6 +6876,9 @@ private void cmdSystemSave_Click(object sender, EventArgs e) if (MessageBox.Show("Save changes on current system ?", "Stationdata changed", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.OK) { Cursor = Cursors.WaitCursor; + if (m_SystemIsNew) + _oldSystemName = ""; + _Milkyway.ChangeAddSystem(m_currentSystemdata, _oldSystemName); setSystemEditable(false); @@ -6871,11 +6899,14 @@ private void cmdSystemSave_Click(object sender, EventArgs e) loadSystemData(m_currentSystemdata.Name); loadStationData(m_currentSystemdata.Name, txtStationName.Text); + + showSystemNumbers(); + Cursor = Cursors.Default; } } - private void cmdStationChange_Click(object sender, EventArgs e) + private void cmdStationSave_Click(object sender, EventArgs e) { EDStation existing = null; @@ -6912,6 +6943,9 @@ private void cmdStationChange_Click(object sender, EventArgs e) if (MessageBox.Show("Save changes on current station ?", "stationdata changed", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.OK) { + if (m_StationIsNew) + _oldStationName = ""; + Cursor = Cursors.WaitCursor; _Milkyway.ChangeAddStation(m_currentSystemdata.Name, m_currentStationdata, _oldStationName); @@ -6922,6 +6956,9 @@ private void cmdStationChange_Click(object sender, EventArgs e) loadSystemData(m_currentSystemdata.Name); loadStationData(m_currentSystemdata.Name, m_currentStationdata.Name); + + showSystemNumbers(); + Cursor = Cursors.Default; } } @@ -6968,6 +7005,7 @@ private void cmdSystemNew_Click(object sender, EventArgs e) cmbStationStations.ReadOnly = false; loadSystemData(newSystemname, true); + loadStationData(newSystemname, "", false); } } } @@ -7259,8 +7297,11 @@ private void cmdTest_Click(object sender, EventArgs e) private void cmbAllStations_SelectedIndexChanged(object sender, EventArgs e) { - if(!m_SystemLoadingValues) + if (!m_SystemLoadingValues) + { loadSystemData(cmbSystemsAllSystems.SelectedValue.ToString()); + loadStationData(cmbSystemsAllSystems.SelectedValue.ToString(), ""); + } } private void cmdSystemCancel_Click(object sender, EventArgs e) @@ -7319,5 +7360,7 @@ private void cmdStationEco_OK_Click(object sender, EventArgs e) paEconomies.Visible = false; } + + } } diff --git a/RegulatedNoise/ProgressView.cs b/RegulatedNoise/ProgressView.cs index a76cafb..3f30dac 100644 --- a/RegulatedNoise/ProgressView.cs +++ b/RegulatedNoise/ProgressView.cs @@ -66,7 +66,7 @@ public void progressUpdate(Int32 Value, Int32 Total) { else { ProzValue = 0; } - if (m_PTimer.currentMeasuring() >= 100) + if (m_PTimer.currentMeasuring() >= 50) { m_PTimer.startMeasuring(); progressUpdate(ProzValue); diff --git a/RegulatedNoise/Properties/AssemblyInfo.cs b/RegulatedNoise/Properties/AssemblyInfo.cs index c1a529d..f548f98 100644 --- a/RegulatedNoise/Properties/AssemblyInfo.cs +++ b/RegulatedNoise/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.84.0.016")] -[assembly: AssemblyFileVersion("1.84.0.016")] +[assembly: AssemblyVersion("1.84.0.017")] +[assembly: AssemblyFileVersion("1.84.0.017")] diff --git a/RegulatedNoise/RegulatedNoise.csproj b/RegulatedNoise/RegulatedNoise.csproj index 51274e1..076100b 100644 --- a/RegulatedNoise/RegulatedNoise.csproj +++ b/RegulatedNoise/RegulatedNoise.csproj @@ -58,7 +58,7 @@ true bin\Debug DJ ep\ - TRACE;DEBUG;DukeJones ep_Debug + TRACE;DEBUG;DukeJones ep_Debug1 true full AnyCPU diff --git a/ToDo.txt b/ToDo.txt index 5dc4016..41d4df4 100644 --- a/ToDo.txt +++ b/ToDo.txt @@ -20,10 +20,16 @@ todo: * show hint with age of market prices if location is a station * show hint how many stations and systems are in database * add rejected marketdata from eddn with rightclick contextmenue + * show the stations as a one look list *********************************************************************************** ------------------------------------------------------------------------------------- +1.84_0.17_5 + * it's possible to add new stations + * default value for EDDN is no longer because it's only for dev testing + * set value for EDDN schema from to and add a hint for users who have EDDN active +------------------------------------------------------------------------------------- 1.84_0.17_4 * it's possible to change data of existing stations -------------------------------------------------------------------------------------