Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.

Type error corrections in various strings. #50

Merged
merged 1 commit into from
Mar 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions UnityLauncher/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ private void Form1_Load(object sender, EventArgs e)

void Start()
{
SetStatus("Initializing..");
SetStatus("Initializing ...");
// check installations folder
var root = GetUnityInstallationsRootFolder();
if (root == null || root.Length == 0)
{
SetStatus("Missing root folder..");
SetStatus("Missing root folder ...");
AddUnityInstallationRootFolder();
SetStatus("Ready");
}

LoadSettings();

// scan installed unitys
bool foundedUnitys = ScanUnityInstallations();
if (foundedUnitys == false)
bool foundUnitys = ScanUnityInstallations();
if (foundUnitys == false)
{
SetStatus("Error> Did not found any Unity installations, try setting correct root folder..");
SetStatus("Error> Did not find any Unity installations, try setting correct root folder ...");
UpdateRecentProjectsList();
tabControl1.SelectedIndex = tabControl1.TabCount - 1; // last tab is settings
return;
Expand All @@ -68,7 +68,7 @@ void Start()
var commandLineArgs = args[1];
if (commandLineArgs == "-projectPath")
{
SetStatus("Launching from commandline..");
SetStatus("Launching from commandline ...");

// path
var projectPathArgument = args[2];
Expand Down Expand Up @@ -181,7 +181,7 @@ void AddUnityInstallationRootFolder()

bool ScanUnityInstallations()
{
SetStatus("Scanning unity installations..");
SetStatus("Scanning Unity installations ...");

// dictionary to keep version and path
unityList.Clear();
Expand Down Expand Up @@ -219,18 +219,18 @@ bool ScanUnityInstallations()
} // all root folders


lbl_unityCount.Text = "Founded " + unityList.Count.ToString() + " versions";
lbl_unityCount.Text = "Found " + unityList.Count.ToString() + " versions";

SetStatus("Finished scanning");

// founded any unity installations?
// found any Unity installations?
return unityList.Count > 0;
}


void FilterRecentProject(object sender, EventArgs e)
{
SetStatus("Filtering recent projects list..");
SetStatus("Filtering recent projects list ...");
foreach (DataGridViewRow recentProject in gridRecent.Rows)
{
if (recentProject.Cells["_project"].Value.ToString().IndexOf(tbSearchBar.Text, StringComparison.OrdinalIgnoreCase) > -1)
Expand All @@ -249,7 +249,7 @@ void FilterRecentProject(object sender, EventArgs e)
/// </summary>
void UpdateRecentProjectsList()
{
SetStatus("Updating recent projects list..");
SetStatus("Updating recent projects list ...");

gridRecent.Rows.Clear();

Expand Down Expand Up @@ -298,7 +298,7 @@ void UpdateRecentProjectsList()
{
projectName = projectPath.Substring(projectPath.LastIndexOf(Path.AltDirectorySeparatorChar) + 1);
}
else // no path separator founded
else // no path separator found
{
projectName = projectPath;
}
Expand Down Expand Up @@ -416,13 +416,13 @@ void LaunchProject(string projectPath, string version, bool openProject = true,
}
else // we dont have this version installed (or no version info available)
{
SetStatus("Missing unity version: " + version);
SetStatus("Missing Unity version: " + version);
DisplayUpgradeDialog(version, projectPath);
}
}
else // given path doesnt exists, strange
{
SetStatus("Invalid Path: " + projectPath);
SetStatus("Invalid path: " + projectPath);
}
}

Expand All @@ -432,7 +432,7 @@ bool CheckCrashBackupScene(string projectPath)
var recoveryFile = Path.Combine(projectPath, "Temp", "__Backupscenes", "0.backup");
if (File.Exists(recoveryFile))
{
DialogResult dialogResult = MessageBox.Show("Crash recovery scene founded, do you want to copy it into Assets/_Recovery/-folder?", "UnityLauncher - Scene Recovery", MessageBoxButtons.YesNoCancel);
DialogResult dialogResult = MessageBox.Show("Crash recovery scene found, do you want to copy it into Assets/_Recovery/-folder?", "UnityLauncher - Scene Recovery", MessageBoxButtons.YesNoCancel);
if (dialogResult == DialogResult.Yes) // restore
{
var restoreFolder = Path.Combine(projectPath, "Assets", "_Recovery");
Expand All @@ -453,15 +453,15 @@ bool CheckCrashBackupScene(string projectPath)
cancelRunningUnity = true;
}
}
else if (dialogResult == DialogResult.Cancel) // dont do restore, but run unity
else if (dialogResult == DialogResult.Cancel) // dont do restore, but run Unity
{
cancelRunningUnity = true;
}
}
return cancelRunningUnity;
}

// parse unity installer exe from release page
// parse Unity installer exe from release page
// thanks to https://github.com/softfruit
string GetDownloadUrlForUnityVersion(string releaseUrl)
{
Expand All @@ -479,7 +479,7 @@ string GetDownloadUrlForUnityVersion(string releaseUrl)
}
else
{
SetStatus("Cannot find UnityDownloadAssistant.exe for this version..");
SetStatus("Cannot find UnityDownloadAssistant.exe for this version.");
}
}
return url;
Expand All @@ -499,7 +499,7 @@ void DownloadInBrowser(string url)
}
else // not found
{
SetStatus("Error> Cannot find installer exe.. opening website instead");
SetStatus("Error> Cannot find installer executable ... opening website instead");
Process.Start(url + "#installer-exe-not-found");
}
}
Expand All @@ -519,7 +519,7 @@ string[] GetUnityInstallationsRootFolder()
}
catch (Exception e)
{
MessageBox.Show("Rare Error while checking unity installation folder settings: " + e.Message, "UnityLauncher", MessageBoxButtons.OK);
MessageBox.Show("Rare error while checking Unity installation folder settings: " + e.Message, "UnityLauncher", MessageBoxButtons.OK);

// this doesnt work?
Properties.Settings.Default.Reset();
Expand Down Expand Up @@ -682,11 +682,11 @@ private void unityGridView_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Return: // launch selected unity
case Keys.Return: // launch selected Unity
e.SuppressKeyPress = true;
LaunchSelectedUnity();
break;
case Keys.F5: // refresh installed unitys list
case Keys.F5: // refresh installed Unity versions list
ScanUnityInstallations();
break;
default:
Expand Down Expand Up @@ -762,7 +762,7 @@ private void GridRecent_CellMouseDoubleClick(object sender, DataGridViewCellMous
}
}

