Fix compiler warnings
This commit is contained in:
parent
1473bb693f
commit
bbf7d357ef
|
@ -7,7 +7,6 @@ namespace Ooui
|
||||||
{
|
{
|
||||||
public class Button : FormControl
|
public class Button : FormControl
|
||||||
{
|
{
|
||||||
ButtonType typ = ButtonType.Submit;
|
|
||||||
public ButtonType Type {
|
public ButtonType Type {
|
||||||
get => GetAttribute ("type", ButtonType.Submit);
|
get => GetAttribute ("type", ButtonType.Submit);
|
||||||
set => SetAttributeProperty ("type", value);
|
set => SetAttributeProperty ("type", value);
|
||||||
|
|
|
@ -20,7 +20,6 @@ namespace Ooui
|
||||||
set => SetAttributeProperty ("title", value);
|
set => SetAttributeProperty ("title", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hidden = false;
|
|
||||||
public bool IsHidden {
|
public bool IsHidden {
|
||||||
get => GetBooleanAttribute ("hidden");
|
get => GetBooleanAttribute ("hidden");
|
||||||
set => SetBooleanAttributeProperty ("hidden", value);
|
set => SetBooleanAttributeProperty ("hidden", value);
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace Ooui
|
||||||
{
|
{
|
||||||
public class Form : Element
|
public class Form : Element
|
||||||
{
|
{
|
||||||
string action = "";
|
|
||||||
public string Action {
|
public string Action {
|
||||||
get => GetStringAttribute ("action", "");
|
get => GetStringAttribute ("action", "");
|
||||||
set => SetAttributeProperty ("action", value ?? "");
|
set => SetAttributeProperty ("action", value ?? "");
|
||||||
|
|
|
@ -9,7 +9,6 @@ namespace Ooui
|
||||||
set => SetAttributeProperty ("name", value);
|
set => SetAttributeProperty ("name", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isDisabled = false;
|
|
||||||
public bool IsDisabled {
|
public bool IsDisabled {
|
||||||
get => GetBooleanAttribute ("disabled");
|
get => GetBooleanAttribute ("disabled");
|
||||||
set => SetBooleanAttributeProperty ("disabled", value);
|
set => SetBooleanAttributeProperty ("disabled", value);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<PackageLicenseUrl>https://github.com/praeclarum/Ooui/blob/master/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/praeclarum/Ooui/blob/master/LICENSE</PackageLicenseUrl>
|
||||||
<RepositoryUrl>https://github.com/praeclarum/Ooui.git</RepositoryUrl>
|
<RepositoryUrl>https://github.com/praeclarum/Ooui.git</RepositoryUrl>
|
||||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -25,7 +25,6 @@ namespace Ooui
|
||||||
set => SetAttributeProperty ("rows", value);
|
set => SetAttributeProperty ("rows", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cols = 20;
|
|
||||||
public int Columns {
|
public int Columns {
|
||||||
get => GetAttribute ("cols", 20);
|
get => GetAttribute ("cols", 20);
|
||||||
set => SetAttributeProperty ("cols", value);
|
set => SetAttributeProperty ("cols", value);
|
||||||
|
|
|
@ -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)
|
protected override void QueueMessage (Message message)
|
||||||
{
|
{
|
||||||
base.QueueMessage (message);
|
base.QueueMessage (message);
|
||||||
|
|
Loading…
Reference in New Issue