Merge for 1.2.4 #8
1
OWTrack/Form1.Designer.cs
generated
1
OWTrack/Form1.Designer.cs
generated
@ -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
|
||||
//
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user