Cleanups after merge
This commit is contained in:
1 parent
f83496d66a
commit
11398dbb2f
56 files changed
+363
-369
No files matched your search
@@ -17,8 +17,6 @@
|
||||
// */
|
||||
#endregion
|
||||
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib
|
||||
{
|
||||
public static class CBase
|
||||
|
||||
@@ -143,7 +143,9 @@ namespace VocaluxeLib
|
||||
|
||||
try
|
||||
{
|
||||
// ReSharper disable LoopCanBeConvertedToQuery
|
||||
foreach (FileInfo file in dir.GetFiles(cast))
|
||||
// ReSharper restore LoopCanBeConvertedToQuery
|
||||
files.Add(!fullpath ? file.Name : file.FullName);
|
||||
|
||||
if (recursive)
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
using System.Drawing;
|
||||
using VocaluxeLib.Menu;
|
||||
#region license
|
||||
// /*
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
// */
|
||||
#endregion
|
||||
|
||||
using System.Drawing;
|
||||
|
||||
namespace VocaluxeLib.Draw
|
||||
{
|
||||
@@ -13,7 +31,7 @@ namespace VocaluxeLib.Draw
|
||||
public string TexturePath = "";
|
||||
|
||||
/// <summary>
|
||||
/// Original size (e.g. of bmp)
|
||||
/// Original size (e.g. of bmp)
|
||||
/// </summary>
|
||||
public readonly Size OrigSize;
|
||||
public float OrigAspect
|
||||
@@ -22,7 +40,7 @@ namespace VocaluxeLib.Draw
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Current size when drawn
|
||||
/// Current size when drawn
|
||||
/// </summary>
|
||||
public SRectF Rect;
|
||||
|
||||
@@ -31,7 +49,7 @@ namespace VocaluxeLib.Draw
|
||||
private int _W2, _H2;
|
||||
private readonly bool _UseFullTexture;
|
||||
/// <summary>
|
||||
/// Internal texture width (on device), a power of 2 if necessary
|
||||
/// Internal texture width (on device), a power of 2 if necessary
|
||||
/// </summary>
|
||||
public int W2
|
||||
{
|
||||
@@ -46,7 +64,7 @@ namespace VocaluxeLib.Draw
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Internal texture height (on device), a power of 2 if necessary
|
||||
/// Internal texture height (on device), a power of 2 if necessary
|
||||
/// </summary>
|
||||
public int H2
|
||||
{
|
||||
@@ -62,16 +80,16 @@ namespace VocaluxeLib.Draw
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Internal use. Specifies which part of texture memory is actually used
|
||||
/// Internal use. Specifies which part of texture memory is actually used
|
||||
/// </summary>
|
||||
public float WidthRatio { get; private set; }
|
||||
/// <summary>
|
||||
/// Internal use. Specifies which part of texture memory is actually used
|
||||
/// Internal use. Specifies which part of texture memory is actually used
|
||||
/// </summary>
|
||||
public float HeightRatio { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Actual texture space used in x direction
|
||||
/// Actual texture space used in x direction
|
||||
/// </summary>
|
||||
public int UsedWidth
|
||||
{
|
||||
@@ -79,7 +97,7 @@ namespace VocaluxeLib.Draw
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Actual texture space used in y direction
|
||||
/// Actual texture space used in y direction
|
||||
/// </summary>
|
||||
public int UsedHeight
|
||||
{
|
||||
@@ -112,7 +130,7 @@ namespace VocaluxeLib.Draw
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new texture reference
|
||||
/// Creates a new texture reference
|
||||
/// </summary>
|
||||
/// <param name="origWidth">Original width (Bitmap size)</param>
|
||||
/// <param name="origHeight">Original height (Bitmap size)</param>
|
||||
|
||||
+20
-13
@@ -1,27 +1,34 @@
|
||||
using System;
|
||||
#region license
|
||||
// /*
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
// */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Game;
|
||||
using VocaluxeLib.Menu;
|
||||
using VocaluxeLib.PartyModes;
|
||||
using VocaluxeLib.Profile;
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
namespace VocaluxeLib
|
||||
{
|
||||
public interface IMenuParty
|
||||
{
|
||||
void SetPartyModeID(int partyModeID);
|
||||
int GetPartyModeID();
|
||||
|
||||
void AssingPartyMode(IPartyMode partyMode);
|
||||
void DataToScreen(Object data);
|
||||
}
|
||||
|
||||
public interface IConfig
|
||||
{
|
||||
void SetBackgroundMusicVolume(int newVolume);
|
||||
|
||||
@@ -22,7 +22,6 @@ using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using VocaluxeLib.Draw;
|
||||
|
||||
using VocaluxeLib.Profile;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
@@ -489,8 +488,7 @@ namespace VocaluxeLib.Menu
|
||||
for (int j = 0; j < _NumW; j++)
|
||||
{
|
||||
SRectF rect = new SRectF(Rect.X + j * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z);
|
||||
CStatic tileStatic = new CStatic(_PartyModeID, _TextureEmptyTile, ColorEmptyTile, rect);
|
||||
tileStatic.Aspect = EAspect.Crop;
|
||||
CStatic tileStatic = new CStatic(_PartyModeID, _TextureEmptyTile, ColorEmptyTile, rect) {Aspect = EAspect.Crop};
|
||||
CText tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle,
|
||||
_Theme.NameFont, _Theme.NameColor, "");
|
||||
_Tiles.Add(new CTile(tileStatic, tileText, -1));
|
||||
|
||||
@@ -21,7 +21,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using VocaluxeLib.Menu.SongMenu;
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
|
||||
@@ -17,18 +17,6 @@
|
||||
// */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Drawing;
|
||||
using VocaluxeLib;
|
||||
using VocaluxeLib.Game;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu.SongMenu;
|
||||
using VocaluxeLib.PartyModes;
|
||||
using VocaluxeLib.Profile;
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
namespace VocaluxeLib.Menu
|
||||
{
|
||||
public interface IMenu
|
||||
|
||||
@@ -22,7 +22,6 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Xml;
|
||||
using VocaluxeLib.Draw;
|
||||
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib.PartyModes
|
||||
{
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
#region license
|
||||
// /*
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
// */
|
||||
#endregion
|
||||
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib.Profile
|
||||
{
|
||||
@@ -13,14 +27,14 @@ namespace VocaluxeLib.Profile
|
||||
public string FileName = "";
|
||||
public CTexture Texture;
|
||||
|
||||
public CAvatar(int ID)
|
||||
public CAvatar(int id)
|
||||
{
|
||||
this.ID = ID;
|
||||
ID = id;
|
||||
}
|
||||
|
||||
public bool LoadFromFile(string NewFileName)
|
||||
public bool LoadFromFile(string fileName)
|
||||
{
|
||||
FileName = NewFileName;
|
||||
FileName = fileName;
|
||||
return Reload();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#region license
|
||||
// /*
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Vocaluxe is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||
// */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
|
||||
@@ -9,15 +26,15 @@ namespace VocaluxeLib.Profile
|
||||
{
|
||||
public class CProfile
|
||||
{
|
||||
private static readonly XmlWriterSettings _Settings = new XmlWriterSettings()
|
||||
{
|
||||
private static readonly XmlWriterSettings _Settings = new XmlWriterSettings
|
||||
{
|
||||
Indent = true,
|
||||
Encoding = Encoding.UTF8,
|
||||
ConformanceLevel = ConformanceLevel.Document
|
||||
};
|
||||
|
||||
public int ID;
|
||||
|
||||
|
||||
public string PlayerName;
|
||||
public string FileName;
|
||||
public string AvatarFileName;
|
||||
@@ -55,9 +72,9 @@ namespace VocaluxeLib.Profile
|
||||
return LoadProfile(FileName);
|
||||
}
|
||||
|
||||
public bool LoadProfile(string NewFileName)
|
||||
public bool LoadProfile(string fileName)
|
||||
{
|
||||
FileName = NewFileName;
|
||||
FileName = fileName;
|
||||
|
||||
CXMLReader xmlReader = CXMLReader.OpenFile(FileName);
|
||||
if (xmlReader == null)
|
||||
@@ -85,7 +102,9 @@ namespace VocaluxeLib.Profile
|
||||
if (FileName == String.Empty)
|
||||
{
|
||||
string filename = string.Empty;
|
||||
// ReSharper disable LoopCanBeConvertedToQuery
|
||||
foreach (char chr in PlayerName)
|
||||
// ReSharper restore LoopCanBeConvertedToQuery
|
||||
{
|
||||
if (char.IsLetter(chr))
|
||||
filename += chr.ToString();
|
||||
@@ -142,4 +161,4 @@ namespace VocaluxeLib.Profile
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,8 +18,6 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using VocaluxeLib;
|
||||
|
||||
using VocaluxeLib.Draw;
|
||||
|
||||
namespace VocaluxeLib.Songs
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu.SingNotes;
|
||||
|
||||
namespace VocaluxeLib.Songs
|
||||
{
|
||||
@@ -806,9 +806,7 @@ namespace VocaluxeLib.Songs
|
||||
return null;
|
||||
|
||||
// build sentences list
|
||||
List<string> sentences = new List<string>();
|
||||
foreach (CLine line in voice.Lines)
|
||||
sentences.Add(line.Points != 0 ? line.Lyrics : String.Empty);
|
||||
List<string> sentences = voice.Lines.Select(line => line.Points != 0 ? line.Lyrics : String.Empty).ToList();
|
||||
|
||||
// find equal sentences series
|
||||
List<SSeries> series = new List<SSeries>();
|
||||
|
||||
@@ -23,10 +23,6 @@ using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu.SingNotes;
|
||||
|
||||
namespace VocaluxeLib
|
||||
{
|
||||
|
||||
|
||||
Reference in new issue
Block a user