Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,8 @@
|
||||
Background="AliceBlue"
|
||||
ResizeMode="NoResize"
|
||||
BorderThickness="2"
|
||||
BorderBrush="Black">
|
||||
BorderBrush="Black"
|
||||
>
|
||||
<Grid>
|
||||
<TabControl>
|
||||
<TabItem Header="1" x:Name="TabItem1" >
|
||||
|
||||
@@ -586,4 +586,5 @@ namespace BeWo.View
|
||||
public string Pfad { get; set; }
|
||||
public string EmojiCode { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
Title="Chat View" Height="800" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
ResizeMode="NoResize">
|
||||
ResizeMode="NoResize"
|
||||
x:Name="ChatViewName">
|
||||
<Grid >
|
||||
<GroupBox Header="Chat" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
|
||||
<GroupBox Header="Chat" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}" >
|
||||
<TextBox x:Name="ServerStats" Height="23" Margin="539,13,7,0" TextWrapping="Wrap" VerticalAlignment="Top" ToolTip="Server Info" IsEnabled="False" VerticalContentAlignment="Center">
|
||||
<TextBox.Resources>
|
||||
@@ -23,24 +24,25 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBox x:Name="Chatbox" HorizontalAlignment="Left" Margin="221,720,0,10" TextWrapping="Wrap" Text="Nachricht schreiben"
|
||||
VerticalContentAlignment="Center" Width="416" MinHeight="25" ToolTip="Schreiben Sie hier eine Nachricht hinein" KeyDown="OnKeyDownHandler" GotFocus="OnFocus" Foreground="DarkGray" >
|
||||
<TextBox x:Name="Chatbox" HorizontalAlignment="Left" Margin="221,720,0,10" TextWrapping="Wrap" Text="Nachricht schreiben" TextChanged="Chatbox_OnTextChanged" VerticalScrollBarVisibility="Auto" MaxLines="5" MaxHeight="70"
|
||||
VerticalContentAlignment="Center" Width="416" MinHeight="25" ToolTip="Schreiben Sie hier eine Nachricht hinein" KeyDown="OnKeyDownHandler" GotFocus="OnFocus" Foreground="DarkGray" >
|
||||
<TextBox.Resources>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="Padding" Value="10,0,0,0" />
|
||||
</Style>
|
||||
<Setter Property="Padding" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</TextBox.Resources>
|
||||
</TextBox>
|
||||
<Button HorizontalAlignment="Left" x:Name="EmojiButton" Margin="642,720,-18,0" VerticalAlignment="Top" Width="23" Height="25" Click="SmileyButton_OnClick">
|
||||
<Image x:Name="Smiley" ToolTip="Zurzeit nicht zurechnungsfähig" Source="/BeWoPlaner;component/Ressources/Icons/trauriges-smiley.png" />
|
||||
<Image x:Name="Smiley" ToolTip="Smiley einfügen" Source="/BeWoPlaner;component/Ressources/Icons/trauriges-smiley.png" />
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
<ListBox x:Name="Chat" HorizontalAlignment="Left" Height="630" Margin="221,64,0,0" VerticalAlignment="Top" Width="564" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling" SelectionMode="Extended" MouseRightButtonDown="OnRightClickEvent" >
|
||||
@@ -84,6 +86,7 @@
|
||||
</ListBox.ItemsPanel>-->
|
||||
</ListBox>
|
||||
|
||||
|
||||
|
||||
<!--###################################### Liste aller User mit Chat Berechtigung ######################################################-->
|
||||
<ListView x:Name="Clientlist" HorizontalAlignment="Left" Height="680" Margin="10,64,0,0" VerticalAlignment="Top" Width="206" SelectionChanged="ListBoxSelectedIndexChanged" Style="{DynamicResource ResourceKey=styleListBox}" ItemTemplate="{DynamicResource DataTemplate1}">
|
||||
@@ -157,7 +160,7 @@
|
||||
</ListView.GroupStyle>
|
||||
|
||||
</ListView>
|
||||
<!--###################################### Ende List view #######################################################-->
|
||||
<!--###################################### Ende Liste #######################################################-->
|
||||
|
||||
|
||||
|
||||
@@ -201,7 +204,6 @@
|
||||
<Button Style="{DynamicResource IconButtonStyle}" x:Name="ButtonAlarmLabel" Background="Transparent" BorderBrush="Transparent" HorizontalAlignment="Left" Height="20" Margin="725,10,0,0" VerticalAlignment="Top" Width="20" Visibility="Collapsed" >
|
||||
<Image x:Name="AlarmLabel" ToolTip="Zurzeit nicht Verbunden" Source="" />
|
||||
</Button>
|
||||
<!-- -->
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media.Imaging;
|
||||
using BeWo.View.Detail;
|
||||
using BS.Shared;
|
||||
@@ -35,8 +36,13 @@ using DevExpress.XtraPrinting.XamlExport;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using Brush = System.Windows.Media.Brush;
|
||||
using Color = System.Drawing.Color;
|
||||
using ContextMenu = System.Windows.Controls.ContextMenu;
|
||||
using Image = System.Windows.Controls.Image;
|
||||
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
||||
using MenuItem = System.Windows.Controls.MenuItem;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
using Point = System.Windows.Point;
|
||||
using SelectionMode = System.Windows.Controls.SelectionMode;
|
||||
using Size = System.Windows.Size;
|
||||
|
||||
namespace BeWo.View
|
||||
@@ -506,7 +512,7 @@ namespace BeWo.View
|
||||
var employeeteamoids = ServiceFacade.DoEmployeeServiceSync(s => s.GetTeamOidsByEmployee(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
|
||||
var offmitarbeiter =
|
||||
ServiceFacade.DoEmployeeServiceSync(s => s.GetAllChatActiveEmployeesCompact());
|
||||
var offklienten = ServiceFacade.DoCustomerServiceSync(s => s.GetAllChatActiveCustomersCompact()); // dieser code muss erweitert werden
|
||||
var offklienten = ServiceFacade.DoCustomerServiceSync(s => s.GetAllChatActiveCustomersCompact(BeWoApp.LoggedOnUser.Employee.EmployeeOid)); // dieser code muss erweitert werden
|
||||
|
||||
/* var employee = ServiceFacade.DoEmployeeServiceSync(
|
||||
s => s.GetEmployeeWithPersonOid(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
|
||||
@@ -561,7 +567,7 @@ namespace BeWo.View
|
||||
{
|
||||
var employeeteamoids = ServiceFacade.DoEmployeeServiceSync(s => s.GetTeamOidsByEmployee(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
|
||||
var offmitarbeiter = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllChatActiveEmployeesCompact());
|
||||
var offklienten = ServiceFacade.DoCustomerServiceSync(s => s.GetAllChatActiveCustomersCompact());
|
||||
var offklienten = ServiceFacade.DoCustomerServiceSync(s => s.GetAllChatActiveCustomersCompact(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
|
||||
|
||||
List<long> idMitarbeitspeicher = new List<long>();
|
||||
List<long> idteamspeicher = new List<long>();
|
||||
@@ -1241,9 +1247,11 @@ namespace BeWo.View
|
||||
emojiView = new ChatEmojisView();
|
||||
|
||||
var x = EmojiButton.PointToScreen(new Point(0, 0));
|
||||
PresentationSource source = PresentationSource.FromVisual(EmojiButton);
|
||||
|
||||
emojiView.Top = (x.Y / source.CompositionTarget.TransformToDevice.M22) - emojiView.Height - 5;
|
||||
emojiView.Left = x.X / source.CompositionTarget.TransformToDevice.M11;
|
||||
|
||||
emojiView.Left = x.X;
|
||||
emojiView.Top = x.Y - emojiView.Height - 5;
|
||||
|
||||
emojiView.Show();
|
||||
}
|
||||
@@ -1258,13 +1266,26 @@ namespace BeWo.View
|
||||
emojiView.Visibility = Visibility.Visible;
|
||||
|
||||
var x = EmojiButton.PointToScreen(new Point(0, 0));
|
||||
PresentationSource source = PresentationSource.FromVisual(EmojiButton);
|
||||
|
||||
emojiView.Left = x.X;
|
||||
emojiView.Top = x.Y - emojiView.Height - 5;
|
||||
emojiView.Top = (x.Y/source.CompositionTarget.TransformToDevice.M22)- emojiView.Height - 5;
|
||||
emojiView.Left = x.X / source.CompositionTarget.TransformToDevice.M11;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Chatbox_OnTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (ChatViewName.Height < 850 && Chatbox.LineCount >= 3)
|
||||
{
|
||||
ChatViewName.Height = ChatViewName.Height + 50;
|
||||
|
||||
}else
|
||||
if(Chatbox.LineCount <=2)
|
||||
{
|
||||
ChatViewName.Height = 800;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class KontaktlistBuilder : INotifyPropertyChanged
|
||||
|
||||
@@ -37,21 +37,23 @@ namespace BeWo.View
|
||||
protected long incommingEmpfangOid;
|
||||
|
||||
protected String namenInfo;
|
||||
protected String nachname;
|
||||
protected Boolean AppendTrue = false;
|
||||
protected List<string> myListDS = new List<string>();
|
||||
//################## Variablen zum Zählen aktueller nachricht ###########
|
||||
protected int anzahlDS = 0;
|
||||
//#######################################################################
|
||||
|
||||
public MiniChatView(String CLientName, String chat, ChatView view , long oid, ChatType type)
|
||||
public MiniChatView(String CLientName,String ClientNachname, String chat, ChatView view , long oid, ChatType type)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
namenInfo = CLientName;
|
||||
nachname = ClientNachname;
|
||||
|
||||
viewChat = view;
|
||||
|
||||
rootGroupBox.Header = CLientName;
|
||||
rootGroupBox.Header = CLientName + " " + ClientNachname ;
|
||||
Minichat.AppendText(chat);
|
||||
|
||||
incommingString = chat;
|
||||
|
||||
@@ -587,7 +587,7 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<CompactCustomerDC> GetAllChatActiveCustomersCompact();
|
||||
List<CompactCustomerDC> GetAllChatActiveCustomersCompact(long personOid);
|
||||
|
||||
[FaultContract(typeof (BeWoFault))]
|
||||
[OperationContract]
|
||||
|
||||
@@ -3146,13 +3146,22 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public List<CompactCustomerDC> GetAllChatActiveCustomersCompact()
|
||||
public List<CompactCustomerDC> GetAllChatActiveCustomersCompact(long personOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
var customers = DAOFactory.SearchDAO.FindAllChatActiveCustomers();
|
||||
|
||||
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customers);
|
||||
var employee = DAOFactory.SearchDAO.FindEmployeeWithPersonOid(personOid);
|
||||
|
||||
var customeroids = employee.Employee2CustomerList.Select(s => s.CustomerOid.Value);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customers);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user