This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

CDT-28: Delete profile functionality

Move CDTag.View namespace to CDTag.Views
Add GetInputWindow
  • Loading branch information...
judwhite committed Feb 26, 2012
1 parent 6a441b9 commit 82bdb25f2c297c19b0a3a6a979f7936d07a86dcf
Showing with 301 additions and 82 deletions.
  1. +1 −1 CDTag.Common/ApplicationServices/IDialogService.cs
  2. +1 −1 CDTag.Common/Events/MessageBoxEvent.cs
  3. +4 −0 CDTag.Common/MVVM/ViewModelBase.cs
  4. +0 −1 CDTag.Model/Settings/SettingsFile.cs
  5. +1 −1 CDTag.View.Interfaces/About/IAboutWindow.cs
  6. +1 −0 CDTag.View.Interfaces/CDTag.View.Interfaces.csproj
  7. +1 −1 CDTag.View.Interfaces/Checksum/IChecksumWindow.cs
  8. +1 −1 CDTag.View.Interfaces/Checksum/IVerifyEACLogWindow.cs
  9. +9 −0 CDTag.View.Interfaces/General/IGetInputWindow.cs
  10. +1 −1 CDTag.View.Interfaces/IWindow.cs
  11. +1 −1 CDTag.View.Interfaces/Options/IOptionsWindow.cs
  12. +1 −1 CDTag.View.Interfaces/Profile/EditProfile/IEditProfileWindow.cs
  13. +1 −1 CDTag.View.Interfaces/Profile/NewProfile/INewProfileWindow.cs
  14. +1 −1 CDTag.View.Interfaces/Tag/EditTag/IEditTagWindow.cs
  15. +1 −1 CDTag.View.Interfaces/Tag/MassTag/IMassTagWindow.cs
  16. +1 −1 CDTag.View.Interfaces/Tag/TagAlbum/ITagAlbumWindow.cs
  17. +1 −1 CDTag.View.Interfaces/Tools/IEncodingInspectorWindow.cs
  18. +1 −1 CDTag.View.Interfaces/Tools/ISplitCueWindow.cs
  19. +2 −2 CDTag.View/About/AboutWindow.xaml.cs
  20. +7 −0 CDTag.View/CDTag.View.csproj
  21. +2 −2 CDTag.View/Checksum/ChecksumWindow.xaml.cs
  22. +2 −2 CDTag.View/Checksum/VerifyEACLogWindow.xaml.cs
  23. +2 −3 CDTag.View/DialogService.cs
  24. +42 −0 CDTag.View/General/GetInputWindow.xaml
  25. +15 −0 CDTag.View/General/GetInputWindow.xaml.cs
  26. +2 −2 CDTag.View/Options/OptionsWindow.xaml.cs
  27. +5 −4 CDTag.View/Profile/EditProfile/EditProfileWindow.xaml
  28. +2 −2 CDTag.View/Profile/EditProfile/EditProfileWindow.xaml.cs
  29. +1 −1 CDTag.View/Profile/NewProfile/NewProfileWindow.xaml.cs
  30. +1 −1 CDTag.View/Tag/EditTag/ID3v2Window.xaml.cs
  31. +2 −2 CDTag.View/Tag/MassTag/MassTagWindow.xaml.cs
  32. +2 −2 CDTag.View/Tag/TagAlbum/TagAlbumWindow.xaml.cs
  33. +2 −2 CDTag.View/Tools/EncodingInspectorWindow.xaml.cs
  34. +2 −2 CDTag.View/Tools/SplitCueWindow.xaml.cs
  35. +1 −2 CDTag.View/WindowViewBase.cs
  36. +51 −4 CDTag.ViewModel/Profile/EditProfile/EditProfileViewModel.cs
  37. +9 −9 CDTag.ViewModel/Tag/TagViewModel.cs
  38. +0 −7 CDTag/App.xaml.cs
  39. +9 −9 CDTag/Bootstrapper.cs
  40. +111 −7 Tests/CDTag.ViewModel.Tests/Profile/EditProfile/EditProfileViewModelTests.cs
  41. +1 −2 Tests/CDTag.ViewModel.Tests/UnitTestDialogService.cs
