Commit b52ba8df by 陶然

init

parent 5fc00b5c
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<!--<add name="Database" providerName="Sqlite" connectionString="$ROOT\AppData\primary.sqlite"/>-->
</connectionStrings>
</configuration>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Kivii.Client.Invoices.Etax
{
internal class Configs
{
public const string TableUiSetting = "ui_settings";
}
}
namespace Kivii.Client.Invoices.Etax
{
partial class FrmMain
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.plConfigs = new System.Windows.Forms.Panel();
this.rtbMessage = new System.Windows.Forms.RichTextBox();
this.lblUrl = new System.Windows.Forms.Label();
this.lblUser = new System.Windows.Forms.Label();
this.lblPassword = new System.Windows.Forms.Label();
this.tbxPassword = new System.Windows.Forms.TextBox();
this.tbxServiceUrl = new System.Windows.Forms.TextBox();
this.tbxUserName = new System.Windows.Forms.TextBox();
this.btnSelectFileFolder = new System.Windows.Forms.Button();
this.tbFilePath = new System.Windows.Forms.TextBox();
this.lblInsert = new System.Windows.Forms.Label();
this.btnLogout = new System.Windows.Forms.Button();
this.btnLogin = new System.Windows.Forms.Button();
this.plConfigs.SuspendLayout();
this.SuspendLayout();
//
// plConfigs
//
this.plConfigs.Controls.Add(this.btnLogout);
this.plConfigs.Controls.Add(this.btnLogin);
this.plConfigs.Controls.Add(this.btnSelectFileFolder);
this.plConfigs.Controls.Add(this.tbFilePath);
this.plConfigs.Controls.Add(this.lblInsert);
this.plConfigs.Controls.Add(this.lblUrl);
this.plConfigs.Controls.Add(this.lblUser);
this.plConfigs.Controls.Add(this.lblPassword);
this.plConfigs.Controls.Add(this.tbxPassword);
this.plConfigs.Controls.Add(this.tbxServiceUrl);
this.plConfigs.Controls.Add(this.tbxUserName);
this.plConfigs.Dock = System.Windows.Forms.DockStyle.Top;
this.plConfigs.Location = new System.Drawing.Point(0, 0);
this.plConfigs.Name = "plConfigs";
this.plConfigs.Size = new System.Drawing.Size(588, 147);
this.plConfigs.TabIndex = 0;
//
// rtbMessage
//
this.rtbMessage.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbMessage.Location = new System.Drawing.Point(0, 147);
this.rtbMessage.Name = "rtbMessage";
this.rtbMessage.Size = new System.Drawing.Size(588, 697);
this.rtbMessage.TabIndex = 1;
this.rtbMessage.Text = "";
//
// lblUrl
//
this.lblUrl.AutoSize = true;
this.lblUrl.Location = new System.Drawing.Point(13, 16);
this.lblUrl.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblUrl.Name = "lblUrl";
this.lblUrl.Size = new System.Drawing.Size(71, 18);
this.lblUrl.TabIndex = 13;
this.lblUrl.Text = "服务器:";
//
// lblUser
//
this.lblUser.AutoSize = true;
this.lblUser.Location = new System.Drawing.Point(13, 58);
this.lblUser.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblUser.Name = "lblUser";
this.lblUser.Size = new System.Drawing.Size(71, 18);
this.lblUser.TabIndex = 14;
this.lblUser.Text = "用户名:";
//
// lblPassword
//
this.lblPassword.AutoSize = true;
this.lblPassword.Location = new System.Drawing.Point(215, 58);
this.lblPassword.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPassword.Name = "lblPassword";
this.lblPassword.Size = new System.Drawing.Size(71, 18);
this.lblPassword.TabIndex = 15;
this.lblPassword.Text = "密 码:";
//
// tbxPassword
//
this.tbxPassword.Location = new System.Drawing.Point(294, 55);
this.tbxPassword.Margin = new System.Windows.Forms.Padding(4);
this.tbxPassword.Name = "tbxPassword";
this.tbxPassword.PasswordChar = '*';
this.tbxPassword.Size = new System.Drawing.Size(164, 28);
this.tbxPassword.TabIndex = 18;
//
// tbxServiceUrl
//
this.tbxServiceUrl.BackColor = System.Drawing.SystemColors.Window;
this.tbxServiceUrl.Location = new System.Drawing.Point(103, 13);
this.tbxServiceUrl.Margin = new System.Windows.Forms.Padding(4);
this.tbxServiceUrl.Name = "tbxServiceUrl";
this.tbxServiceUrl.Size = new System.Drawing.Size(355, 28);
this.tbxServiceUrl.TabIndex = 16;
//
// tbxUserName
//
this.tbxUserName.Location = new System.Drawing.Point(103, 55);
this.tbxUserName.Margin = new System.Windows.Forms.Padding(4);
this.tbxUserName.Name = "tbxUserName";
this.tbxUserName.Size = new System.Drawing.Size(104, 28);
this.tbxUserName.TabIndex = 17;
//
// btnSelectFileFolder
//
this.btnSelectFileFolder.Location = new System.Drawing.Point(398, 90);
this.btnSelectFileFolder.Margin = new System.Windows.Forms.Padding(4);
this.btnSelectFileFolder.Name = "btnSelectFileFolder";
this.btnSelectFileFolder.Size = new System.Drawing.Size(60, 32);
this.btnSelectFileFolder.TabIndex = 25;
this.btnSelectFileFolder.Text = "...";
this.btnSelectFileFolder.UseVisualStyleBackColor = true;
this.btnSelectFileFolder.Click += new System.EventHandler(this.btnSelectFileFolder_Click);
//
// tbFilePath
//
this.tbFilePath.Location = new System.Drawing.Point(103, 94);
this.tbFilePath.Margin = new System.Windows.Forms.Padding(4);
this.tbFilePath.Name = "tbFilePath";
this.tbFilePath.ReadOnly = true;
this.tbFilePath.Size = new System.Drawing.Size(287, 28);
this.tbFilePath.TabIndex = 24;
//
// lblInsert
//
this.lblInsert.AutoSize = true;
this.lblInsert.Location = new System.Drawing.Point(13, 97);
this.lblInsert.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblInsert.Name = "lblInsert";
this.lblInsert.Size = new System.Drawing.Size(89, 18);
this.lblInsert.TabIndex = 23;
this.lblInsert.Text = "读取路径:";
//
// btnLogout
//
this.btnLogout.Enabled = false;
this.btnLogout.Location = new System.Drawing.Point(466, 89);
this.btnLogout.Margin = new System.Windows.Forms.Padding(4);
this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(112, 34);
this.btnLogout.TabIndex = 27;
this.btnLogout.Text = "退出";
this.btnLogout.UseVisualStyleBackColor = true;
this.btnLogout.Click += new System.EventHandler(this.btnLogout_Click);
//
// btnLogin
//
this.btnLogin.Location = new System.Drawing.Point(466, 13);
this.btnLogin.Margin = new System.Windows.Forms.Padding(4);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(112, 70);
this.btnLogin.TabIndex = 26;
this.btnLogin.Text = "登录";
this.btnLogin.UseVisualStyleBackColor = true;
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(588, 844);
this.Controls.Add(this.rtbMessage);
this.Controls.Add(this.plConfigs);
this.MinimumSize = new System.Drawing.Size(610, 900);
this.Name = "FrmMain";
this.Text = "数电票PDF、OFD文件上传客户端V4.0";
this.Load += new System.EventHandler(this.FrmMain_Load);
this.plConfigs.ResumeLayout(false);
this.plConfigs.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel plConfigs;
private System.Windows.Forms.RichTextBox rtbMessage;
private System.Windows.Forms.Button btnSelectFileFolder;
private System.Windows.Forms.TextBox tbFilePath;
private System.Windows.Forms.Label lblInsert;
private System.Windows.Forms.Label lblUrl;
private System.Windows.Forms.Label lblUser;
private System.Windows.Forms.Label lblPassword;
private System.Windows.Forms.TextBox tbxPassword;
private System.Windows.Forms.TextBox tbxServiceUrl;
private System.Windows.Forms.TextBox tbxUserName;
private System.Windows.Forms.Button btnLogout;
private System.Windows.Forms.Button btnLogin;
}
}
using Kivii.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Kivii.Client.Invoices.Etax
{
public partial class FrmMain : Form
{
private JsonServiceClient _client = null;
public FrmMain()
{
InitializeComponent();
}
#region 界面控件默认值管理
private void loadDefault(params Control[] ctls)
{
using (var conn = KiviiContext.GetOpenedDbConnection<UiSetting>())
{
foreach (var ctl in ctls)
{
var setting = conn.Select<UiSetting>(o => o.FormName == this.Name && o.ControlName == ctl.Name).FirstOrDefault();
if (setting == null) continue;
ctl.Text = setting.ControlValue;
}
}
}
private void setDefault(params Control[] ctls)
{
using (var conn = KiviiContext.GetOpenedDbConnection<UiSetting>())
{
foreach (var ctl in ctls)
{
var setting = conn.Select<UiSetting>(o => o.FormName == this.Name && o.ControlName == ctl.Name).FirstOrDefault();
if (setting == null)
{
setting = new UiSetting();
setting.FormName = this.Name;
setting.ControlName = ctl.Name;
setting.ControlValue = ctl.Text;
conn.Insert(setting);
}
else
{
setting.ControlValue = ctl.Text;
conn.Update(setting);
}
}
}
}
/// <summary>
/// 输出消息
/// </summary>
/// <param name="message">消息内容</param>
/// <param name="clearMessage">是否清除消息</param>
private void outputMessage(string message, bool clearMessage = false)
{
if (this.InvokeRequired)
{
this.Invoke(new Action(() => outputMessage(message, clearMessage)));
return;
}
if (clearMessage) rtbMessage.Clear();
if (rtbMessage.Lines.Count() > 500) rtbMessage.Clear();
var time = DateTime.Now.ToString("HH:mm:ss");
rtbMessage.AppendText($"[{time}]{message}{Environment.NewLine}");
rtbMessage.ScrollToCaret();
}
#endregion
private void FrmMain_Load(object sender, EventArgs e)
{
loadDefault(tbxServiceUrl, tbxUserName, tbxPassword, tbFilePath);
}
private void btnLogin_Click(object sender, EventArgs e)
{
if (_client != null)
{
MessageBox.Show("登陆前先退出原连接");
return;
}
if (tbFilePath.Text.IsNullOrEmpty())
{
MessageBox.Show("请先设置读取路径!");
return;
}
btnLogin.Enabled = false;
_client = new JsonServiceClient(tbxServiceUrl.Text);
var auth = new Authenticate { UserName = tbxUserName.Text, Password = tbxPassword.Text, provider = "Kivii" };
var task = _client.PostAsync(auth);
task.Success(resp =>
{
btnLogin.Enabled = resp.Kvid == Guid.Empty ? true : false;
btnLogout.Enabled = !btnLogin.Enabled;
tbxServiceUrl.Enabled = btnLogin.Enabled;
tbxUserName.Enabled = btnLogin.Enabled;
tbxPassword.Enabled = btnLogin.Enabled;
btnSelectFileFolder.Enabled = btnLogin.Enabled;
setDefault(tbxServiceUrl, tbxUserName, tbxPassword,tbFilePath);
outputMessage($"登录成功:{resp.FullName}");
}, true);
task.Error(err =>
{
btnLogin.Enabled = true;
btnLogout.Enabled = !btnLogin.Enabled;
tbxServiceUrl.Enabled = btnLogin.Enabled;
tbxUserName.Enabled = btnLogin.Enabled;
tbxPassword.Enabled = btnLogin.Enabled;
btnSelectFileFolder.Enabled = btnLogin.Enabled;
_client.Dispose();
_client = null;
MessageBox.Show(err.Message, "Login Error");
}, true);
}
private void btnLogout_Click(object sender, EventArgs e)
{
if (_client == null)
{
MessageBox.Show("未连接");
return;
}
btnLogout.Enabled = false;
var auth = new Authenticate { provider = "Logout" };
var task = _client.PostAsync(auth);
task.Success(resp =>
{
btnLogin.Enabled = resp != null;
btnLogout.Enabled = !btnLogin.Enabled;
tbxServiceUrl.Enabled = btnLogin.Enabled;
tbxUserName.Enabled = btnLogin.Enabled;
tbxPassword.Enabled = btnLogin.Enabled;
btnSelectFileFolder.Enabled = btnLogin.Enabled;
outputMessage($"退出成功");
_client.Dispose();
_client = null;
});
task.Error(err =>
{
btnLogout.Enabled = true;
MessageBox.Show(err.Message, "Logout Error");
});
}
private void btnSelectFileFolder_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() != DialogResult.OK) return;
tbFilePath.Text = fbd.SelectedPath;
setDefault(tbFilePath);
}
}
}
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
<?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>{26FE1EFF-51CC-4CE2-B997-73D10DA5836F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Kivii.Client.Invoices.Etax</RootNamespace>
<AssemblyName>Kivii.Client.Invoices.Etax.V4.0</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<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="Kivii.Common.V4.0, Version=5.6.2024.1160, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Kivii.Common.5.6.2024.1160\lib\net40\Kivii.Common.V4.0.dll</HintPath>
</Reference>
<Reference Include="Kivii.Core.V4.0, Version=5.6.2023.9000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Kivii.Core.5.6.2023.9000\lib\net40\Kivii.Core.V4.0.dll</HintPath>
</Reference>
<Reference Include="Kivii.Linq.Sqlite.V4.0, Version=5.6.2023.3000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Kivii.Linq.Sqlite.5.6.2023.3000\lib\net40\Kivii.Linq.Sqlite.V4.0.dll</HintPath>
</Reference>
<Reference Include="Kivii.Linq.V4.0, Version=5.6.2024.2000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Kivii.Linq.5.6.2024.2000\lib\net40\Kivii.Linq.V4.0.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configs.cs" />
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UiSetting.cs" />
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="App.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Kivii.Client.Invoices.Etax
{
internal static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Kivii.Client.Invoices.Etax")]
[assembly: AssemblyDescription("国家税务总局数电票PDF、OFD文件上传客户端")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Kivii.Client.Invoices.Etax")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("26fe1eff-51cc-4ce2-b997-73d10da5836f")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.2.2024.4040")]
[assembly: AssemblyFileVersion("5.2.2024.4040")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Kivii.Client.Invoices.Etax.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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("Kivii.Client.Invoices.Etax.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>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Kivii.Client.Invoices.Etax.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.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="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
using Kivii.Configuration;
using Kivii.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Kivii.Client.Invoices.Etax
{
[Alias(Configs.TableUiSetting)]
public class UiSetting : Entity
{
[Required]
[Unique("Form-Control")]
public string FormName { get; set; }
[Required]
[Unique("Form-Control")]
public string ControlName { get; set; }
[Default("")]
public string ControlValue { get; set; }
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Kivii.Common" version="5.6.2024.1160" targetFramework="net40" />
<package id="Kivii.Core" version="5.6.2023.9000" targetFramework="net40" />
<package id="Kivii.Linq" version="5.6.2024.2000" targetFramework="net40" />
<package id="Kivii.Linq.Sqlite" version="5.6.2023.3000" targetFramework="net40" />
</packages>
\ 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