Normalized line endings in platform.cs code

This commit is contained in:
Andrew Hoefling 2017-11-17 20:31:56 +00:00
parent 7c315661b9
commit 7967bdebf7
1 changed files with 75 additions and 75 deletions

View File

@ -34,81 +34,81 @@ namespace Ooui.Forms
_renderer = new PlatformRenderer (this);
MessagingCenter.Subscribe(this, Page.AlertSignalName, (Page sender, AlertArguments arguments) =>
{
var alert = new Div
{
ClassName = "modal-dialog"
};
var content = new Div
{
ClassName = "modal-content"
};
var header = new Div
{
ClassName = "modal-header"
};
var closeButton = new Button
{
ClassName = "close"
};
closeButton.AppendChild(new Span(HttpUtility.HtmlDecode("×")));
closeButton.Clicked += CloseAlert;
var h4 = new Heading(4)
{
Text = arguments.Title
};
header.AppendChild(closeButton);
header.AppendChild(h4);
content.AppendChild(header);
content.AppendChild(new Div()
{
ClassName = "modal-body",
Text = arguments.Message
});
if (!string.IsNullOrEmpty(arguments.Cancel))
{
var footer = new Div()
{
ClassName = "modal-footer"
};
var cancel = new Button(arguments.Cancel)
{
ClassName = "btn btn-default"
};
cancel.Clicked += CloseAlert;
footer.AppendChild(cancel);
if (!string.IsNullOrEmpty(arguments.Accept))
{
var accept = new Button(arguments.Accept)
{
ClassName = "btn btn-default"
};
accept.Clicked += CloseAlert;
footer.AppendChild(accept);
}
content.AppendChild(footer);
}
alert.AppendChild(content);
_renderer.AppendChild(alert);
void CloseAlert(object s, EventArgs e)
{
_renderer.RemoveChild(alert);
}
{
var alert = new Div
{
ClassName = "modal-dialog"
};
var content = new Div
{
ClassName = "modal-content"
};
var header = new Div
{
ClassName = "modal-header"
};
var closeButton = new Button
{
ClassName = "close"
};
closeButton.AppendChild(new Span(HttpUtility.HtmlDecode("×")));
closeButton.Clicked += CloseAlert;
var h4 = new Heading(4)
{
Text = arguments.Title
};
header.AppendChild(closeButton);
header.AppendChild(h4);
content.AppendChild(header);
content.AppendChild(new Div()
{
ClassName = "modal-body",
Text = arguments.Message
});
if (!string.IsNullOrEmpty(arguments.Cancel))
{
var footer = new Div()
{
ClassName = "modal-footer"
};
var cancel = new Button(arguments.Cancel)
{
ClassName = "btn btn-default"
};
cancel.Clicked += CloseAlert;
footer.AppendChild(cancel);
if (!string.IsNullOrEmpty(arguments.Accept))
{
var accept = new Button(arguments.Accept)
{
ClassName = "btn btn-default"
};
accept.Clicked += CloseAlert;
footer.AppendChild(accept);
}
content.AppendChild(footer);
}
alert.AppendChild(content);
_renderer.AppendChild(alert);
void CloseAlert(object s, EventArgs e)
{
_renderer.RemoveChild(alert);
}
});
}