Files
RobustToolbox/Robust.Client/ViewVariables/ViewVariablesPropertyEditor.cs
T
SilverandGitHub 25926a17b7 Renames SS14.* to Robust.* (#793)
RobustToolbox projects should be named Robust.* 

This PR changes the RobustToolbox projects from SS14.* to Robust.*

Updates SS14.* prefixes/namespaces to Robust.*
Updates SpaceStation14.sln to RobustToolbox.sln
Updates MSBUILD/SS14.* to MSBUILD/Robust.*
Updates CSProject and MSBuild references for the above
Updates git_helper.py
Removes Runserver and Runclient as they are unusable
2019-04-15 20:24:59 -06:00

34 lines
854 B
C#

using System;
using System.ComponentModel;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
namespace Robust.Client.ViewVariables
{
/// <summary>
/// An editor for the value of a property.
/// </summary>
public abstract class ViewVariablesPropertyEditor
{
/// <summary>
/// Invoked when the value was changed.
/// </summary>
internal event Action<object> OnValueChanged;
protected bool ReadOnly { get; private set; }
public Control Initialize(object value, bool readOnly)
{
ReadOnly = readOnly;
return MakeUI(value);
}
protected abstract Control MakeUI(object value);
protected void ValueChanged(object newValue)
{
OnValueChanged?.Invoke(newValue);
}
}
}