[longomatch] Move enums to a LongoMatch.Common namespace/folder
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [longomatch] Move enums to a LongoMatch.Common namespace/folder
- Date: Thu, 19 Nov 2009 23:54:56 +0000 (UTC)
commit d26367e2527861921b321a4fc46d8ecba3af243f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Nov 19 00:02:34 2009 +0100
Move enums to a LongoMatch.Common namespace/folder
LongoMatch/Gui/Component/ProjectDetailsWidget.cs | 21 +++++++++------------
LongoMatch/Gui/Dialog/NewProjectDialog.cs | 3 ++-
LongoMatch/Gui/Dialog/ProjectsManager.cs | 3 ++-
LongoMatch/Gui/MainWindow.cs | 3 ++-
LongoMatch/Makefile.am | 1 +
5 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
index 3589415..272bc4d 100644
--- a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
@@ -21,6 +21,7 @@
using System;
using Mono.Unix;
using Gtk;
+using LongoMatch.Common;
using LongoMatch.DB;
using LongoMatch.Handlers;
using LongoMatch.IO;
@@ -33,11 +34,7 @@ using LongoMatch.Video.Utils;
namespace LongoMatch.Gui.Component
{
- public enum UseType {
- NewCaptureProject,
- NewFromFileProject,
- EditProject,
- }
+
//TODO añadir eventos de cambios para realizar el cambio directamente sobre el file data abierto
[System.ComponentModel.Category("LongoMatch")]
[System.ComponentModel.ToolboxItem(true)]
@@ -53,7 +50,7 @@ namespace LongoMatch.Gui.Component
private Sections actualSection;
private TeamTemplate actualVisitorTeam;
private TeamTemplate actualLocalTeam;
- private UseType useType;
+ private ProjectType useType;
public ProjectDetailsWidget()
{
@@ -69,17 +66,17 @@ namespace LongoMatch.Gui.Component
FillSections();
FillTeamsTemplate();
- this.Use=UseType.NewFromFileProject;
+ this.Use=ProjectType.NewFileProject;
}
- public UseType Use {
+ public ProjectType Use {
set {
- if (value == UseType.NewFromFileProject || value == UseType.EditProject) {
+ if (value == ProjectType.NewFileProject || value == ProjectType.EditProject) {
videobitratelabel.Hide();
bitratespinbutton.Hide();
}
- if (value == UseType.EditProject) {
+ if (value == ProjectType.EditProject) {
tagscombobox.Visible = false;
localcombobox.Visible = false;
visitorcombobox.Visible = false;
@@ -251,7 +248,7 @@ namespace LongoMatch.Gui.Component
public Project GetProject() {
if (this.Filename != "") {
- if (useType == UseType.NewFromFileProject) {
+ if (useType == ProjectType.NewFileProject) {
return new Project(mFile,
LocalName,
VisitorName,
@@ -333,7 +330,7 @@ namespace LongoMatch.Gui.Component
{
FileChooserDialog fChooser = null;
- if (this.useType == UseType.NewCaptureProject) {
+ if (this.useType == ProjectType.NewCaptureProject) {
fChooser = new FileChooserDialog(Catalog.GetString("Save File as..."),
(Gtk.Window)this.Toplevel,
FileChooserAction.Save,
diff --git a/LongoMatch/Gui/Dialog/NewProjectDialog.cs b/LongoMatch/Gui/Dialog/NewProjectDialog.cs
index 573f0c7..f70ad3b 100644
--- a/LongoMatch/Gui/Dialog/NewProjectDialog.cs
+++ b/LongoMatch/Gui/Dialog/NewProjectDialog.cs
@@ -20,6 +20,7 @@
using System;
using LongoMatch.DB;
+using LongoMatch.Common;
namespace LongoMatch.Gui.Dialog
{
@@ -35,7 +36,7 @@ namespace LongoMatch.Gui.Dialog
fdwidget.Clear();
}
- public LongoMatch.Gui.Component.UseType Use {
+ public ProjectType Use {
set {
this.fdwidget.Use = value;
}
diff --git a/LongoMatch/Gui/Dialog/ProjectsManager.cs b/LongoMatch/Gui/Dialog/ProjectsManager.cs
index 1818efc..e8e54a6 100644
--- a/LongoMatch/Gui/Dialog/ProjectsManager.cs
+++ b/LongoMatch/Gui/Dialog/ProjectsManager.cs
@@ -22,6 +22,7 @@ using System;
using System.Collections.Generic;
using Gtk;
using Mono.Unix;
+using LongoMatch.Common;
using LongoMatch.DB;
using LongoMatch.Gui.Component;
@@ -39,7 +40,7 @@ namespace LongoMatch.Gui.Dialog
{
this.Build();
this.Fill();
- this.projectdetails.Use = LongoMatch.Gui.Component.UseType.EditProject;
+ this.projectdetails.Use = ProjectType.EditProject;
projectdetails.Edited = false;
}
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index e65b0b1..4da6eeb 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -25,6 +25,7 @@ using System.IO;
using GLib;
using System.Threading;
using Gdk;
+using LongoMatch.Common;
using LongoMatch.DB;
using LongoMatch.TimeNodes;
using LongoMatch.Gui.Dialog;
@@ -247,7 +248,7 @@ namespace LongoMatch.Gui
Project project;
NewProjectDialog npd = new NewProjectDialog();
npd.TransientFor = this;
- npd.Use = LongoMatch.Gui.Component.UseType.NewFromFileProject;
+ npd.Use = ProjectType.NewFileProject;
// Esperamos a que se pulse el boton aceptar y se cumplan las condiciones para
// crear un nuevo objeto del tipo Project
int response = npd.Run();
diff --git a/LongoMatch/Makefile.am b/LongoMatch/Makefile.am
index 8fed0ae..1194568 100644
--- a/LongoMatch/Makefile.am
+++ b/LongoMatch/Makefile.am
@@ -75,6 +75,7 @@ all: $(ASSEMBLY) $(COMMONAPPLICATIONDATAROOT_IMAGES) $(COMMONAPPLICATIONDATAROO
FILES = \
AssemblyInfo.cs \
+ Common/Enums.cs \
Compat/0.0/DatabaseMigrator.cs \
Compat/0.0/DB/DataBase.cs \
Compat/0.0/DB/MediaFile.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]