Klassen vom MainWindow getrennt
+ Klassen getrennt + Business Schicht abgeändert
This commit is contained in:
parent
80f2610b04
commit
a05b392aea
16
bibtalk/bib-talk/Business/Message.cs
Normal file
16
bibtalk/bib-talk/Business/Message.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace bib_talk.Business
|
||||||
|
{
|
||||||
|
public class Message
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Username { get; set; }
|
||||||
|
public string Text { get; set; }
|
||||||
|
public DateTime Timestamp { get; set; }
|
||||||
|
}
|
||||||
|
}
|
15
bibtalk/bib-talk/Business/MessageDto.cs
Normal file
15
bibtalk/bib-talk/Business/MessageDto.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace bib_talk.Business
|
||||||
|
{
|
||||||
|
public class MessageDto
|
||||||
|
{
|
||||||
|
public string Username { get; set; }
|
||||||
|
public string Message { get; set; }
|
||||||
|
public DateTime Timestamp { get; set; }
|
||||||
|
}
|
||||||
|
}
|
19
bibtalk/bib-talk/Business/User.cs
Normal file
19
bibtalk/bib-talk/Business/User.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace bib_talk.Business
|
||||||
|
{
|
||||||
|
public class User
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Username { get; set; }
|
||||||
|
public string Password { get; set; }
|
||||||
|
public string Email { get; set; }
|
||||||
|
public string Birthday { get; set; }
|
||||||
|
public string IsOnline { get; set; }
|
||||||
|
public string ProfileImagePath { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using bib_talk.Business;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -132,7 +132,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
<ListBox x:Name="onlineUsersListBox" Margin="76,112,339,0" d:ItemsSource="{d:SampleData ItemCount=5}" Background="#FF323134" BorderBrush="{x:Null}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" SelectionChanged="onlineUsersListBox_SelectionChanged" Grid.RowSpan="2">
|
<ListBox x:Name="onlineUsersListBox" Margin="76,112,339,0" d:ItemsSource="{d:SampleData ItemCount=5}" Background="#FF323134" BorderBrush="{x:Null}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Grid.RowSpan="2">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal" Width="205" Height="60">
|
<StackPanel Orientation="Horizontal" Width="205" Height="60">
|
||||||
|
@ -120,7 +120,6 @@ namespace bib_talk
|
|||||||
|
|
||||||
private void Popup_LostFocus(object sender, RoutedEventArgs e)
|
private void Popup_LostFocus(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
ClosePopup();
|
ClosePopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,10 +128,10 @@ namespace bib_talk
|
|||||||
popup.IsOpen = false;
|
popup.IsOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onlineUsersListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
//private void onlineUsersListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
//{
|
||||||
|
|
||||||
}
|
//}
|
||||||
private async void uploadpbclick(object sender, RoutedEventArgs e)
|
private async void uploadpbclick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||||
@ -144,33 +143,4 @@ namespace bib_talk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Message
|
|
||||||
{
|
|
||||||
public int Id { get; set; }
|
|
||||||
public string Username { get; set; }
|
|
||||||
public string Text { get; set; }
|
|
||||||
public DateTime Timestamp { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MessageDto
|
|
||||||
{
|
|
||||||
public string Username { get; set; }
|
|
||||||
public string Message { get; set; }
|
|
||||||
public DateTime Timestamp { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class User
|
|
||||||
{
|
|
||||||
public int Id { get; set; }
|
|
||||||
public string Username { get; set; }
|
|
||||||
public string Password { get; set; }
|
|
||||||
public string Email { get; set; }
|
|
||||||
public string Birthday { get; set; }
|
|
||||||
public string IsOnline { get; set; }
|
|
||||||
public string ProfileImagePath { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user