[Nasa-exp-checkins] SF.net SVN: nasa-exp: [3731] trunk/WorldWind/DstilePlugin/DstileFE.cs
Brought to you by:
baker99-bull,
vigilant
From: <wi...@us...> - 2007-03-25 05:10:46
|
Revision: 3731 http://svn.sourceforge.net/nasa-exp/?rev=3731&view=rev Author: withak Date: 2007-03-24 22:10:46 -0700 (Sat, 24 Mar 2007) Log Message: ----------- ADD-81: Added saving of fwtools location. Modified Paths: -------------- trunk/WorldWind/DstilePlugin/DstileFE.cs Modified: trunk/WorldWind/DstilePlugin/DstileFE.cs =================================================================== --- trunk/WorldWind/DstilePlugin/DstileFE.cs 2007-03-25 03:56:52 UTC (rev 3730) +++ trunk/WorldWind/DstilePlugin/DstileFE.cs 2007-03-25 05:10:46 UTC (rev 3731) @@ -70,7 +70,7 @@ private ToolStripStatusLabel toolStripStatusLabel1; private IContainer components; - private object[] lztsdvalues = new object[] { + private object[] lztsdvalues= new object[] { 20, 18, 15, @@ -86,6 +86,7 @@ 0.5, 0.25, 0.125}; + //private XmlDocument xmlDoc = null; @@ -95,6 +96,7 @@ // Required for Windows Form Designer support // InitializeComponent(); + this.tileListBox.Items.AddRange(lztsdvalues); // // TODO: Add any constructor code after InitializeComponent call @@ -108,8 +110,8 @@ /// <summary> /// Restore/Save XML Configuration /// </summary> - /// <param name="loadsave"></param> - private void LoadSaveXmlConfig(bool loadsave) + /// <param name="load">Specifies whether the settings are being loaded (true) or saved (false)</param> + private void LoadSaveXmlConfig(bool load) { try { @@ -137,7 +139,7 @@ XmlNodeList list = doc.GetElementsByTagName("FWTools"); foreach (XmlNode node in list) { - if (loadsave) + if (load) fwlocText.Text = node.InnerText; else node.InnerText = fwlocText.Text; @@ -298,7 +300,6 @@ this.tileListBox.Font = new System.Drawing.Font("Arial", 9F); this.tileListBox.FormattingEnabled = true; this.tileListBox.ItemHeight = 15; - this.tileListBox.Items.AddRange(lztsdvalues); this.tileListBox.Location = new System.Drawing.Point(97, 183); this.tileListBox.Name = "tileListBox"; this.tileListBox.Size = new System.Drawing.Size(75, 19); @@ -932,7 +933,10 @@ { String dirName = folderDialog.SelectedPath; if (File.Exists(Path.Combine(dirName, "bin/dstile.exe")) && File.Exists(Path.Combine(dirName, "bin/gdalinfo.exe"))) + { fwlocText.Text = dirName; + LoadSaveXmlConfig(false); + } else MessageBox.Show("FWTools not located"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |