update versuch dpi fix
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
Background="AliceBlue"
|
||||
ResizeMode="NoResize"
|
||||
BorderThickness="2"
|
||||
BorderBrush="Black">
|
||||
BorderBrush="Black"
|
||||
>
|
||||
<view:DpiDecorator>
|
||||
<Viewbox>
|
||||
<Grid>
|
||||
<TabControl>
|
||||
<TabItem Header="1" x:Name="TabItem1" >
|
||||
@@ -182,6 +185,8 @@
|
||||
|
||||
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</view:DpiDecorator>
|
||||
</Window>
|
||||
|
||||
|
||||
|
||||
@@ -586,4 +586,22 @@ namespace BeWo.View
|
||||
public string Pfad { get; set; }
|
||||
public string EmojiCode { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class DpiDecorator : Decorator
|
||||
{
|
||||
public DpiDecorator()
|
||||
{
|
||||
this.Loaded += (s, e) =>
|
||||
{
|
||||
Matrix m = PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice;
|
||||
ScaleTransform dpiTransform = new ScaleTransform(1 / m.M11, 1 / m.M22);
|
||||
if (dpiTransform.CanFreeze)
|
||||
dpiTransform.Freeze();
|
||||
this.LayoutTransform = dpiTransform;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -1242,9 +1248,18 @@ namespace BeWo.View
|
||||
|
||||
var x = EmojiButton.PointToScreen(new Point(0, 0));
|
||||
|
||||
var a = Screen.PrimaryScreen.WorkingArea;
|
||||
|
||||
var myScreenHeight = a.Height;
|
||||
var myScreenWidth = a.Width;
|
||||
|
||||
|
||||
|
||||
emojiView.Left = x.X;
|
||||
emojiView.Top = x.Y - emojiView.Height - 5;
|
||||
|
||||
|
||||
|
||||
emojiView.Show();
|
||||
}
|
||||
else
|
||||
@@ -1257,10 +1272,16 @@ namespace BeWo.View
|
||||
{
|
||||
emojiView.Visibility = Visibility.Visible;
|
||||
|
||||
|
||||
var a = Screen.PrimaryScreen.WorkingArea;
|
||||
|
||||
|
||||
var x = EmojiButton.PointToScreen(new Point(0, 0));
|
||||
|
||||
|
||||
emojiView.Left = x.X;
|
||||
emojiView.Top = x.Y - emojiView.Height - 5;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3154,14 +3154,14 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
var employee = DAOFactory.SearchDAO.FindEmployeeWithPersonOid(personOid);
|
||||
|
||||
employee.Employee2CustomerList.Select(s => s.CustomerOid.Value);
|
||||
var customeroids = employee.Employee2CustomerList.Select(s => s.CustomerOid.Value);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customers);
|
||||
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customers);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user