Compare commits
3 Commits
0ca78d7861
...
badbaf0b40
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
badbaf0b40 | ||
|
|
072e12d427 | ||
|
|
f0d785cb13 |
@@ -42,8 +42,8 @@ namespace PolyChat
|
|||||||
Serve();
|
Serve();
|
||||||
|
|
||||||
// test
|
// test
|
||||||
|
UIController.OnIncomingConnection("localhost");
|
||||||
/*
|
/*
|
||||||
UIController.OnIncomingConnection("1.1.1.1");
|
|
||||||
UIController.OnIncomingConnection("1.2.3.4");
|
UIController.OnIncomingConnection("1.2.3.4");
|
||||||
UIController.OnIncomingConnection("1.2.4.8");
|
UIController.OnIncomingConnection("1.2.4.8");
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -96,13 +96,16 @@
|
|||||||
<!-- CHAT -->
|
<!-- CHAT -->
|
||||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
|
||||||
<ListView x:Name="listViewMessages" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="4 16">
|
<ListView x:Name="listViewMessages" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="4 16">
|
||||||
|
<ListView.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListViewItem">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
</Style>
|
||||||
|
</ListView.ItemContainerStyle>
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate x:DataType="models:ChatMessage">
|
<DataTemplate x:DataType="models:ChatMessage">
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
|
<StackPanel HorizontalAlignment="{x:Bind Align}" x:Name="Message" MaxWidth="320" Margin="0 4" Padding="16 8" CornerRadius="4" Background="{ThemeResource SystemAccentColor}">
|
||||||
<StackPanel HorizontalAlignment="{x:Bind Align}" x:Name="Message" MaxWidth="320" Margin="0 4" Padding="16 8" CornerRadius="4" Background="{ThemeResource SystemAccentColor}">
|
<TextBlock Text="{x:Bind Content}" Foreground="{ThemeResource SystemAltHighColor}" TextWrapping="WrapWholeWords" FontSize="14"/>
|
||||||
<TextBlock Text="{x:Bind Content}" Foreground="{ThemeResource SystemAltHighColor}" TextWrapping="WrapWholeWords" FontSize="14"/>
|
<TextBlock Text="{x:Bind TimeStamp.ToString()}" Foreground="{ThemeResource SystemAltMediumColor}"/>
|
||||||
<TextBlock Text="{x:Bind TimeStamp.ToString()}" Foreground="{ThemeResource SystemAltMediumColor}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
|
|||||||
@@ -87,16 +87,16 @@ namespace PolyChat
|
|||||||
public async void OnOpenNewChatDialog(object sender = null, RoutedEventArgs e = null)
|
public async void OnOpenNewChatDialog(object sender = null, RoutedEventArgs e = null)
|
||||||
{
|
{
|
||||||
// test
|
// test
|
||||||
/*
|
/**/
|
||||||
OnIncomingMessage(
|
OnIncomingMessage(
|
||||||
"1.1.1.1",
|
"localhost",
|
||||||
new JObject(
|
new JObject(
|
||||||
new JProperty("type", "username"),
|
new JProperty("type", "message"),
|
||||||
new JProperty("content", "Cloudflare")
|
new JProperty("content", "Test")
|
||||||
).ToString(),
|
).ToString(),
|
||||||
DateTime.Now
|
DateTime.Now
|
||||||
);
|
);
|
||||||
*/
|
/**/
|
||||||
NewChatDialog dialog = new NewChatDialog();
|
NewChatDialog dialog = new NewChatDialog();
|
||||||
var result = await SafelyOpenDialog(dialog);
|
var result = await SafelyOpenDialog(dialog);
|
||||||
if (result == ContentDialogResult.Primary)
|
if (result == ContentDialogResult.Primary)
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ namespace PolyChat.Models
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private String[] genKeys()
|
private String[] genKeys()
|
||||||
{
|
{
|
||||||
return new String[] {"sehrSichererKey", "nochVielSichererKey"};
|
return new String[] {"12345678", "12345678" };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user