diff --git a/Src/ServerGridEditor/Forms/CreateIslandForm.Designer.cs b/Src/ServerGridEditor/Forms/CreateIslandForm.Designer.cs index 171778b..ff3c63d 100644 --- a/Src/ServerGridEditor/Forms/CreateIslandForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/CreateIslandForm.Designer.cs @@ -1,6 +1,6 @@ namespace ServerGridEditor { - partial class CreateIslndForm + partial class CreateIslandForm { /// /// Required designer variable. @@ -365,7 +365,7 @@ this.instancesListBox.Size = new System.Drawing.Size(194, 95); this.instancesListBox.TabIndex = 39; // - // CreateIslndForm + // CreateIslandForm // this.AcceptButton = this.createBtn; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -404,7 +404,10 @@ this.Controls.Add(this.label1); this.Controls.Add(this.islandNameTxtBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "CreateIslndForm"; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "CreateIslandForm"; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Create Island"; this.Load += new System.EventHandler(this.Form2_Load); diff --git a/Src/ServerGridEditor/Forms/CreateIslandForm.cs b/Src/ServerGridEditor/Forms/CreateIslandForm.cs index 54aeab5..e6beb14 100644 --- a/Src/ServerGridEditor/Forms/CreateIslandForm.cs +++ b/Src/ServerGridEditor/Forms/CreateIslandForm.cs @@ -12,13 +12,13 @@ using System.Windows.Forms; namespace ServerGridEditor { - public partial class CreateIslndForm : Form + public partial class CreateIslandForm : Form { public MainForm mainForm; public Island editedIsland; public bool bIslandNameChanged = false; - public CreateIslndForm() + public CreateIslandForm() { InitializeComponent(); pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; diff --git a/Src/ServerGridEditor/Forms/CreateIslandForm.resx b/Src/ServerGridEditor/Forms/CreateIslandForm.resx index 91ebdb0..80b1d8e 100644 --- a/Src/ServerGridEditor/Forms/CreateIslandForm.resx +++ b/Src/ServerGridEditor/Forms/CreateIslandForm.resx @@ -126,12 +126,6 @@ True - - True - - - True - 45 diff --git a/Src/ServerGridEditor/Forms/CreateProjectForm.Designer.cs b/Src/ServerGridEditor/Forms/CreateProjectForm.Designer.cs index e860046..e7c616b 100644 --- a/Src/ServerGridEditor/Forms/CreateProjectForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/CreateProjectForm.Designer.cs @@ -975,7 +975,10 @@ this.Controls.Add(this.sizeXTxtBox); this.Controls.Add(this.label1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "CreateProjectForm"; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Create Project"; this.Load += new System.EventHandler(this.CreateProjectForm_Load); diff --git a/Src/ServerGridEditor/Forms/CreateProjectForm.cs b/Src/ServerGridEditor/Forms/CreateProjectForm.cs index d2b613e..ca8a25e 100644 --- a/Src/ServerGridEditor/Forms/CreateProjectForm.cs +++ b/Src/ServerGridEditor/Forms/CreateProjectForm.cs @@ -428,6 +428,7 @@ namespace ServerGridEditor mainForm.currentProject.TravelDataConfig.CopyFrom(TravelDataConfig); mainForm.currentProject.SharedLogConfig.CopyFrom(SharedLogConfig); } + mainForm.EnableProjectMenuItems(); Close(); } diff --git a/Src/ServerGridEditor/Forms/EditAllLocksForm.Designer.cs b/Src/ServerGridEditor/Forms/EditAllLocksForm.Designer.cs index cd362a1..d296c3b 100644 --- a/Src/ServerGridEditor/Forms/EditAllLocksForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditAllLocksForm.Designer.cs @@ -146,8 +146,12 @@ this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "EditAllLocksForm"; this.ShowIcon = false; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Locks"; this.ResumeLayout(false); diff --git a/Src/ServerGridEditor/Forms/EditDiscoZonesForm.Designer.cs b/Src/ServerGridEditor/Forms/EditDiscoZonesForm.Designer.cs index 745a4d2..f6ee3fc 100644 --- a/Src/ServerGridEditor/Forms/EditDiscoZonesForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditDiscoZonesForm.Designer.cs @@ -219,8 +219,13 @@ this.Controls.Add(this.discoZonesGrid); this.Controls.Add(this.cancelBtn); this.Controls.Add(this.saveBtn); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "EditDiscoZonesForm"; - this.Text = "EditDiscoZonesForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Edit Discovery Zones"; ((System.ComponentModel.ISupportInitialize)(this.discoZonesGrid)).EndInit(); this.ResumeLayout(false); diff --git a/Src/ServerGridEditor/Forms/EditDiscoZonesForm.resx b/Src/ServerGridEditor/Forms/EditDiscoZonesForm.resx index 9847d60..7da6a26 100644 --- a/Src/ServerGridEditor/Forms/EditDiscoZonesForm.resx +++ b/Src/ServerGridEditor/Forms/EditDiscoZonesForm.resx @@ -159,4 +159,46 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + \ No newline at end of file diff --git a/Src/ServerGridEditor/Forms/EditDiscoveryZoneInstance.Designer.cs b/Src/ServerGridEditor/Forms/EditDiscoveryZoneInstance.Designer.cs index efbc7db..39f8076 100644 --- a/Src/ServerGridEditor/Forms/EditDiscoveryZoneInstance.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditDiscoveryZoneInstance.Designer.cs @@ -218,8 +218,13 @@ this.Controls.Add(this.zoneNameTxt); this.Controls.Add(this.cancelBtn); this.Controls.Add(this.saveBtn); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "EditDiscoveryZoneInstance"; - this.Text = "EditDiscoveryZoneInstance"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Edit Discovery Zone Instance"; this.ResumeLayout(false); this.PerformLayout(); diff --git a/Src/ServerGridEditor/Forms/EditIslandInstance.Designer.cs b/Src/ServerGridEditor/Forms/EditIslandInstance.Designer.cs index b874e3c..23abd73 100644 --- a/Src/ServerGridEditor/Forms/EditIslandInstance.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditIslandInstance.Designer.cs @@ -283,6 +283,7 @@ this.Controls.Add(this.saveBtn); this.Controls.Add(this.label1); this.Controls.Add(this.spawnerOverridesGrid); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "EditIslandInstance"; diff --git a/Src/ServerGridEditor/Forms/EditIslandInstance.resx b/Src/ServerGridEditor/Forms/EditIslandInstance.resx index 467a348..89f6d45 100644 --- a/Src/ServerGridEditor/Forms/EditIslandInstance.resx +++ b/Src/ServerGridEditor/Forms/EditIslandInstance.resx @@ -123,4 +123,10 @@ True + + True + + + True + \ No newline at end of file diff --git a/Src/ServerGridEditor/Forms/EditServerForm.Designer.cs b/Src/ServerGridEditor/Forms/EditServerForm.Designer.cs index 1b5a11d..469fd9d 100644 --- a/Src/ServerGridEditor/Forms/EditServerForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditServerForm.Designer.cs @@ -741,7 +741,10 @@ this.Controls.Add(this.portTxtBox); this.Controls.Add(this.label1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "EditServerForm"; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Edit Server"; this.Load += new System.EventHandler(this.EditServerForm_Load); diff --git a/Src/ServerGridEditor/Forms/EditServerTemplate.Designer.cs b/Src/ServerGridEditor/Forms/EditServerTemplate.Designer.cs index 0267ad3..a1fe751 100644 --- a/Src/ServerGridEditor/Forms/EditServerTemplate.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditServerTemplate.Designer.cs @@ -629,7 +629,10 @@ this.Controls.Add(this.cancelBtn); this.Controls.Add(this.saveBtn); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "EditServerTemplate"; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Edit Server Template"; this.Load += new System.EventHandler(this.EditServerTemplate_Load); diff --git a/Src/ServerGridEditor/Forms/EditServerTemplates.Designer.cs b/Src/ServerGridEditor/Forms/EditServerTemplates.Designer.cs index af375eb..bfa6467 100644 --- a/Src/ServerGridEditor/Forms/EditServerTemplates.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditServerTemplates.Designer.cs @@ -84,9 +84,12 @@ this.Controls.Add(this.addBtn); this.Controls.Add(this.templatesLstBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "EditServerTemplates"; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "EditServerTemplates"; + this.Text = "Edit Server Templates"; this.ResumeLayout(false); } diff --git a/Src/ServerGridEditor/Forms/EditServerTemplates.cs b/Src/ServerGridEditor/Forms/EditServerTemplates.cs index 143b045..59b05a8 100644 --- a/Src/ServerGridEditor/Forms/EditServerTemplates.cs +++ b/Src/ServerGridEditor/Forms/EditServerTemplates.cs @@ -65,9 +65,9 @@ namespace ServerGridEditor.Forms { var confirmResult = MessageBox.Show("You are about to delete the selected template\n\nAre you sure?", "Warning", - MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); + MessageBoxButtons.YesNo, MessageBoxIcon.Question); - if (confirmResult == DialogResult.OK) + if (confirmResult == DialogResult.Yes) { templatesLstBox.Items.Remove(serverTemplate.name); mainForm.currentProject.serverTemplates.Remove(serverTemplate); diff --git a/Src/ServerGridEditor/Forms/EditShipPath.Designer.cs b/Src/ServerGridEditor/Forms/EditShipPath.Designer.cs index bdc7bbb..d845966 100644 --- a/Src/ServerGridEditor/Forms/EditShipPath.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditShipPath.Designer.cs @@ -133,8 +133,12 @@ this.Controls.Add(this.label1); this.Controls.Add(this.applyBtn); this.Controls.Add(this.loopingPathChckBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "EditShipPath"; this.ShowIcon = false; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Edit Ship Path"; this.Load += new System.EventHandler(this.EditShipPath_Load); diff --git a/Src/ServerGridEditor/Forms/EditSpawnRegions.Designer.cs b/Src/ServerGridEditor/Forms/EditSpawnRegions.Designer.cs index f632588..877e29a 100644 --- a/Src/ServerGridEditor/Forms/EditSpawnRegions.Designer.cs +++ b/Src/ServerGridEditor/Forms/EditSpawnRegions.Designer.cs @@ -108,8 +108,12 @@ this.Controls.Add(this.cancelBtn); this.Controls.Add(this.saveBtn); this.Controls.Add(this.spawnRegionsGrid); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "EditSpawnRegions"; - this.Text = "EditSpawnRegions"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Edit Spawn Regions"; ((System.ComponentModel.ISupportInitialize)(this.spawnRegionsGrid)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/Src/ServerGridEditor/Forms/LocksForm.Designer.cs b/Src/ServerGridEditor/Forms/LocksForm.Designer.cs index 9ac53a1..d143131 100644 --- a/Src/ServerGridEditor/Forms/LocksForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/LocksForm.Designer.cs @@ -90,8 +90,12 @@ this.Controls.Add(this.lockDiscoChckbox); this.Controls.Add(this.applyBtn); this.Controls.Add(this.lockIslandsChkbox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "LocksForm"; this.ShowIcon = false; + this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Locks"; this.Load += new System.EventHandler(this.LocksForm_Load); diff --git a/Src/ServerGridEditor/Forms/MainForm.cs b/Src/ServerGridEditor/Forms/MainForm.cs index cf78b1f..5c537b2 100644 --- a/Src/ServerGridEditor/Forms/MainForm.cs +++ b/Src/ServerGridEditor/Forms/MainForm.cs @@ -1561,7 +1561,7 @@ namespace ServerGridEditor ///////////////////////////Action Handlers/////////////////////////////////// private void addIslandBtn_Click(object sender, EventArgs e) { - var createForm = new CreateIslndForm(); + var createForm = new CreateIslandForm(); createForm.mainForm = this; createForm.ShowDialog(); } @@ -1596,7 +1596,7 @@ namespace ServerGridEditor { if (currentProject != null) { - MessageBox.Show("Creating a project will overwrite the currently opened one"); + MessageBox.Show("If you create a new project, any unsaved changes to your current project will be LOST!"); } var createForm = new CreateProjectForm(); @@ -1623,12 +1623,11 @@ namespace ServerGridEditor { if (currentProject != null) { - var confirmResult = MessageBox.Show("Opening a project will overwrite the currently opened one, open?", + var confirmResult = MessageBox.Show("If you click OK, any unsaved changes to your current project will be LOST!", "Warning", MessageBoxButtons.OKCancel); if (confirmResult != DialogResult.OK) return; - //MessageBox.Show("Opening a project will overwrite the currently opened one"); } openFileDialog.Filter = "json files (*.json)|*.json"; @@ -1750,47 +1749,44 @@ namespace ServerGridEditor private void removeIslandBtn_Click(object sender, EventArgs e) { - var confirmResult = MessageBox.Show("Removing an island will remove all its instances in the map\nAre you sure?", + var confirmResult = MessageBox.Show("Removing an island will remove all its instances in the map!\n\nAre you sure?", "Warning", - MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); + MessageBoxButtons.YesNo, MessageBoxIcon.Question); - if (confirmResult == DialogResult.OK) + if (confirmResult != DialogResult.Yes) + return; + + List islandsToRemove = new List(); + + foreach (ListViewItem item in islandListBox.SelectedItems) { - - List islandsToRemove = new List(); - - foreach (ListViewItem item in islandListBox.SelectedItems) - { - islandsToRemove.Add(item.SubItems[2].Text); - } - - if (currentProject != null) - { - for (int i = 0; i < currentProject.islandInstances.Count; i++) - foreach (string islandToRemove in islandsToRemove) - if (currentProject.islandInstances[i].name == islandToRemove) - { - currentProject.islandInstances[i].SetDirty(this); - currentProject.islandInstances.RemoveAt(i); - i--; - } - } - - foreach (string islandToRemove in islandsToRemove) - { - //delete the image - islands[islandToRemove].InvalidateImage(); - File.Delete(islands[islandToRemove].imagePath); - - islands.Remove(islandToRemove); - } - - - RefreshIslandList(); - mapPanel.Invalidate(); - SaveIslands(); + islandsToRemove.Add(item.SubItems[2].Text); } + if (currentProject != null) + { + for (int i = 0; i < currentProject.islandInstances.Count; i++) + foreach (string islandToRemove in islandsToRemove) + if (currentProject.islandInstances[i].name == islandToRemove) + { + currentProject.islandInstances[i].SetDirty(this); + currentProject.islandInstances.RemoveAt(i); + i--; + } + } + + foreach (string islandToRemove in islandsToRemove) + { + //delete the image + islands[islandToRemove].InvalidateImage(); + File.Delete(islands[islandToRemove].imagePath); + + islands.Remove(islandToRemove); + } + + RefreshIslandList(); + mapPanel.Invalidate(); + SaveIslands(); } private void showServerInfoCheckbox_CheckedChanged(object sender, EventArgs e) @@ -1840,7 +1836,7 @@ namespace ServerGridEditor if (isle == null) return; - var createForm = new CreateIslndForm(); + var createForm = new CreateIslandForm(); createForm.mainForm = this; createForm.editedIsland = isle; if(createForm.ShowDialog() != DialogResult.Cancel && createForm.bIslandNameChanged) @@ -1964,9 +1960,8 @@ namespace ServerGridEditor { if (currentProject != null) { - var confirmResult = MessageBox.Show("All unsaved progress will be lost", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation); - if (confirmResult == DialogResult.Cancel) - e.Cancel = true; + var confirmResult = MessageBox.Show("All unsaved changes to your current project will be LOST!", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation); + e.Cancel = confirmResult == DialogResult.Cancel; } } @@ -1985,7 +1980,7 @@ namespace ServerGridEditor { if (currentProject != null) { - MessageBox.Show("Creating a project will overwrite the currently opened one"); + MessageBox.Show("If you create a new project, any unsaved changes to your current project will be LOST!"); } var createForm = new CreateProjectForm(); diff --git a/Src/ServerGridEditor/Forms/SharedLogConfigForm.Designer.cs b/Src/ServerGridEditor/Forms/SharedLogConfigForm.Designer.cs index 688f2ce..36153cc 100644 --- a/Src/ServerGridEditor/Forms/SharedLogConfigForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/SharedLogConfigForm.Designer.cs @@ -248,7 +248,11 @@ this.Controls.Add(this.saveBtn); this.Controls.Add(this.cancelBtn); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "SharedLogConfigForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Shared Log Config"; this.Load += new System.EventHandler(this.SharedLogConfigForm_Load); this.ResumeLayout(false); diff --git a/Src/ServerGridEditor/Forms/TravelDataConfigForm.Designer.cs b/Src/ServerGridEditor/Forms/TravelDataConfigForm.Designer.cs index 27b1944..cdb600e 100644 --- a/Src/ServerGridEditor/Forms/TravelDataConfigForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/TravelDataConfigForm.Designer.cs @@ -152,7 +152,11 @@ this.Controls.Add(this.saveBtn); this.Controls.Add(this.cancelBtn); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "TravelDataConfigForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Travel Data Config"; this.Load += new System.EventHandler(this.TravelDataConfigForm_Load); this.ResumeLayout(false); diff --git a/Src/ServerGridEditor/Forms/TribeLogConfigForm.Designer.cs b/Src/ServerGridEditor/Forms/TribeLogConfigForm.Designer.cs index 123dec7..a81c24b 100644 --- a/Src/ServerGridEditor/Forms/TribeLogConfigForm.Designer.cs +++ b/Src/ServerGridEditor/Forms/TribeLogConfigForm.Designer.cs @@ -188,7 +188,11 @@ this.Controls.Add(this.saveBtn); this.Controls.Add(this.cancelBtn); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "TribeLogConfigForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Tribe Log Config"; this.Load += new System.EventHandler(this.TribeLogConfigForm_Load); this.ResumeLayout(false);