Commit 4c022672 authored by 潘栩锋's avatar 潘栩锋 🚴

和美安装包_v6.22.0 -20210403

1. 添加 吹膜数据库浏览器
parent 5674a0ff

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30611.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.Blowing.DbViewer", "FLY.Blowing.DbViewer\FLY.Blowing.DbViewer.csproj", "{C417AD1B-052E-473A-892D-BFB99938598B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C417AD1B-052E-473A-892D-BFB99938598B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DA0C5C41-7E28-4F3B-891C-DCC1EA7BAE6D}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
</providers>
</entityFramework>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6"/>
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
<remove invariant="System.Data.SQLite"/>
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/>
</DbProviderFactories>
</system.data>
</configuration>
<Application x:Class="FLY.Blowing.DbViewer.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="WindowMain.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="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="GroupBox"/>
</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.Windows;
using Unity;
namespace FLY.Blowing.DbViewer
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
public static MetroWindow MetroWindow { get; set; }
public App()
{
App.Current.Properties[nameof(IUnityContainer)] = UnityExt.Container;
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{
string err = e.ExceptionObject.ToString();
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家",
MessageBoxButton.OK, MessageBoxImage.Error);
};
}
}
}
using AutoMapper;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FLY.Blowing.DbViewer.Core
{
public class DbViewerModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public string DbDirPath { get; set; } = @"D:\blowingdata";
public DbProfilePack Pack { get; set; }
public bool IsPackReady { get; set; }
public DateTime PackBeginDate { get; set; }
public DateTime PackEndDate { get; set; }
public ObservableCollection<string> PackMsgs { get; } = new ObservableCollection<string>();
public DbHelper mDbHelper;
public DbViewerModel() {
}
public void Init() {
if (!Load())
Save();
mDbHelper = new DbHelper();
mDbHelper.DbDirPath = DbDirPath;
mDbHelper.Init();
}
private string filePath = "param.json";
bool Load() {
return DbViewerModelJsonDb.Load(this, filePath);
}
public bool Save()
{
return DbViewerModelJsonDb.Save(this, filePath);
}
}
public class DbViewerModelJsonDb
{
static Mapper Mapper { get; } = new AutoMapper.Mapper(new MapperConfiguration(c =>
{
c.CreateMap<DbViewerModel, DbViewerModelJsonDb>().ReverseMap();
}));
public static bool Save(DbViewerModel src, string filePath)
{
var p = Mapper.Map<DbViewerModelJsonDb>(src);
try
{
File.WriteAllText(filePath, JsonConvert.SerializeObject(p, Formatting.Indented));
}
catch
{
//异常,没有json 编码失败
return false;
}
return true;
}
public static bool Load(DbViewerModel src, string filePath)
{
try
{
if (File.Exists(filePath))
{
string json = File.ReadAllText(filePath);
var p = JsonConvert.DeserializeObject<DbViewerModelJsonDb>(json);
Mapper.Map(p, src);
return true;
}
}
catch
{
//异常,没有json 解码失败
}
return false;
}
public string DbDirPath { get; set; } = @"D:\blowingdata";
}
}
<?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>{C417AD1B-052E-473A-892D-BFB99938598B}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>FLY.Blowing.DbViewer</RootNamespace>
<AssemblyName>FLY.Blowing.DbViewer</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</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>
<Prefer32Bit>false</Prefer32Bit>
</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>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>clipboard.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Security" />
<Reference Include="System.Windows.Forms" />
<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.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="Core\DbViewerModel.cs" />
<Compile Include="Core\ExcelOuput.cs" />
<Compile Include="PageMain.xaml.cs">
<DependentUpon>PageMain.xaml</DependentUpon>
</Compile>
<Compile Include="PageSetup.xaml.cs">
<DependentUpon>PageSetup.xaml</DependentUpon>
</Compile>
<Compile Include="UnityExt.cs" />
<Compile Include="WindowMain.xaml.cs">
<DependentUpon>WindowMain.xaml</DependentUpon>
</Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Core\DbHelper.cs" />
<Page Include="PageMain.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PageSelect.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PageSetup.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\CustomTabControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Styles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WindowMain.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="PageSelect.xaml.cs">
<DependentUpon>PageSelect.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="App.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="clipboard.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper">
<Version>9.0.0</Version>
</PackageReference>
<PackageReference Include="Costura.Fody">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="EPPlus">
<Version>4.5.3.2</Version>
</PackageReference>
<PackageReference Include="MahApps.Metro">
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="MahApps.Metro.IconPacks">
<Version>4.8.0</Version>
</PackageReference>
<PackageReference Include="MvvmLight">
<Version>5.4.1.1</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="System.Data.SQLite">
<Version>1.0.112</Version>
</PackageReference>
<PackageReference Include="Unity">
<Version>5.11.2</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Project.FLY.FeedbackRenZiJia\FLY.FeedbackRenZiJia\FLY.FeedbackRenZiJia.csproj">
<Project>{3faf02de-b9e8-4dda-a8e4-7a99e6e53acb}</Project>
<Name>FLY.FeedbackRenZiJia</Name>
</ProjectReference>
<ProjectReference Include="..\..\Project.FLY.IBC\FLY.IBC\FLY.IBC.csproj">
<Project>{88efedf8-8228-4eee-90af-1ebf747b9fab}</Project>
<Name>FLY.IBC</Name>
</ProjectReference>
<ProjectReference Include="..\..\Project.FLY.Weight\FLY.Weight\FLY.Weight.csproj">
<Project>{97c282a9-f2f0-4b3c-a3b0-b351918d5c4d}</Project>
<Name>FLY.Weight</Name>
</ProjectReference>
<ProjectReference Include="..\..\Project.FLY.Winder_20190413\FLY.Winder\FLY.Winder.csproj">
<Project>{a989e480-3730-4b26-809f-dff94d145d6e}</Project>
<Name>FLY.Winder</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.ControlLibrary\FLY.ControlLibrary\FLY.ControlLibrary.csproj">
<Project>{119c3adc-f8e1-4f72-b89b-006236ff8586}</Project>
<Name>FLY.ControlLibrary</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.Misc\MISC\Misc.csproj">
<Project>{5ee61ac6-5269-4f0f-b8fa-4334fe4a678f}</Project>
<Name>Misc</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.OBJComponents\OBJComponents\FLY.OBJComponents.csproj">
<Project>{a539505d-9ac0-426b-a9a0-197df50598b0}</Project>
<Name>FLY.OBJComponents</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.SQLiteHelper\SQLiteHelper\SQLiteHelper.csproj">
<Project>{4cbabfaa-1c62-4510-ac63-a51ee5fd50ff}</Project>
<Name>SQLiteHelper</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
<Costura />
</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="TriggerDependentProperties" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the IsChanged property 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:attribute name="SuppressWarnings" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings from this weaver.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressOnPropertyNameChangedWarning" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings about mismatched On_PropertyName_Changed methods.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</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
<Page x:Class="FLY.Blowing.DbViewer.PageMain"
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="clr-namespace:FLY.Blowing.DbViewer.Core"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:DbViewerModel}"
Title="Page_Main">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="30" HorizontalAlignment="Center">
<StackPanel.Resources>
</StackPanel.Resources>
<StackPanel VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Margin="0,-20,-100,0">
<TextBlock Text="Step 1" FontSize="20" Foreground="{StaticResource MahApps.Brushes.Accent}" />
<TextBlock Text="选择数据" VerticalAlignment="Bottom" Margin="4,0"/>
</StackPanel>
<Button Style="{StaticResource Styles.Button.Circle.Accent2}" Click="ButtonSelect_Click">
<iconPacks:PackIconMaterial Kind="DatabaseImport" />
</Button>
<Grid Margin="0,0,-100,-45">
<StackPanel Visibility="{Binding IsPackReady, Converter={StaticResource visbilityconv}}">
<TextBlock>
<Run Text="{Binding PackBeginDate,StringFormat={}{0:MM-dd HH:mm}}"/>~
<Run Text="{Binding PackEndDate,StringFormat={}{0:MM-dd HH:mm}}"/>
</TextBlock>
<ItemsControl ItemsSource="{Binding PackMsgs}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding .}" Margin="2"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Grid>
</StackPanel>
<Line X2="96" VerticalAlignment="Center" Stroke="{StaticResource MahApps.Brushes.Gray7}" 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="{StaticResource MahApps.Brushes.Accent}" />
<TextBlock Text="查看图表(暂不支持)" VerticalAlignment="Bottom" Margin="4,0"/>
</StackPanel>
<Button Style="{StaticResource Styles.Button.Circle.Accent2}" Click="ButtonChart_Click" IsEnabled="False">
<iconPacks:PackIconMaterial Kind="ChartAreaspline" />
</Button>
</StackPanel>
<Line X2="96" VerticalAlignment="Center" Stroke="{StaticResource MahApps.Brushes.Gray7}" 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="{StaticResource MahApps.Brushes.Accent}" />
<TextBlock Text="导出excel" VerticalAlignment="Bottom" Margin="4,0"/>
</StackPanel>
<Button Style="{StaticResource Styles.Button.Circle.Accent2}" Click="ButtonExcel_Click" IsEnabled="{Binding IsPackReady}">
<iconPacks:PackIconMaterial Kind="MicrosoftExcel" />
</Button>
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Vertical" Margin="10,30">
<Rectangle Height="1" Fill="{StaticResource MahApps.Brushes.Gray7}" Width="800"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="{StaticResource ControlMargin}">
<StackPanel Orientation="Vertical">
<Button Style="{StaticResource ButtonStyle_empty}" Click="ButtonSetup_Click">
<TextBlock Text="吹膜数据库浏览器" FontSize="25">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Accent}"/>
</Style>
</TextBlock.Style>
</TextBlock>
</Button>
</StackPanel>
<TextBlock Text="by flyautomation" VerticalAlignment="Bottom" Margin="{StaticResource ControlMargin}"/>
</StackPanel>
</StackPanel>
</Grid>
</Page>
\ No newline at end of file
using FLY.Blowing.DbViewer.Core;
using MahApps.Metro.Controls.Dialogs;
using Microsoft.Win32;
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;
using Unity;
namespace FLY.Blowing.DbViewer
{
/// <summary>
/// PageMain.xaml 的交互逻辑
/// </summary>
public partial class PageMain : Page
{
IUnityContainer container;
DbViewer.Core.DbViewerModel dbViewerModel;
public PageMain()
{
InitializeComponent();
}
[Unity.InjectionMethod]
public void Init(IUnityContainer container, DbViewer.Core.DbViewerModel dbViewerModel) {
this.container = container;
this.dbViewerModel = dbViewerModel;
this.DataContext = dbViewerModel;
}
private void ButtonSelect_Click(object sender, RoutedEventArgs e)
{
PageSelect p = new PageSelect();
container.BuildUp(p);
this.NavigationService.Navigate(p);
}
private void ButtonChart_Click(object sender, RoutedEventArgs e)
{
}
private async void ButtonExcel_Click(object sender, RoutedEventArgs e)
{
string strDesktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
string filename = $"吹膜记录_{DateTime.Now:yyyyMMddHHmmss}.xlsx";
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "xlsx files (*.xlsx)|*.xlsx";
sfd.InitialDirectory = strDesktopPath;
sfd.FileName = filename;
if (sfd.ShowDialog() == true)
{
ExcelOuput ouput = new ExcelOuput();
controller = await App.MetroWindow.ShowProgressAsync("请等待...", "开始导出",
settings: new MetroDialogSettings()
{
NegativeButtonText = "停止",
AnimateShow = false,
AnimateHide = false,
});
//controller.SetCancelable(true);
controller.SetIndeterminate();
ouput.PropertyChanged += Ouput_PropertyChanged;
await ouput.SaveToXlsx(sfd.FileName, dbViewerModel.Pack);
ouput.PropertyChanged -= Ouput_PropertyChanged;
await controller.CloseAsync();
controller = null;
await App.MetroWindow.ShowMessageAsync("输出成功",
sfd.FileName);
}
}
ProgressDialogController controller;
private void Ouput_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
var output = sender as ExcelOuput;
if ((e.PropertyName == nameof(ExcelOuput.Progress))||
(e.PropertyName == nameof(ExcelOuput.Msg)))
{
controller.SetProgress(output.Progress);
controller.SetMessage(output.Msg);
}
}
private void ButtonSetup_Click(object sender, RoutedEventArgs e)
{
PageSetup p = new PageSetup();
container.BuildUp(p);
this.NavigationService.Navigate(p);
}
}
}
<Page x:Class="FLY.Blowing.DbViewer.PageSelect"
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:local="clr-namespace:FLY.Blowing.DbViewer"
xmlns:conv="clr-namespace:FLY.ControlLibrary.Converter;assembly=FLY.ControlLibrary"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="PageSelect" >
<Page.Resources>
<Style TargetType="TextBlock" x:Key="Badge.Title">
<Setter Property="FontSize" Value="12"/>
<Setter Property="Margin" Value="2,0"/>
<Setter Property="Padding" Value="10,2"/>
<Setter Property="Background" Value="{StaticResource MahApps.Brushes.Badged.Background}"/>
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Badged.Foreground}"/>
</Style>
<local:PageSelectVmUt x:Key="viewModel"/>
</Page.Resources>
<Grid d:DataContext="{StaticResource viewModel}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" DataContext="{Binding DbHelper}">
<TextBlock Text="数据库" FontSize="24" Margin="{StaticResource ControlMargin}"/>
<TextBlock Text="{Binding ErrorMsg}" Margin="{StaticResource ControlMargin}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Accent}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsDbErr}" Value="true">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Control.Validation}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}" Visibility="{Binding IsAirRingExist,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="风环数据范围" Width="200"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
<Run Text="{Binding AirRingDbBeginTime,Mode=OneWay,StringFormat={}{0:yyyy-MM-dd}}"/> ~ <Run Text="{Binding AirRingDbEndTime,Mode=OneWay,StringFormat={}{0:yyyy-MM-dd}}"/>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}" Visibility="{Binding IsWeightExist,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="称重数据范围" Width="200"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
<Run Text="{Binding WeightDbBeginTime,Mode=OneWay,StringFormat={}{0:yyyy-MM-dd}}"/> ~ <Run Text="{Binding WeightDbEndTime,Mode=OneWay,StringFormat={}{0:yyyy-MM-dd}}"/>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}" Visibility="{Binding IsIbcExist,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="IBC数据范围" Width="200"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
<Run Text="{Binding IbcDbBeginTime,Mode=OneWay,StringFormat={}{0:yyyy-MM-dd}}"/> ~ <Run Text="{Binding IbcDbEndTime,Mode=OneWay,StringFormat={}{0:yyyy-MM-dd}}"/>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource ControlMargin}" Visibility="{Binding IsWinderExist,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="收卷数据范围" Width="200"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}">
<Run Text="{Binding WinderDbBeginTime,Mode=OneWay,StringFormat={}{0:yyyy-MM-dd}}"/> ~ <Run Text="{Binding WinderDbEndTime,Mode=OneWay,StringFormat={}{0:yyyy-MM-dd}}"/>
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="查找" FontSize="24"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<StackPanel>
<StackPanel Orientation="Horizontal">
<DatePicker Width="200"
Margin="{StaticResource ControlMargin}"
HorizontalAlignment="Center"
HorizontalContentAlignment="Stretch"
controls:TextBoxHelper.UseFloatingWatermark="True"
controls:TextBoxHelper.Watermark="开始日期"
controls:TextBoxHelper.WatermarkAlignment="Right"
SelectedDate="{Binding BeginDate}"/>
<DatePicker Width="200"
Margin="{StaticResource ControlMargin}"
HorizontalAlignment="Center"
HorizontalContentAlignment="Stretch"
controls:TextBoxHelper.UseFloatingWatermark="True"
controls:TextBoxHelper.Watermark="结束日期"
controls:TextBoxHelper.WatermarkAlignment="Right"
SelectedDate="{Binding EndDate}"/>
</StackPanel>
</StackPanel>
<Button Style="{StaticResource Styles.Button.Circle.Accent}" Margin="{StaticResource ControlMargin}" Grid.Column="1" VerticalAlignment="Bottom" Command="{Binding ButtonSearchCmd}">
<iconPacks:Material Kind="Magnify" />
</Button>
</StackPanel>
</Grid>
</StackPanel>
</StackPanel>
<Button VerticalAlignment="Top" HorizontalAlignment="Right" Style="{StaticResource Styles.Button.Circle.Accent}" Margin="{StaticResource ControlMargin}" Grid.Column="1" Click="ButtonBack_Click">
<iconPacks:PackIconMaterial Kind="ArrowLeft" />
</Button>
</Grid>
</Page>

