freeso/TSOClient/FSO.IDE/EditorComponent/OperandForms/OpLabelControl.cs
riperiperi b57ebbd141 Cleanup: Remove most unused usings and MPL per-file licenses
MPL per-file was used in older project files, but should apply to the whole project, so having it there was redundant.
2023-11-25 03:45:29 +00:00

33 lines
968 B
C#

using FSO.IDE.EditorComponent.OperandForms.DataProviders;
using FSO.SimAntics.Engine;
using System.Windows.Forms;
namespace FSO.IDE.EditorComponent.OperandForms
{
public class OpLabelControl : Label, IOpControl
{
private OpTextProvider TextProvider;
private VMPrimitiveOperand Operand;
private EditorScope Scope;
public OpLabelControl()
{
this.Dock = System.Windows.Forms.DockStyle.Fill;
this.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10);
this.AutoSize = true;
}
public OpLabelControl(BHAVEditor master, EditorScope scope, VMPrimitiveOperand operand, OpTextProvider textP) : this()
{
Scope = scope;
Operand = operand;
TextProvider = textP;
OperandUpdated();
}
public void OperandUpdated()
{
this.Text = TextProvider.GetText(Scope, Operand);
}
}
}