// set basefolder of all unity installations
// set basefolder of all Unity installations
private void btn_setinstallfolder_Click(object sender, EventArgs e)
{
AddUnityInstallationRootFolder();
Expand Down Expand Up @@ -922,7 +922,7 @@ private void btnOpenUpdateWebsite_Click(object sender, EventArgs e)

private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
// if enter Updates tab, then automatically fetch list of unity versions if list is empty (not fetched)
// if enter Updates tab, then automatically fetch list of Unity versions if list is empty (not fetched)
if (((TabControl)sender).SelectedIndex == 3) // FIXME: fixed index 3 for this tab..
{
if (gridUnityUpdates.Rows.Count == 0)
Expand Down Expand Up @@ -1027,7 +1027,7 @@ void UpgradeProject()
var selected = gridRecent.CurrentCell.RowIndex;
if (selected > -1)
{
SetStatus("Upgrading project..");
SetStatus("Upgrading project ...");

var projectPath = gridRecent.Rows[selected].Cells["_path"].Value.ToString();
var currentVersion = Tools.GetProjectVersion(projectPath);
Expand Down Expand Up @@ -1067,7 +1067,7 @@ void DisplayUpgradeDialog(string currentVersion, string projectPath, bool launch
SetStatus("Cancelled project upgrade");
break;
case DialogResult.Retry: // download and install missing version
SetStatus("Download and Install missing version " + currentVersion);
SetStatus("Download and install missing version " + currentVersion);
string url = Tools.GetUnityReleaseURL(currentVersion);
if (string.IsNullOrEmpty(url) == false)
{
Expand All @@ -1093,13 +1093,13 @@ private void FetchListOfUnityUpdates()
{
if (isDownloadUnityList == true)
{
SetStatus("We are already downloading..");
SetStatus("We are already downloading ...");
return;
}
isDownloadUnityList = true;
SetStatus("Downloading list of unity versions..");
SetStatus("Downloading list of Unity versions ...");

// download list of unity versions
// download list of Unity versions
using (WebClient webClient = new WebClient())
{
webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(UnityVersionsListDownloaded);
Expand All @@ -1111,7 +1111,7 @@ private void FetchListOfUnityUpdates()
private void UnityVersionsListDownloaded(object sender, DownloadStringCompletedEventArgs e)
{
// TODO check for error..
SetStatus("Downloading list of unity versions..Done");
SetStatus("Downloading list of Unity versions ... done");
isDownloadUnityList = false;
// parse to list
var unityList = e.Result.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Expand Down Expand Up @@ -1158,7 +1158,7 @@ void CheckUpdates()

void BrowseForExistingProjectFolder()
{
folderBrowserDialog1.Description = "Select Existing Project Folder";
folderBrowserDialog1.Description = "Select existing project folder";
var d = folderBrowserDialog1.ShowDialog();
var projectPath = folderBrowserDialog1.SelectedPath;
if (String.IsNullOrWhiteSpace(projectPath) == false && Directory.Exists(projectPath) == true)
Expand All @@ -1182,7 +1182,7 @@ void BrowseForExistingProjectFolder()
projectName = projectPath.Substring(projectPath.LastIndexOf(Path.AltDirectorySeparatorChar) + 1);
Console.WriteLine("2");
}
else // no path separator founded
else // no path separator found
{
projectName = projectPath;
Console.WriteLine("3");
Expand Down