Skip to content
Snippets Groups Projects
Commit 65248270 authored by Oskar Nowicki's avatar Oskar Nowicki
Browse files

v0.4

parent 7f511a9c
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,8 @@
<Label x:Name="Lhaslo"></Label>
<Label Text="zgadywana"></Label>
<Entry x:Name="Zgadywana"/>
<ListView x:Name="kategorie_lista">
</ListView>
<Picker x:Name="picker_kat" />
<Label x:Name="test">test</Label>
</StackLayout>
......
......@@ -22,6 +22,7 @@ namespace wisielec
{
InitializeComponent();
FileHelper.CopyFileToLocalStorage();
zaladuj_tab("zwierzeta");
zaladuj_kategorie();
......@@ -75,6 +76,12 @@ namespace wisielec
Lhaslo.Text = "error";
return;
}
/*
foreach (var item in lista_hasel_kat)
{
test.Text += item.haslo;
}
*/
}
......@@ -83,15 +90,17 @@ namespace wisielec
string jsonPath = Path.Combine(FileSystem.AppDataDirectory, "baza.json");
string json = File.ReadAllText(jsonPath);
JObject obiekt = JObject.Parse(json);
JObject kategorie_file = obiekt["kategorie"] as JObject;
if (kategorie_file != null)
JObject kategorie_file = (JObject)obiekt["kategorie"];
foreach (var categotia in kategorie_file)
{
List<string> kategorie = kategorie_file.Properties().Select(p => p.Name).ToList();
kategorie.Add(categotia.Key);
}
picker_kat.ItemsSource = kategorie;
}
......
......@@ -7,5 +7,6 @@ namespace wisielec
public class Kategoria
{
public string haslo { get; set; }
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment