This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using Xamarin.Forms; | |
namespace App2 | |
{ | |
class AllMustBeTrueMultiConverter : IMultiValueConverter | |
{ | |
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
var hasFixedGoogleBug154855417 = GetSharedPreferences("google_bug_154855417", global::Android.Content.FileCreationMode.Private); | |
if (!hasFixedGoogleBug154855417.Contains("fixed")) | |
{ | |
var corruptedZoomTables = new Java.IO.File(this.ApplicationContext.FilesDir, "ZoomTables.data"); | |
var corruptedSavedClientParameters = new Java.IO.File(this.ApplicationContext.FilesDir, "SavedClientParameters.data.cs"); | |
var corruptedClientParametersData = | |
new Java.IO.File( | |
this.ApplicationContext.FilesDir, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page "/MyPage" | |
<h3>Show images</h3> | |
@for (int i = 0; i < LabImages.Count; i += imagesPerRow) | |
{ | |
<div class="card-deck"> | |
@for(int j = i; j < i + imagesPerRow && j < LabImages.Count; j++) | |
{ | |
<div class="card"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page "/EditTicket" | |
@using System.Globalization | |
<h3>Edit Ticket # @Ticket.Id</h3> | |
<EditForm Model="Ticket" OnSubmit="Save"> | |
<InputText @bind-Value="Ticket.Title" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<EditForm Model="@Item" OnValidSubmit="@(e => OnSave.InvokeAsync(Item))"> | |
<DataAnnotationsValidator /> | |
<ValidationSummary /> | |
<div class="form-group"> | |
<label for="Title">Name:</label> | |
<InputText id="Title" @bind-Value="Item.name" class="form-control" /> | |
</div> | |
<div class="form-group"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
List<Item> items = new List<UserQuery.Item> | |
{ | |
new Item { Id = 1, Nome = "Giorgio" }, | |
new Item { Id = 1, Nome = "Luca" }, | |
new Item { Id = 1, Nome = "Marco" }, | |
new Item { Id = 1, Nome = "Nicolò" } | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
// Deve essere compreso tra 1 e il numero di quitz | |
const int numOfQuitzzes = 3; | |
// Chiamo il servizio che mi genera la lista di quitz | |
List<string> RandomQuitzList = QuitzService.GetQuitzList(numOfQuitzzes); | |
// Mostro il risultato | |
for(int i = 0; i < numOfQuitzzes; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hi Francesco, | |
// here is my code... :-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright(c) 2018 Nicolò Carandini (aka TPCWare) | |
// Content | |
// ====================================================================================================== | |
// This "not for production code" is just an example on how to run an async task that can be cancelled. | |
// Moreover, in this example there is an implementation of HSL to RGB color conversion. | |
// Build and test | |
// ========================================================================================================= | |
// Run it on LinqPad (https://www.linqpad.net/) or use the code to create a Console app on Visual Studio. |