-
September 28th, 2013, 11:15 PM
#1
Ignoring Json file settings and following something else i command
So lets say i have a project called Epic
and Epic calls upon a Json file for its information, so that i can edit the json file when needed.
Now lets say i have a .cs file called EpicSettings, and my main forum refers to Epicsettings.json, which its default is generated from EpicSettings.cs
Now lets say i have the code
Code:
defaultLauncherSettings.EpicVersion = "Epicversion.jar";
and in most cases it refers to that, and im happy. but lets say i have a button, and i want it to ignore that, and do something else when i press the button. Lets say i want it to do "EpicVersion2.jar"
Heres what i have right now;
Code:
private void toolStripButton4_Click(object sender, EventArgs e)
{
SetStatus("Logging In...");
progressBar.Value = 10;
progressBar.Value = 100;
launchWithForge = null;
if (!Epic.Launcher.Start(usernameInput.Text, passwordInput.Text, settings, false))
{
SetStatus("Invalid Login !");
progressBar.Value = 0;
return;
}
if (settings.closeWhenStarting == true)
{
this.Close();
}
}
And in
Code:
SetStatus("Logging In...");
progressBar.Value = 10;
progressBar.Value = 100;
launchWithForge = null;
i want it to ignore that code, what would i put in there to do so?
-
September 29th, 2013, 01:42 AM
#2
Re: Ignoring Json file settings and following something else i command
It's little hard to follow what you are looking for, but if you want to ignore code, don't call that code. Use a conditional operator like an if statement to determine whether to call code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|