Merge for 1.2.4 #8

Merged
Hesham merged 11 commits from Dev into master 2018-09-01 13:26:28 +02:00
2 changed files with 26 additions and 14 deletions
Showing only changes of commit bc83f16ab2 - Show all commits

View File

@ -221,7 +221,6 @@
this.openFileDialog1.FileName = "Overwatch.exe";
this.openFileDialog1.InitialDirectory = "C:\\";
this.openFileDialog1.RestoreDirectory = true;
this.openFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.openFileDialog1_FileOk);
//
// Form1
//

View File

@ -48,22 +48,25 @@ namespace OWTrack
tr.wins = savedTracker().wins;
tr.losses = savedTracker().losses;
tr.gamePath = savedTracker().gamePath;
if (tr.gamePath == "" || tr.gamePath == null)
{
openFileDialog1.Title = "Select Overwatch.exe";
openFileDialog1.ShowDialog();
}
//if (tr.gamePath == "" || tr.gamePath == null)
//{
//}
update();
}
else MessageBox.Show("no save");
}
}
private bool saveExist()
{
try
{
if (File.Exists(Directory.GetCurrentDirectory() + "/data.json")) { return true; }
else return false;
else
{
getGamePath();
return false;
}
}
catch (Exception e)
{
@ -72,6 +75,21 @@ namespace OWTrack
}
}
void getGamePath()
{
openFileDialog1.Title = "Select Overwatch.exe";
openFileDialog1.DefaultExt = "exe";
openFileDialog1.Filter = "exe Files (*.exe)|*.exe|All files (*.*)|*.*";
openFileDialog1.CheckFileExists = true;
openFileDialog1.CheckPathExists = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
tr.gamePath = openFileDialog1.FileName;
MessageBox.Show(openFileDialog1.FileName);
}
}
private Tracker savedTracker()
{
try
@ -161,11 +179,6 @@ namespace OWTrack
else tr.newSR = sr;
}
update();
}
private void openFileDialog1_FileOk(object sender, System.ComponentModel.CancelEventArgs e)
{
MessageBox.Show("ok");
}
}
}
}