[longomatch] Move teams tagger objects into their own namespace
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Move teams tagger objects into their own namespace
- Date: Fri, 17 Apr 2015 16:22:04 +0000 (UTC)
commit 9279c87ff6626670d4ca5414793409e582ed95c7
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Apr 10 18:14:13 2015 +0200
Move teams tagger objects into their own namespace
.../CanvasObjects/{ => Teams}/BenchObject.cs | 12 +-
.../CanvasObjects/{ => Teams}/FieldObject.cs | 13 +--
.../CanvasObjects/{ => Teams}/PlayerObject.cs | 6 +-
.../{ => Teams}/PlayersTaggerObject.cs | 97 +++++++++++---------
LongoMatch.Drawing/LongoMatch.Drawing.csproj | 9 +-
LongoMatch.Drawing/PlayslistCellRenderer.cs | 10 +-
LongoMatch.Drawing/Widgets/TeamTagger.cs | 27 +++---
LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs | 12 +-
8 files changed, 97 insertions(+), 89 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/BenchObject.cs
b/LongoMatch.Drawing/CanvasObjects/Teams/BenchObject.cs
similarity index 97%
rename from LongoMatch.Drawing/CanvasObjects/BenchObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Teams/BenchObject.cs
index 8f69de2..c400c97 100644
--- a/LongoMatch.Drawing/CanvasObjects/BenchObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Teams/BenchObject.cs
@@ -16,12 +16,12 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
-using LongoMatch.Core.Interfaces.Drawing;
-using LongoMatch.Core.Common;
using System.Collections.Generic;
+using LongoMatch.Core.Common;
+using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store.Drawables;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Teams
{
public class BenchObject: CanvasObject, ICanvasSelectableObject
{
@@ -39,7 +39,7 @@ namespace LongoMatch.Drawing.CanvasObjects
get;
set;
}
-
+
public Point Position {
get;
set;
@@ -64,7 +64,7 @@ namespace LongoMatch.Drawing.CanvasObjects
get;
set;
}
-
+
public void Update ()
{
if (BenchPlayers == null) {
@@ -108,7 +108,7 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.End ();
}
- public Selection GetSelection (Point point, double precision, bool inMotion=false)
+ public Selection GetSelection (Point point, double precision, bool inMotion = false)
{
Selection selection = null;
diff --git a/LongoMatch.Drawing/CanvasObjects/FieldObject.cs
b/LongoMatch.Drawing/CanvasObjects/Teams/FieldObject.cs
similarity index 95%
rename from LongoMatch.Drawing/CanvasObjects/FieldObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Teams/FieldObject.cs
index ffe4b41..fc3f255 100644
--- a/LongoMatch.Drawing/CanvasObjects/FieldObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Teams/FieldObject.cs
@@ -16,13 +16,12 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
-using System.Linq;
-using LongoMatch.Core.Interfaces.Drawing;
using System.Collections.Generic;
using LongoMatch.Core.Common;
+using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store.Drawables;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Teams
{
public class FieldObject: CanvasObject, ICanvasSelectableObject
{
@@ -112,7 +111,7 @@ namespace LongoMatch.Drawing.CanvasObjects
}
/* Columns */
- for (int col=0; col < formation.Length; col ++) {
+ for (int col = 0; col < formation.Length; col++) {
double colX, rowHeight;
if (players.Count == index)
@@ -125,9 +124,9 @@ namespace LongoMatch.Drawing.CanvasObjects
}
rowHeight = Height / formation [col];
- for (int row=0; row < formation[col]; row ++) {
+ for (int row = 0; row < formation [col]; row++) {
double rowY;
- PlayerObject po = players[index];
+ PlayerObject po = players [index];
if (team == TeamType.LOCAL) {
rowY = rowHeight * row + rowHeight / 2;
@@ -137,7 +136,7 @@ namespace LongoMatch.Drawing.CanvasObjects
po.Position = new Point (colX, rowY);
po.Size = playerSize;
- index ++;
+ index++;
if (players.Count == index)
break;
}
diff --git a/LongoMatch.Drawing/CanvasObjects/PlayerObject.cs
b/LongoMatch.Drawing/CanvasObjects/Teams/PlayerObject.cs
similarity index 97%
rename from LongoMatch.Drawing/CanvasObjects/PlayerObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Teams/PlayerObject.cs
index a072768..d47795a 100644
--- a/LongoMatch.Drawing/CanvasObjects/PlayerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Teams/PlayerObject.cs
@@ -21,7 +21,7 @@ using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
using LongoMatch.Core.Store.Drawables;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Teams
{
public class PlayerObject: CanvasButtonObject, ICanvasSelectableObject
{
@@ -89,7 +89,7 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
- public Selection GetSelection (Point point, double precision, bool inMotion=false)
+ public Selection GetSelection (Point point, double precision, bool inMotion = false)
{
Point position = new Point (Position.X - Width / 2, Position.Y - Height / 2);
@@ -182,7 +182,7 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.FontSize = 18;
}
tk.DrawText (p, StyleConf.PlayerNumberSize, StyleConf.PlayerNumberSize,
- Player.Number.ToString ());
+ Player.Number.ToString ());
if (Active) {
Color c = Color.Copy ();
diff --git a/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
b/LongoMatch.Drawing/CanvasObjects/Teams/PlayersTaggerObject.cs
similarity index 91%
rename from LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Teams/PlayersTaggerObject.cs
index a7919e7..96f07b7 100644
--- a/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Teams/PlayersTaggerObject.cs
@@ -16,17 +16,17 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
-using System.Linq;
-using LongoMatch.Core.Interfaces.Drawing;
-using LongoMatch.Core.Store.Templates;
using System.Collections.Generic;
+using System.IO;
+using System.Linq;
using LongoMatch.Core.Common;
-using LongoMatch.Core.Store.Drawables;
-using LongoMatch.Core.Store;
using LongoMatch.Core.Handlers;
-using System.IO;
+using LongoMatch.Core.Interfaces.Drawing;
+using LongoMatch.Core.Store;
+using LongoMatch.Core.Store.Drawables;
+using LongoMatch.Core.Store.Templates;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Teams
{
public class PlayersTaggerObject: CanvasObject, ICanvasSelectableObject
{
@@ -39,6 +39,7 @@ namespace LongoMatch.Drawing.CanvasObjects
public event PlayersSubstitutionHandler PlayersSubstitutionEvent;
public event PlayersSelectionChangedHandler PlayersSelectionChangedEvent;
public event TeamSelectionChangedHandler TeamSelectionChangedEvent;
+
const int BUTTONS_HEIGHT = 40;
const int BUTTONS_WIDTH = 60;
ButtonObject subPlayers, subInjury, homeButton, awayButton;
@@ -65,7 +66,7 @@ namespace LongoMatch.Drawing.CanvasObjects
awayBench = new BenchObject ();
offset = new Point (0, 0);
scaleX = scaleY = 1;
- playerToPlayerObject = new Dictionary<Player, PlayerObject>();
+ playerToPlayerObject = new Dictionary<Player, PlayerObject> ();
field = new FieldObject ();
SelectedPlayers = new List<Player> ();
lastTime = null;
@@ -112,7 +113,7 @@ namespace LongoMatch.Drawing.CanvasObjects
lastTime = currentTime;
}
}
-
+
public Point Position {
get;
set;
@@ -132,7 +133,7 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
get;
}
-
+
public bool Compact {
get;
set;
@@ -152,7 +153,7 @@ namespace LongoMatch.Drawing.CanvasObjects
homeBench.SubstitutionMode = awayBench.SubstitutionMode =
field.SubstitutionMode = value;
}
}
-
+
public bool ShowSubsitutionButtons {
get {
return showSubsitutionButtons;
@@ -164,7 +165,7 @@ namespace LongoMatch.Drawing.CanvasObjects
showSubsitutionButtons = value;
}
}
-
+
public bool ShowTeamsButtons {
get {
return showTeamsButtons;
@@ -206,7 +207,7 @@ namespace LongoMatch.Drawing.CanvasObjects
awayBench.Update ();
field.Update ();
}
-
+
public void Select (List<Player> players, TeamType team)
{
ResetSelection ();
@@ -231,7 +232,7 @@ namespace LongoMatch.Drawing.CanvasObjects
}
}
- public void Select (Player player, bool silent=false, bool reset=false)
+ public void Select (Player player, bool silent = false, bool reset = false)
{
PlayerObject po;
@@ -273,12 +274,12 @@ namespace LongoMatch.Drawing.CanvasObjects
{
if (team == homeTeam) {
Substitute (homePlayers.FirstOrDefault (p => p.Player == p1),
- homePlayers.FirstOrDefault (p => p.Player == p2),
- homePlayingPlayers, homeBenchPlayers);
+ homePlayers.FirstOrDefault (p => p.Player == p2),
+ homePlayingPlayers, homeBenchPlayers);
} else {
Substitute (awayPlayers.FirstOrDefault (p => p.Player == p1),
- awayPlayers.FirstOrDefault (p => p.Player == p2),
- awayPlayingPlayers, awayBenchPlayers);
+ awayPlayers.FirstOrDefault (p => p.Player == p2),
+ awayPlayingPlayers, awayBenchPlayers);
}
}
@@ -320,7 +321,7 @@ namespace LongoMatch.Drawing.CanvasObjects
} else {
homeButton.BackgroundImage = homeTeam.Shield;
}
- NTeams ++;
+ NTeams++;
}
if (awayTeam != null) {
awayTeam.UpdateColors ();
@@ -335,7 +336,7 @@ namespace LongoMatch.Drawing.CanvasObjects
} else {
awayButton.BackgroundImage = awayTeam.Shield;
}
- NTeams ++;
+ NTeams++;
}
colSize = ColumnSize;
@@ -343,7 +344,7 @@ namespace LongoMatch.Drawing.CanvasObjects
BenchWidth (colSize, field.Height, playerSize);
field.LoadTeams (background, homeF, awayF, homePlayingPlayers,
- awayPlayingPlayers, playerSize, NTeams);
+ awayPlayingPlayers, playerSize, NTeams);
homeBench.BenchPlayers = homeBenchPlayers;
awayBench.BenchPlayers = awayBenchPlayers;
homeBench.Height = awayBench.Height = field.Height;
@@ -384,7 +385,7 @@ namespace LongoMatch.Drawing.CanvasObjects
}
Project.CurrentLineup (currentTime, out homeFieldL, out homeBenchL,
- out awayFieldL, out awayBenchL);
+ out awayFieldL, out awayBenchL);
homePlayingPlayers = homeFieldL.Select (p => playerToPlayerObject [p]).ToList ();
homeBenchPlayers = homeBenchL.Select (p => playerToPlayerObject [p]).ToList ();
awayPlayingPlayers = awayFieldL.Select (p => playerToPlayerObject [p]).ToList ();
@@ -411,7 +412,7 @@ namespace LongoMatch.Drawing.CanvasObjects
if (Compact) {
/* Try with 4/4, 3/4 and 2/4 of the original column size
* to fit all players in a single column */
- for (int i=4; i>1; i--) {
+ for (int i = 4; i > 1; i--) {
ncolSize = (double)colSize * i / 4;
playersPerColumn = (int)(height / ncolSize);
playersPerRow = (int)Math.Ceiling ((double)maxPlayers /
playersPerColumn);
@@ -444,9 +445,10 @@ namespace LongoMatch.Drawing.CanvasObjects
playerToPlayerObject.Clear ();
}
- void LoadSubsButtons () {
+ void LoadSubsButtons ()
+ {
subPlayers = new ButtonObject ();
- string path = Path.Combine (Config.IconsDir, StyleConf.SubsUnlock);
+ string path = Path.Combine (Config.IconsDir, StyleConf.SubsUnlock);
subPlayers.BackgroundImageActive = Image.LoadFromFile (path);
subPlayers.BackgroundColorActive = Config.Style.PaletteBackground;
path = Path.Combine (Config.IconsDir, StyleConf.SubsLock);
@@ -460,19 +462,24 @@ namespace LongoMatch.Drawing.CanvasObjects
subInjury.Visible = false;
}
- void LoadTeamsButtons () {
+ void LoadTeamsButtons ()
+ {
homeButton = new ButtonObject ();
homeButton.Toggle = true;
homeButton.ClickedEvent += HandleTeamClickedEvent;
homeButton.Width = BUTTONS_WIDTH;
homeButton.Height = BUTTONS_HEIGHT;
- homeButton.RedrawEvent += (co, area) => {EmitRedrawEvent (homeButton, area);};
+ homeButton.RedrawEvent += (co, area) => {
+ EmitRedrawEvent (homeButton, area);
+ };
awayButton = new ButtonObject ();
awayButton.Toggle = true;
awayButton.Width = BUTTONS_WIDTH;
awayButton.Height = BUTTONS_HEIGHT;
awayButton.ClickedEvent += HandleTeamClickedEvent;
- awayButton.RedrawEvent += (co, area) => {EmitRedrawEvent (awayButton, area);};
+ awayButton.RedrawEvent += (co, area) => {
+ EmitRedrawEvent (awayButton, area);
+ };
}
void Substitute (PlayerObject p1, PlayerObject p2,
@@ -519,9 +526,9 @@ namespace LongoMatch.Drawing.CanvasObjects
width = field.Width / NTeams;
if (homeTeam != null && awayTeam != null) {
count = Math.Max (homeTeam.Formation.Count (),
- awayTeam.Formation.Count ());
+ awayTeam.Formation.Count ());
max = Math.Max (homeTeam.Formation.Max (),
- awayTeam.Formation.Max ());
+ awayTeam.Formation.Max ());
} else if (homeTeam != null) {
count = homeTeam.Formation.Count ();
max = homeTeam.Formation.Max ();
@@ -548,9 +555,11 @@ namespace LongoMatch.Drawing.CanvasObjects
playerObjects = new List<PlayerObject> ();
foreach (Player p in players) {
- PlayerObject po = new PlayerObject { Player = p, Team = team};
+ PlayerObject po = new PlayerObject { Player = p, Team = team };
po.ClickedEvent += HandlePlayerClickedEvent;
- po.RedrawEvent += (co, area) => {EmitRedrawEvent (po, area);};
+ po.RedrawEvent += (co, area) => {
+ EmitRedrawEvent (po, area);
+ };
playerObjects.Add (po);
playerToPlayerObject.Add (p, po);
}
@@ -572,16 +581,16 @@ namespace LongoMatch.Drawing.CanvasObjects
if (PlayersSubstitutionEvent != null) {
if (bench.Contains (player1) && bench.Contains (player2)) {
PlayersSubstitutionEvent (team, player1.Player, player2.Player,
- SubstitutionReason.BenchPositionChange,
CurrentTime);
+ SubstitutionReason.BenchPositionChange, CurrentTime);
} else if (!bench.Contains (player1) && !bench.Contains (player2)) {
PlayersSubstitutionEvent (team, player1.Player, player2.Player,
- SubstitutionReason.PositionChange,
CurrentTime);
+ SubstitutionReason.PositionChange, CurrentTime);
} else if (bench.Contains (player1)) {
PlayersSubstitutionEvent (team, player1.Player, player2.Player,
- SubstitutionReason.PlayersSubstitution,
CurrentTime);
+ SubstitutionReason.PlayersSubstitution, CurrentTime);
} else {
PlayersSubstitutionEvent (team, player2.Player, player1.Player,
- SubstitutionReason.PlayersSubstitution,
CurrentTime);
+ SubstitutionReason.PlayersSubstitution, CurrentTime);
}
}
ResetSelection ();
@@ -655,7 +664,7 @@ namespace LongoMatch.Drawing.CanvasObjects
Selection selection = null;
if (ButtonClickPressed (point, modif, subPlayers, subInjury,
- homeButton, awayButton)) {
+ homeButton, awayButton)) {
return;
}
@@ -676,7 +685,7 @@ namespace LongoMatch.Drawing.CanvasObjects
if (selection != null) {
clickedPlayer = selection.Drawable as PlayerObject;
if (SubstitutionMode && substitutionPlayer != null &&
- clickedPlayer.Team != substitutionPlayer.Team) {
+ clickedPlayer.Team != substitutionPlayer.Team) {
clickedPlayer = null;
} else {
(selection.Drawable as ICanvasObject).ClickPressed (point, modif);
@@ -708,11 +717,11 @@ namespace LongoMatch.Drawing.CanvasObjects
/* Compute how we should scale and translate to fit the widget
* in the designated area */
width = homeBench.Width * NTeams + field.Width +
- 2 * NTeams * Config.Style.TeamTaggerBenchBorder;
+ 2 * NTeams * Config.Style.TeamTaggerBenchBorder;
height = field.Height;
Image.ScaleFactor ((int)width, (int)height, (int)Width,
- (int)Height - BUTTONS_HEIGHT,
- out scaleX, out scaleY, out offset);
+ (int)Height - BUTTONS_HEIGHT,
+ out scaleX, out scaleY, out offset);
offset.Y += BUTTONS_HEIGHT;
tk.Begin ();
tk.Clear (Config.Style.PaletteBackground);
@@ -720,7 +729,7 @@ namespace LongoMatch.Drawing.CanvasObjects
/* Draw substitution buttons */
if (subPlayers.Visible) {
subPlayers.Position = new Point (Width / 2 - BUTTONS_WIDTH / 2,
- offset.Y - BUTTONS_HEIGHT);
+ offset.Y - BUTTONS_HEIGHT);
subPlayers.Width = BUTTONS_WIDTH;
subPlayers.Height = BUTTONS_HEIGHT;
subPlayers.Draw (tk, area);
@@ -744,13 +753,13 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.End ();
}
- public Selection GetSelection (Point point, double precision, bool inMotion=false)
+ public Selection GetSelection (Point point, double precision, bool inMotion = false)
{
Selection sel = null;
if (!inMotion) {
if (point.X < Position.X || point.X > Position.X + Width ||
- point.Y < Position.Y || point.Y > Position.Y + Height) {
+ point.Y < Position.Y || point.Y > Position.Y + Height) {
sel = null;
} else {
sel = new Selection (this, SelectionPosition.All, 0);
diff --git a/LongoMatch.Drawing/LongoMatch.Drawing.csproj b/LongoMatch.Drawing/LongoMatch.Drawing.csproj
index 04562b4..5ba4f0a 100644
--- a/LongoMatch.Drawing/LongoMatch.Drawing.csproj
+++ b/LongoMatch.Drawing/LongoMatch.Drawing.csproj
@@ -31,6 +31,7 @@
<Folder Include="CanvasObjects\Dashboard\" />
<Folder Include="CanvasObjects\Blackboard\" />
<Folder Include="CanvasObjects\Timeline\" />
+ <Folder Include="CanvasObjects\Teams\" />
</ItemGroup>
<ItemGroup>
<Compile Include="Canvas.cs" />
@@ -38,16 +39,12 @@
<Compile Include="Constants.cs" />
<Compile Include="Widgets\PlaysTimeline.cs" />
<Compile Include="CanvasObjects\CanvasObject.cs" />
- <Compile Include="CanvasObjects\PlayerObject.cs" />
<Compile Include="Widgets\TeamTagger.cs" />
<Compile Include="Widgets\TimersTimeline.cs" />
<Compile Include="Widgets\PositionTagger.cs" />
<Compile Include="CanvasObjects\PositionObject.cs" />
<Compile Include="Widgets\Blackboard.cs" />
<Compile Include="Utils.cs" />
- <Compile Include="CanvasObjects\BenchObject.cs" />
- <Compile Include="CanvasObjects\FieldObject.cs" />
- <Compile Include="CanvasObjects\PlayersTaggerObject.cs" />
<Compile Include="PlayslistCellRenderer.cs" />
<Compile Include="Widgets\DashboardCanvas.cs" />
<Compile Include="CanvasObjects\ButtonObject.cs" />
@@ -76,6 +73,10 @@
<Compile Include="CanvasObjects\Timeline\TimeNodeObject.cs" />
<Compile Include="CanvasObjects\Timeline\CameraObject.cs" />
<Compile Include="CanvasObjects\Timeline\TimelineEventObject.cs" />
+ <Compile Include="CanvasObjects\Teams\BenchObject.cs" />
+ <Compile Include="CanvasObjects\Teams\PlayerObject.cs" />
+ <Compile Include="CanvasObjects\Teams\PlayersTaggerObject.cs" />
+ <Compile Include="CanvasObjects\Teams\FieldObject.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/LongoMatch.Drawing/PlayslistCellRenderer.cs b/LongoMatch.Drawing/PlayslistCellRenderer.cs
index 3661290..e897ba9 100644
--- a/LongoMatch.Drawing/PlayslistCellRenderer.cs
+++ b/LongoMatch.Drawing/PlayslistCellRenderer.cs
@@ -16,14 +16,14 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
-using LongoMatch.Core.Interfaces.Drawing;
+using System.Collections.Generic;
+using System.IO;
using LongoMatch.Core.Common;
+using LongoMatch.Core.Interfaces;
+using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
using LongoMatch.Core.Store.Playlists;
-using System.IO;
-using System.Collections.Generic;
-using LongoMatch.Drawing.CanvasObjects;
-using LongoMatch.Core.Interfaces;
+using LongoMatch.Drawing.CanvasObjects.Teams;
namespace LongoMatch.Drawing
{
diff --git a/LongoMatch.Drawing/Widgets/TeamTagger.cs b/LongoMatch.Drawing/Widgets/TeamTagger.cs
index 4ff2ee6..9747fbe 100644
--- a/LongoMatch.Drawing/Widgets/TeamTagger.cs
+++ b/LongoMatch.Drawing/Widgets/TeamTagger.cs
@@ -16,16 +16,14 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
-using System.Linq;
using System.Collections.Generic;
using LongoMatch.Core.Common;
+using LongoMatch.Core.Handlers;
using LongoMatch.Core.Interfaces.Drawing;
+using LongoMatch.Core.Store;
using LongoMatch.Core.Store.Drawables;
using LongoMatch.Core.Store.Templates;
-using LongoMatch.Drawing.CanvasObjects;
-using LongoMatch.Core.Store;
-using LongoMatch.Core.Handlers;
-using System.IO;
+using LongoMatch.Drawing.CanvasObjects.Teams;
namespace LongoMatch.Drawing.Widgets
{
@@ -36,9 +34,10 @@ namespace LongoMatch.Drawing.Widgets
public event TeamSelectionChangedHandler TeamSelectionChangedEvent;
public event PlayersSubstitutionHandler PlayersSubstitutionEvent;
public event PlayersPropertiesHandler ShowMenuEvent;
+
PlayersTaggerObject tagger;
- public TeamTagger (IWidget widget): base (widget)
+ public TeamTagger (IWidget widget) : base (widget)
{
Accuracy = 0;
widget.SizeChangedEvent += HandleSizeChangedEvent;
@@ -51,7 +50,7 @@ namespace LongoMatch.Drawing.Widgets
ObjectsCanMove = false;
AddObject (tagger);
}
-
+
protected override void Dispose (bool disposing)
{
base.Dispose (disposing);
@@ -75,7 +74,7 @@ namespace LongoMatch.Drawing.Widgets
tagger.Project = value;
}
}
-
+
public bool Compact {
set {
tagger.Compact = value;
@@ -87,7 +86,7 @@ namespace LongoMatch.Drawing.Widgets
tagger.CurrentTime = value;
}
}
-
+
public bool SubstitutionMode {
set {
tagger.SubstitutionMode = value;
@@ -105,7 +104,7 @@ namespace LongoMatch.Drawing.Widgets
tagger.ShowTeamsButtons = value;
}
}
-
+
public new MultiSelectionMode SelectionMode {
set {
tagger.SelectionMode = value;
@@ -117,11 +116,11 @@ namespace LongoMatch.Drawing.Widgets
return tagger.SelectedTeam;
}
}
-
+
public void ResetSelection ()
{
tagger.ResetSelection ();
- }
+ }
public void Select (TeamType team)
{
@@ -132,7 +131,7 @@ namespace LongoMatch.Drawing.Widgets
{
tagger.Select (players, team);
}
-
+
public void Select (Player p)
{
tagger.Select (p);
@@ -181,7 +180,7 @@ namespace LongoMatch.Drawing.Widgets
PlayersSelectionChangedEvent (players);
}
}
-
+
void HandleTeamSelectionChangedEvent (TeamType team)
{
if (TeamSelectionChangedEvent != null) {
diff --git a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
index 8d840de..71732bd 100644
--- a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
@@ -16,16 +16,16 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
+using System.Collections.Generic;
using System.Linq;
-using LongoMatch.Drawing.Widgets;
-using LongoMatch.Drawing.Cairo;
+using LongoMatch.Core.Common;
+using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
-using System.Collections.Generic;
using LongoMatch.Core.Store.Templates;
-using LongoMatch.Core.Common;
using LongoMatch.Drawing;
-using LongoMatch.Drawing.CanvasObjects;
-using LongoMatch.Core.Interfaces.Drawing;
+using LongoMatch.Drawing.Cairo;
+using LongoMatch.Drawing.CanvasObjects.Teams;
+using LongoMatch.Drawing.Widgets;
namespace LongoMatch.Gui.Dialog
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]