update token anpassung
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
@@ -22,6 +22,8 @@ using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
|
||||
using Microsoft.Win32;
|
||||
using CheckBox = System.Windows.Controls.CheckBox;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
|
||||
namespace BeWo.View
|
||||
{
|
||||
@@ -119,11 +121,23 @@ namespace BeWo.View
|
||||
|
||||
private void GenerateCodeClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!GeneratetTexfield.Text.Equals(""))
|
||||
{
|
||||
if (MessageBox.Show("Wollen sie wirklich ihren Code ändern?", "Achtung", MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question) == MessageBoxResult.Yes)
|
||||
{
|
||||
var result =
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value));
|
||||
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value));
|
||||
|
||||
GeneratetTexfield.Text = result.CustomerCode;
|
||||
GeneratetTexfield.Text = result.CustomerCode;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value));
|
||||
|
||||
GeneratetTexfield.Text = result.CustomerCode;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBox_Checked(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -70,11 +70,22 @@ namespace BeWo.View
|
||||
|
||||
private void GenerateCodeClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!GeneratetTexfield.Text.Equals(""))
|
||||
{
|
||||
if (MessageBox.Show("Wollen sie wirklich ihren Code ändern?", "Achtung", MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question) == MessageBoxResult.Yes)
|
||||
{
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewEmployeeAPPCodeDC(employeeOid.Value));
|
||||
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewEmployeeAPPCodeDC(employeeOid.Value));
|
||||
|
||||
GeneratetTexfield.Text = result.EmployeeCode;
|
||||
GeneratetTexfield.Text = result.EmployeeCode;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewEmployeeAPPCodeDC(employeeOid.Value));
|
||||
|
||||
GeneratetTexfield.Text = result.EmployeeCode;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBox_Checked(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -96,9 +96,9 @@ namespace BeWo.View
|
||||
|
||||
|
||||
//versuch oder | probieren geht über studieren
|
||||
private Dictionary<string, byte[]> SoundZwischenSpeicher = new Dictionary<string, byte[]>();
|
||||
private Dictionary<string, byte[]> BildZwischenSpeicher = new Dictionary<string, byte[]>();
|
||||
private Dictionary<string, byte[]> DokumentZwischenSpeicher = new Dictionary<string, byte[]>();
|
||||
// private Dictionary<string, byte[]> SoundZwischenSpeicher = new Dictionary<string, byte[]>();
|
||||
// private Dictionary<string, byte[]> BildZwischenSpeicher = new Dictionary<string, byte[]>();
|
||||
// private Dictionary<string, byte[]> DokumentZwischenSpeicher = new Dictionary<string, byte[]>();
|
||||
public Dictionary<string, string> Speicherpfad = new Dictionary<string, string>();
|
||||
|
||||
private bool sortLabelSwitch = false;
|
||||
@@ -848,8 +848,6 @@ namespace BeWo.View
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
//lade hier die MEdia Datei runter
|
||||
datensatz = ServiceFacade.DoCustomerServiceSync(r => r.GetChatMedia(chatmessageoid));
|
||||
|
||||
if (datensatz != null)
|
||||
@@ -2042,8 +2040,7 @@ namespace BeWo.View
|
||||
string file = dokarray[0].ToString();
|
||||
// byte[] dokBytes = (byte[]) dokarray[1];
|
||||
long? chatMessageOid = (long?) dokarray[2];
|
||||
|
||||
//LAde Hier die Nötige Datei Herunter und übergebe diese dem
|
||||
|
||||
byte[] dokBytes = ServiceFacade.DoCustomerServiceSync(r => r.GetChatMedia(chatMessageOid.Value));
|
||||
|
||||
if(dokBytes != null){
|
||||
@@ -2074,22 +2071,7 @@ namespace BeWo.View
|
||||
SourceStream.Write(dokBytes, 0, dokBytes.Length);
|
||||
}
|
||||
}
|
||||
//Dispatcher.BeginInvoke(
|
||||
// DispatcherPriority.Normal,
|
||||
// (Action)(() =>
|
||||
// {
|
||||
|
||||
|
||||
// myProcess.StartInfo.FileName = path;
|
||||
// myProcess.EnableRaisingEvents = true;
|
||||
// myProcess.Exited += myProcess_Exited;
|
||||
|
||||
// myProcess.Start();
|
||||
|
||||
// myProcess.WaitForExit();
|
||||
|
||||
// myProcess.Close();
|
||||
//}));
|
||||
|
||||
Process.Start(path);
|
||||
|
||||
if(!Speicherpfad.ContainsKey(file))
|
||||
@@ -2267,14 +2249,14 @@ namespace BeWo.View
|
||||
{
|
||||
try
|
||||
{
|
||||
SoundZwischenSpeicher.Clear();
|
||||
BildZwischenSpeicher.Clear();
|
||||
DokumentZwischenSpeicher.Clear();
|
||||
// SoundZwischenSpeicher.Clear();
|
||||
// BildZwischenSpeicher.Clear();
|
||||
// DokumentZwischenSpeicher.Clear();
|
||||
|
||||
var allitems = allitems2.OrderBy(dc => dc.Uhrzeit).ToList();
|
||||
|
||||
long senderoid = sendoid ?? 0;//allitems[0].SenderPersonOid ?? 0;
|
||||
long empfaengerOid = empfangOid ?? 0; //allitems[0].EmpfängerPersonOid ?? 0;
|
||||
long senderoid = sendoid ?? 0;
|
||||
long empfaengerOid = empfangOid ?? 0;
|
||||
|
||||
if (firstTime)
|
||||
{
|
||||
@@ -2299,8 +2281,6 @@ namespace BeWo.View
|
||||
|
||||
foreach (var list in allitems)
|
||||
{
|
||||
|
||||
//Chat Message dem array übergeben
|
||||
object[] datenmengen = new object[2];
|
||||
datenmengen[0] = list;
|
||||
|
||||
@@ -2320,8 +2300,8 @@ namespace BeWo.View
|
||||
|
||||
var bild = DecodeBild(list.ImageThumpNail);
|
||||
|
||||
if (!BildZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
BildZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
// if (!BildZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// BildZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
|
||||
|
||||
KontakMessageBuilder builder =
|
||||
@@ -2335,7 +2315,7 @@ namespace BeWo.View
|
||||
Chat.Items.Add(builder);
|
||||
}
|
||||
|
||||
//if (list.SoundDatei != null)
|
||||
//if (list.MediaTyp == 3)
|
||||
//{
|
||||
// if (!SoundZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// SoundZwischenSpeicher.Add(list.ChatText,list.SoundDatei);
|
||||
@@ -2345,8 +2325,8 @@ namespace BeWo.View
|
||||
|
||||
if (list.MediaTyp == 2)
|
||||
{
|
||||
if (!DokumentZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
DokumentZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
// if (!DokumentZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// DokumentZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
|
||||
KontakMessageBuilder builder =
|
||||
new KontakMessageBuilder(BeWoApp.LoggedOnUser.Employee.FirstName, list.ChatText,
|
||||
@@ -2373,8 +2353,8 @@ namespace BeWo.View
|
||||
|
||||
var bild = DecodeBild(list.ImageThumpNail);
|
||||
|
||||
if (!BildZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
BildZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
// if (!BildZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// BildZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
|
||||
KontakMessageBuilder builder =
|
||||
new KontakMessageBuilder(BeWoApp.LoggedOnUser.Employee.FirstName, list.ChatText,
|
||||
@@ -2387,7 +2367,7 @@ namespace BeWo.View
|
||||
Chat.Items.Add(builder);
|
||||
}
|
||||
|
||||
//if (list.SoundDatei != null)
|
||||
//if (list.MediaTyp == 3)
|
||||
//{
|
||||
// if (!SoundZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// SoundZwischenSpeicher.Add(list.ChatText, list.SoundDatei);
|
||||
@@ -2397,8 +2377,8 @@ namespace BeWo.View
|
||||
|
||||
if (list.MediaTyp == 2)
|
||||
{
|
||||
if (!DokumentZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
DokumentZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
// if (!DokumentZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// DokumentZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
|
||||
|
||||
KontakMessageBuilder builder =
|
||||
@@ -2431,8 +2411,8 @@ namespace BeWo.View
|
||||
|
||||
var bild = DecodeBild(list.ImageThumpNail);
|
||||
|
||||
if (!BildZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
BildZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
// if (!BildZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// BildZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
|
||||
|
||||
KontakMessageBuilder builder =
|
||||
@@ -2445,7 +2425,7 @@ namespace BeWo.View
|
||||
Chat.Items.Add(builder);
|
||||
}
|
||||
|
||||
//if (list.SoundDatei != null)
|
||||
//if (list.Mediatyp == 3 )
|
||||
//{
|
||||
// if (!SoundZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// SoundZwischenSpeicher.Add(list.ChatText, list.SoundDatei);
|
||||
@@ -2455,8 +2435,8 @@ namespace BeWo.View
|
||||
|
||||
if ( list.MediaTyp == 2)
|
||||
{
|
||||
if (!DokumentZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
DokumentZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
// if (!DokumentZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// DokumentZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
|
||||
|
||||
KontakMessageBuilder builder =
|
||||
@@ -2492,8 +2472,8 @@ namespace BeWo.View
|
||||
|
||||
var bild = DecodeBild(list.ImageThumpNail);
|
||||
|
||||
if (!BildZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
BildZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
// if (!BildZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// BildZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
|
||||
Chat.Items.Add(new KontakMessageBuilder(
|
||||
BeWoApp.LoggedOnUser.Employee.FirstName, list.ChatText,
|
||||
@@ -2501,7 +2481,7 @@ namespace BeWo.View
|
||||
null, null, false, datenmengen, list.ChatMessagesOid));
|
||||
}
|
||||
|
||||
//if (list.SoundDatei != null)
|
||||
//if (list.Mediatyp == 3 )
|
||||
//{
|
||||
// if (!SoundZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// SoundZwischenSpeicher.Add(list.ChatText, list.SoundDatei);
|
||||
@@ -2511,8 +2491,8 @@ namespace BeWo.View
|
||||
|
||||
if (list.MediaTyp == 2)
|
||||
{
|
||||
if (!DokumentZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
DokumentZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
// if (!DokumentZwischenSpeicher.ContainsKey(list.ChatText))
|
||||
// DokumentZwischenSpeicher.Add(list.ChatText, list.MediaDatei);
|
||||
|
||||
Chat.Items.Add(new KontakMessageBuilder(
|
||||
BeWoApp.LoggedOnUser.Employee.FirstName, list.ChatText,
|
||||
@@ -2550,9 +2530,9 @@ namespace BeWo.View
|
||||
{
|
||||
try
|
||||
{
|
||||
SoundZwischenSpeicher.Clear();
|
||||
BildZwischenSpeicher.Clear();
|
||||
DokumentZwischenSpeicher.Clear();
|
||||
// SoundZwischenSpeicher.Clear();
|
||||
// BildZwischenSpeicher.Clear();
|
||||
// DokumentZwischenSpeicher.Clear();
|
||||
|
||||
int sx = 0;
|
||||
|
||||
@@ -2592,8 +2572,6 @@ namespace BeWo.View
|
||||
|
||||
if (x.Contains(anzeige.SenderPersonOid.Value))
|
||||
{
|
||||
|
||||
//Chat Message dem array übergeben
|
||||
object[] datenmengen = new object[2];
|
||||
datenmengen[0] = anzeige;
|
||||
|
||||
@@ -2609,13 +2587,13 @@ namespace BeWo.View
|
||||
}
|
||||
else
|
||||
{
|
||||
if (/*anzeige.MediaDatei != null &&*/ anzeige.MediaTyp == 1)
|
||||
if (anzeige.MediaTyp == 1)
|
||||
{
|
||||
|
||||
var bild = DecodeBild(anzeige.ImageThumpNail);
|
||||
|
||||
if (!BildZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
BildZwischenSpeicher.Add(anzeige.ChatText, anzeige.MediaDatei);
|
||||
//if (!BildZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
// BildZwischenSpeicher.Add(anzeige.ChatText, anzeige.MediaDatei);
|
||||
|
||||
KontakMessageBuilder builder = new KontakMessageBuilder(person[zahl].FirstName,
|
||||
anzeige.ChatText, anzeige.Uhrzeit.ToString(), anzeige.SenderPersonOid.Value,
|
||||
@@ -2623,11 +2601,10 @@ namespace BeWo.View
|
||||
|
||||
datenmengen[1] = builder;
|
||||
|
||||
//Bearbeiten ,false,null
|
||||
Chat.Items.Add(builder);
|
||||
}
|
||||
|
||||
//if (anzeige.SoundDatei != null)
|
||||
//if (anzeige.MediaTyp == 3)
|
||||
//{
|
||||
// if (!SoundZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
// SoundZwischenSpeicher.Add(anzeige.ChatText, anzeige.SoundDatei);
|
||||
@@ -2637,8 +2614,8 @@ namespace BeWo.View
|
||||
|
||||
if (anzeige.MediaTyp == 2)
|
||||
{
|
||||
if (!DokumentZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
DokumentZwischenSpeicher.Add(anzeige.ChatText, anzeige.MediaDatei);
|
||||
// if (!DokumentZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
// DokumentZwischenSpeicher.Add(anzeige.ChatText, anzeige.MediaDatei);
|
||||
|
||||
KontakMessageBuilder builder = new KontakMessageBuilder(person[zahl].FirstName,
|
||||
anzeige.ChatText, anzeige.Uhrzeit.ToString(), anzeige.SenderPersonOid.Value,
|
||||
@@ -2671,13 +2648,13 @@ namespace BeWo.View
|
||||
}
|
||||
else
|
||||
{
|
||||
if (/*anzeige.MediaDatei != null &&*/ anzeige.MediaTyp == 1)
|
||||
if (anzeige.MediaTyp == 1)
|
||||
{
|
||||
|
||||
var bild = DecodeBild(anzeige.ImageThumpNail);
|
||||
|
||||
if (!BildZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
BildZwischenSpeicher.Add(anzeige.ChatText, anzeige.MediaDatei);
|
||||
// if (!BildZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
// BildZwischenSpeicher.Add(anzeige.ChatText, anzeige.MediaDatei);
|
||||
|
||||
|
||||
KontakMessageBuilder builder = new KontakMessageBuilder(person[zahl].FirstName,
|
||||
@@ -2689,7 +2666,7 @@ namespace BeWo.View
|
||||
Chat.Items.Add(builder);
|
||||
}
|
||||
|
||||
//if (anzeige.SoundDatei != null)
|
||||
//if (anzeige.MediaTyp == 3)
|
||||
//{
|
||||
// if (!SoundZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
// SoundZwischenSpeicher.Add(anzeige.ChatText, anzeige.SoundDatei);
|
||||
@@ -2699,8 +2676,8 @@ namespace BeWo.View
|
||||
|
||||
if (anzeige.MediaTyp == 2)
|
||||
{
|
||||
if (!DokumentZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
DokumentZwischenSpeicher.Add(anzeige.ChatText, anzeige.MediaDatei);
|
||||
// if (!DokumentZwischenSpeicher.ContainsKey(anzeige.ChatText))
|
||||
// DokumentZwischenSpeicher.Add(anzeige.ChatText, anzeige.MediaDatei);
|
||||
|
||||
KontakMessageBuilder builder = new KontakMessageBuilder(person[zahl].FirstName,
|
||||
anzeige.ChatText, anzeige.Uhrzeit.ToString(), anzeige.SenderPersonOid.Value,
|
||||
|
||||
@@ -329,9 +329,9 @@
|
||||
<RowDefinition Height="*" MinHeight="165" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Grid.ColumnSpan="1" Header="Foto" Margin="8 8 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Column="0">
|
||||
<GroupBox Grid.ColumnSpan="1" Header="Foto" Margin="8 8 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Column="0" >
|
||||
<Grid>
|
||||
<dxe:ImageEdit MinWidth="250" MaxWidth="300" Height="250" x:Name="Img" Stretch="Uniform" HorizontalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
<dxe:ImageEdit MinWidth="250" MaxWidth="300" Height="250" x:Name="Img" Stretch="Uniform" HorizontalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" MouseDoubleClick="Img_OnMouseDoubleClick"/>
|
||||
</Grid>
|
||||
<!--RenderOptions.BitmapScalingMode="Fant"-->
|
||||
</GroupBox>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.ServiceModel;
|
||||
@@ -30,11 +31,19 @@ using DevExpress.Xpf.Grid;
|
||||
using DevExpress.XtraGrid;
|
||||
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media;
|
||||
|
||||
using Binding = System.Windows.Data.Binding;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
using CheckBox = System.Windows.Controls.CheckBox;
|
||||
using ComboBox = System.Windows.Controls.ComboBox;
|
||||
using Control = System.Windows.Controls.Control;
|
||||
using GroupBox = System.Windows.Controls.GroupBox;
|
||||
using HorizontalAlignment = System.Windows.HorizontalAlignment;
|
||||
using Hyperlink = System.Windows.Documents.Hyperlink;
|
||||
using Image = System.Windows.Controls.Image;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
using VerticalAlignment = System.Windows.VerticalAlignment;
|
||||
|
||||
|
||||
@@ -1589,6 +1598,42 @@ namespace BeWo.View.Detail
|
||||
ViewModel.GradDerBehinderung = GdBComboBox.SelectedValue.ToString();
|
||||
}
|
||||
|
||||
private void Img_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Form form = new Form())
|
||||
{
|
||||
Image imgg = new Image();
|
||||
|
||||
imgg.Source = Img.Source;
|
||||
|
||||
BmpBitmapEncoder encoder = new BmpBitmapEncoder();
|
||||
MemoryStream ms = new MemoryStream();
|
||||
encoder.Frames.Add(BitmapFrame.Create((BitmapSource)imgg.Source));
|
||||
encoder.Save(ms);
|
||||
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
|
||||
|
||||
Bitmap imgbit = new Bitmap(img);
|
||||
|
||||
form.StartPosition = FormStartPosition.CenterScreen;
|
||||
form.Size = imgbit.Size;
|
||||
form.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
|
||||
PictureBox pb = new PictureBox();
|
||||
pb.Dock = DockStyle.Fill;
|
||||
pb.Image = imgbit;
|
||||
|
||||
form.Controls.Add(pb);
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
catch (Exception edf)
|
||||
{
|
||||
MessageBox.Show("Unbekannter Fehler: " + edf.Message + "\n" + edf.StackTrace, "Fehler: 2392 ", MessageBoxButton.OK);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class MVListConverter : IValueConverter
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<GroupBox Header="Foto" Margin="8 0 8 8" Grid.RowSpan="3" Style="{StaticResource ObjectEditGroupBox}" Grid.Column="0">
|
||||
<Grid>
|
||||
<dxe:ImageEdit MinWidth="250" MaxWidth="300" Height="250" MaxHeight="300" x:Name="Img" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Top" RenderOptions.BitmapScalingMode="HighQuality"/>
|
||||
<dxe:ImageEdit MinWidth="250" MaxWidth="300" Height="250" MaxHeight="300" x:Name="Img" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Top" RenderOptions.BitmapScalingMode="HighQuality" MouseDoubleClick="Img_OnMouseDoubleClick"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.ServiceModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using BeWo.Core;
|
||||
@@ -22,7 +24,11 @@ using BS.Shared.Extensions;
|
||||
|
||||
using DevExpress.Xpf.Editors.Settings;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
using Color = System.Drawing.Color;
|
||||
using Image = System.Windows.Controls.Image;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
using Point = System.Windows.Point;
|
||||
|
||||
namespace BeWo.View.Detail
|
||||
{
|
||||
@@ -561,8 +567,41 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Img_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Form form = new Form())
|
||||
{
|
||||
Image imgg = new Image();
|
||||
|
||||
|
||||
imgg.Source = Img.Source;
|
||||
|
||||
BmpBitmapEncoder encoder = new BmpBitmapEncoder();
|
||||
MemoryStream ms = new MemoryStream();
|
||||
encoder.Frames.Add(BitmapFrame.Create((BitmapSource)imgg.Source));
|
||||
encoder.Save(ms);
|
||||
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
|
||||
|
||||
Bitmap imgbit = new Bitmap(img);
|
||||
|
||||
form.StartPosition = FormStartPosition.CenterScreen;
|
||||
form.Size = imgbit.Size;
|
||||
form.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
|
||||
PictureBox pb = new PictureBox();
|
||||
pb.Dock = DockStyle.Fill;
|
||||
pb.Image = imgbit;
|
||||
|
||||
form.Controls.Add(pb);
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
catch (Exception edf)
|
||||
{
|
||||
MessageBox.Show("Unbekannter Fehler: " + edf.Message + "\n" + edf.StackTrace, "Fehler: 2392 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user