init
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<base:BaseView x:Class="DatabaseServices.DatabaseCopyView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:commonconverters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:DatabaseServices"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
x:Name="DatabaseCopy" Background="White">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<commonconverters:BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="White" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<controls:CommonStatusRibbon AutomationProperties.AutomationId="ImmediateProgress" Grid.Row="0" Margin="0,5,0,5" ProgressBarName="CurrentTaskStatus"
|
||||
Content="{Binding CurrentTaskProgressBarView}" />
|
||||
<controls:CommonStatusRibbon AutomationProperties.AutomationId="OverallProgress" Grid.Row="1" Margin="0,5,0,5" ProgressBarName="OverallStatus"
|
||||
Content="{Binding OverallProgressBarView}" />
|
||||
<Button AutomationProperties.AutomationId="Copy Button" Content="{strings:Translate CopyFromRemoteServer}"
|
||||
MinWidth="200" Grid.Row="2" HorizontalAlignment="Left" Click="Copy_Click" IsEnabled="{Binding CopyEnabled, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding IsCopyVisible, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using DTS.Common.Interface.Database;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DatabaseServices
|
||||
{
|
||||
/// <inheritdoc cref="IDatabaseCopyView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for DatabaseCopyView.xaml
|
||||
/// </summary>
|
||||
public partial class DatabaseCopyView : IDatabaseCopyView
|
||||
{
|
||||
public DatabaseCopyView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Copy_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var button = (Control)sender;
|
||||
var vm = (IDatabaseCopyViewModel)button.DataContext;
|
||||
vm.CopyDatabase();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<base:BaseView x:Class="DatabaseServices.DatabaseStatusBarView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:DatabaseServices"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:converters="clr-namespace:DatabaseServices.Converters"
|
||||
xmlns:local="clr-namespace:DatabaseServices"
|
||||
xmlns:enums="clr-namespace:DTS.Common.Enums.Database;assembly=DTS.Common"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="50" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
x:Name="DatabaseStatusBar">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<converters:DbTypeToVisibilityConverter x:Key="DbTypeConverter" />
|
||||
<!--<local:DatabaseStatusBarViewModel x:Key="MainViewModel" />-->
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<StackPanel Orientation="Horizontal" Background="Transparent" x:Name="MainStackPanel" VerticalAlignment="Center">
|
||||
<TextBlock Foreground="White"
|
||||
Text="{strings:TranslateExtension ConnectedTo}"
|
||||
Background="{Binding BackgroundBrush,UpdateSourceTrigger=PropertyChanged}"
|
||||
FontSize="12" VerticalAlignment="Center" Padding="5,0,5,0"/>
|
||||
<TextBlock Foreground="White" AutomationProperties.AutomationId="ServerTextBlock"
|
||||
Text="{Binding ActiveDbName,UpdateSourceTrigger=PropertyChanged}"
|
||||
Background="{Binding BackgroundBrush,UpdateSourceTrigger=PropertyChanged}"
|
||||
FontSize="12" VerticalAlignment="Center" Padding="0,0,5,0"/>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,18 @@
|
||||
using DTS.Common.Interface.Database;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DatabaseServices
|
||||
{
|
||||
/// <inheritdoc cref="DatabaseStatusBarView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for DatabaseStatusBarView.xaml
|
||||
/// </summary>
|
||||
public partial class DatabaseStatusBarView : IDatabaseStatusBarView
|
||||
{
|
||||
public DatabaseStatusBarView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<base:BaseView x:Class="DatabaseServices.DatabaseSwitchView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:DatabaseServices"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
x:Name="DatabaseSwitch" Background="White">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<converters:InverseBooleanConverter x:Key="InverseConverter" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<WrapPanel Background="White" Orientation="Horizontal">
|
||||
<Button Content="{strings:TranslateExtension SwitchToLocal}" IsEnabled="{Binding RemoteIsActive, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="SwitchToLocalButton" Click="SwitchToLocal_Click" />
|
||||
<Button Content="{strings:TranslateExtension SwitchToRemote}" IsEnabled="{Binding RemoteIsActive, Converter={StaticResource InverseConverter}, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="SwitchToRemoteButton" Click="SwitchToRemote_Click" />
|
||||
</WrapPanel>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Windows.Controls;
|
||||
using DTS.Common.Interface.Database;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace DatabaseServices
|
||||
{
|
||||
/// <inheritdoc cref="IDatabaseSwitchView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for DatabaseSwitchView.xaml
|
||||
/// </summary>
|
||||
public partial class DatabaseSwitchView : IDatabaseSwitchView
|
||||
{
|
||||
public DatabaseSwitchView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void SwitchToLocal_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
var vm = (IDatabaseSwitchViewModel)((Control)sender).DataContext;
|
||||
vm.SwitchLocal();
|
||||
}
|
||||
|
||||
private void SwitchToRemote_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
var vm = (IDatabaseSwitchViewModel)((Control)sender).DataContext;
|
||||
vm.SwitchRemote();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user