Compare commits

..

3 Commits

Author SHA1 Message Date
Patrick Hellebrand
badbaf0b40 Merge branch 'ConnectionController' of https://sourcecode.socialcoding.bosch.com/scm/~hpl2fe/polychat into ConnectionController 2021-09-23 16:24:51 +02:00
Patrick Hellebrand
072e12d427 ChatMessages on THEEEEEEEEEEEEEEE RIGHT 2021-09-23 16:24:41 +02:00
Felix Hartmann (PEA3-Fe-FI)
f0d785cb13 set encryption keys 2021-09-23 16:22:38 +02:00
4 changed files with 15 additions and 12 deletions

View File

@@ -42,8 +42,8 @@ namespace PolyChat
Serve();
// test
UIController.OnIncomingConnection("localhost");
/*
UIController.OnIncomingConnection("1.1.1.1");
UIController.OnIncomingConnection("1.2.3.4");
UIController.OnIncomingConnection("1.2.4.8");
*/

View File

@@ -96,14 +96,17 @@
<!-- CHAT -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<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>
<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}">
<TextBlock Text="{x:Bind Content}" Foreground="{ThemeResource SystemAltHighColor}" TextWrapping="WrapWholeWords" FontSize="14"/>
<TextBlock Text="{x:Bind TimeStamp.ToString()}" Foreground="{ThemeResource SystemAltMediumColor}"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>

View File

@@ -87,16 +87,16 @@ namespace PolyChat
public async void OnOpenNewChatDialog(object sender = null, RoutedEventArgs e = null)
{
// test
/*
/**/
OnIncomingMessage(
"1.1.1.1",
"localhost",
new JObject(
new JProperty("type", "username"),
new JProperty("content", "Cloudflare")
new JProperty("type", "message"),
new JProperty("content", "Test")
).ToString(),
DateTime.Now
);
*/
/**/
NewChatDialog dialog = new NewChatDialog();
var result = await SafelyOpenDialog(dialog);
if (result == ContentDialogResult.Primary)

View File

@@ -173,7 +173,7 @@ namespace PolyChat.Models
/// <returns></returns>
private String[] genKeys()
{
return new String[] {"sehrSichererKey", "nochVielSichererKey"};
return new String[] {"12345678", "12345678" };
}