mirror of
https://github.com/riperiperi/FreeSO
synced 2026-08-13 20:26:13 -04:00
MPL per-file was used in older project files, but should apply to the whole project, so having it there was redundant.
33 lines
968 B
C#
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);
|
|
}
|
|
}
|
|
}
|