- Im MoK werden jetzt die Klienten so angezeigt wie auch im BeWoPlaner
- Der ownChat lädt jetzt asynchron Nachrichten, Kontakte, etc.
This commit is contained in:
@@ -1046,6 +1046,9 @@ namespace BeWo
|
||||
{
|
||||
callback(serverUrl);
|
||||
}
|
||||
}, errorMessage =>
|
||||
{
|
||||
MessageBox.Show(errorMessage, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
@@ -838,7 +838,9 @@
|
||||
<Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}" />
|
||||
</Style>
|
||||
|
||||
<HierarchicalDataTemplate x:Key="servicecat_treeitemtemplate" DataType="{x:Type Core:ServiceCategoryTreeItem}" ItemsSource="{Binding Path=Children}">
|
||||
<HierarchicalDataTemplate x:Key="servicecat_treeitemtemplate"
|
||||
DataType="{x:Type Core:ServiceCategoryTreeItem}"
|
||||
ItemsSource="{Binding Path=Children}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
||||
@@ -164,9 +164,10 @@
|
||||
</dxg:TreeListColumn.DisplayTemplate>
|
||||
<dxg:TreeListColumn.EditTemplate>
|
||||
<ControlTemplate>
|
||||
<!-- Textbausteinkategorie -->
|
||||
<dxe:ComboBoxEdit x:Name="PART_Editor" EditMode="InplaceActive" IsTextEditable="False"
|
||||
ItemsSource="{Binding Path=DataContext.PossibleTextModuleParents, RelativeSource={RelativeSource FindAncestor, AncestorType=dxg:TreeListControl}}"
|
||||
SelectedItem="{Binding Path=DataContext.RowData.Row.Parent, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
|
||||
ItemsSource="{Binding Path=DataContext.PossibleTextModuleParents, RelativeSource={RelativeSource FindAncestor, AncestorType=dxg:TreeListControl}}"
|
||||
SelectedItem="{Binding Path=DataContext.RowData.Row.Parent, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
|
||||
EditValueChanged="PART_Editor_OnEditValueChanged"
|
||||
Tag="{Binding Path=DataContext.RowData.Row, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
|
||||
Loaded="FrameworkElement_OnLoaded">
|
||||
|
||||
@@ -261,12 +261,19 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: wird das gebraucht? Was tut es?
|
||||
private void PART_Editor_OnEditValueChanged(object sender, EditValueChangedEventArgs e)
|
||||
{
|
||||
var comboBoxEdit = (ComboBoxEdit) sender;
|
||||
var selectedTextModule = (TextModuleVM) comboBoxEdit.Tag;
|
||||
|
||||
selectedTextModule.Parent = (TextModuleVM) e.NewValue;
|
||||
var oldValue = e.OldValue;
|
||||
var newValue = e.NewValue;
|
||||
|
||||
if(e.NewValue != null)
|
||||
{
|
||||
selectedTextModule.Parent = (TextModuleVM) e.NewValue;
|
||||
}
|
||||
}
|
||||
|
||||
private void FrameworkElement_OnLoaded(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -6,10 +6,8 @@ using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
using BeWo.Core.Service;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.View;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
@@ -18,7 +16,6 @@ using ChatController.ChatKlassen;
|
||||
using ChatController.LoginKlassen;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
using Panel = System.Windows.Controls.Panel;
|
||||
|
||||
namespace BeWo.ownChat
|
||||
{
|
||||
@@ -99,7 +96,6 @@ namespace BeWo.ownChat
|
||||
// TODO: Für Mitarbeiter implementieren
|
||||
private void ChatMainControl_OnClickContextMenuItem(string menuItem)
|
||||
{
|
||||
|
||||
var selectedContact = ChatMainControl.GetCurrentContactWithUserIdManage();
|
||||
|
||||
if (selectedContact != null)
|
||||
@@ -140,8 +136,6 @@ namespace BeWo.ownChat
|
||||
{
|
||||
MessageBox.Show("Es können nur Nachrichten von KlientInnen dokumentiert werden.", "Dokumentieren nicht möglich", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void OpenServiceRecordEditView(List<ChatMessage> messages, CompactCustomerDC compactCustomer)
|
||||
@@ -218,7 +212,6 @@ namespace BeWo.ownChat
|
||||
|
||||
}
|
||||
|
||||
#region Fenstergrößenverstellung
|
||||
internal void Normal()
|
||||
{
|
||||
WindowState = (WindowState) FormWindowState.Normal;
|
||||
@@ -233,10 +226,6 @@ namespace BeWo.ownChat
|
||||
{
|
||||
WindowState = (WindowState)FormWindowState.Minimized;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Speichere/Lade MessageSync In DB
|
||||
|
||||
private void SpeichereMessageInfosInDatenBank()
|
||||
{
|
||||
@@ -273,44 +262,6 @@ namespace BeWo.ownChat
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Waitlayer
|
||||
private WaitLayer2 _WaitLayer;
|
||||
|
||||
public void StartWaiting()
|
||||
{
|
||||
Dispatcher.BeginInvoke(DispatcherPriority.Background, (Action)StartWaitingImmediately);
|
||||
}
|
||||
|
||||
public void StartWaitingImmediately()
|
||||
{
|
||||
if (_WaitLayer == null)
|
||||
{
|
||||
_WaitLayer = new WaitLayer2();
|
||||
|
||||
ChatViewGrid.Children.Add(_WaitLayer);
|
||||
Panel.SetZIndex(_WaitLayer, int.MaxValue);
|
||||
_WaitLayer.RefreshChatUI();
|
||||
}
|
||||
}
|
||||
|
||||
public void EndWaiting()
|
||||
{
|
||||
Dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Background,
|
||||
(Action)delegate
|
||||
{
|
||||
if (_WaitLayer != null)
|
||||
{
|
||||
ChatViewGrid.Children.Remove(_WaitLayer);
|
||||
_WaitLayer = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void ChatView_OnClosing(object sender, CancelEventArgs e)
|
||||
{
|
||||
HideWindowsAndSaveMessageInfo();
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Mvvm.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraScheduler.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
||||
@@ -731,7 +731,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
// Damit sind die allgemeinen gemeint!
|
||||
var textbausteine = OperationsService.GetAllTextModules();
|
||||
foreach (var tm in textbausteine)
|
||||
foreach (var tm in textbausteine.Where(textModule => textModule.IsParent == false))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(tm.Text))
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
if(user != null)
|
||||
{
|
||||
if(user.CheckForRight(UserRightType.ViewAll))
|
||||
if(user.CheckForAtLeastOneRight(new List<UserRightType> { UserRightType.ViewAll, UserRightType.CustomerView_View}))
|
||||
{
|
||||
result.Add(new SelectListItem { Text = allCustomers, Value = allCustomersValue });
|
||||
result.Add(new SelectListItem { Text = myCustomersOnly, Value = myCustomersValue });
|
||||
|
||||
@@ -4400,7 +4400,7 @@ namespace BeWo.Data.Access
|
||||
var lCriteria = CreateCriteriaIsActive<Customer>();
|
||||
|
||||
// Der ApplicationUser darf alles sehen
|
||||
if(user.CheckForRight(UserRightType.ViewAll) && customerFilter == CustomerFilterEnum.All)
|
||||
if(user.CheckForAtLeastOneRight(new List<UserRightType> { UserRightType.ViewAll, UserRightType.CustomerView_View }) && customerFilter == CustomerFilterEnum.All)
|
||||
{
|
||||
return lCriteria.List<Customer>().ToList();
|
||||
}
|
||||
|
||||
@@ -525,8 +525,8 @@ namespace BS.Shared.Core
|
||||
{
|
||||
Bitmap originalBitmap = new Bitmap(image);
|
||||
|
||||
Point min = new Point(Int32.MaxValue, Int32.MaxValue);
|
||||
Point max = new Point(Int32.MinValue, Int32.MinValue);
|
||||
var min = new Point(Int32.MaxValue, Int32.MaxValue);
|
||||
var max = new Point(Int32.MinValue, Int32.MinValue);
|
||||
|
||||
for (int x = 0; x < originalBitmap.Width; ++x)
|
||||
{
|
||||
@@ -546,15 +546,15 @@ namespace BS.Shared.Core
|
||||
}
|
||||
|
||||
// Create a new bitmap from the crop rectangleig
|
||||
if (min.X < Int32.MaxValue && min.Y < Int32.MaxValue && max.X > Int32.MinValue && max.Y > Int32.MinValue)
|
||||
if (min.X < int.MaxValue && min.Y < int.MaxValue && max.X > int.MinValue && max.Y > int.MinValue)
|
||||
{
|
||||
Rectangle cropRectangle = new Rectangle(min.X, min.Y, max.X - min.X, max.Y - min.Y);
|
||||
var cropRectangle = new Rectangle(min.X, min.Y, max.X - min.X, max.Y - min.Y);
|
||||
if (cropRectangle.Width > 0 && cropRectangle.Height > 0)
|
||||
{
|
||||
Bitmap newBitmap = new Bitmap(cropRectangle.Width, cropRectangle.Height);
|
||||
using (Graphics g = Graphics.FromImage(newBitmap))
|
||||
var newBitmap = new Bitmap(cropRectangle.Width, cropRectangle.Height);
|
||||
using (var graphics = Graphics.FromImage(newBitmap))
|
||||
{
|
||||
g.DrawImage(originalBitmap, 0, 0, cropRectangle, GraphicsUnit.Pixel);
|
||||
graphics.DrawImage(originalBitmap, 0, 0, cropRectangle, GraphicsUnit.Pixel);
|
||||
}
|
||||
|
||||
return newBitmap;
|
||||
|
||||
Reference in New Issue
Block a user