[longomatch] Move dashboards objects into a new namespace
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Move dashboards objects into a new namespace
- Date: Fri, 17 Apr 2015 16:21:49 +0000 (UTC)
commit d5cbdb9f8f7f7a9118ec6ccede3cc12b4d91a2eb
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Apr 10 17:50:31 2015 +0200
Move dashboards objects into a new namespace
.../CanvasObjects/{ => Dashboard}/CardObject.cs | 16 ++++----
.../{ => Dashboard}/CategoryObject.cs | 44 ++++++++++----------
.../{ => Dashboard}/DashboardButtonObject.cs | 11 +++--
.../CanvasObjects/{ => Dashboard}/ScoreObject.cs | 6 +-
.../CanvasObjects/{ => Dashboard}/TagObject.cs | 8 +--
.../CanvasObjects/{ => Dashboard}/TimerObject.cs | 16 ++++----
LongoMatch.Drawing/LongoMatch.Drawing.csproj | 13 +++---
LongoMatch.Drawing/Makefile.am | 12 +++---
LongoMatch.Drawing/Widgets/DashboardCanvas.cs | 15 +++----
LongoMatch.Drawing/Widgets/PlaysTimeline.cs | 18 ++++----
10 files changed, 80 insertions(+), 79 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/CardObject.cs
b/LongoMatch.Drawing/CanvasObjects/Dashboard/CardObject.cs
similarity index 84%
rename from LongoMatch.Drawing/CanvasObjects/CardObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Dashboard/CardObject.cs
index 8b88be2..cc7e5b5 100644
--- a/LongoMatch.Drawing/CanvasObjects/CardObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Dashboard/CardObject.cs
@@ -20,11 +20,11 @@ using LongoMatch.Core.Common;
using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Dashboard
{
public class CardObject: TimedTaggerObject
{
- public CardObject (PenaltyCardButton card): base (card)
+ public CardObject (PenaltyCardButton card) : base (card)
{
Button = card;
}
@@ -33,7 +33,7 @@ namespace LongoMatch.Drawing.CanvasObjects
get;
set;
}
-
+
public override void Draw (IDrawingToolkit tk, Area area)
{
Color front, back;
@@ -51,7 +51,7 @@ namespace LongoMatch.Drawing.CanvasObjects
} else {
tk.LineWidth = 0;
tk.StrokeColor = TextColor;
- tk.FillColor = BackgroundColor;
+ tk.FillColor = BackgroundColor;
}
/* Draw Shape */
@@ -61,19 +61,19 @@ namespace LongoMatch.Drawing.CanvasObjects
break;
case CardShape.Circle:
tk.DrawCircle (new Point (Button.Position.X + Button.Width / 2,
- Button.Position.Y + Button.Height / 2),
- Math.Min (Button.Width, Button.Height) / 2);
+ Button.Position.Y + Button.Height / 2),
+ Math.Min (Button.Width, Button.Height) / 2);
break;
case CardShape.Triangle:
tk.DrawTriangle (new Point (Button.Position.X + Button.Width / 2,
Button.Position.Y),
- Button.Width, Button.Height, SelectionPosition.Top);
+ Button.Width, Button.Height, SelectionPosition.Top);
break;
}
/* Draw header */
tk.LineWidth = 2;
if (Recording) {
- tk.DrawText (Position, Button.Width, Button.Height, (CurrentTime -
Start).ToSecondsString());
+ tk.DrawText (Position, Button.Width, Button.Height, (CurrentTime -
Start).ToSecondsString ());
} else {
tk.DrawText (Position, Button.Width, Button.Height, Button.PenaltyCard.Name);
}
diff --git a/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
b/LongoMatch.Drawing/CanvasObjects/Dashboard/CategoryObject.cs
similarity index 93%
rename from LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Dashboard/CategoryObject.cs
index 93e982c..261f52e 100644
--- a/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Dashboard/CategoryObject.cs
@@ -24,7 +24,7 @@ using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
using LongoMatch.Core.Store.Drawables;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Dashboard
{
public class CategoryObject: TimedTaggerObject
{
@@ -48,7 +48,7 @@ namespace LongoMatch.Drawing.CanvasObjects
Rectangle editRect, cancelRect, applyRect;
double catWidth, heightPerRow;
- public CategoryObject (AnalysisEventButton category): base (category)
+ public CategoryObject (AnalysisEventButton category) : base (category)
{
Button = category;
rects = new Dictionary <Rectangle, object> ();
@@ -59,23 +59,23 @@ namespace LongoMatch.Drawing.CanvasObjects
applyRect = new Rectangle (new Point (0, 0), 0, 0);
if (iconImage == null) {
iconImage = new Image (Path.Combine (Config.ImagesDir,
- StyleConf.ButtonEventIcon));
+ StyleConf.ButtonEventIcon));
}
if (recImage == null) {
recImage = new Image (Path.Combine (Config.IconsDir,
- StyleConf.RecordButton));
+ StyleConf.RecordButton));
}
if (editImage == null) {
editImage = new Image (Path.Combine (Config.IconsDir,
- StyleConf.EditButton));
+ StyleConf.EditButton));
}
if (cancelImage == null) {
cancelImage = new Image (Path.Combine (Config.IconsDir,
- StyleConf.CancelButton));
+ StyleConf.CancelButton));
}
if (applyImage == null) {
applyImage = new Image (Path.Combine (Config.IconsDir,
- StyleConf.ApplyButton));
+ StyleConf.ApplyButton));
}
MinWidth = 100;
MinHeight = HeaderHeight * 2;
@@ -110,8 +110,8 @@ namespace LongoMatch.Drawing.CanvasObjects
bool ShowApplyButton {
get {
return ShowTags && tagsByGroup.Count > 1
- && Button.TagMode == TagMode.Predefined
- && Mode != TagMode.Edit;
+ && Button.TagMode == TagMode.Predefined
+ && Mode != TagMode.Edit;
}
}
@@ -169,7 +169,7 @@ namespace LongoMatch.Drawing.CanvasObjects
override protected void Clear ()
{
- base.Clear();
+ base.Clear ();
emitEvent = false;
cancelClicked = false;
SelectedTags.Clear ();
@@ -321,7 +321,7 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.FontWeight = FontWeight.Light;
/* Draw tags */
- for (int i=0; i < tags.Count; i++) {
+ for (int i = 0; i < tags.Count; i++) {
Point pos;
int col;
Tag tag;
@@ -329,7 +329,7 @@ namespace LongoMatch.Drawing.CanvasObjects
row = i / tagsPerRow;
col = i % tagsPerRow;
pos = new Point (start.X + col * rowwidth,
- start.Y + yptr + row * heightPerRow);
+ start.Y + yptr + row * heightPerRow);
tk.StrokeColor = Button.DarkColor;
tk.LineWidth = 1;
@@ -420,7 +420,7 @@ namespace LongoMatch.Drawing.CanvasObjects
width = StyleConf.ButtonRecWidth;
height = HeaderHeight;
pos = new Point (Position.X + Width - StyleConf.ButtonRecWidth,
- Position.Y + Height - height);
+ Position.Y + Height - height);
tk.LineWidth = 0;
tk.FillColor = new Color (c.R, c.G, c.B, 200);
tk.StrokeColor = BackgroundColor;
@@ -449,7 +449,7 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.DrawRectangle (new Point (r.TopLeft.X, r.TopLeft.Y), r.Width,
r.Height);
tk.StrokeColor = BackgroundColor;
tk.DrawText (new Point (r.TopLeft.X, r.TopLeft.Y), r.Width, r.Height,
- (obj as Tag).Value);
+ (obj as Tag).Value);
}
}
}
@@ -462,15 +462,15 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.FontWeight = FontWeight.Normal;
tk.StrokeColor = BackgroundColor;
tk.DrawText (new Point (Position.X + HeaderTextOffset, Position.Y),
- HeaderTextWidth, HeaderHeight,
- (CurrentTime - Start).ToSecondsString ());
+ HeaderTextWidth, HeaderHeight,
+ (CurrentTime - Start).ToSecondsString ());
} else {
tk.FontSize = 24;
tk.FontWeight = FontWeight.Bold;
tk.StrokeColor = BackgroundColor;
tk.DrawText (new Point (Position.X, Position.Y + HeaderHeight),
- Width, Height - HeaderHeight,
- (CurrentTime - Start).ToSecondsString ());
+ Width, Height - HeaderHeight,
+ (CurrentTime - Start).ToSecondsString ());
}
}
}
@@ -486,7 +486,7 @@ namespace LongoMatch.Drawing.CanvasObjects
}
pos = new Point (Position.X + Width - StyleConf.ButtonRecWidth,
- Position.Y);
+ Position.Y);
width = StyleConf.ButtonRecWidth;
height = HeaderHeight;
tk.FillColor = Config.Style.PaletteBackgroundDark;
@@ -511,7 +511,7 @@ namespace LongoMatch.Drawing.CanvasObjects
}
pos = new Point (Position.X + Width - StyleConf.ButtonRecWidth,
- Position.Y);
+ Position.Y);
bpos = new Point (pos.X, pos.Y + 5);
width = StyleConf.ButtonRecWidth;
@@ -556,7 +556,7 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.FillColor = TextColor;
}
tk.DrawImage (new Point (Position.X + 5, Position.Y + 5),
- Icon.Width, Icon.Height, Icon, false, true);
+ Icon.Width, Icon.Height, Icon, false, true);
}
}
}
@@ -575,7 +575,7 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.Begin ();
tk.TranslateAndScale (new Point (-Position.X, -Position.Y),
- new Point (1, 1));
+ new Point (1, 1));
tk.FontWeight = FontWeight.Bold;
/* Draw Rectangle */
diff --git a/LongoMatch.Drawing/CanvasObjects/DashboardButtonObject.cs
b/LongoMatch.Drawing/CanvasObjects/Dashboard/DashboardButtonObject.cs
similarity index 94%
rename from LongoMatch.Drawing/CanvasObjects/DashboardButtonObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Dashboard/DashboardButtonObject.cs
index 1920430..4d94ace 100644
--- a/LongoMatch.Drawing/CanvasObjects/DashboardButtonObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Dashboard/DashboardButtonObject.cs
@@ -16,14 +16,12 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
+using System.Collections.Generic;
using LongoMatch.Core.Common;
-using LongoMatch.Core.Interfaces;
using LongoMatch.Core.Interfaces.Drawing;
-using LongoMatch.Core.Store.Drawables;
using LongoMatch.Core.Store;
-using LongoMatch.Core.Handlers;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Dashboard
{
public class DashboardButtonObject: ButtonObject, ICanvasSelectableObject
{
@@ -122,6 +120,11 @@ namespace LongoMatch.Drawing.CanvasObjects
return 1;
}
}
+
+ public virtual Point GetLinkAnchor (List<Tag> tag)
+ {
+ return new Point (Position.X + 5, Position.Y + 5);
+ }
}
public class TimedTaggerObject: DashboardButtonObject
diff --git a/LongoMatch.Drawing/CanvasObjects/ScoreObject.cs
b/LongoMatch.Drawing/CanvasObjects/Dashboard/ScoreObject.cs
similarity index 88%
rename from LongoMatch.Drawing/CanvasObjects/ScoreObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Dashboard/ScoreObject.cs
index 2224fdb..5d9b7c5 100644
--- a/LongoMatch.Drawing/CanvasObjects/ScoreObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Dashboard/ScoreObject.cs
@@ -19,18 +19,18 @@ using System;
using LongoMatch.Core.Common;
using LongoMatch.Core.Store;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Dashboard
{
public class ScoreObject: TimedTaggerObject
{
static Image iconImage;
- public ScoreObject (ScoreButton score): base (score)
+ public ScoreObject (ScoreButton score) : base (score)
{
Button = score;
if (iconImage == null) {
iconImage = new Image (System.IO.Path.Combine (Config.ImagesDir,
- StyleConf.ButtonScoreIcon));
+ StyleConf.ButtonScoreIcon));
}
}
diff --git a/LongoMatch.Drawing/CanvasObjects/TagObject.cs
b/LongoMatch.Drawing/CanvasObjects/Dashboard/TagObject.cs
similarity index 83%
rename from LongoMatch.Drawing/CanvasObjects/TagObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Dashboard/TagObject.cs
index 59b6195..6b74db7 100644
--- a/LongoMatch.Drawing/CanvasObjects/TagObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Dashboard/TagObject.cs
@@ -16,24 +16,22 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
-using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Common;
-using LongoMatch.Core.Interfaces;
using LongoMatch.Core.Store;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Dashboard
{
public class TagObject: DashboardButtonObject
{
static Image iconImage;
- public TagObject (TagButton tagger): base (tagger)
+ public TagObject (TagButton tagger) : base (tagger)
{
TagButton = tagger;
Toggle = true;
if (iconImage == null) {
iconImage = new Image (System.IO.Path.Combine (Config.ImagesDir,
- StyleConf.ButtonTagIcon));
+ StyleConf.ButtonTagIcon));
}
}
diff --git a/LongoMatch.Drawing/CanvasObjects/TimerObject.cs
b/LongoMatch.Drawing/CanvasObjects/Dashboard/TimerObject.cs
similarity index 87%
rename from LongoMatch.Drawing/CanvasObjects/TimerObject.cs
rename to LongoMatch.Drawing/CanvasObjects/Dashboard/TimerObject.cs
index 493b88e..9903f2c 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Dashboard/TimerObject.cs
@@ -19,21 +19,21 @@ using LongoMatch.Core.Common;
using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
-namespace LongoMatch.Drawing.CanvasObjects
+namespace LongoMatch.Drawing.CanvasObjects.Dashboard
{
public class TimerObject: DashboardButtonObject
{
Time currentTime;
static Image iconImage;
- public TimerObject (TimerButton timer): base (timer)
+ public TimerObject (TimerButton timer) : base (timer)
{
Button = timer;
Toggle = true;
CurrentTime = new Time (0);
if (iconImage == null) {
iconImage = new Image (System.IO.Path.Combine (Config.ImagesDir,
- StyleConf.ButtonTimerIcon));
+ StyleConf.ButtonTimerIcon));
}
MinWidth = StyleConf.ButtonMinWidth;
MinHeight = iconImage.Height + StyleConf.ButtonTimerFontSize;
@@ -61,7 +61,7 @@ namespace LongoMatch.Drawing.CanvasObjects
}
}
if (value != null && currentTime != null &&
- currentTime.TotalSeconds != value.TotalSeconds) {
+ currentTime.TotalSeconds != value.TotalSeconds) {
update = true;
}
currentTime = value;
@@ -135,13 +135,13 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.FontSize = StyleConf.ButtonHeaderFontSize;
tk.FontAlignment = FontAlignment.Left;
tk.DrawText (new Point (Position.X + TextHeaderX, Position.Y),
- Button.Width - TextHeaderX, iconImage.Height, Button.Timer.Name);
+ Button.Width - TextHeaderX, iconImage.Height, Button.Timer.Name);
tk.FontWeight = FontWeight.Bold;
tk.FontSize = StyleConf.ButtonTimerFontSize;
tk.FontAlignment = FontAlignment.Center;
tk.DrawText (new Point (Position.X, Position.Y + iconImage.Height),
- Button.Width, Button.Height - iconImage.Height,
- PartialTime.ToSecondsString (), false, true);
+ Button.Width, Button.Height - iconImage.Height,
+ PartialTime.ToSecondsString (), false, true);
} else {
Text = Button.Timer.Name;
DrawText (tk);
@@ -150,7 +150,7 @@ namespace LongoMatch.Drawing.CanvasObjects
if (TeamImage != null) {
tk.DrawImage (new Point (Position.X + Width - 40, Position.Y + 5), 40,
- iconImage.Height, TeamImage, true);
+ iconImage.Height, TeamImage, true);
}
tk.End ();
}
diff --git a/LongoMatch.Drawing/LongoMatch.Drawing.csproj b/LongoMatch.Drawing/LongoMatch.Drawing.csproj
index 5d83107..7ee9ec4 100644
--- a/LongoMatch.Drawing/LongoMatch.Drawing.csproj
+++ b/LongoMatch.Drawing/LongoMatch.Drawing.csproj
@@ -28,6 +28,7 @@
<ItemGroup>
<Folder Include="CanvasObjects\" />
<Folder Include="Widgets\" />
+ <Folder Include="CanvasObjects\Dashboard\" />
</ItemGroup>
<ItemGroup>
<Compile Include="Canvas.cs" />
@@ -52,11 +53,6 @@
<Compile Include="CanvasObjects\TextObject.cs" />
<Compile Include="CanvasObjects\CounterObject.cs" />
<Compile Include="Utils.cs" />
- <Compile Include="CanvasObjects\CategoryObject.cs" />
- <Compile Include="CanvasObjects\ScoreObject.cs" />
- <Compile Include="CanvasObjects\CardObject.cs" />
- <Compile Include="CanvasObjects\TimerObject.cs" />
- <Compile Include="CanvasObjects\TagObject.cs" />
<Compile Include="CanvasObjects\BenchObject.cs" />
<Compile Include="CanvasObjects\FieldObject.cs" />
<Compile Include="CanvasObjects\PlayersTaggerObject.cs" />
@@ -72,7 +68,12 @@
<Compile Include="..\AssemblyInfo\AssemblyInfo.cs">
<Link>AssemblyInfo.cs</Link>
</Compile>
- <Compile Include="CanvasObjects\DashboardButtonObject.cs" />
+ <Compile Include="CanvasObjects\Dashboard\CardObject.cs" />
+ <Compile Include="CanvasObjects\Dashboard\DashboardButtonObject.cs" />
+ <Compile Include="CanvasObjects\Dashboard\CategoryObject.cs" />
+ <Compile Include="CanvasObjects\Dashboard\ScoreObject.cs" />
+ <Compile Include="CanvasObjects\Dashboard\TagObject.cs" />
+ <Compile Include="CanvasObjects\Dashboard\TimerObject.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/LongoMatch.Drawing/Makefile.am b/LongoMatch.Drawing/Makefile.am
index eb259e0..7a3094a 100644
--- a/LongoMatch.Drawing/Makefile.am
+++ b/LongoMatch.Drawing/Makefile.am
@@ -10,11 +10,14 @@ SOURCES = ../AssemblyInfo/AssemblyInfo.cs \
CanvasObjects/ButtonObject.cs \
CanvasObjects/CameraObject.cs \
CanvasObjects/CanvasObject.cs \
- CanvasObjects/CardObject.cs \
- CanvasObjects/CategoryObject.cs \
CanvasObjects/CounterObject.cs \
CanvasObjects/CrossObject.cs \
- CanvasObjects/DashboardButtonObject.cs \
+ CanvasObjects/Dashboard/CardObject.cs \
+ CanvasObjects/Dashboard/CategoryObject.cs \
+ CanvasObjects/Dashboard/DashboardButtonObject.cs \
+ CanvasObjects/Dashboard/ScoreObject.cs \
+ CanvasObjects/Dashboard/TagObject.cs \
+ CanvasObjects/Dashboard/TimerObject.cs \
CanvasObjects/EllipseObject.cs \
CanvasObjects/FieldObject.cs \
CanvasObjects/LabelObject.cs \
@@ -26,12 +29,9 @@ SOURCES = ../AssemblyInfo/AssemblyInfo.cs \
CanvasObjects/PositionObject.cs \
CanvasObjects/QuadrilateralObject.cs \
CanvasObjects/RectangleObject.cs \
- CanvasObjects/ScoreObject.cs \
- CanvasObjects/TagObject.cs \
CanvasObjects/TextObject.cs \
CanvasObjects/TimeNodeObject.cs \
CanvasObjects/TimelineObject.cs \
- CanvasObjects/TimerObject.cs \
Constants.cs \
PlayslistCellRenderer.cs \
Utils.cs \
diff --git a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
index d623287..4dcb17f 100644
--- a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
+++ b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
@@ -16,16 +16,15 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
-using System.Linq;
-using LongoMatch.Core.Store.Templates;
using System.Collections.Generic;
+using System.Linq;
using LongoMatch.Core.Common;
-using LongoMatch.Drawing.CanvasObjects;
using LongoMatch.Core.Handlers;
+using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
using LongoMatch.Core.Store.Drawables;
-using LongoMatch.Core.Interfaces.Drawing;
-using LongoMatch.Core.Interfaces;
+using LongoMatch.Core.Store.Templates;
+using LongoMatch.Drawing.CanvasObjects.Dashboard;
namespace LongoMatch.Drawing.Widgets
{
@@ -44,7 +43,7 @@ namespace LongoMatch.Drawing.Widgets
FitMode fitMode;
bool modeChanged;
- public DashboardCanvas (IWidget widget): base (widget)
+ public DashboardCanvas (IWidget widget) : base (widget)
{
Accuracy = 5;
TagMode = TagMode.Edit;
@@ -300,8 +299,8 @@ namespace LongoMatch.Drawing.Widgets
translation = new Point (0, 0);
} else if (FitMode == FitMode.Fit) {
Image.ScaleFactor (templateWidth, templateHeight,
- (int)widget.Width, (int)widget.Height,
- out scaleX, out scaleY, out translation);
+ (int)widget.Width, (int)widget.Height,
+ out scaleX, out scaleY, out translation);
}
if (modeChanged) {
modeChanged = false;
diff --git a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
index cbbef9d..5fbe306 100644
--- a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
@@ -43,7 +43,7 @@ namespace LongoMatch.Drawing.Widgets
Dictionary<TimelineObject, object> timelineToFilter;
Dictionary<EventType, CategoryTimeline> eventsTimelines;
- public PlaysTimeline (IWidget widget): base(widget)
+ public PlaysTimeline (IWidget widget) : base (widget)
{
eventsTimelines = new Dictionary<EventType, CategoryTimeline> ();
timelineToFilter = new Dictionary<TimelineObject, object> ();
@@ -86,7 +86,7 @@ namespace LongoMatch.Drawing.Widgets
tl.CurrentTime = value;
}
if (currentTime < value) {
- start = Utils.TimeToPos (currentTime,SecondsPerPixel);
+ start = Utils.TimeToPos (currentTime, SecondsPerPixel);
stop = Utils.TimeToPos (value, SecondsPerPixel);
} else {
start = Utils.TimeToPos (value, SecondsPerPixel);
@@ -187,23 +187,23 @@ namespace LongoMatch.Drawing.Widgets
tl = new TimerTimeline (project.Periods.Select (p => p as Timer).ToList (),
true, NodeDraggingMode.All, false, duration,
- i * StyleConf.TimelineCategoryHeight,
- Utils.ColorForRow (i), Config.Style.PaletteBackgroundDark);
+ i * StyleConf.TimelineCategoryHeight,
+ Utils.ColorForRow (i), Config.Style.PaletteBackgroundDark);
AddTimeline (tl, null);
PeriodsTimeline = tl as TimerTimeline;
i++;
foreach (Timer t in project.Timers) {
tl = new TimerTimeline (new List<Timer> { t }, false, NodeDraggingMode.All,
false, duration,
- i * StyleConf.TimelineCategoryHeight,
- Utils.ColorForRow (i),
Config.Style.PaletteBackgroundDark);
+ i * StyleConf.TimelineCategoryHeight,
+ Utils.ColorForRow (i), Config.Style.PaletteBackgroundDark);
AddTimeline (tl, t);
}
foreach (EventType type in project.EventTypes) {
tl = new CategoryTimeline (project, project.EventsByType (type), duration,
- i * StyleConf.TimelineCategoryHeight,
- Utils.ColorForRow (i), playsFilter);
+ i * StyleConf.TimelineCategoryHeight,
+ Utils.ColorForRow (i), playsFilter);
AddTimeline (tl, type);
i++;
}
@@ -230,7 +230,7 @@ namespace LongoMatch.Drawing.Widgets
void ShowTimersMenu (Point coords)
{
if (coords.Y >= PeriodsTimeline.OffsetY &&
- coords.Y < PeriodsTimeline.OffsetY + PeriodsTimeline.Height) {
+ coords.Y < PeriodsTimeline.OffsetY + PeriodsTimeline.Height) {
Timer t = Selections.Select (p => (p.Drawable as
TimerTimeNodeObject).Timer).FirstOrDefault ();
if (ShowTimerMenuEvent != null) {
ShowTimerMenuEvent (t, Utils.PosToTime (coords, SecondsPerPixel));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]