mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Grid Changes
- added good, warning and bad icons to the map spawner and prevent transfer grids.
This commit is contained in:
parent
9df02ec05e
commit
ca9c053f08
8 changed files with 172 additions and 17 deletions
|
|
@ -17,11 +17,9 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
public IEnumerable<string> RenderToView()
|
||||
{
|
||||
List<string> errors = new List<string>();
|
||||
|
||||
Update();
|
||||
|
||||
return errors;
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
public void RenderToModel()
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
public IEnumerable<string> RenderToView()
|
||||
{
|
||||
Update();
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
|
|
@ -26,6 +28,14 @@ namespace ServerManagerTool.Lib
|
|||
public void UpdateForLocalization()
|
||||
{
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
IsEnabled = this.Count > 0;
|
||||
|
||||
foreach (var preventTransfer in this)
|
||||
preventTransfer.Update();
|
||||
}
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
|
@ -53,7 +63,10 @@ namespace ServerManagerTool.Lib
|
|||
public override void InitializeFromINIValue(string value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
Update();
|
||||
return;
|
||||
}
|
||||
|
||||
var kvPair = value.Split(new[] { '=' }, 2);
|
||||
var kvValue = kvPair[1].Trim(' ');
|
||||
|
|
@ -74,5 +87,18 @@ namespace ServerManagerTool.Lib
|
|||
{
|
||||
return IsValid;
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty ValidStatusProperty = DependencyProperty.Register(nameof(ValidStatus), typeof(string), typeof(PreventTransferOverride), new PropertyMetadata("N"));
|
||||
|
||||
public string ValidStatus
|
||||
{
|
||||
get { return (string)GetValue(ValidStatusProperty); }
|
||||
set { SetValue(ValidStatusProperty, value); }
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
ValidStatus = IsValid ? (GameData.HasCreatureForClass(DinoClassString) ? "Y" : "W") : "N";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue