fix trailing whitespace everywhere

This commit is contained in:
Chris Forbes
2011-09-25 14:37:12 +13:00
parent 0eb98ef3b5
commit 55036cd58c
596 changed files with 3194 additions and 3194 deletions

View File

@@ -1,7 +1,7 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
@@ -17,7 +17,7 @@ using OpenRA.FileFormats.Graphics;
using OpenRA.Widgets;
namespace OpenRA.Mods.Cnc.Widgets.Logic
{
{
public class CncInstallFromCDLogic
{
Widget panel;
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
Action continueLoading;
ButtonWidget retryButton, backButton;
Widget installingContainer, insertDiskContainer;
[ObjectCreator.UseCtor]
public CncInstallFromCDLogic([ObjectCreator.Param] Widget widget,
[ObjectCreator.Param] Action continueLoading)
@@ -35,18 +35,18 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
panel = widget.GetWidget("INSTALL_FROMCD_PANEL");
progressBar = panel.GetWidget<ProgressBarWidget>("PROGRESS_BAR");
statusLabel = panel.GetWidget<LabelWidget>("STATUS_LABEL");
backButton = panel.GetWidget<ButtonWidget>("BACK_BUTTON");
backButton.OnClick = Widget.CloseWindow;
retryButton = panel.GetWidget<ButtonWidget>("RETRY_BUTTON");
retryButton.OnClick = CheckForDisk;
installingContainer = panel.GetWidget("INSTALLING");
insertDiskContainer = panel.GetWidget("INSERT_DISK");
CheckForDisk();
}
void CheckForDisk()
{
Func<string, bool> ValidDiskFilter = diskRoot => File.Exists(diskRoot+Path.DirectorySeparatorChar+"CONQUER.MIX") &&
@@ -63,7 +63,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
installingContainer.IsVisible = () => false;
}
}
void Install(string source)
{
backButton.IsDisabled = () => true;
@@ -74,34 +74,34 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
var dest = new string[] { Platform.SupportDir, "Content", "cnc" }.Aggregate(Path.Combine);
var copyFiles = new string[] { "CONQUER.MIX", "DESERT.MIX",
"SCORES.MIX", "SOUNDS.MIX", "TEMPERAT.MIX", "WINTER.MIX" };
var extractPackage = "INSTALL/SETUP.Z";
var extractFiles = new string[] { "speech.mix", "tempicnh.mix", "transit.mix" };
var installCounter = 0;
var installTotal = copyFiles.Count() + extractFiles.Count();
var onProgress = (Action<string>)(s => Game.RunAfterTick(() =>
var onProgress = (Action<string>)(s => Game.RunAfterTick(() =>
{
progressBar.Percentage = installCounter*100/installTotal;
installCounter++;
statusLabel.GetText = () => s;
}));
var onError = (Action<string>)(s => Game.RunAfterTick(() =>
var onError = (Action<string>)(s => Game.RunAfterTick(() =>
{
statusLabel.GetText = () => "Error: "+s;
backButton.IsDisabled = () => false;
retryButton.IsDisabled = () => false;
}));
var t = new Thread( _ =>
{
try
{
if (!InstallUtils.CopyFiles(source, copyFiles, dest, onProgress, onError))
return;
if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, dest, onProgress, onError))
return;