using GalaSoft.MvvmLight.Command;
using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using FLY.Blowing.DbViewer.Core;
using System.Collections.Generic;
using System.Windows.Navigation;
namespace FLY.Blowing.DbViewer
{
/// <summary>
/// PageSelect.xaml 的交互逻辑
/// </summary>
public partial class PageSelect : Page
{
PageSelectVm viewModel;
DbViewerModel dBViewerModel;
public PageSelect()
{
InitializeComponent();
}
[Unity.InjectionMethod]
public void Init(DbViewerModel dBViewerModel)
{
this.dBViewerModel = dBViewerModel;
viewModel = new PageSelectVm();
viewModel.Init(dBViewerModel);
this.DataContext = viewModel;
viewModel.SearchSuccessEvent += ViewModel_SearchSuccessEvent;
}
private void ViewModel_SearchSuccessEvent(object sender, EventArgs e)
{
this.NavigationService.GoBack();
this.NavigationService.RemoveBackEntry();
}
private void ButtonBack_Click(object sender, RoutedEventArgs e)
{
this.NavigationService.GoBack();
this.NavigationService.RemoveBackEntry();
}
}
public class PageSelectVm : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public DateTime BeginDate { get; set; }
public DateTime EndDate { get; set; }
public RelayCommand ButtonSearchCmd { get; private set; }
public DbHelper DbHelper { get; private set; }
DbViewerModel dBViewerModel;
public event EventHandler SearchSuccessEvent;
public PageSelectVm()
{
ButtonSearchCmd = new RelayCommand(Search);
}
public void Init(DbViewerModel dBViewerModel) {
this.dBViewerModel = dBViewerModel;
DbHelper = dBViewerModel.mDbHelper;
BeginDate = DateTime.Now.AddDays(-1);
EndDate = DateTime.Now;
}
ProgressDialogController controller;
async void Search()
{
controller = await App.MetroWindow.ShowProgressAsync("请等待...", "开始搜索",
settings: new MetroDialogSettings()
{
NegativeButtonText = "停止",
AnimateShow = false,
AnimateHide = false,
});
//controller.SetCancelable(true);
controller.SetIndeterminate();
DbHelper.PropertyChanged += DbHelper_PropertyChanged;
await Task.Run(() =>
{
dBViewerModel.Pack = DbHelper.GetPack(BeginDate, EndDate);
});
DbHelper.PropertyChanged -= DbHelper_PropertyChanged;
await controller.CloseAsync();
controller = null;
List<string> msgs = dBViewerModel.Pack.GetMsgs();
dBViewerModel.Pack.GetDateRange(out DateTime beginTime, out DateTime endTime);
if (msgs.Count() == 0)
{
await App.MetroWindow.ShowMessageAsync("搜索失败", "不能获取任何数据");
dBViewerModel.IsPackReady = false;
}
else
{
dBViewerModel.IsPackReady = true;
dBViewerModel.PackBeginDate = beginTime;
dBViewerModel.PackEndDate = endTime;
dBViewerModel.PackMsgs.Clear();
string msg = "";
for (int i = 0; i < msgs.Count(); i++)
{
if (!string.IsNullOrEmpty(msg)) {
msg += "; ";
}
msg += msgs[i];
dBViewerModel.PackMsgs.Add(msgs[i]);
}
await App.MetroWindow.ShowMessageAsync("搜索成功", msg);
if (msgs.Count() > 0)
{
SearchSuccessEvent?.Invoke(this, null);
}
}
return;
}
private void DbHelper_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
var dbHelper = sender as DbHelper;
if (e.PropertyName == nameof(DbHelper.GetPackMsg)) {
controller.SetMessage(dbHelper.GetPackMsg);
}
}
}
public class PageSelectVmUt : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public DbHelper DbHelper { get; set; } = new DbHelper();
public PageSelectVmUt()
{
StartTime = DateTime.Now.AddDays(-1);
EndTime = DateTime.Now;
}
}
}
<Page x:Class="FLY.Blowing.DbViewer.PageSetup"
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:local="clr-namespace:FLY.Blowing.DbViewer"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:PageSetupVm}"
Title="PageSelect">
<Page.Resources>
<Style TargetType="TextBlock" x:Key="TextBlockStyle_FieldHeader">
<Setter Property="Margin" Value="3" />
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Gray1}" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="YouYuan" />
<Setter Property="TextAlignment" Value="Left" />
</Style>
<Style TargetType="Button">
<Setter Property="Margin" Value="20,5"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="50"/>
</Style>
<Style x:Key="TitleStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Gray1}"/>
<Setter Property="FontSize" Value="14"/>
</Style>
<Style x:Key="ValueStyle" TargetType="Control">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Text}"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="MinWidth" Value="60"/>
</Style>
<Style x:Key="UnitStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Gray2}"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
</Style>
</Page.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="配置" FontSize="32" Margin="{StaticResource ControlMargin}"/>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="数据库" FontSize="24" Margin="{StaticResource ControlMargin}"/>
<StackPanel Orientation="Horizontal">
<Button Width="140" Margin="{StaticResource ControlMargin}" Content="选择数据库文件夹"
Command="{Binding DbSelectCmd}"
Style="{StaticResource MahApps.Styles.Button.Square.Accent}" />
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Text="{Binding DbDirPath}" FontSize="15"/>
<TextBlock
DataContext="{Binding DbHelper}"
Text="{Binding ErrorMsg,Mode=OneWay}" >
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Green"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsDbErr}" Value="True">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Control.Validation}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</StackPanel>
<StackPanel DataContext="{Binding DbHelper}">
<TextBlock Margin="{StaticResource ControlMargin}">
风环数据库[<Run Text="{Binding IsAirRingExist,Mode=OneWay}"/>]
</TextBlock>
<TextBlock Margin="{StaticResource ControlMargin}">
称重数据库[<Run Text="{Binding IsWeightExist,Mode=OneWay}"/>]
</TextBlock>
<TextBlock Margin="{StaticResource ControlMargin}">
IBC数据库[<Run Text="{Binding IsIbcExist,Mode=OneWay}"/>]
</TextBlock>
<TextBlock Margin="{StaticResource ControlMargin}">
收卷数据库[<Run Text="{Binding IsWinderExist,Mode=OneWay}"/>]
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
<Button VerticalAlignment="Top" HorizontalAlignment="Right" Style="{StaticResource Styles.Button.Circle.Accent}" Margin="{StaticResource ControlMargin}" Grid.Column="1" Click="ButtonBack_Click">
<iconPacks:PackIconMaterial Kind="ArrowLeft" />
</Button>
</Grid>
</Page>
using FLY.Blowing.DbViewer.Core;
using GalaSoft.MvvmLight.Command;
using Microsoft.Win32;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
namespace FLY.Blowing.DbViewer
{
/// <summary>
/// PageSetup.xaml 的交互逻辑
/// </summary>
public partial class PageSetup : Page
{
PageSetupVm viewModel;
public PageSetup()
{
InitializeComponent();
}
[Unity.InjectionMethod]
public void Init(DbViewerModel dbViewerModel)
{
viewModel = new PageSetupVm();
viewModel.Init(dbViewerModel);
this.DataContext = viewModel;
}
private void ButtonBack_Click(object sender, RoutedEventArgs e)
{
this.NavigationService.GoBack();
this.NavigationService.RemoveBackEntry();
}
}
public class PageSetupVm : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public string DbDirPath { get; set; }
public RelayCommand DbSelectCmd { get; private set; }
public DbHelper DbHelper { get; } = new DbHelper();
DbViewerModel dbViewerModel;
public PageSetupVm()
{
DbSelectCmd = new RelayCommand(DbSelect);
}
public void Init(DbViewerModel dbViewerModel)
{
this.dbViewerModel = dbViewerModel;
DbDirPath = dbViewerModel.DbDirPath;
this.DbHelper.DbDirPath = DbDirPath;
this.DbHelper.Init();
}
void DbSelect()
{
System.Windows.Forms.FolderBrowserDialog open = new System.Windows.Forms.FolderBrowserDialog();
open.SelectedPath = DbDirPath;
if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
DbDirPath = open.SelectedPath;
DbHelper.DbDirPath = DbDirPath;
if (DbHelper.Init())
{
dbViewerModel.DbDirPath = DbDirPath;
dbViewerModel.Save();
dbViewerModel.mDbHelper.DbDirPath = DbDirPath;
dbViewerModel.mDbHelper.Init();
}
}
}
}
}
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("吹膜数据库浏览器")]
[assembly: AssemblyDescription("吹膜数据库浏览器")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("佛山市枫莱尔自动化技术有限公司")]
[assembly: AssemblyProduct("吹膜数据库浏览器")]
[assembly: AssemblyCopyright("Copyright © 2021 FlyAutomation")]
[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("6.0.0.0")]
[assembly: AssemblyFileVersion("6.0.0.0")]
[assembly: Guid("5FE5D848-CD2B-42CC-8EBD-2029371CDFE2")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace FLY.Blowing.DbViewer.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.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 (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FLY.Blowing.DbViewer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 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>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace FLY.Blowing.DbViewer.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.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
<UserControl x:Class="FLY.Thick.Normal.UI.DBViewer.ScanGraph"
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:local="clr-namespace:FLY.Thick.Normal.UI.DBViewer"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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 FLY.Thick.Normal.UI.DBViewer
{
/// <summary>
/// ScanGraph.xaml 的交互逻辑
/// </summary>
public partial class ScanGraph : UserControl
{
public ScanGraph()
{
InitializeComponent();
}
}
}
<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="{StaticResource MahApps.Colors.Gray8}" />
<SolidColorBrush x:Key="TabItemBackgroundIsSelectedBrush" Color="{StaticResource MahApps.Colors.Gray2}" />
<SolidColorBrush x:Key="TabItemBackgroundIsMouseOverBrush" Color="{StaticResource MahApps.Colors.Gray5}" />
<SolidColorBrush x:Key="TabItemForegroundIsSelectedBrush" Color="{StaticResource MahApps.Colors.IdealForeground}" />
<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
<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 x:Key="Styles.Button.Circle.Accent"
BasedOn="{StaticResource MahApps.Styles.Button.Circle}"
TargetType="{x:Type ButtonBase}">
<Setter Property="Width" Value="48"/>
<Setter Property="Height" Value="48"/>
<Setter Property="Margin" Value="4"/>
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Accent}" />
<Setter Property="Background" Value="{StaticResource MahApps.Brushes.ThemeBackground}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource MahApps.Brushes.Accent}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource MahApps.Brushes.Gray7}" />
</Trigger>
</Style.Triggers>
<Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources>
</Style>
<Style x:Key="Styles.Button.Circle.Accent2"
BasedOn="{StaticResource Styles.Button.Circle.Accent}"
TargetType="{x:Type ButtonBase}">
<Setter Property="Width" Value="96"/>
<Setter Property="Height" Value="96"/>
<Setter Property="Margin" Value="4"/>
<Style.Resources>
<Style TargetType="iconPacks:PackIconMaterial" >
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Style.Resources>
</Style>
</ResourceDictionary>
\ No newline at end of file
using FLY.Blowing.DbViewer.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Unity;
namespace FLY.Blowing.DbViewer
{
public class UnityExt
{
public static UnityContainer Container;
static UnityExt()
{
Init();
}
static void Init()
{
Container = new UnityContainer();
Container.RegisterFactory<DbViewerModel>((unity) =>
{
var dbViewer = new DbViewerModel();
dbViewer.Init();
return dbViewer;
}, new Unity.Lifetime.ContainerControlledLifetimeManager());
}
}
}
<controls:MetroWindow x:Class="FLY.Blowing.DbViewer.WindowMain"
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.Templates.WindowButtonCommands.Win10}" />
</controls:MetroWindow.WindowButtonCommands>
<controls:MetroWindow.IconTemplate>
<DataTemplate>
<iconPacks:PackIconMaterial Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Margin="2"
Padding="4"
Foreground="{StaticResource MahApps.Brushes.IdealForeground}"
Kind="Database" />
</DataTemplate>
</controls:MetroWindow.IconTemplate>
<Frame NavigationUIVisibility="Hidden" x:Name="frame"/>
</controls:MetroWindow>
\ No newline at end of file
using MahApps.Metro.Controls;
using Misc;
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.Shapes;
using Unity;
namespace FLY.Blowing.DbViewer
{
/// <summary>
/// WindowMain.xaml 的交互逻辑
/// </summary>
public partial class WindowMain : MetroWindow
{
public WindowMain()
{
InitializeComponent();
App.MetroWindow = this;
var container = App.Current.Properties[nameof(IUnityContainer)] as IUnityContainer;
var p = new PageMain();
container.BuildUp(p);
this.frame.Content = p;
Ver ver = new Ver() { SrcType = this.GetType() };
this.Title = ver.ToString();
}
private void ButtonGitLabClick(object sender, RoutedEventArgs e)
{
//System.Diagnostics.Process.Start("http://private.flyautomation.net:82/panruising/batterydb.browser");
}
}
}
......@@ -113,6 +113,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FObjBase.Reflect", "thick_p
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApp1", "WpfApp1\WpfApp1.csproj", "{02E0A9B3-3C04-4846-8A7F-AF8B1550BC73}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.Blowing.DbViewer", "Project.FLY.Blowing.DbViewer\FLY.Blowing.DbViewer\FLY.Blowing.DbViewer.csproj", "{C417AD1B-052E-473A-892D-BFB99938598B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -646,6 +648,18 @@ Global
{02E0A9B3-3C04-4846-8A7F-AF8B1550BC73}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{02E0A9B3-3C04-4846-8A7F-AF8B1550BC73}.Release|x86.ActiveCfg = Release|Any CPU
{02E0A9B3-3C04-4846-8A7F-AF8B1550BC73}.Release|x86.Build.0 = Release|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Debug|x86.ActiveCfg = Debug|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Debug|x86.Build.0 = Debug|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Release|Any CPU.Build.0 = Release|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Release|x86.ActiveCfg = Release|Any CPU
{C417AD1B-052E-473A-892D-BFB99938598B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
Subproject commit 04761ec33d2c7b148cc7ec58a4183d29583144a0
Subproject commit 8957f54bb1bf04be95af6d047cc4d08ed142639c
......@@ -50,7 +50,11 @@ copy_to2()
copy_to $src_dir $dest_dir $files
#第2步,复制 release_conf 对应的出厂默认配置文件
src_dir="release_conf/"$2"/*"
src_dir="release_conf/"$2
if [ ! -d $src_dir ]; then
return
fi
src_dir=$src_dir"/*"
cp -Rf $src_dir $dest_dir
}
......@@ -157,4 +161,13 @@ files=(\
"nlog.config" \
)
copy_to2 $src_dir $dest_dir $files
src_dir="../Project.FLY.Blowing.DbViewer/FLY.Blowing.DbViewer"
dest_dir="FLY.Blowing.DbViewer"
files=(\
"x64" "x86" \
"FLY.Blowing.DbViewer.exe" \
)
copy_to2 $src_dir $dest_dir $files
echo 完成
\ No newline at end of file
......@@ -77,6 +77,13 @@
"IsAutoRun":true,
"Others":null
},
{
"PackPath":"佛山市枫莱尔自动化技术有限公司\\windows\\FLY.Blowing.DbViewer",
"Exe":"FLY.Blowing.DbViewer.exe",
"Name":"吹膜数据库浏览器",
"IsAutoRun":false,
"Others":null
}
{
"PackPath":"佛山市枫莱尔自动化技术有限公司\\windows\\LP3",
"Exe":"FLY.LinkProxy.UI.exe",
......
和美安装包_v6.22.0 -20210403
1. 添加 吹膜数据库浏览器
和美安装包_v6.21.13 -20210330
1. 修复 AD盒与电脑时间不同步
......
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