diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/View/HomePageProWindow.xaml.cs b/Correlator/View/HomePageProWindow.xaml.cs
index 56b8c6c..1c33874 100644
--- a/Correlator/View/HomePageProWindow.xaml.cs
+++ b/Correlator/View/HomePageProWindow.xaml.cs
@@ -68,28 +68,52 @@
#region 打开图片文件列表
- OpenImageFileButton.Click+= delegate
+ OpenImageFileButton.Click += delegate
{
-
+ var fileWindow = new PictureFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
#region 打开音频文件列表
- OpenAudioFileButton.Click+= delegate
+ OpenAudioFileButton.Click += delegate
{
-
+ var fileWindow = new AudioFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
-
+
+ #region 打开听音界面
+
+ ListenAudioButton.Click += delegate
+ {
+ if (!SerialPortManager.Get.Sp.IsOpen)
+ {
+ MessageBox.Show("串口状态异常,无法操作", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ var auditionWindow = new AuditionWindow
+ {
+ Owner = GetWindow(this)
+ };
+ auditionWindow.ShowDialog();
+ };
+
+ #endregion
+
#region 设置
- SettingsButton.Click+= delegate
- {
-
- };
+ SettingsButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/View/HomePageProWindow.xaml.cs b/Correlator/View/HomePageProWindow.xaml.cs
index 56b8c6c..1c33874 100644
--- a/Correlator/View/HomePageProWindow.xaml.cs
+++ b/Correlator/View/HomePageProWindow.xaml.cs
@@ -68,28 +68,52 @@
#region 打开图片文件列表
- OpenImageFileButton.Click+= delegate
+ OpenImageFileButton.Click += delegate
{
-
+ var fileWindow = new PictureFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
#region 打开音频文件列表
- OpenAudioFileButton.Click+= delegate
+ OpenAudioFileButton.Click += delegate
{
-
+ var fileWindow = new AudioFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
-
+
+ #region 打开听音界面
+
+ ListenAudioButton.Click += delegate
+ {
+ if (!SerialPortManager.Get.Sp.IsOpen)
+ {
+ MessageBox.Show("串口状态异常,无法操作", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ var auditionWindow = new AuditionWindow
+ {
+ Owner = GetWindow(this)
+ };
+ auditionWindow.ShowDialog();
+ };
+
+ #endregion
+
#region 设置
- SettingsButton.Click+= delegate
- {
-
- };
+ SettingsButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/HomePageWindow.xaml.cs b/Correlator/View/HomePageWindow.xaml.cs
index a77a872..07e9f39 100644
--- a/Correlator/View/HomePageWindow.xaml.cs
+++ b/Correlator/View/HomePageWindow.xaml.cs
@@ -2,7 +2,6 @@
using System.Diagnostics;
using System.Drawing;
using System.Windows;
-using Correlator.Pages;
using Correlator.Util;
using GalaSoft.MvvmLight.Messaging;
using MathWorks.MATLAB.NET.Arrays;
@@ -58,31 +57,6 @@
HydrophoneButton.Checked += delegate { FlowStatus.IsHydrophone = true; };
HydrophoneButton.Unchecked += delegate { FlowStatus.IsHydrophone = false; };
- //菜单
- Messenger.Default.Register(this, MessengerToken.RemoveMenu,
- s => { HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["menuUserControl"]); });
-
- //音频文件列表
- Messenger.Default.Register(this, MessengerToken.AddAudioFile,
- s => { HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["audioFileUserControl"]); });
- Messenger.Default.Register(this, MessengerToken.RemoveAudioFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["audioFileUserControl"]);
- });
-
- //图片文件列表
- Messenger.Default.Register(this, MessengerToken.AddPictureFile,
- s =>
- {
- HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
- Messenger.Default.Register(this, MessengerToken.RemovePictureFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
-
#region 不使用VM
ShutDownButton.Click += delegate
@@ -120,12 +94,7 @@
filePath.SnapShot();
};
- OpenMenuButton.Click += delegate
- {
- var menuUserControl = new MenuUserControl();
- UserControlManager.UserControlMap["menuUserControl"] = menuUserControl;
- HomePageContentGrid.Children.Add(menuUserControl);
- };
+ OpenMenuButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/View/HomePageProWindow.xaml.cs b/Correlator/View/HomePageProWindow.xaml.cs
index 56b8c6c..1c33874 100644
--- a/Correlator/View/HomePageProWindow.xaml.cs
+++ b/Correlator/View/HomePageProWindow.xaml.cs
@@ -68,28 +68,52 @@
#region 打开图片文件列表
- OpenImageFileButton.Click+= delegate
+ OpenImageFileButton.Click += delegate
{
-
+ var fileWindow = new PictureFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
#region 打开音频文件列表
- OpenAudioFileButton.Click+= delegate
+ OpenAudioFileButton.Click += delegate
{
-
+ var fileWindow = new AudioFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
-
+
+ #region 打开听音界面
+
+ ListenAudioButton.Click += delegate
+ {
+ if (!SerialPortManager.Get.Sp.IsOpen)
+ {
+ MessageBox.Show("串口状态异常,无法操作", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ var auditionWindow = new AuditionWindow
+ {
+ Owner = GetWindow(this)
+ };
+ auditionWindow.ShowDialog();
+ };
+
+ #endregion
+
#region 设置
- SettingsButton.Click+= delegate
- {
-
- };
+ SettingsButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/HomePageWindow.xaml.cs b/Correlator/View/HomePageWindow.xaml.cs
index a77a872..07e9f39 100644
--- a/Correlator/View/HomePageWindow.xaml.cs
+++ b/Correlator/View/HomePageWindow.xaml.cs
@@ -2,7 +2,6 @@
using System.Diagnostics;
using System.Drawing;
using System.Windows;
-using Correlator.Pages;
using Correlator.Util;
using GalaSoft.MvvmLight.Messaging;
using MathWorks.MATLAB.NET.Arrays;
@@ -58,31 +57,6 @@
HydrophoneButton.Checked += delegate { FlowStatus.IsHydrophone = true; };
HydrophoneButton.Unchecked += delegate { FlowStatus.IsHydrophone = false; };
- //菜单
- Messenger.Default.Register(this, MessengerToken.RemoveMenu,
- s => { HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["menuUserControl"]); });
-
- //音频文件列表
- Messenger.Default.Register(this, MessengerToken.AddAudioFile,
- s => { HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["audioFileUserControl"]); });
- Messenger.Default.Register(this, MessengerToken.RemoveAudioFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["audioFileUserControl"]);
- });
-
- //图片文件列表
- Messenger.Default.Register(this, MessengerToken.AddPictureFile,
- s =>
- {
- HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
- Messenger.Default.Register(this, MessengerToken.RemovePictureFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
-
#region 不使用VM
ShutDownButton.Click += delegate
@@ -120,12 +94,7 @@
filePath.SnapShot();
};
- OpenMenuButton.Click += delegate
- {
- var menuUserControl = new MenuUserControl();
- UserControlManager.UserControlMap["menuUserControl"] = menuUserControl;
- HomePageContentGrid.Children.Add(menuUserControl);
- };
+ OpenMenuButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/PictureFileWindow.xaml b/Correlator/View/PictureFileWindow.xaml
new file mode 100644
index 0000000..f5ab3c7
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/View/HomePageProWindow.xaml.cs b/Correlator/View/HomePageProWindow.xaml.cs
index 56b8c6c..1c33874 100644
--- a/Correlator/View/HomePageProWindow.xaml.cs
+++ b/Correlator/View/HomePageProWindow.xaml.cs
@@ -68,28 +68,52 @@
#region 打开图片文件列表
- OpenImageFileButton.Click+= delegate
+ OpenImageFileButton.Click += delegate
{
-
+ var fileWindow = new PictureFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
#region 打开音频文件列表
- OpenAudioFileButton.Click+= delegate
+ OpenAudioFileButton.Click += delegate
{
-
+ var fileWindow = new AudioFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
-
+
+ #region 打开听音界面
+
+ ListenAudioButton.Click += delegate
+ {
+ if (!SerialPortManager.Get.Sp.IsOpen)
+ {
+ MessageBox.Show("串口状态异常,无法操作", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ var auditionWindow = new AuditionWindow
+ {
+ Owner = GetWindow(this)
+ };
+ auditionWindow.ShowDialog();
+ };
+
+ #endregion
+
#region 设置
- SettingsButton.Click+= delegate
- {
-
- };
+ SettingsButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/HomePageWindow.xaml.cs b/Correlator/View/HomePageWindow.xaml.cs
index a77a872..07e9f39 100644
--- a/Correlator/View/HomePageWindow.xaml.cs
+++ b/Correlator/View/HomePageWindow.xaml.cs
@@ -2,7 +2,6 @@
using System.Diagnostics;
using System.Drawing;
using System.Windows;
-using Correlator.Pages;
using Correlator.Util;
using GalaSoft.MvvmLight.Messaging;
using MathWorks.MATLAB.NET.Arrays;
@@ -58,31 +57,6 @@
HydrophoneButton.Checked += delegate { FlowStatus.IsHydrophone = true; };
HydrophoneButton.Unchecked += delegate { FlowStatus.IsHydrophone = false; };
- //菜单
- Messenger.Default.Register(this, MessengerToken.RemoveMenu,
- s => { HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["menuUserControl"]); });
-
- //音频文件列表
- Messenger.Default.Register(this, MessengerToken.AddAudioFile,
- s => { HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["audioFileUserControl"]); });
- Messenger.Default.Register(this, MessengerToken.RemoveAudioFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["audioFileUserControl"]);
- });
-
- //图片文件列表
- Messenger.Default.Register(this, MessengerToken.AddPictureFile,
- s =>
- {
- HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
- Messenger.Default.Register(this, MessengerToken.RemovePictureFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
-
#region 不使用VM
ShutDownButton.Click += delegate
@@ -120,12 +94,7 @@
filePath.SnapShot();
};
- OpenMenuButton.Click += delegate
- {
- var menuUserControl = new MenuUserControl();
- UserControlManager.UserControlMap["menuUserControl"] = menuUserControl;
- HomePageContentGrid.Children.Add(menuUserControl);
- };
+ OpenMenuButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/PictureFileWindow.xaml b/Correlator/View/PictureFileWindow.xaml
new file mode 100644
index 0000000..f5ab3c7
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/View/PictureFileWindow.xaml.cs b/Correlator/View/PictureFileWindow.xaml.cs
new file mode 100644
index 0000000..d6b2a68
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml.cs
@@ -0,0 +1,25 @@
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class PictureFileWindow : Window
+ {
+ public PictureFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+ var window = new BigPictureWindow(fullPath)
+ {
+ Owner = GetWindow(this)
+ };
+ window.ShowDialog();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj
index db9fa0b..3fb1dd9 100644
--- a/Correlator/Correlator.csproj
+++ b/Correlator/Correlator.csproj
@@ -224,15 +224,6 @@
-
- AudioFileUserControl.xaml
-
-
- MenuUserControl.xaml
-
-
- PictureFileUserControl.xaml
-
@@ -262,18 +253,19 @@
-
-
+
+ AudioFileWindow.xaml
+
AuditionWindow.xaml
@@ -283,6 +275,9 @@
HomePageProWindow.xaml
+
+ PictureFileWindow.xaml
+
PipeRangeWindow.xaml
@@ -315,15 +310,7 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
+
@@ -343,6 +330,7 @@
MainWindow.xaml
Code
+
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/View/HomePageProWindow.xaml.cs b/Correlator/View/HomePageProWindow.xaml.cs
index 56b8c6c..1c33874 100644
--- a/Correlator/View/HomePageProWindow.xaml.cs
+++ b/Correlator/View/HomePageProWindow.xaml.cs
@@ -68,28 +68,52 @@
#region 打开图片文件列表
- OpenImageFileButton.Click+= delegate
+ OpenImageFileButton.Click += delegate
{
-
+ var fileWindow = new PictureFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
#region 打开音频文件列表
- OpenAudioFileButton.Click+= delegate
+ OpenAudioFileButton.Click += delegate
{
-
+ var fileWindow = new AudioFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
-
+
+ #region 打开听音界面
+
+ ListenAudioButton.Click += delegate
+ {
+ if (!SerialPortManager.Get.Sp.IsOpen)
+ {
+ MessageBox.Show("串口状态异常,无法操作", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ var auditionWindow = new AuditionWindow
+ {
+ Owner = GetWindow(this)
+ };
+ auditionWindow.ShowDialog();
+ };
+
+ #endregion
+
#region 设置
- SettingsButton.Click+= delegate
- {
-
- };
+ SettingsButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/HomePageWindow.xaml.cs b/Correlator/View/HomePageWindow.xaml.cs
index a77a872..07e9f39 100644
--- a/Correlator/View/HomePageWindow.xaml.cs
+++ b/Correlator/View/HomePageWindow.xaml.cs
@@ -2,7 +2,6 @@
using System.Diagnostics;
using System.Drawing;
using System.Windows;
-using Correlator.Pages;
using Correlator.Util;
using GalaSoft.MvvmLight.Messaging;
using MathWorks.MATLAB.NET.Arrays;
@@ -58,31 +57,6 @@
HydrophoneButton.Checked += delegate { FlowStatus.IsHydrophone = true; };
HydrophoneButton.Unchecked += delegate { FlowStatus.IsHydrophone = false; };
- //菜单
- Messenger.Default.Register(this, MessengerToken.RemoveMenu,
- s => { HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["menuUserControl"]); });
-
- //音频文件列表
- Messenger.Default.Register(this, MessengerToken.AddAudioFile,
- s => { HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["audioFileUserControl"]); });
- Messenger.Default.Register(this, MessengerToken.RemoveAudioFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["audioFileUserControl"]);
- });
-
- //图片文件列表
- Messenger.Default.Register(this, MessengerToken.AddPictureFile,
- s =>
- {
- HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
- Messenger.Default.Register(this, MessengerToken.RemovePictureFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
-
#region 不使用VM
ShutDownButton.Click += delegate
@@ -120,12 +94,7 @@
filePath.SnapShot();
};
- OpenMenuButton.Click += delegate
- {
- var menuUserControl = new MenuUserControl();
- UserControlManager.UserControlMap["menuUserControl"] = menuUserControl;
- HomePageContentGrid.Children.Add(menuUserControl);
- };
+ OpenMenuButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/PictureFileWindow.xaml b/Correlator/View/PictureFileWindow.xaml
new file mode 100644
index 0000000..f5ab3c7
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/View/PictureFileWindow.xaml.cs b/Correlator/View/PictureFileWindow.xaml.cs
new file mode 100644
index 0000000..d6b2a68
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml.cs
@@ -0,0 +1,25 @@
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class PictureFileWindow : Window
+ {
+ public PictureFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+ var window = new BigPictureWindow(fullPath)
+ {
+ Owner = GetWindow(this)
+ };
+ window.ShowDialog();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/ViewModel/AudioFileViewModel.cs b/Correlator/ViewModel/AudioFileViewModel.cs
index 3236257..38be766 100644
--- a/Correlator/ViewModel/AudioFileViewModel.cs
+++ b/Correlator/ViewModel/AudioFileViewModel.cs
@@ -6,7 +6,6 @@
using Correlator.Util;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
-using GalaSoft.MvvmLight.Messaging;
using HandyControl.Controls;
using HandyControl.Data;
using FileInfo = Correlator.Model.FileInfo;
@@ -78,8 +77,6 @@
AudioFiles = _totalFiles.Take(8).ToList();
});
- GoBackCommand = new RelayCommand(() => { Messenger.Default.Send("", MessengerToken.RemoveAudioFile); });
-
ItemSelectedCommand = new RelayCommand
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/View/HomePageProWindow.xaml.cs b/Correlator/View/HomePageProWindow.xaml.cs
index 56b8c6c..1c33874 100644
--- a/Correlator/View/HomePageProWindow.xaml.cs
+++ b/Correlator/View/HomePageProWindow.xaml.cs
@@ -68,28 +68,52 @@
#region 打开图片文件列表
- OpenImageFileButton.Click+= delegate
+ OpenImageFileButton.Click += delegate
{
-
+ var fileWindow = new PictureFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
#region 打开音频文件列表
- OpenAudioFileButton.Click+= delegate
+ OpenAudioFileButton.Click += delegate
{
-
+ var fileWindow = new AudioFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
-
+
+ #region 打开听音界面
+
+ ListenAudioButton.Click += delegate
+ {
+ if (!SerialPortManager.Get.Sp.IsOpen)
+ {
+ MessageBox.Show("串口状态异常,无法操作", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ var auditionWindow = new AuditionWindow
+ {
+ Owner = GetWindow(this)
+ };
+ auditionWindow.ShowDialog();
+ };
+
+ #endregion
+
#region 设置
- SettingsButton.Click+= delegate
- {
-
- };
+ SettingsButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/HomePageWindow.xaml.cs b/Correlator/View/HomePageWindow.xaml.cs
index a77a872..07e9f39 100644
--- a/Correlator/View/HomePageWindow.xaml.cs
+++ b/Correlator/View/HomePageWindow.xaml.cs
@@ -2,7 +2,6 @@
using System.Diagnostics;
using System.Drawing;
using System.Windows;
-using Correlator.Pages;
using Correlator.Util;
using GalaSoft.MvvmLight.Messaging;
using MathWorks.MATLAB.NET.Arrays;
@@ -58,31 +57,6 @@
HydrophoneButton.Checked += delegate { FlowStatus.IsHydrophone = true; };
HydrophoneButton.Unchecked += delegate { FlowStatus.IsHydrophone = false; };
- //菜单
- Messenger.Default.Register(this, MessengerToken.RemoveMenu,
- s => { HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["menuUserControl"]); });
-
- //音频文件列表
- Messenger.Default.Register(this, MessengerToken.AddAudioFile,
- s => { HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["audioFileUserControl"]); });
- Messenger.Default.Register(this, MessengerToken.RemoveAudioFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["audioFileUserControl"]);
- });
-
- //图片文件列表
- Messenger.Default.Register(this, MessengerToken.AddPictureFile,
- s =>
- {
- HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
- Messenger.Default.Register(this, MessengerToken.RemovePictureFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
-
#region 不使用VM
ShutDownButton.Click += delegate
@@ -120,12 +94,7 @@
filePath.SnapShot();
};
- OpenMenuButton.Click += delegate
- {
- var menuUserControl = new MenuUserControl();
- UserControlManager.UserControlMap["menuUserControl"] = menuUserControl;
- HomePageContentGrid.Children.Add(menuUserControl);
- };
+ OpenMenuButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/PictureFileWindow.xaml b/Correlator/View/PictureFileWindow.xaml
new file mode 100644
index 0000000..f5ab3c7
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/View/PictureFileWindow.xaml.cs b/Correlator/View/PictureFileWindow.xaml.cs
new file mode 100644
index 0000000..d6b2a68
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml.cs
@@ -0,0 +1,25 @@
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class PictureFileWindow : Window
+ {
+ public PictureFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+ var window = new BigPictureWindow(fullPath)
+ {
+ Owner = GetWindow(this)
+ };
+ window.ShowDialog();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/ViewModel/AudioFileViewModel.cs b/Correlator/ViewModel/AudioFileViewModel.cs
index 3236257..38be766 100644
--- a/Correlator/ViewModel/AudioFileViewModel.cs
+++ b/Correlator/ViewModel/AudioFileViewModel.cs
@@ -6,7 +6,6 @@
using Correlator.Util;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
-using GalaSoft.MvvmLight.Messaging;
using HandyControl.Controls;
using HandyControl.Data;
using FileInfo = Correlator.Model.FileInfo;
@@ -78,8 +77,6 @@
AudioFiles = _totalFiles.Take(8).ToList();
});
- GoBackCommand = new RelayCommand(() => { Messenger.Default.Send("", MessengerToken.RemoveAudioFile); });
-
ItemSelectedCommand = new RelayCommand
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/View/HomePageProWindow.xaml.cs b/Correlator/View/HomePageProWindow.xaml.cs
index 56b8c6c..1c33874 100644
--- a/Correlator/View/HomePageProWindow.xaml.cs
+++ b/Correlator/View/HomePageProWindow.xaml.cs
@@ -68,28 +68,52 @@
#region 打开图片文件列表
- OpenImageFileButton.Click+= delegate
+ OpenImageFileButton.Click += delegate
{
-
+ var fileWindow = new PictureFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
#region 打开音频文件列表
- OpenAudioFileButton.Click+= delegate
+ OpenAudioFileButton.Click += delegate
{
-
+ var fileWindow = new AudioFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
-
+
+ #region 打开听音界面
+
+ ListenAudioButton.Click += delegate
+ {
+ if (!SerialPortManager.Get.Sp.IsOpen)
+ {
+ MessageBox.Show("串口状态异常,无法操作", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ var auditionWindow = new AuditionWindow
+ {
+ Owner = GetWindow(this)
+ };
+ auditionWindow.ShowDialog();
+ };
+
+ #endregion
+
#region 设置
- SettingsButton.Click+= delegate
- {
-
- };
+ SettingsButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/HomePageWindow.xaml.cs b/Correlator/View/HomePageWindow.xaml.cs
index a77a872..07e9f39 100644
--- a/Correlator/View/HomePageWindow.xaml.cs
+++ b/Correlator/View/HomePageWindow.xaml.cs
@@ -2,7 +2,6 @@
using System.Diagnostics;
using System.Drawing;
using System.Windows;
-using Correlator.Pages;
using Correlator.Util;
using GalaSoft.MvvmLight.Messaging;
using MathWorks.MATLAB.NET.Arrays;
@@ -58,31 +57,6 @@
HydrophoneButton.Checked += delegate { FlowStatus.IsHydrophone = true; };
HydrophoneButton.Unchecked += delegate { FlowStatus.IsHydrophone = false; };
- //菜单
- Messenger.Default.Register(this, MessengerToken.RemoveMenu,
- s => { HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["menuUserControl"]); });
-
- //音频文件列表
- Messenger.Default.Register(this, MessengerToken.AddAudioFile,
- s => { HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["audioFileUserControl"]); });
- Messenger.Default.Register(this, MessengerToken.RemoveAudioFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["audioFileUserControl"]);
- });
-
- //图片文件列表
- Messenger.Default.Register(this, MessengerToken.AddPictureFile,
- s =>
- {
- HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
- Messenger.Default.Register(this, MessengerToken.RemovePictureFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
-
#region 不使用VM
ShutDownButton.Click += delegate
@@ -120,12 +94,7 @@
filePath.SnapShot();
};
- OpenMenuButton.Click += delegate
- {
- var menuUserControl = new MenuUserControl();
- UserControlManager.UserControlMap["menuUserControl"] = menuUserControl;
- HomePageContentGrid.Children.Add(menuUserControl);
- };
+ OpenMenuButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/PictureFileWindow.xaml b/Correlator/View/PictureFileWindow.xaml
new file mode 100644
index 0000000..f5ab3c7
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/View/PictureFileWindow.xaml.cs b/Correlator/View/PictureFileWindow.xaml.cs
new file mode 100644
index 0000000..d6b2a68
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml.cs
@@ -0,0 +1,25 @@
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class PictureFileWindow : Window
+ {
+ public PictureFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+ var window = new BigPictureWindow(fullPath)
+ {
+ Owner = GetWindow(this)
+ };
+ window.ShowDialog();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/ViewModel/AudioFileViewModel.cs b/Correlator/ViewModel/AudioFileViewModel.cs
index 3236257..38be766 100644
--- a/Correlator/ViewModel/AudioFileViewModel.cs
+++ b/Correlator/ViewModel/AudioFileViewModel.cs
@@ -6,7 +6,6 @@
using Correlator.Util;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
-using GalaSoft.MvvmLight.Messaging;
using HandyControl.Controls;
using HandyControl.Data;
using FileInfo = Correlator.Model.FileInfo;
@@ -78,8 +77,6 @@
AudioFiles = _totalFiles.Take(8).ToList();
});
- GoBackCommand = new RelayCommand(() => { Messenger.Default.Send("", MessengerToken.RemoveAudioFile); });
-
ItemSelectedCommand = new RelayCommand
diff --git a/Correlator/Pages/AudioFileUserControl.xaml b/Correlator/Pages/AudioFileUserControl.xaml
deleted file mode 100644
index 5a6951b..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/AudioFileUserControl.xaml.cs b/Correlator/Pages/AudioFileUserControl.xaml.cs
deleted file mode 100644
index bfa1f8c..0000000
--- a/Correlator/Pages/AudioFileUserControl.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Media;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// AudioFileUserControl.xaml 的交互逻辑
- ///
- public partial class AudioFileUserControl : UserControl
- {
- private readonly SoundPlayer _soundPlayer = new SoundPlayer();
-
- public AudioFileUserControl()
- {
- InitializeComponent();
- }
-
- private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
-
- _soundPlayer.SoundLocation = fullPath;
- _soundPlayer.Play();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Pages/MenuUserControl.xaml b/Correlator/Pages/MenuUserControl.xaml
deleted file mode 100644
index 3cf27c2..0000000
--- a/Correlator/Pages/MenuUserControl.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/MenuUserControl.xaml.cs b/Correlator/Pages/MenuUserControl.xaml.cs
deleted file mode 100644
index bec0b1e..0000000
--- a/Correlator/Pages/MenuUserControl.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Correlator.Pages
-{
- ///
- /// MenuUserControl.xaml 的交互逻辑
- ///
- public partial class MenuUserControl : UserControl
- {
- public MenuUserControl()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/Correlator/Pages/PictureFileUserControl.xaml b/Correlator/Pages/PictureFileUserControl.xaml
deleted file mode 100644
index f2cf57d..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Correlator/Pages/PictureFileUserControl.xaml.cs b/Correlator/Pages/PictureFileUserControl.xaml.cs
deleted file mode 100644
index 9dc9c19..0000000
--- a/Correlator/Pages/PictureFileUserControl.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using Correlator.View;
-
-namespace Correlator.Pages
-{
- public partial class PictureFileUserControl : UserControl
- {
- public PictureFileUserControl()
- {
- InitializeComponent();
- }
-
- private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
- {
- var fullPath = (sender as Button)?.Tag.ToString();
- var window = new BigPictureWindow(fullPath)
- {
- Owner = Window.GetWindow(this)
- };
- window.ShowDialog();
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/Util/MessengerToken.cs b/Correlator/Util/MessengerToken.cs
index 65017a2..a70f6d5 100644
--- a/Correlator/Util/MessengerToken.cs
+++ b/Correlator/Util/MessengerToken.cs
@@ -2,21 +2,6 @@
{
public static class MessengerToken
{
- #region AddUserControl
-
- public const string AddAudioFile = "2022122403";
- public const string AddPictureFile = "2022122405";
-
- #endregion
-
- #region RemoveUserControl
-
- public const string RemoveMenu = "2022122402";
- public const string RemoveAudioFile = "2022122404";
- public const string RemovePictureFile = "2022122406";
-
- #endregion
-
#region Message 普通消息
public const string SensorADevStatus = "202211150102";
diff --git a/Correlator/View/AudioFileWindow.xaml b/Correlator/View/AudioFileWindow.xaml
new file mode 100644
index 0000000..6af34fb
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/View/AudioFileWindow.xaml.cs b/Correlator/View/AudioFileWindow.xaml.cs
new file mode 100644
index 0000000..8420207
--- /dev/null
+++ b/Correlator/View/AudioFileWindow.xaml.cs
@@ -0,0 +1,26 @@
+using System.Media;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class AudioFileWindow : Window
+ {
+ private readonly SoundPlayer _soundPlayer = new SoundPlayer();
+
+ public AudioFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void PlayAudioButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+
+ _soundPlayer.SoundLocation = fullPath;
+ _soundPlayer.Play();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/View/AuditionWindow.xaml b/Correlator/View/AuditionWindow.xaml
index 61b605c..d619ef9 100644
--- a/Correlator/View/AuditionWindow.xaml
+++ b/Correlator/View/AuditionWindow.xaml
@@ -7,13 +7,14 @@
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="听音"
- Width="1280"
- Height="720"
+ MinWidth="1366"
+ MinHeight="768"
Background="White"
DataContext="{Binding Audition, Source={StaticResource Locator}}"
- ResizeMode="NoResize"
ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
+ WindowStartupLocation="CenterScreen"
+ WindowState="Maximized"
+ WindowStyle="None"
mc:Ignorable="d">
diff --git a/Correlator/View/HomePageProWindow.xaml.cs b/Correlator/View/HomePageProWindow.xaml.cs
index 56b8c6c..1c33874 100644
--- a/Correlator/View/HomePageProWindow.xaml.cs
+++ b/Correlator/View/HomePageProWindow.xaml.cs
@@ -68,28 +68,52 @@
#region 打开图片文件列表
- OpenImageFileButton.Click+= delegate
+ OpenImageFileButton.Click += delegate
{
-
+ var fileWindow = new PictureFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
#region 打开音频文件列表
- OpenAudioFileButton.Click+= delegate
+ OpenAudioFileButton.Click += delegate
{
-
+ var fileWindow = new AudioFileWindow
+ {
+ Owner = GetWindow(this)
+ };
+ fileWindow.ShowDialog();
};
#endregion
-
+
+ #region 打开听音界面
+
+ ListenAudioButton.Click += delegate
+ {
+ if (!SerialPortManager.Get.Sp.IsOpen)
+ {
+ MessageBox.Show("串口状态异常,无法操作", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ var auditionWindow = new AuditionWindow
+ {
+ Owner = GetWindow(this)
+ };
+ auditionWindow.ShowDialog();
+ };
+
+ #endregion
+
#region 设置
- SettingsButton.Click+= delegate
- {
-
- };
+ SettingsButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/HomePageWindow.xaml.cs b/Correlator/View/HomePageWindow.xaml.cs
index a77a872..07e9f39 100644
--- a/Correlator/View/HomePageWindow.xaml.cs
+++ b/Correlator/View/HomePageWindow.xaml.cs
@@ -2,7 +2,6 @@
using System.Diagnostics;
using System.Drawing;
using System.Windows;
-using Correlator.Pages;
using Correlator.Util;
using GalaSoft.MvvmLight.Messaging;
using MathWorks.MATLAB.NET.Arrays;
@@ -58,31 +57,6 @@
HydrophoneButton.Checked += delegate { FlowStatus.IsHydrophone = true; };
HydrophoneButton.Unchecked += delegate { FlowStatus.IsHydrophone = false; };
- //菜单
- Messenger.Default.Register(this, MessengerToken.RemoveMenu,
- s => { HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["menuUserControl"]); });
-
- //音频文件列表
- Messenger.Default.Register(this, MessengerToken.AddAudioFile,
- s => { HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["audioFileUserControl"]); });
- Messenger.Default.Register(this, MessengerToken.RemoveAudioFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["audioFileUserControl"]);
- });
-
- //图片文件列表
- Messenger.Default.Register(this, MessengerToken.AddPictureFile,
- s =>
- {
- HomePageContentGrid.Children.Add(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
- Messenger.Default.Register(this, MessengerToken.RemovePictureFile,
- s =>
- {
- HomePageContentGrid.Children.Remove(UserControlManager.UserControlMap["pictureFileUserControl"]);
- });
-
#region 不使用VM
ShutDownButton.Click += delegate
@@ -120,12 +94,7 @@
filePath.SnapShot();
};
- OpenMenuButton.Click += delegate
- {
- var menuUserControl = new MenuUserControl();
- UserControlManager.UserControlMap["menuUserControl"] = menuUserControl;
- HomePageContentGrid.Children.Add(menuUserControl);
- };
+ OpenMenuButton.Click += delegate { };
#endregion
}
diff --git a/Correlator/View/PictureFileWindow.xaml b/Correlator/View/PictureFileWindow.xaml
new file mode 100644
index 0000000..f5ab3c7
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/View/PictureFileWindow.xaml.cs b/Correlator/View/PictureFileWindow.xaml.cs
new file mode 100644
index 0000000..d6b2a68
--- /dev/null
+++ b/Correlator/View/PictureFileWindow.xaml.cs
@@ -0,0 +1,25 @@
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Correlator.View
+{
+ public partial class PictureFileWindow : Window
+ {
+ public PictureFileWindow()
+ {
+ InitializeComponent();
+
+ GoBackButton.Click += delegate { Close(); };
+ }
+
+ private void ShowPictureButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var fullPath = (sender as Button)?.Tag.ToString();
+ var window = new BigPictureWindow(fullPath)
+ {
+ Owner = GetWindow(this)
+ };
+ window.ShowDialog();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Correlator/ViewModel/AudioFileViewModel.cs b/Correlator/ViewModel/AudioFileViewModel.cs
index 3236257..38be766 100644
--- a/Correlator/ViewModel/AudioFileViewModel.cs
+++ b/Correlator/ViewModel/AudioFileViewModel.cs
@@ -6,7 +6,6 @@
using Correlator.Util;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
-using GalaSoft.MvvmLight.Messaging;
using HandyControl.Controls;
using HandyControl.Data;
using FileInfo = Correlator.Model.FileInfo;
@@ -78,8 +77,6 @@
AudioFiles = _totalFiles.Take(8).ToList();
});
- GoBackCommand = new RelayCommand(() => { Messenger.Default.Send("", MessengerToken.RemoveAudioFile); });
-
ItemSelectedCommand = new RelayCommand(ItemSelected);
DeleteItemCommand = new RelayCommand(() =>
diff --git a/Correlator/ViewModel/MenuViewModel.cs b/Correlator/ViewModel/MenuViewModel.cs
deleted file mode 100644
index bc52204..0000000
--- a/Correlator/ViewModel/MenuViewModel.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using Correlator.Pages;
-using Correlator.Util;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using GalaSoft.MvvmLight.Messaging;
-
-namespace Correlator.ViewModel
-{
- public class MenuViewModel : ViewModelBase
- {
- public RelayCommand GoAudioWindowCommand { get; set; }
- public RelayCommand GoPictureWindowCommand { get; set; }
- public RelayCommand CloseWindowCommand { get; set; }
-
- public MenuViewModel()
- {
- GoAudioWindowCommand = new RelayCommand(() =>
- {
- var audioFileUserControl = new AudioFileUserControl();
- UserControlManager.UserControlMap["audioFileUserControl"] = audioFileUserControl;
- Messenger.Default.Send("", MessengerToken.AddAudioFile);
- });
-
- GoPictureWindowCommand = new RelayCommand(() =>
- {
- var pictureFileUserControl = new PictureFileUserControl();
- UserControlManager.UserControlMap["pictureFileUserControl"] = pictureFileUserControl;
- Messenger.Default.Send("", MessengerToken.AddPictureFile);
- });
-
- CloseWindowCommand = new RelayCommand(() => { Messenger.Default.Send("", MessengerToken.RemoveMenu); });
- }
- }
-}
\ No newline at end of file
diff --git a/Correlator/ViewModel/PictureFileViewModel.cs b/Correlator/ViewModel/PictureFileViewModel.cs
index d5fdff7..2d40815 100644
--- a/Correlator/ViewModel/PictureFileViewModel.cs
+++ b/Correlator/ViewModel/PictureFileViewModel.cs
@@ -6,7 +6,6 @@
using Correlator.Util;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
-using GalaSoft.MvvmLight.Messaging;
using HandyControl.Controls;
using HandyControl.Data;
using FileInfo = Correlator.Model.FileInfo;
@@ -59,7 +58,6 @@
#region RelayCommand
public RelayCommand WindowLoadedCommand { get; set; }
- public RelayCommand GoBackCommand { get; set; }
public RelayCommand ItemSelectedCommand { get; set; }
public RelayCommand DeleteItemCommand { get; set; }
public RelayCommand ReLoadDataCommand { get; set; }
@@ -78,8 +76,6 @@
PictureFiles = _totalFiles.Take(8).ToList();
});
- GoBackCommand = new RelayCommand(() => { Messenger.Default.Send("", MessengerToken.RemovePictureFile); });
-
ItemSelectedCommand = new RelayCommand(ItemSelected);
DeleteItemCommand = new RelayCommand(() =>
diff --git a/Correlator/ViewModel/ViewModelLocator.cs b/Correlator/ViewModel/ViewModelLocator.cs
index 7ebb7a8..12d8914 100644
--- a/Correlator/ViewModel/ViewModelLocator.cs
+++ b/Correlator/ViewModel/ViewModelLocator.cs
@@ -43,7 +43,6 @@
#region VM
SimpleIoc.Default.Register();
- SimpleIoc.Default.Register();
SimpleIoc.Default.Register();
SimpleIoc.Default.Register();
SimpleIoc.Default.Register();
@@ -60,7 +59,6 @@
}
public HomePageViewModel HomePage => ServiceLocator.Current.GetInstance();
- public MenuViewModel Menu => ServiceLocator.Current.GetInstance();
public AudioFileViewModel AudioFile => ServiceLocator.Current.GetInstance();
public PictureFileViewModel PictureFile => ServiceLocator.Current.GetInstance();
public AuditionViewModel Audition => ServiceLocator.Current.GetInstance();