?? preferences.cs
字號(hào):
////////////////////////////////////////////////
//
// Project: Lines.NET
// Version: 1.1
// Author: Vladimir L.
//
// homepage: http://www.boomsoft.org
// e-mail: support@boomsoft.org
//
// Copyright (c) 2003-2004, Boomsoft.org
//
using System;
using System.Drawing;
namespace Lines.GUI
{
/// <summary>
/// Describes graphics and color preferences of the game.
/// </summary>
/// <remarks>
/// <p style="color:red">This class currently has a very simple implementation and is a topic to
/// change in a future to be more flexible and customizable.</p>
/// </remarks>
public class Preferences
{
/// <summary>
/// Creates an instance of Preferences class.
/// </summary>
public Preferences()
{
}
/// <summary>
/// Matches between color index of ball and <see cref="Color"/> object to to draw this ball.
/// </summary>
/// <param name="color">The color index of ball.</param>
public Color GetBallColor(int color)
{
switch (color)
{
case 1:
return Color.Red;
case 2:
return Color.Green;
case 3:
return Color.Blue;
case 4:
return Color.Yellow;
case 5:
return Color.Orange;
case 6:
return Color.Brown;
case 7:
return Color.Cyan;
case 8:
return Color.Violet;
// So on, anyway will be changed in a future
default:
return Color.Black;
}
}
/// <summary>
/// Matches between color index of ball and <see cref="Color"/> object to to draw the frame of this ball.
/// </summary>
/// <param name="color">The color index of ball.</param>
/// <returns>The border color itself to draw the ball frame.</returns>
public Color GetBallBorderColor(int color)
{
switch (color)
{
case 1:
return Color.DarkRed;
case 2:
return Color.DarkGreen;
case 3:
return Color.DarkBlue;
case 4:
return Color.Gold;
case 5:
return Color.DarkOrange;
case 6:
return Color.Black;
case 7:
return Color.DarkCyan;
case 8:
return Color.DarkViolet;
// So on, anyway will be changed in a future
default:
return Color.Black;
}
}
/// <summary>
/// Gets the field (game board) background color.
/// </summary>
public Color FieldBgColor
{
get {return Color.WhiteSmoke;}
}
/// <summary>
/// Gets the field (game board) foreground color.
/// </summary>
public Color FieldFgColor
{
get {return Color.Black;}
}
/// <summary>
/// Gets the score/steps/next balls indicator background color.
/// </summary>
public Color IndicatorBgColor
{
get {return Color.WhiteSmoke;}
}
/// <summary>
/// Gets the score/steps/next balls indicator foreground color.
/// </summary>
public Color IndicatorFgColor
{
get {return Color.Black;}
}
/// <summary>
/// Gets the score/steps indicator text color.
/// </summary>
public Color IndicatorTextColor
{
get {return Color.PaleGreen;}
}
/// <summary>
/// Gets the background color of indicator itself.
/// </summary>
public Color IndicatorCtrlBgColor
{
get {return Color.DarkSlateGray;}
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -