You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Mesnac.Controls.Sulf
{
public partial class SulfDataBG : UserControl
{
public SulfDataBG()
{
InitializeComponent();
}
private string _timesName;
public string TimesName
{
get { return _timesName; }
set { _timesName = value; }
}
private int _times;
public int Times
{
get { return _times; }
set
{
_times = value;
TimeSpan a = TimeSpan.FromSeconds(value);
string time = Convert.ToInt32(a.TotalHours).ToString() + ":" + a.Minutes.ToString() + ":" + a.Seconds.ToString();
this.label2.Text = time;
this.Refresh();
}
}
private string _labletitle;
public string Labletitle
{
get { return _labletitle; }
set
{
_labletitle = value;
if (value != null)
{
this.label1.Text = value;
this.label1.Left = this.Width / 2 - this.label1.Width / 2;
this.Refresh();
}
}
}
private bool _isVisibleTitle;
/// <summary>
/// 是否现实标题
/// </summary>
public bool IsVisibleTitle
{
get { return _isVisibleTitle; }
set
{
_isVisibleTitle = value;
if (!_isVisibleTitle)
this.label2.Visible = false;
else
this.label2.Visible = true;
}
}
}
}