diff --git a/Audit.csproj b/Audit.csproj index 2b37079..319670a 100644 --- a/Audit.csproj +++ b/Audit.csproj @@ -113,11 +113,13 @@ + + packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll diff --git a/View/StuffView.xaml b/View/StuffView.xaml index ff3d686..7aa8d81 100644 --- a/View/StuffView.xaml +++ b/View/StuffView.xaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Audit.View" + xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" mc:Ignorable="d" DataContext="{Binding Source={StaticResource Locator},Path=Stuff}" d:DesignHeight="900" d:DesignWidth="1140" xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"> @@ -111,11 +112,11 @@ - - + + - + diff --git a/View/StuffView.xaml.cs b/View/StuffView.xaml.cs index a55c4e6..177ccf0 100644 --- a/View/StuffView.xaml.cs +++ b/View/StuffView.xaml.cs @@ -12,13 +12,15 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using System.Windows.Forms; +using System.Drawing; namespace Audit.View { /// /// StuffView.xaml 的交互逻辑 /// - public partial class StuffView : UserControl + public partial class StuffView : System.Windows.Controls.UserControl { /// /// StuffView @@ -35,7 +37,15 @@ namespace Audit.View private void Button_Delete(object sender, RoutedEventArgs e) { - + + System.Windows.Forms.ColorDialog colorDialog = new System.Windows.Forms.ColorDialog(); + if (colorDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + + // System.Drawing.SolidBrush sb = new System.Drawing.SolidBrush(color); + // SolidColorBrush solidColorBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(sb.Color.A, sb.Color.R, sb.Color.G, sb.Color.B)); + // TextBox.stuff_Color.Background = solidColorBrush; + } } private void DataGridStuff_MouseDoubleClick(object sender, MouseButtonEventArgs e) @@ -60,5 +70,12 @@ namespace Audit.View if (DataGridStuff_ProductType.ToString() == "1") stuff_ProductType.Text = "助剂"; if (DataGridStuff_ProductType.ToString() == "2") stuff_ProductType.Text = "粉体助剂"; } + + private void stuff_Color_TextChanged(object sender, TextChangedEventArgs e) + { + ColorDialog colorDialog = new ColorDialog(); + + + } } }