@@ -1,6 +1,6 @@
using System;
using CDTag.Common.Wpf;
-using CDTag.View.Interfaces;
+using CDTag.Views.Interfaces;
namespace CDTag.Common.ApplicationServices
{
@@ -1,5 +1,5 @@
using System.Windows;
-using CDTag.View.Interfaces;
+using CDTag.Views.Interfaces;
namespace CDTag.Common.Events
{
@@ -52,6 +52,9 @@ public abstract class ViewModelBase : IViewModelBase
/// <summary>Path service.</summary>
protected static readonly IPathService _pathService;
+ /// <summary>Dialog service.</summary>
+ protected static readonly IDialogService _dialogService;
+
/// <summary>Occurs when a property value changes.</summary>
public event PropertyChangedEventHandler PropertyChanged;
@@ -67,6 +70,7 @@ static ViewModelBase()
{
_dispatcher = IoC.Resolve<IDispatcher>();
_pathService = IoC.Resolve<IPathService>();
+ _dialogService = IoC.Resolve<IDialogService>();
}
/// <summary>
@@ -3,7 +3,6 @@
using System.Text;
using CDTag.Common.ApplicationServices;
using CDTag.Common.Json;
-using CDTag.View;
namespace CDTag.Common.Settings
{
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.About
+namespace CDTag.Views.Interfaces.About
{
/// <summary>
/// IAboutWindow
@@ -52,6 +52,7 @@
<Compile Include="About\IAboutWindow.cs" />
<Compile Include="Checksum\IChecksumWindow.cs" />
<Compile Include="Checksum\IVerifyEACLogWindow.cs" />
+ <Compile Include="General\IGetInputWindow.cs" />
<Compile Include="IWindow.cs" />
<Compile Include="Options\IOptionsWindow.cs" />
<Compile Include="Profile\EditProfile\IEditProfileWindow.cs" />
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Checksum
+namespace CDTag.Views.Interfaces.Checksum
{
/// <summary>
/// IChecksumWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Checksum
+namespace CDTag.Views.Interfaces.Checksum
{
/// <summary>
/// IVerifyEACLogWindow
@@ -0,0 +1,9 @@
+namespace CDTag.Views.Interfaces.General
+{
+ /// <summary>
+ /// IGetInputWindow
+ /// </summary>
+ public interface IGetInputWindow : IWindow
+ {
+ }
+}
@@ -1,6 +1,6 @@
using System.Windows;
-namespace CDTag.View.Interfaces
+namespace CDTag.Views.Interfaces
{
/// <summary>
/// IWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Options
+namespace CDTag.Views.Interfaces.Options
{
/// <summary>
/// IOptionsWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Profile.EditProfile
+namespace CDTag.Views.Interfaces.Profile.EditProfile
{
/// <summary>
/// IEditProfileWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Profile.NewProfile
+namespace CDTag.Views.Interfaces.Profile.NewProfile
{
/// <summary>
/// INewProfileWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Tag.EditTag
+namespace CDTag.Views.Interfaces.Tag.EditTag
{
/// <summary>
/// IEditTagWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Tag.MassTag
+namespace CDTag.Views.Interfaces.Tag.MassTag
{
/// <summary>
/// IMassTagWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Tag.TagAlbum
+namespace CDTag.Views.Interfaces.Tag.TagAlbum
{
/// <summary>
/// ITagAlbumWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Tools
+namespace CDTag.Views.Interfaces.Tools
{
/// <summary>
/// IEncodingInspectorWindow
@@ -1,4 +1,4 @@
-namespace CDTag.View.Interfaces.Tools
+namespace CDTag.Views.Interfaces.Tools
{
/// <summary>
/// ISplitCueWindow
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.About;
-using CDTag.ViewModels.About;
+using CDTag.ViewModels.About;
+using CDTag.Views.Interfaces.About;
namespace CDTag.Views.About
{
@@ -86,6 +86,9 @@
<Compile Include="Converters\PlayLengthConverter.cs" />
<Compile Include="Converters\ShortFileNameConverter.cs" />
<Compile Include="DialogService.cs" />
+ <Compile Include="General\GetInputWindow.xaml.cs">
+ <DependentUpon>GetInputWindow.xaml</DependentUpon>
+ </Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
</Compile>
@@ -167,6 +170,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="General\GetInputWindow.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.Checksum;
-using CDTag.ViewModels.Checksum;
+using CDTag.ViewModels.Checksum;
+using CDTag.Views.Interfaces.Checksum;
namespace CDTag.Views.Checksum
{
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.Checksum;
-using CDTag.ViewModels.Checksum;
+using CDTag.ViewModels.Checksum;
+using CDTag.Views.Interfaces.Checksum;
namespace CDTag.Views.Checksum
{
@@ -8,11 +8,10 @@
using CDTag.Common.Wpf;
using CDTag.Controls;
using CDTag.FileBrowser.Events;
-using CDTag.View.Interfaces;
-using CDTag.Views;
+using CDTag.Views.Interfaces;
using Microsoft.Win32;
-namespace CDTag.View
+namespace CDTag.Views
{
public class DialogService : IDialogService
{
@@ -0,0 +1,42 @@
+<Views:WindowViewBase
+ x:Class="CDTag.Views.General.GetInputWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:Views="clr-namespace:CDTag.Views"
+ Title="{Binding WindowTitle, Mode=OneWay}"
+ MinHeight="200"
+ MinWidth="200"
+ Height="200"
+ Width="350"
+ CurrentVisualState="{Binding CurrentVisualState}"
+ FocusManager.FocusedElement="{Binding ElementName=InputTextBox}"
+>
+ <Grid Margin="8">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <TextBlock Text="{Binding LabelText, Mode=OneWay}" Margin="0,0,8,0" />
+ <TextBox x:Name="InputTextBox" Text="{Binding InputValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" />
+
+ <Path Grid.Row="1" Grid.ColumnSpan="2" Data="M0,0 L1,0" Stroke="#CCCCCC" Stretch="Fill" Margin="0,8" />
+
+ <Grid Grid.Row="2" Grid.ColumnSpan="2" Grid.IsSharedSizeScope="True">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" SharedSizeGroup="BottomButtons" MinWidth="80" />
+ <ColumnDefinition Width="Auto" SharedSizeGroup="BottomButtons" MinWidth="80" />
+ </Grid.ColumnDefinitions>
+
+ <Button Grid.Column="1" Content="_OK" Command="{Binding OKCommand}" Padding="7,2" Margin="8,0,0,0" />
+ <Button Grid.Column="2" Content="_Cancel" IsCancel="True" Padding="7,2" Margin="8,0,0,0" />
+ </Grid>
+
+ </Grid>
+</Views:WindowViewBase>
@@ -0,0 +1,15 @@
+using CDTag.Views.Interfaces.General;
+
+namespace CDTag.Views.General
+{
+ /// <summary>
+ /// Interaction logic for GetInputWindow.xaml
+ /// </summary>
+ public partial class GetInputWindow : WindowViewBase, IGetInputWindow
+ {
+ public GetInputWindow()
+ {
+ InitializeComponent();
+ }
+ }
+}
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.Options;
-using CDTag.ViewModel.Options;
+using CDTag.ViewModel.Options;
+using CDTag.Views.Interfaces.Options;
namespace CDTag.Views.Options
{
@@ -1,13 +1,14 @@
-<Views:WindowViewBase
+<Views:WindowViewBase
x:Class="CDTag.Views.Profile.EditProfile.EditProfileWindow"
x:Name="editProfileWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Views="clr-namespace:CDTag.Views" xmlns:EditProfile="clr-namespace:CDTag.Views.Profile.EditProfile"
+ xmlns:Views="clr-namespace:CDTag.Views"
+ xmlns:EditProfile="clr-namespace:CDTag.Views.Profile.EditProfile"
Title="{Binding WindowTitle, Mode=OneWay}"
- MinHeight="540"
+ MinHeight="540"
MinWidth="600"
- Height="580"
+ Height="580"
Width="780"
CurrentVisualState="{Binding CurrentVisualState}"
FocusManager.FocusedElement="{Binding ElementName=ProfileNameTextBox}"
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.Profile.EditProfile;
-using CDTag.ViewModels.Profile.EditProfile;
+using CDTag.ViewModels.Profile.EditProfile;
+using CDTag.Views.Interfaces.Profile.EditProfile;
namespace CDTag.Views.Profile.EditProfile
{
@@ -1,6 +1,6 @@
using System;
-using CDTag.View.Interfaces.Profile.NewProfile;
using CDTag.ViewModels.Profile.NewProfile;
+using CDTag.Views.Interfaces.Profile.NewProfile;
namespace CDTag.Views.Profile.NewProfile
{
@@ -1,7 +1,7 @@
using System.Windows;
using CDTag.Model.Tag;
-using CDTag.View.Interfaces.Tag.EditTag;
using CDTag.ViewModels.Tag.EditTag;
+using CDTag.Views.Interfaces.Tag.EditTag;
using IdSharp.Common.Events;
using Microsoft.Win32;
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.Tag.MassTag;
-using CDTag.ViewModels.Tag.MassTag;
+using CDTag.ViewModels.Tag.MassTag;
+using CDTag.Views.Interfaces.Tag.MassTag;
namespace CDTag.Views.Tag.MassTag
{
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.Tag.TagAlbum;
-using CDTag.ViewModels.Tag.TagAlbum;
+using CDTag.ViewModels.Tag.TagAlbum;
+using CDTag.Views.Interfaces.Tag.TagAlbum;
namespace CDTag.Views.Tag.TagAlbum
{
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.Tools;
-using CDTag.ViewModels.Tools;
+using CDTag.ViewModels.Tools;
+using CDTag.Views.Interfaces.Tools;
namespace CDTag.Views.Tools
{
@@ -1,5 +1,5 @@
-using CDTag.View.Interfaces.Tools;
-using CDTag.ViewModels.Tools;
+using CDTag.ViewModels.Tools;
+using CDTag.Views.Interfaces.Tools;
namespace CDTag.Views.Tools
{
@@ -3,11 +3,10 @@
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
-using CDTag.Common;
using CDTag.Common.Events;
using CDTag.Common.Mvvm;
using CDTag.Common.Settings;
-using CDTag.View.Interfaces;
+using CDTag.Views.Interfaces;
using IdSharp.Common.Events;
namespace CDTag.Views
Oops, something went wrong.

0 comments on commit 82bdb25

Please sign in to comment.