Compare commits
6 Commits
B2025-004_
...
B2025-007
Author | SHA1 | Date | |
---|---|---|---|
f3309e4a40 | |||
8fa059c186 | |||
96e61aea2b | |||
565779c9c8 | |||
b4ccd682c3 | |||
dba1331556 |
@@ -1154,7 +1154,10 @@ namespace ROEditor
|
||||
tbtnCancel.Enabled = true;
|
||||
tbtnSave.Enabled = true;
|
||||
tbtnRestore.Enabled = true;
|
||||
tbtnSaveAs.Enabled = true;
|
||||
if (newone == null)
|
||||
{ tbtnSaveAs.Enabled = true; }
|
||||
else
|
||||
{ tbtnSaveAs.Enabled = false; }
|
||||
}
|
||||
menuROSave.Enabled = tbtnSave.Enabled;
|
||||
}
|
||||
@@ -1170,7 +1173,10 @@ namespace ROEditor
|
||||
|
||||
tbtnSave.Enabled = true;
|
||||
tbtnRestore.Enabled = true;
|
||||
tbtnSaveAs.Enabled = true;
|
||||
if (newone == null)
|
||||
{ tbtnSaveAs.Enabled = true; }
|
||||
else
|
||||
{ tbtnSaveAs.Enabled = false; }
|
||||
tbtnCancel.Enabled = true;
|
||||
menuROSave.Enabled = tbtnSave.Enabled;
|
||||
//B2021-080 set the mysavexml flag to true to ensure the text change will be saved
|
||||
@@ -2392,20 +2398,26 @@ namespace ROEditor
|
||||
*/
|
||||
private void menuRODelete_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
bool success=false;
|
||||
XmlNode nd = (XmlNode) roTreeView.SelectedNode.Tag;
|
||||
if (nd.ParentNode.Name == "RO_Root")
|
||||
success = myrodb.RODB_DeleteGroup(nd,null,null);
|
||||
else
|
||||
success = myrodb.RODB_DeleteRO(nd);
|
||||
if (success == true)
|
||||
string msgstr = "It is recommended that you may wish to create a backup zip of your RO folder prior to performing deletions.\n\nAre you sure you wish to delete the selected RO/RO Group?";
|
||||
|
||||
DialogResult AnswerYN = MessageBox.Show(msgstr, "Deleting ROs/RO Group", MessageBoxButtons.YesNo);
|
||||
if (AnswerYN == DialogResult.Yes)
|
||||
{
|
||||
// remove from xml tree & the tree control
|
||||
XmlNode parent = nd.ParentNode;
|
||||
parent.RemoveChild(nd);
|
||||
updateRoListView(roTreeView.SelectedNode.Parent);
|
||||
roTreeView.SelectedNode.Remove();
|
||||
roTreeView.Refresh();
|
||||
bool success = false;
|
||||
XmlNode nd = (XmlNode)roTreeView.SelectedNode.Tag;
|
||||
if (nd.ParentNode.Name == "RO_Root")
|
||||
success = myrodb.RODB_DeleteGroup(nd, null, null);
|
||||
else
|
||||
success = myrodb.RODB_DeleteRO(nd);
|
||||
if (success == true)
|
||||
{
|
||||
// remove from xml tree & the tree control
|
||||
XmlNode parent = nd.ParentNode;
|
||||
parent.RemoveChild(nd);
|
||||
updateRoListView(roTreeView.SelectedNode.Parent);
|
||||
roTreeView.SelectedNode.Remove();
|
||||
roTreeView.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -324,29 +324,17 @@ namespace ctlXMLEditLib
|
||||
string ROINI = Directory.GetCurrentDirectory()+ "\\ROAPP.INI";
|
||||
|
||||
// Get the default file extension for graphic files
|
||||
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention","",5,"ROAPP.INI");
|
||||
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention","",5,"ROAPP.INI");
|
||||
// Bug fix: B2006-025
|
||||
// needed to pass the full path of ROAPP.INI
|
||||
// B2025-007 only use the default file location (remove 16 bit PROMS location)
|
||||
IniReader in1 = new IniReader(ROINI);
|
||||
DefaultGraphicFileExtension = in1.ReadString("ROApp","Extention","");
|
||||
if (DefaultGraphicFileExtension.Equals(""))
|
||||
{
|
||||
string ApplPathUp = ApplicationPath.ToUpper();
|
||||
int idx = ApplPathUp.IndexOf("VE-PROMS.NET\\BIN");
|
||||
if (idx >= 0)
|
||||
{
|
||||
string PromsINI = ApplicationPath.Substring(0, idx);
|
||||
PromsINI += "VE-PROMS\\VEPROMS.INI";
|
||||
IniReader in2 = new IniReader(PromsINI);
|
||||
DefaultGraphicFileExtension = in2.ReadString("Graphics", "defaultext", ".TIF");
|
||||
}
|
||||
else
|
||||
DefaultGraphicFileExtension = ".TIF";
|
||||
}
|
||||
// if (File.Exists(PromsINI))
|
||||
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("Graphics","defaultext",".TIF",5,PromsINI);
|
||||
// if (File.Exists("ROAPP.INI"))
|
||||
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention",".TIF",5,"ROAPP.INI");
|
||||
DefaultGraphicFileExtension = in1.ReadString("ROApp", "Extention");
|
||||
if (string.IsNullOrEmpty(DefaultGraphicFileExtension)) DefaultGraphicFileExtension = in1.ReadString("ROApp", "Extension", ".TIF");
|
||||
// if (File.Exists(PromsINI))
|
||||
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("Graphics","defaultext",".TIF",5,PromsINI);
|
||||
// if (File.Exists("ROAPP.INI"))
|
||||
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention",".TIF",5,"ROAPP.INI");
|
||||
if (!DefaultGraphicFileExtension.StartsWith("."))
|
||||
DefaultGraphicFileExtension = "." + DefaultGraphicFileExtension;
|
||||
|
||||
@@ -1486,10 +1474,13 @@ namespace ctlXMLEditLib
|
||||
FileInfo ifi = new FileInfo(fnamebox.Text);
|
||||
if (ifi.Exists == false)
|
||||
{
|
||||
MessageBoxButtons buttons = MessageBoxButtons.OK;
|
||||
MessageBox.Show( "File does not exist.",
|
||||
"File Input Error", buttons);
|
||||
return;
|
||||
FileInfo ifi2 = new FileInfo(fnamebox.Text + DefaultGraphicFileExtension);
|
||||
if (!ifi2.Exists)
|
||||
{
|
||||
MessageBox.Show("File does not exist.",
|
||||
"File Input Error", MessageBoxButtons.OK);
|
||||
return;
|
||||
}
|
||||
}
|
||||
bool ok = ValidGraphicsFile(fnamebox.Text);
|
||||
if (ok != true)
|
||||
|
Reference in New Issue
Block a user