diff --git a/ChatController/ChatControlWaitLayer.xaml b/ChatController/ChatControlWaitLayer.xaml
index 21785d2..19e3ea8 100644
--- a/ChatController/ChatControlWaitLayer.xaml
+++ b/ChatController/ChatControlWaitLayer.xaml
@@ -61,7 +61,7 @@
-
+
diff --git a/ChatController/ChatControlWaitLayer.xaml.cs b/ChatController/ChatControlWaitLayer.xaml.cs
index a6d32d2..d09d0a6 100644
--- a/ChatController/ChatControlWaitLayer.xaml.cs
+++ b/ChatController/ChatControlWaitLayer.xaml.cs
@@ -1,10 +1,38 @@
-namespace ChatController
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using ChatController.Annotations;
+
+namespace ChatController
{
- public partial class ChatControlWaitLayer
+ public partial class ChatControlWaitLayer : INotifyPropertyChanged
{
- public ChatControlWaitLayer()
+ private string _DialogText;
+
+ public string DialogText
+ {
+ get => _DialogText;
+ set
+ {
+ _DialogText = value;
+ OnPropertyChanged(nameof(DialogText));
+ }
+ }
+
+ public ChatControlWaitLayer(string dialogText = null)
{
InitializeComponent();
+
+ DataContext = this;
+
+ DialogText = dialogText ?? "Daten werden übertragen. Bitte warten...";
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ [NotifyPropertyChangedInvocator]
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
\ No newline at end of file
diff --git a/ChatController/ChatController.csproj b/ChatController/ChatController.csproj
index de91cda..eb04b1d 100644
--- a/ChatController/ChatController.csproj
+++ b/ChatController/ChatController.csproj
@@ -68,6 +68,7 @@
+
@@ -100,7 +101,10 @@
True
Resource.resx
-
+
+ OwnChatMessageBox.xaml
+
+
@@ -130,6 +134,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
@@ -153,6 +161,13 @@
+
+
+
+
+
+
+
diff --git a/ChatController/ChatKlassen/ChatMessage.cs b/ChatController/ChatKlassen/ChatMessage.cs
index a9f5358..1114d7f 100644
--- a/ChatController/ChatKlassen/ChatMessage.cs
+++ b/ChatController/ChatKlassen/ChatMessage.cs
@@ -70,7 +70,7 @@ namespace ChatController.ChatKlassen
OriginalImage = originalImage;
OriginalImageName = imageName;
- if(MessageId == 0 && MessageType == ChatMessageType.Image && logo != null)
+ if(MessageId == 0 && MessageType == ChatMessageType.Image && !(logo is null))
{
PictureSource = logo;
PicturePlaceholderHeight = (int) logo.Height;
@@ -81,9 +81,7 @@ namespace ChatController.ChatKlassen
if(!string.IsNullOrWhiteSpace(thumbnailPath))
{
ThumbnailPlaceholderHeight = Utils.GetHeightFromThumbnailUri(thumbnailPath);
- Thumbnail = Utils.GetPicturePlaceholder();
-
- Utils.DownloadImageAsync(thumbnailPath, $"group-{groupId}", CacheCategory.Thumbnail, imageSource =>
+ Utils.DownloadDocumentThumbnail(thumbnailPath, imageSource =>
{
Thumbnail = imageSource;
});
@@ -208,17 +206,7 @@ namespace ChatController.ChatKlassen
public override bool Equals(object obj)
{
- if(obj is ChatMessage message)
- {
- if(message.IsSeparator && IsSeparator)
- {
- return SendTime == message.SendTime;
- }
-
- return Id.Equals(message.Id) && MessageId.Equals(message.MessageId);
- }
-
- return false;
+ return obj is ChatMessage message && (message.IsSeparator && IsSeparator ? SendTime == message.SendTime : Id.Equals(message.Id) && MessageId.Equals(message.MessageId));
}
public override string ToString()
diff --git a/ChatController/ChatKlassen/Contact.cs b/ChatController/ChatKlassen/Contact.cs
index 9ab8f2d..3c38fe9 100644
--- a/ChatController/ChatKlassen/Contact.cs
+++ b/ChatController/ChatKlassen/Contact.cs
@@ -54,14 +54,7 @@ namespace ChatController.ChatKlassen
var isOwnMessage = rmUserId.HasValue && rmUserId.Value.Equals(userId);
- if (_HasUnreadMessages && !isOwnMessage)
- {
- _Color = new BrushConverter().ConvertFromString("#ff5e00") as SolidColorBrush;
- }
- else
- {
- _Color = new SolidColorBrush(Colors.Gray);
- }
+ _Color = _HasUnreadMessages && !isOwnMessage ? new BrushConverter().ConvertFromString("#FF5A00") as SolidColorBrush : new SolidColorBrush(Colors.Gray);
OnPropertyChanged(nameof(HasUnreadMessages));
OnPropertyChanged(nameof(Color));
@@ -135,22 +128,7 @@ namespace ChatController.ChatKlassen
{
if(obj is Contact y)
{
- if(ReferenceEquals(this, y))
- {
- return true;
- }
-
- if(GetType() != y.GetType())
- {
- return false;
- }
-
- return Name == y.Name &&
- IsNewMessage == y.IsNewMessage &&
- TimeStamp.Equals(y.TimeStamp) &&
- GroupId == y.GroupId &&
- UserIdManage == y.UserIdManage &&
- IsChatMessageInputGridVisible == y.IsChatMessageInputGridVisible;
+ return GroupId == y.GroupId;
}
return false;
@@ -160,16 +138,21 @@ namespace ChatController.ChatKlassen
{
unchecked
{
- var hashCode = Name != null ? Name.GetHashCode() : 0;
+ var hashCode = Name?.GetHashCode() ?? 0;
hashCode = (hashCode * 397) ^ GroupId;
- hashCode = (hashCode * 397) ^ (UserIdManage != null ? UserIdManage.GetHashCode() : 0);
+ hashCode = (hashCode * 397) ^ (UserIdManage?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ IsChatMessageInputGridVisible.GetHashCode();
return hashCode;
}
}
+ public override string ToString()
+ {
+ return $"({GroupId}) {Name}";
+ }
+
public SolidColorBrush AccentColorBrush { get; }
public event PropertyChangedEventHandler PropertyChanged;
diff --git a/ChatController/ChatMainControl.xaml b/ChatController/ChatMainControl.xaml
index fcd7abb..e0245e3 100644
--- a/ChatController/ChatMainControl.xaml
+++ b/ChatController/ChatMainControl.xaml
@@ -11,15 +11,14 @@
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="600"
Loaded="ChatMainControl_OnLoaded"
- SnapsToDevicePixels="True" d:DataContext="{d:DesignData ChatMainControl}">
+ SnapsToDevicePixels="True" d:DataContext="{d:DesignData Type=ChatMainControl}">
+
-
-
@@ -49,84 +48,31 @@
-
+
@@ -178,6 +125,7 @@
+
@@ -186,12 +134,12 @@
+
+
+
@@ -300,7 +251,7 @@
-
+
@@ -319,19 +270,24 @@
-
+
-
+
+
+
+
-
@@ -339,19 +295,19 @@
-
+
-
-
+
@@ -366,7 +322,18 @@
-
+
+
+
+
+
+
+
+
@@ -396,7 +363,7 @@
Background="{StaticResource LightBackColor}"
ContextMenuOpening="Chat_OnContextMenuOpening"
Padding="20"
- Visibility="{Binding Path=Chat.IsInBroadcastMode, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type chatController:ChatMainControl}}, Converter={StaticResource BoolToVisibilityConverter}}"
+ Visibility="{Binding Path=ChatListBoxVisibility, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type chatController:ChatMainControl}}}"
d:DataContext="{d:DesignData ChatMessage}">
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ChatController/OwnChatMessageBox.xaml.cs b/ChatController/OwnChatMessageBox.xaml.cs
new file mode 100644
index 0000000..be83422
--- /dev/null
+++ b/ChatController/OwnChatMessageBox.xaml.cs
@@ -0,0 +1,76 @@
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Windows;
+using ChatController.Annotations;
+
+namespace ChatController
+{
+ public partial class OwnChatMessageBox : INotifyPropertyChanged
+ {
+ private string _MessageBoxText;
+
+ public string MessageBoxText
+ {
+ get => _MessageBoxText;
+ set
+ {
+ _MessageBoxText = value;
+ OnPropertyChanged(nameof(MessageBoxText));
+ }
+ }
+
+ private string _PositiveButtonText;
+ public string PositiveButtonText
+ {
+ get => _PositiveButtonText;
+ set
+ {
+ _PositiveButtonText = value;
+ OnPropertyChanged(nameof(PositiveButtonText));
+ }
+ }
+
+ private string _CloseButtonText;
+ public string CloseButtonText
+ {
+ get => _CloseButtonText;
+ set
+ {
+ _CloseButtonText = value;
+ OnPropertyChanged(nameof(CloseButtonText));
+ }
+ }
+
+ public OwnChatMessageBox(string positiveButtonText, string closeButtonText, string messageBoxText, string title)
+ {
+ InitializeComponent();
+
+ DataContext = this;
+
+ PositiveButtonText = positiveButtonText;
+ CloseButtonText = string.IsNullOrWhiteSpace(closeButtonText) ? "Schließen" : closeButtonText;
+ MessageBoxText = messageBoxText;
+ Title = title;
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ [NotifyPropertyChangedInvocator]
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+
+ private void PositiveButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ DialogResult = true;
+ Close();
+ }
+
+ private void CloseButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ DialogResult = false;
+ Close();
+ }
+ }
+}
diff --git a/ChatController/Properties/Annotations1.cs b/ChatController/Properties/Annotations1.cs
index 4376ea0..9b594a1 100644
--- a/ChatController/Properties/Annotations1.cs
+++ b/ChatController/Properties/Annotations1.cs
@@ -137,7 +137,7 @@ namespace ChatController.Annotations
///
///
/// void Foo(string param) {
- /// if (param == null)
+ /// if (param is null)
/// throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol
/// }
///
diff --git a/ChatController/Ressourcen/paper-plane-solid.png b/ChatController/Ressourcen/paper-plane-solid.png
new file mode 100644
index 0000000..a7cc99b
Binary files /dev/null and b/ChatController/Ressourcen/paper-plane-solid.png differ
diff --git a/ChatController/Ressourcen/paperclip-solid.png b/ChatController/Ressourcen/paperclip-solid.png
new file mode 100644
index 0000000..9e7615d
Binary files /dev/null and b/ChatController/Ressourcen/paperclip-solid.png differ
diff --git a/ChatController/Ressourcen/smile-regular.png b/ChatController/Ressourcen/smile-regular.png
new file mode 100644
index 0000000..0437a2a
Binary files /dev/null and b/ChatController/Ressourcen/smile-regular.png differ
diff --git a/ChatController/Ressourcen/sync-alt.png b/ChatController/Ressourcen/sync-alt.png
new file mode 100644
index 0000000..4c03e77
Binary files /dev/null and b/ChatController/Ressourcen/sync-alt.png differ
diff --git a/ChatController/Ressourcen/tasks-solid-inverted.png b/ChatController/Ressourcen/tasks-solid-inverted.png
new file mode 100644
index 0000000..4339022
Binary files /dev/null and b/ChatController/Ressourcen/tasks-solid-inverted.png differ
diff --git a/ChatController/Ressourcen/tasks-solid.png b/ChatController/Ressourcen/tasks-solid.png
new file mode 100644
index 0000000..d649880
Binary files /dev/null and b/ChatController/Ressourcen/tasks-solid.png differ
diff --git a/ChatController/Ressourcen/times-solid.png b/ChatController/Ressourcen/times-solid.png
new file mode 100644
index 0000000..9f80126
Binary files /dev/null and b/ChatController/Ressourcen/times-solid.png differ
diff --git a/ChatController/Utilities/BroadcastMessage.cs b/ChatController/Utilities/ChatMessageFileWrapper.cs
similarity index 51%
rename from ChatController/Utilities/BroadcastMessage.cs
rename to ChatController/Utilities/ChatMessageFileWrapper.cs
index 1819df3..16d5182 100644
--- a/ChatController/Utilities/BroadcastMessage.cs
+++ b/ChatController/Utilities/ChatMessageFileWrapper.cs
@@ -5,11 +5,14 @@ using System.Runtime.CompilerServices;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using ChatController.Annotations;
+using ChatController.Core;
namespace ChatController.Utilities
{
- public class BroadcastMessage : INotifyPropertyChanged
+ public class ChatMessageFileWrapper : INotifyPropertyChanged
{
+ public string FileName => !string.IsNullOrWhiteSpace(OriginalFilePath) ? Path.GetFileName(OriginalFilePath) : null;
+
private string _OriginalFilePath;
public string OriginalFilePath
{
@@ -18,6 +21,7 @@ namespace ChatController.Utilities
{
_OriginalFilePath = value;
OnPropertyChanged(nameof(OriginalFilePath));
+ OnPropertyChanged(nameof(FileName));
}
}
@@ -32,29 +36,39 @@ namespace ChatController.Utilities
}
}
- private ImageSource _BroadcastMessageImageSource;
+ private ImageSource _ChatMessageImageSource;
- public ImageSource BroadcastMessageImageSource
+ public ImageSource ChatMessageImageSource
{
- get => _BroadcastMessageImageSource;
- set
+ get => _ChatMessageImageSource;
+ private set
{
- _BroadcastMessageImageSource = value;
- OnPropertyChanged(nameof(BroadcastMessageImageSource));
+ _ChatMessageImageSource = value;
+ OnPropertyChanged(nameof(ChatMessageImageSource));
}
}
- public BroadcastMessage(string originalFilePath, string scaledFilePath)
+ public ChatMessageFileWrapper(string originalFilePath, string scaledFilePath, string thumbnailUrl)
{
OriginalFilePath = originalFilePath;
ScaledFilePath = scaledFilePath;
- var bitmap = new BitmapImage();
- bitmap.BeginInit();
- bitmap.UriSource = new Uri(scaledFilePath);
- bitmap.EndInit();
+ var uri = new Uri(scaledFilePath);
- BroadcastMessageImageSource = bitmap;
+ if (Constants.ImageFileExtensions.Contains(Path.GetExtension(scaledFilePath).ToUpperInvariant()) && uri.IsFile)
+ {
+ var bitmap = new BitmapImage(uri);
+ bitmap.Freeze();
+
+ ChatMessageImageSource = bitmap;
+ }
+ else
+ {
+ Utils.DownloadDocumentThumbnail(thumbnailUrl, imageSource =>
+ {
+ ChatMessageImageSource = imageSource;
+ });
+ }
}
public event PropertyChangedEventHandler PropertyChanged;
diff --git a/ChatController/Utilities/Extensions/ObservableSortCollection.cs b/ChatController/Utilities/Extensions/ObservableSortCollection.cs
index 2289be4..4a45afd 100644
--- a/ChatController/Utilities/Extensions/ObservableSortCollection.cs
+++ b/ChatController/Utilities/Extensions/ObservableSortCollection.cs
@@ -49,7 +49,7 @@ namespace ChatController.Utilities.Extensions
public void Sort()
{
- if (_Comparer != null)
+ if (!(_Comparer is null))
{
DisconnectHandler();
var lTemp = this.ToList();
diff --git a/ChatController/Utilities/FileUtils.cs b/ChatController/Utilities/FileUtils.cs
index 598d0cd..2216f4a 100644
--- a/ChatController/Utilities/FileUtils.cs
+++ b/ChatController/Utilities/FileUtils.cs
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
@@ -13,6 +14,13 @@ namespace ChatController.Utilities
{
try
{
+ var isImageFile = Constants.ImageFileExtensions.Contains(Path.GetExtension(pFile).ToUpperInvariant());
+
+ if(!isImageFile)
+ {
+ return pFile;
+ }
+
byte[] mediaFile;
using(Stream reader = File.OpenRead(pFile))
{
@@ -79,7 +87,8 @@ namespace ChatController.Utilities
graphics.DrawImage(scaledBitmap, (int)width, (int)height);
}
- var filePath = Path.GetTempPath() + Guid.NewGuid() + pFormat;
+ // tmp_img_owch_
+ var filePath = $"{Path.GetTempPath()}{Guid.NewGuid()}_tmp_img_owch{pFormat}";
if(pFormat.Equals(".JPG") || pFormat.Equals(".JPE") || pFormat.Equals(".JPEG") || pFormat.Equals(".BMP"))
{
@@ -120,12 +129,37 @@ namespace ChatController.Utilities
return pFile;
}
}
-
+
public static bool CheckFileSize(string pathToFile, long maxFileSize)
{
var fileInfo = new FileInfo(pathToFile);
-
+
return fileInfo.Length > maxFileSize;
}
+
+ public static bool IsFileLocked(string path)
+ {
+ if(!File.Exists(path))
+ {
+ return false;
+ }
+
+ try
+ {
+ var file = new FileInfo(path);
+
+ using (var stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.None))
+ {
+ stream.Close();
+ }
+ }
+ catch(IOException ioException)
+ {
+ Debug.WriteLine($"Error (FileUtils.IsFileLocked): {ioException.Message}");
+ return true;
+ }
+
+ return false;
+ }
}
}
diff --git a/ChatController/Utilities/Utils.cs b/ChatController/Utilities/Utils.cs
index e3ad49c..58f9efa 100644
--- a/ChatController/Utilities/Utils.cs
+++ b/ChatController/Utilities/Utils.cs
@@ -14,14 +14,11 @@ using System.Windows;
using System.Windows.Documents;
using System.Windows.Interop;
using System.Windows.Media;
-using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using ChatController.Core;
using RestSharp;
using MessageBox = System.Windows.MessageBox;
using PixelFormat = System.Drawing.Imaging.PixelFormat;
-using Point = System.Drawing.Point;
-using Size = System.Drawing.Size;
namespace ChatController.Utilities
{
@@ -138,7 +135,7 @@ namespace ChatController.Utilities
var cachedImage = cache.GetImageSourceFromCache(key, uri, cacheCategory);
- if (cachedImage != null)
+ if(!(cachedImage is null))
{
callback?.Invoke(cachedImage);
return;
@@ -151,15 +148,38 @@ namespace ChatController.Utilities
});
}
+ public static void DownloadDocumentThumbnail(string uri, Action callback)
+ {
+ if (string.IsNullOrEmpty(uri))
+ {
+ callback?.Invoke(null);
+ return;
+ }
+
+ var cache = OwnChatCache.GetInstance();
+
+ if(!(cache.DocumentThumbnail is null))
+ {
+ callback?.Invoke(cache.DocumentThumbnail);
+ return;
+ }
+
+ DownloadImage(uri, imageSource =>
+ {
+ cache.DocumentThumbnail = imageSource;
+ callback?.Invoke(imageSource);
+ });
+ }
+
private static ImageSource GetDefaultImageSource(bool pIsGroup, bool pIsEmployee)
{
var defaultImage = Constants.EmployeeDefaultImagePath;
- if (pIsGroup)
+ if(pIsGroup)
{
defaultImage = pIsEmployee ? Constants.TeamDefaultImagePath : Constants.NormalGroupDefaultImagePath;
}
- else if (!pIsEmployee)
+ else if(!pIsEmployee)
{
defaultImage = Constants.CustomerDefaultImagePath;
}
@@ -176,21 +196,28 @@ namespace ChatController.Utilities
public static ImageSource GetPicturePlaceholder()
{
- var resultBitmapImage = new BitmapImage();
+ var cache = OwnChatCache.GetInstance();
- resultBitmapImage.BeginInit();
- resultBitmapImage.UriSource = new Uri(Constants.ImagePlaceholderPath);
- resultBitmapImage.EndInit();
- resultBitmapImage.Freeze();
+ if(cache.ImagePlaceholder is null)
+ {
+ var resultBitmapImage = new BitmapImage();
- return resultBitmapImage;
+ resultBitmapImage.BeginInit();
+ resultBitmapImage.UriSource = new Uri(Constants.ImagePlaceholderPath);
+ resultBitmapImage.EndInit();
+ resultBitmapImage.Freeze();
+
+ cache.ImagePlaceholder = resultBitmapImage;
+ }
+
+ return cache.ImagePlaceholder;
}
public static string ReadStream(WebResponse response)
{
var dataStream = response.GetResponseStream();
- if (dataStream == null)
+ if(dataStream is null)
{
return null;
}
@@ -214,21 +241,21 @@ namespace ChatController.Utilities
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
var companyFilePath = Path.Combine(localAppData, Resource.CompanyName);
- if (!Directory.Exists(companyFilePath))
+ if(!Directory.Exists(companyFilePath))
{
Directory.CreateDirectory(companyFilePath);
}
var bewoFilePath = Path.Combine(companyFilePath, Resource.ApplicationFolderName);
- if (!Directory.Exists(bewoFilePath))
+ if(!Directory.Exists(bewoFilePath))
{
Directory.CreateDirectory(bewoFilePath);
}
return bewoFilePath;
}
- catch (Exception exception)
+ catch(Exception exception)
{
MessageBox.Show("Fehler beim Anlegen des Anwendungsordners. Sie besitzen nicht die erforderlichen Rechte, bitte wenden Sie sich an Ihren Systemadministrator.\n" + exception.Message, "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
@@ -251,15 +278,15 @@ namespace ChatController.Utilities
{
try
{
- using (var memoryStream = new MemoryStream())
+ using(var memoryStream = new MemoryStream())
{
pImage.Save(memoryStream, ImageFormat.Bmp);
return memoryStream.ToArray();
}
}
- catch (Exception e)
+ catch(Exception exception)
{
- MessageBox.Show("Fehler: " + e.Message, "Fehler", MessageBoxButton.OK);
+ MessageBox.Show("Fehler: " + exception.Message, "Fehler", MessageBoxButton.OK);
return null;
}
}
@@ -337,7 +364,7 @@ namespace ChatController.Utilities
public static byte[] ReadFully(Stream pStream)
{
- using (var memStream = new MemoryStream())
+ using(var memStream = new MemoryStream())
{
pStream.CopyTo(memStream);
return memStream.ToArray();
@@ -346,7 +373,7 @@ namespace ChatController.Utilities
public static RotateFlipType OrientationToFlipType(string orientation)
{
- switch (int.Parse(orientation))
+ switch(int.Parse(orientation))
{
case 1:
return RotateFlipType.RotateNoneFlipNone;
@@ -453,7 +480,7 @@ namespace ChatController.Utilities
https://test.ownchat.de/message/view-image/{customerid}/{group}/{height}/{filename}
*/
- if (uri != null && uri.Contains("/"))
+ if(uri?.Contains("/") ?? false)
{
var splitUri = uri.Split('/');
@@ -477,7 +504,7 @@ namespace ChatController.Utilities
{
var result = new ObservableCollection();
- if(messageText == null)
+ if(messageText is null)
{
return result;
}
diff --git a/PrototypChat/.vs/PrototypChat/v16/.suo b/PrototypChat/.vs/PrototypChat/v16/.suo
index 3489906..02dc9bb 100644
Binary files a/PrototypChat/.vs/PrototypChat/v16/.suo and b/PrototypChat/.vs/PrototypChat/v16/.suo differ
diff --git a/PrototypChat/App.xaml.cs b/PrototypChat/App.xaml.cs
index d4ceeba..363f8d5 100644
--- a/PrototypChat/App.xaml.cs
+++ b/PrototypChat/App.xaml.cs
@@ -1,17 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace ownChat
+namespace ownChat
{
- ///
- /// Interaktionslogik für "App.xaml"
- ///
- public partial class App : Application
+ public partial class App
{
}
}
diff --git a/PrototypChat/MainWindow.xaml b/PrototypChat/MainWindow.xaml
index fa6b2df..d85b209 100644
--- a/PrototypChat/MainWindow.xaml
+++ b/PrototypChat/MainWindow.xaml
@@ -5,8 +5,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cc="clr-namespace:ChatController;assembly=ChatController"
mc:Ignorable="d" WindowStartupLocation="CenterScreen" Icon="pack://application:,,,/ChatController;component/Ressourcen/ownchat_icon.png"
- SizeChanged="MainWindow_OnSizeChanged" MinHeight="610"
- Title="ownChat Desktop" Height="700" Width="900" x:Name="MainView" Closed="MainWindow_OnClosed">
+ MinHeight="610"
+ Title="ownChat Desktop" Height="700" Width="900" Closed="MainWindow_OnClosed">
diff --git a/PrototypChat/MainWindow.xaml.cs b/PrototypChat/MainWindow.xaml.cs
index fe0370c..651514b 100644
--- a/PrototypChat/MainWindow.xaml.cs
+++ b/PrototypChat/MainWindow.xaml.cs
@@ -1,5 +1,4 @@
using System;
-using System.Diagnostics;
using System.Threading;
using System.Windows;
@@ -21,7 +20,6 @@ namespace ownChat
ChatMainControl.ContainingWindow = this;
ChatMainControl.InitMitChatdaten(x);
- ChatMainControl.ResetStyle();
_EmojiView = new ChatEmojisView(ChatMainControl);
}
@@ -50,10 +48,5 @@ namespace ownChat
Environment.Exit(0);
}
-
- private void MainWindow_OnSizeChanged(object sender, SizeChangedEventArgs e)
- {
- Debug.WriteLine($"+++>ActualHeight: {ActualHeight}");
- }
}
}
diff --git a/PrototypChat/Properties/Annotations.cs b/PrototypChat/Properties/Annotations.cs
index 49365e2..33ee2e6 100644
--- a/PrototypChat/Properties/Annotations.cs
+++ b/PrototypChat/Properties/Annotations.cs
@@ -137,7 +137,7 @@ namespace ownChat.Annotations
///
///
/// void Foo(string param) {
- /// if (param == null)
+ /// if (param is null)
/// throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol
/// }
///