Commit 90451516 authored by 潘栩锋's avatar 潘栩锋 🚴

删除还没用的db.browser

parent 8c0023b6
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
\ No newline at end of file
<Application x:Class="DB.Browser.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DB.Browser"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<!-- Accent and AppTheme setting -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
<ResourceDictionary Source="Themes/Styles.xaml" />
<ResourceDictionary Source="Converters/Converters.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
using MahApps.Metro.Controls;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace DB.Browser
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
NLog.Logger log = NLog.LogManager.GetLogger("app");
public static MetroWindow MetroWindow { get; set; }
public App()
{
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{
string err = e.ExceptionObject.ToString();
log.Error(err);
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家",
MessageBoxButton.OK, MessageBoxImage.Error);
};
//AutoMapper 初始化
//所有使用到 AutoMapper 的程序集 必须主动显式 在这里加载。
//当为 dll 反射加载的 程序集, 应该在此提前 加载。
var cfg = new AutoMapper.Configuration.MapperConfigurationExpression();
var assemblies = System.AppDomain.CurrentDomain.GetAssemblies();
cfg.AddMaps(assemblies);
//cfg.AddMaps("FLY.Thick.Normal");
AutoMapper.Mapper.Initialize(cfg);
}
}
}
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:DB.Browser.Converter"
>
<conv:VisibilityConverter x:Key="visbilityconv" />
<conv:Equals2VisibleConverter_Collapsed x:Key="e2visconv_collapsed" />
<conv:Equals2VisibleConverter x:Key="e2visconv" />
<conv:Equals2HiddenConverter x:Key="e2hiddenconv" />
<conv:Equals2CollapsedConverter x:Key="e2collapsedconv" />
<conv:Equals2BoolConverter x:Key="e2bconv"/>
<conv:BoolReverseConverter x:Key="brconv"/>
</ResourceDictionary>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
namespace DB.Browser.Converter
{
public class Equals2BoolConverter : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == null)
return false;
Type tv = value.GetType();
Type tp = parameter.GetType();
if (tp.Equals(tv))
{
if (value.Equals(parameter))
return true;
}
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if ((bool)value == true)
{
return parameter;
}
else
{
return null;
}
}
#endregion
}
/// <summary>
/// 逻辑反向
/// </summary>
public class BoolReverseConverter : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
bool b = (bool)value;
return !b;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
bool b = (bool)value;
return !b;
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
namespace DB.Browser.Converter
{
public class Equals2VisibleConverter : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Type tv = value.GetType();
Type tp = parameter.GetType();
if (tp.Equals(tv))
{
if (value.Equals(parameter))
return System.Windows.Visibility.Visible;
}
return System.Windows.Visibility.Hidden;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
public class Equals2VisibleConverter_Collapsed : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Type tv = value.GetType();
Type tp = parameter.GetType();
if (tp.Equals(tv))
{
if (value.Equals(parameter))
return System.Windows.Visibility.Visible;
}
return System.Windows.Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
public class Equals2CollapsedConverter : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Type tv = value.GetType();
Type tp = parameter.GetType();
if (tp.Equals(tv))
{
if (value.Equals(parameter))
return System.Windows.Visibility.Collapsed;
}
return System.Windows.Visibility.Visible;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
public class Equals2HiddenConverter : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Type tv = value.GetType();
Type tp = parameter.GetType();
if (tp.Equals(tv))
{
if (value.Equals(parameter))
return System.Windows.Visibility.Hidden;
}
return System.Windows.Visibility.Visible;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
namespace DB.Browser.Converter
{
public class VisibilityConverter : IValueConverter
{
#region IValueConverter 成员
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
bool enable = (bool)value;
string p = null;
if(parameter!=null)
p = parameter as string;
if (p == "Collapsed")
{
if (enable)
return System.Windows.Visibility.Visible;
else
return System.Windows.Visibility.Collapsed;
}
else if (p == "HiddenWhenTrue")
{
if (!enable)
return System.Windows.Visibility.Visible;
else
return System.Windows.Visibility.Hidden;
}
else if (p == "CollapsedWhenTrue")
{
if (!enable)
return System.Windows.Visibility.Visible;
else
return System.Windows.Visibility.Collapsed;
}
else
{
if (enable)
return System.Windows.Visibility.Visible;
else
return System.Windows.Visibility.Hidden;
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{77A8A78B-6C8B-4231-821F-8250B48AFBFB}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>DB.Browser</RootNamespace>
<AssemblyName>DB.Browser</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Themes\Styles.cs" />
<Page Include="Converters\Converters.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Converters\Equals2BoolConverter.cs" />
<Compile Include="Converters\Equals2VisibleConverter.cs" />
<Compile Include="Converters\VisibilityConverter.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="PgMain.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\CustomTabControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Styles.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="PgMain.xaml.cs">
<DependentUpon>PgMain.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper">
<Version>8.1.1</Version>
</PackageReference>
<PackageReference Include="MahApps.Metro">
<Version>2.0.0-alpha0409</Version>
</PackageReference>
<PackageReference Include="MahApps.Metro.IconPacks">
<Version>3.0.0-alpha0206</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.2</Version>
</PackageReference>
<PackageReference Include="NLog">
<Version>4.6.6</Version>
</PackageReference>
<PackageReference Include="NLog.Config">
<Version>4.6.6</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version>
</PackageReference>
<PackageReference Include="System.Data.SQLite">
<Version>1.0.111</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.572
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DB.Browser", "DB.Browser.csproj", "{77A8A78B-6C8B-4231-821F-8250B48AFBFB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Misc", "..\thick_public\Project.FLY.Misc\MISC\Misc.csproj", "{5EE61AC6-5269-4F0F-B8FA-4334FE4A678F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteHelper", "..\thick_public\Project.SQLiteHelper\SQLiteHelper\SQLiteHelper.csproj", "{4CBABFAA-1C62-4510-AC63-A51EE5FD50FF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{77A8A78B-6C8B-4231-821F-8250B48AFBFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{77A8A78B-6C8B-4231-821F-8250B48AFBFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77A8A78B-6C8B-4231-821F-8250B48AFBFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{77A8A78B-6C8B-4231-821F-8250B48AFBFB}.Release|Any CPU.Build.0 = Release|Any CPU
{5EE61AC6-5269-4F0F-B8FA-4334FE4A678F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5EE61AC6-5269-4F0F-B8FA-4334FE4A678F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5EE61AC6-5269-4F0F-B8FA-4334FE4A678F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5EE61AC6-5269-4F0F-B8FA-4334FE4A678F}.Release|Any CPU.Build.0 = Release|Any CPU
{4CBABFAA-1C62-4510-AC63-A51EE5FD50FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CBABFAA-1C62-4510-AC63-A51EE5FD50FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CBABFAA-1C62-4510-AC63-A51EE5FD50FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4CBABFAA-1C62-4510-AC63-A51EE5FD50FF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {06A6249F-08E1-4A6A-AF65-C00EF2B915AD}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
<controls:MetroWindow x:Class="DB.Browser.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
Title="枫莱尔数据库浏览" WindowState="Maximized" >
<controls:MetroWindow.WindowButtonCommands>
<controls:WindowButtonCommands Template="{StaticResource MahApps.Metro.Templates.WindowButtonCommands.Win10}" />
</controls:MetroWindow.WindowButtonCommands>
<controls:MetroWindow.IconTemplate>
<DataTemplate>
<iconPacks:PackIconMaterial Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Margin="2"
Padding="4"
Foreground="{StaticResource IdealForegroundColorBrush}"
Kind="Database" />
</DataTemplate>
</controls:MetroWindow.IconTemplate>
<Frame NavigationUIVisibility="Hidden" x:Name="frame"/>
</controls:MetroWindow>
using MahApps.Metro.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace DB.Browser
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow :MetroWindow
{
public MainWindow()
{
InitializeComponent();
App.MetroWindow = this;
this.frame.Content = new PgMain();
}
}
}
<Page x:Class="DB.Browser.PgMain"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:local="DB.Browser"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="Page_Main">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="30" HorizontalAlignment="Center">
<StackPanel.Resources>
<Style x:Key="AccentCircleButtonStyle2"
BasedOn="{StaticResource AccentCircleButtonStyle}"
TargetType="{x:Type ButtonBase}">
<Setter Property="Width" Value="96"/>
<Setter Property="Height" Value="96"/>
</Style>
<Style x:Key="AccentCircleIconPackStyle2"
BasedOn="{StaticResource AccentCircleIconPackStyle}"
TargetType="{x:Type iconPacks:PackIconBase}">
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="40"/>
</Style>
</StackPanel.Resources>
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Margin="0,-20,-100,0">
<TextBlock Text="Step 1" FontSize="20" Foreground="{DynamicResource AccentColorBrush}" />
<TextBlock Text="选择数据" VerticalAlignment="Bottom" Margin="4,0"/>
</StackPanel>
<Button Style="{StaticResource AccentCircleButtonStyle2}" Click="ButtonSelect_Click">
<iconPacks:PackIconMaterial Style="{StaticResource AccentCircleIconPackStyle2}"
Kind="DatabaseImport" />
</Button>
<Grid Margin="0,0,-100,-45">
<StackPanel Orientation="Vertical" Visibility="{Binding IsDBReady, Converter={StaticResource visbilityconv}}">
<TextBlock FontSize="15">
<Run Text="{Binding Profile.PName}"/><Run Text="-"/><Run Text="{Binding Profile.Batch}"/><Run Text="-"/><Run Text="{Binding Profile.Number}"/>
</TextBlock>
<TextBlock Text="{Binding Profile.StartTime,StringFormat={}{0:MM-dd HH:mm}}"/>
<TextBlock Text="{Binding Profile.EndTime,StringFormat={}{0:MM-dd HH:mm}}"/>
</StackPanel>
</Grid>
</StackPanel>
<Line X2="96" VerticalAlignment="Center" Stroke="{DynamicResource GrayBrush7}" StrokeThickness="3" Margin="40,0"/>
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Margin="0,-20,-100,0">
<TextBlock Text="Step 2" FontSize="20" Foreground="{DynamicResource AccentColorBrush}" />
<TextBlock Text="查看图表" VerticalAlignment="Bottom" Margin="4,0"/>
</StackPanel>
<Button Style="{StaticResource AccentCircleButtonStyle2}" Click="ButtonChart_Click" IsEnabled="{Binding IsDBReady}">
<iconPacks:PackIconMaterial Style="{StaticResource AccentCircleIconPackStyle2}"
Kind="ChartAreaspline" />
</Button>
</StackPanel>
<Line X2="96" VerticalAlignment="Center" Stroke="{DynamicResource GrayBrush7}" StrokeThickness="3" Margin="40,0"/>
<StackPanel Orientation="Vertical" VerticalAlignment="Center" >
<StackPanel Orientation="Horizontal" Margin="0,-20,-100,0">
<TextBlock Text="Step 3" FontSize="20" Foreground="{DynamicResource AccentColorBrush}" />
<TextBlock Text="导出excel" VerticalAlignment="Bottom" Margin="4,0"/>
</StackPanel>
<Button Style="{StaticResource AccentCircleButtonStyle2}" Click="ButtonExcel_Click" IsEnabled="{Binding IsDBReady}">
<iconPacks:PackIconModern Style="{StaticResource AccentCircleIconPackStyle2}"
Kind="OfficeExcel" />
</Button>
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Vertical" Margin="10,30">
<Rectangle Height="1" Fill="{DynamicResource GrayBrush7}" Width="800"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="{StaticResource ControlMargin}">
<StackPanel Orientation="Vertical">
<TextBlock Text="枫莱尔数据库浏览器" FontSize="25" Foreground="{DynamicResource AccentColorBrush}"/>
</StackPanel>
<TextBlock Text="by flyautomation" VerticalAlignment="Bottom" Margin="{StaticResource ControlMargin}"/>
</StackPanel>
</StackPanel>
</Grid>
</Page>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace DB.Browser
{
/// <summary>
/// PgMain.xaml 的交互逻辑
/// </summary>
public partial class PgMain : Page
{
public PgMain()
{
InitializeComponent();
//this.DataContext = DBViewerModel.Instance;
}
private void ButtonSelect_Click(object sender, RoutedEventArgs e)
{
//PageSelect p = new PageSelect();
//p.Init();
//this.NavigationService.Navigate(p);
}
private void ButtonChart_Click(object sender, RoutedEventArgs e)
{
//PageChartView p = new PageChartView();
//p.Init();
//this.NavigationService.Navigate(p);
}
private async void ButtonExcel_Click(object sender, RoutedEventArgs e)
{
}
}
}
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("DB.Browser")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DB.Browser")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
//若要开始生成可本地化的应用程序,请设置
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
//例如,如果您在源文件中使用的是美国英语,
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
//对以下 NeutralResourceLanguage 特性的注释。 更新
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
//(未在页面中找到资源时使用,
//或应用程序资源字典中找到时使用)
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
//(未在页面中找到资源时使用,
//、应用程序或任何主题专用资源字典中找到时使用)
)]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace DB.Browser.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DB.Browser.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 覆盖当前线程的 CurrentUICulture 属性
/// 使用此强类型的资源类的资源查找。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace DB.Browser.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:behaviours="http://metro.mahapps.com/winfx/xaml/shared"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:converter="clr-namespace:MahApps.Metro.IconPacks.Converter;assembly=MahApps.Metro.IconPacks.Core">
<SolidColorBrush x:Key="TabItemPanelBackgroundBrush" Color="{DynamicResource Gray8}" />
<SolidColorBrush x:Key="TabItemBackgroundIsSelectedBrush" Color="{DynamicResource Gray2}" />
<SolidColorBrush x:Key="TabItemBackgroundIsMouseOverBrush" Color="{DynamicResource Gray5}" />
<SolidColorBrush x:Key="TabItemForegroundIsSelectedBrush" Color="{DynamicResource IdealForegroundColor}" />
<SolidColorBrush x:Key="TabItemSelectorBrush" Color="LawnGreen" />
<SolidColorBrush x:Key="TabControlBackgroundBrush" Color="WhiteSmoke" />
<Style x:Key="CustomTabItemStyle" TargetType="{x:Type TabItem}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="10" />
<Setter Property="MinWidth" Value="100" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid x:Name="PART_Grid"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True"
Margin="0">
<ContentPresenter x:Name="PART_HeaderContent"
Margin="{TemplateBinding Padding}"
ContentSource="Header"
HorizontalAlignment="Center"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Rectangle x:Name="PART_Selector"
VerticalAlignment="Bottom"
Height="4"
Visibility="Collapsed"
Fill="{StaticResource TabItemSelectorBrush}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="{StaticResource TabItemBackgroundIsSelectedBrush}" />
<Setter Property="Foreground" Value="{StaticResource TabItemForegroundIsSelectedBrush}" />
<Setter TargetName="PART_Selector" Property="Visibility" Value="Visible" />
</Trigger.Setters>
</Trigger>
<Trigger SourceName="PART_Grid" Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="{StaticResource TabItemBackgroundIsMouseOverBrush}" />
<Setter Property="Cursor" Value="Hand" />
</Trigger.Setters>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CustomTabControlStyle" TargetType="{x:Type TabControl}">
<Setter Property="Background" Value="{StaticResource TabControlBackgroundBrush}" />
<Setter Property="TabStripPlacement" Value="Top" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="ItemContainerStyle" Value="{StaticResource CustomTabItemStyle}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<DockPanel LastChildFill="True">
<Grid x:Name="HeaderGrid"
DockPanel.Dock="Left"
Background="{StaticResource TabItemPanelBackgroundBrush}">
<TabPanel x:Name="HeaderPanel"
HorizontalAlignment="Center"
Panel.ZIndex="1"
IsItemsHost="True"
KeyboardNavigation.TabIndex="1" />
</Grid>
<Border x:Name="ContentPanel"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
KeyboardNavigation.DirectionalNavigation="Contained"
KeyboardNavigation.TabIndex="2"
KeyboardNavigation.TabNavigation="Local"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
<controls:TransitioningContentControl UseLayoutRounding="True"
behaviours:ReloadBehavior.OnSelectedTabChanged="True"
RestartTransitionOnContentChange="True"
Transition="{TemplateBinding controls:TabControlHelper.Transition}">
<ContentPresenter x:Name="PART_SelectedContentHost"
UseLayoutRounding="False"
Margin="{TemplateBinding Padding}"
ContentSource="SelectedContent"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</controls:TransitioningContentControl>
</Border>
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Top">
<Setter TargetName="HeaderGrid" Property="DockPanel.Dock" Value="Top" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace DB.Browser.Themes
{
public static class Styles
{
public static Brush GetForeground(int index)
{
IEnumerable<SolidColorBrush> randomColors = App.Current.FindResource("RandomColors") as IEnumerable<SolidColorBrush>;
return randomColors.ElementAt(index % randomColors.Count());
}
}
}
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
>
<Style TargetType="Button" x:Key="ButtonStyle_empty">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border
Background="{TemplateBinding Background}"
Height="{TemplateBinding Height}"
Width="{TemplateBinding Width}"
>
<ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style TargetType="Grid" x:Key="GridStyle_shadow">
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="15" Direction="-90" RenderingBias="Quality" Opacity=".2" ShadowDepth="1"/>
</Setter.Value>
</Setter>
</Style>
<x:Array x:Key="RandomColors" Type="SolidColorBrush">
<SolidColorBrush>#2195f2</SolidColorBrush>
<SolidColorBrush>#f34336</SolidColorBrush>
<SolidColorBrush>#fec007</SolidColorBrush>
<SolidColorBrush>#607d8a</SolidColorBrush>
<SolidColorBrush>#e81e63</SolidColorBrush>
<SolidColorBrush>#4cae50</SolidColorBrush>
<SolidColorBrush>#3f51b4</SolidColorBrush>
<SolidColorBrush>#ccdb39</SolidColorBrush>
</x:Array>
<SolidColorBrush x:Key="AreaColors0">Red</SolidColorBrush>
<SolidColorBrush x:Key="AreaColors1">Orange</SolidColorBrush>
<SolidColorBrush x:Key="AreaColors2">Green</SolidColorBrush>
<SolidColorBrush x:Key="AreaColors3">Blue</SolidColorBrush>
<SolidColorBrush x:Key="AreaColors4">Purple</SolidColorBrush>
<Style x:Key="AccentCircleButtonStyle"
BasedOn="{StaticResource MahApps.Metro.Styles.MetroCircleButtonStyle}"
TargetType="{x:Type ButtonBase}">
<Setter Property="Width" Value="48"/>
<Setter Property="Height" Value="48"/>
<Setter Property="Margin" Value="4"/>
<Setter Property="Foreground" Value="{DynamicResource AccentColorBrush}" />
<Setter Property="Background" Value="{DynamicResource ControlBackgroundBrush}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource AccentColorBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource GrayBrush7}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="AccentCircleIconPackStyle"
TargetType="{x:Type iconPacks:PackIconBase}">
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="20"/>
</Style>
<Thickness x:Key="ControlMargin">5</Thickness>
</ResourceDictionary>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment