Fix compiler warnings

This commit is contained in:
Frank A. Krueger 2018-03-13 17:59:47 -07:00
parent 1473bb693f
commit bbf7d357ef
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
7 changed files with 1 additions and 49 deletions

View File

@ -7,7 +7,6 @@ namespace Ooui
{
public class Button : FormControl
{
ButtonType typ = ButtonType.Submit;
public ButtonType Type {
get => GetAttribute ("type", ButtonType.Submit);
set => SetAttributeProperty ("type", value);

View File

@ -20,7 +20,6 @@ namespace Ooui
set => SetAttributeProperty ("title", value);
}
bool hidden = false;
public bool IsHidden {
get => GetBooleanAttribute ("hidden");
set => SetBooleanAttributeProperty ("hidden", value);

View File

@ -4,7 +4,6 @@ namespace Ooui
{
public class Form : Element
{
string action = "";
public string Action {
get => GetStringAttribute ("action", "");
set => SetAttributeProperty ("action", value ?? "");

View File

@ -9,7 +9,6 @@ namespace Ooui
set => SetAttributeProperty ("name", value);
}
bool isDisabled = false;
public bool IsDisabled {
get => GetBooleanAttribute ("disabled");
set => SetBooleanAttributeProperty ("disabled", value);

View File

@ -9,6 +9,7 @@
<PackageLicenseUrl>https://github.com/praeclarum/Ooui/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/praeclarum/Ooui.git</RepositoryUrl>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

View File

@ -25,7 +25,6 @@ namespace Ooui
set => SetAttributeProperty ("rows", value);
}
int cols = 20;
public int Columns {
get => GetAttribute ("cols", 20);
set => SetAttributeProperty ("cols", value);

View File

@ -115,50 +115,6 @@ namespace Ooui
}
}
void QueueStateMessagesLocked (EventTarget target)
{
if (target == null) return;
var created = false;
foreach (var m in target.StateMessages) {
if (m.MessageType == MessageType.Create) {
createdIds.Add (m.TargetId);
created = true;
}
if (created) {
QueueMessageLocked (m);
}
}
}
void QueueMessageLocked (Message message)
{
//
// Make sure all the referenced objects have been created
//
if (!createdIds.Contains (message.TargetId)) {
QueueStateMessagesLocked (element.GetElementById (message.TargetId));
}
if (message.Value is EventTarget ve) {
if (!createdIds.Contains (ve.Id)) {
QueueStateMessagesLocked (ve);
}
}
else if (message.Value is Array a) {
for (var i = 0; i < a.Length; i++) {
// Console.WriteLine ($"A{i} = {a.GetValue(i)}");
if (a.GetValue (i) is EventTarget e && !createdIds.Contains (e.Id)) {
QueueStateMessagesLocked (e);
}
}
}
//
// Add it to the queue
//
//Console.WriteLine ($"QM {message.MessageType} {message.TargetId} {message.Key} {message.Value}");
queuedMessages.Add (message);
}
protected override void QueueMessage (Message message)
{
base.QueueMessage (message);