초기 커밋.
This commit is contained in:
49
LFP_Manager/Controls/ucStatus.cs
Normal file
49
LFP_Manager/Controls/ucStatus.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public partial class ucStatus : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
public ucStatus()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
lcStatus.Text = " " + name + " ";
|
||||
}
|
||||
|
||||
public void SetTextWidth(int width)
|
||||
{
|
||||
lcStatus.Size = new System.Drawing.Size(width, 14);
|
||||
}
|
||||
|
||||
public void SetValue(int nValue)
|
||||
{
|
||||
switch (nValue)
|
||||
{
|
||||
case 0:
|
||||
pcStatus.BackColor = System.Drawing.Color.Green;
|
||||
lcStatus.ForeColor = System.Drawing.Color.White;
|
||||
break;
|
||||
case 1:
|
||||
pcStatus.BackColor = System.Drawing.Color.Orange;
|
||||
lcStatus.ForeColor = System.Drawing.Color.Black;
|
||||
break;
|
||||
case 2:
|
||||
pcStatus.BackColor = System.Drawing.Color.Red;
|
||||
lcStatus.ForeColor = System.Drawing.Color.White;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user