Commit 2e2d63d8 顾剑亮

upload

0 个父辈
正在显示 1000 个修改的文件 包含 4805 行增加0 行删除

要显示的修改太多。

为保证性能只显示 1000 of 1000+ 个文件。

此文件类型无法预览
{
"CurrentProjectSetting": null
}
\ No newline at end of file
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
\ No newline at end of file
此文件类型无法预览
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!--
<PackageSource Include="https://www.nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
</PropertyGroup>
<PropertyGroup>
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
</PropertyGroup>
<PropertyGroup>
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
</PropertyGroup>
<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExePath)"</NuGetCommand>
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>
<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>
<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />
<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);
Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
</Project>
\.git
\ No newline at end of file
namespace AGaugeApp
{
partial class AGauge
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FB89F830-9695-466E-B495-6D7E1E3AD198}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AGaugeApp</RootNamespace>
<AssemblyName>AGaugeApp</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<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="AGauge.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="AGauge.Designer.cs">
<DependentUpon>AGauge.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<SubType>Designer</SubType>
<DependentUpon>Form1.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="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>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace AGaugeApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void aGauge1_ValueInRangeChanged(object sender, AGauge.ValueInRangeChangedEventArgs e)
{
if (e.valueInRange == 0)
{
pictureBox1.BackColor = Color.Green;
}
else
{
pictureBox1.BackColor = Color.Red;
}
}
private void aGauge2_ValueInRangeChanged(object sender, AGauge.ValueInRangeChangedEventArgs e)
{
if (e.valueInRange == 1)
{
label1.Text="WARNING!--OBJECTS IN MIRROR MAY APPEAR SLOWER THAN THEY USED TO.";
}
else if (e.valueInRange==2)
{
label1.Text="IF THIS GAUGE DISPLAYS YOUR CURRENT SPEED AND YOU STILL CAN SEE THIS THEN SOMTHING IS WRONG ;-)";
}
else
{
label1.Text = "";
}
}
private void trackBar1_ValueChanged(object sender, EventArgs e)
{
aGauge1.Value = trackBar1.Value;
aGauge2.Value = trackBar1.Value;
textBox1.Text = aGauge1.Value.ToString();
}
private void timer1_Tick(object sender, EventArgs e)
{
aGauge3.Value+=0.5f;
aGauge4.Value += 10;
if (aGauge3.Value >= 50)
{
aGauge3.Value = 0;
}
if (aGauge4.Value >= 300)
{
aGauge4.Value = -300;
}
aGauge5.Value = aGauge3.Value;
aGauge6.Value = (Single)(((Int32)aGauge6.Value + 49) % 50);
aGauge7.Value = (Single)(((Int32)aGauge7.Value + 49) % 50);
aGauge8.Value = (Single)(((Int32)aGauge8.Value + 51) % 50);
aGauge11.Value = (Single)(((Int32)aGauge11.Value + 9) % 10);
aGauge9.Value = (Single)(((Int32)aGauge9.Value + 99) % 100);
aGauge10.Value = (Single)(((Int32)aGauge10.Value + 99) % 100);
aGauge12.Value = (Single)(((Int32)aGauge12.Value + 99) % 100);
}
private void button1_Click(object sender, EventArgs e)
{
if (aGauge1.NeedleType == 0)
{
aGauge1.NeedleType = 1;
}
else
{
aGauge1.NeedleType = 0;
}
if (aGauge2.NeedleType == 0)
{
aGauge2.NeedleType = 1;
}
else
{
aGauge2.NeedleType = 0;
}
if (aGauge3.NeedleType == 0)
{
aGauge3.NeedleType = 1;
}
else
{
aGauge3.NeedleType = 0;
}
if (aGauge4.NeedleType == 0)
{
aGauge4.NeedleType = 1;
}
else
{
aGauge4.NeedleType = 0;
}
if (aGauge5.NeedleType == 0)
{
aGauge5.NeedleType = 1;
}
else
{
aGauge5.NeedleType = 0;
}
}
}
}
\ No newline at end of file
<?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=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>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="process1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>260, 17</value>
</metadata>
</root>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace AGaugeApp
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
}
}
}
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AGaugeApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AGaugeApp")]
[assembly: AssemblyCopyright("Copyright © A.J.Bauer 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("568d124d-f44d-4510-be07-b675e5ef0440")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.*")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AGaugeApp.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AGaugeApp.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 AGaugeApp.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
此文件类型无法预览
//----------------------------------------------------------------
//
// 概述: 本文件作用是提供在整个应用程序域中提供全局变量
// 修改:替换过时方法ConfigurationSettings.GetConfig(CurrentLoginName)
// 为 (IDictionary)ConfigurationManager.GetSection(CurrentLoginName) by 倪豪 2007-08-27
// ----------------------------------------------------------------
using System;
using System.Configuration;
using System.Collections;
namespace App
{
/// <summary>
/// AppGlobal 的摘要说明。
/// </summary>
public class AppGlobal
{
public static System.Collections.Hashtable UserConfig = new Hashtable();
//添加用户属性名
//每个属性的名字必须添加在此,可以避免属性名字重复
//例:public const 属性名="属性名";
public const string DateTime = "DateTime";//时间:在每次登录时会被更新本地Config文件的时间属性
public const string Project = "Project";//项目:记录登录选择的项目
public const string Language = "Language";//语言:登陆语言
public const string BaseLine = "BaseLine";//基线
public AppGlobal()
{
}
//public bool SetUserAttribute(string AttributeName, object AttributeValue)
//{
// GlobalConfig globalconfig = new GlobalConfig();
// string CurrentLoginName = Fuction.m_UserLogin;
// string NewValue = AttributeValue.ToString();
// if (globalconfig.ModifyUseConfig(CurrentLoginName, AttributeName, NewValue))
// {
// if (AppGlobal.UserConfig == null)
// {
// AppGlobal.UserConfig.Add(AttributeName, NewValue);
// }
// else
// {
// foreach (string f_useKey in AppGlobal.UserConfig.Keys)
// {
// if (f_useKey == AttributeName)
// {
// AppGlobal.UserConfig.Remove(f_useKey);
// AppGlobal.UserConfig.Add(AttributeName, NewValue);
// return true;
// }
// }
// AppGlobal.UserConfig.Add(AttributeName, NewValue);
// }
// return true;
// }
// else
// {
// return false;
// }
//}
///// <summary>
///// 获取用户属性
///// </summary>
///// <param name="AttributeName"></param>
///// <returns></returns>
//public string GetUserAttribute(string AttributeName)
//{
// if (AppGlobal.UserConfig != null)
// {
// foreach (string f_useKey in AppGlobal.UserConfig.Keys)
// {
// if (f_useKey == AttributeName)
// {
// return AppGlobal.UserConfig[f_useKey].ToString();
// }
// }
// }
// string CurrentLoginName = Fuction.m_UserLogin;
// try
// {
// //IDictionary UseConfigTable = (IDictionary)ConfigurationSettings.GetConfig(CurrentLoginName);
// IDictionary UseConfigTable = (IDictionary)ConfigurationManager.GetSection(CurrentLoginName);
// string UseConfigAttribute = "";
// if (UseConfigTable[AttributeName] != null)
// {
// UseConfigAttribute = (string)UseConfigTable[AttributeName];
// }
// return UseConfigAttribute;
// }
// catch
// {
// return "";
// }
//}
///// <summary>
///// 设置当前用户
///// </summary>
///// <param name="UserName">用户名</param>
///// <returns>是否成功</returns>
//public bool SetUser(string UserName)
//{
// GlobalConfig globalconfig = new GlobalConfig();
// if (globalconfig.CreateUseConfig(UserName))
// {
// return true;
// }
// else
// {
// return false;
// }
//}
}
}
using System;
using System.Reflection;
using System.Diagnostics;
using System.Windows.Forms;
using System.IO;
using BizFacade;
namespace App
{
/// <summary>
/// CheckVersion 的摘要说明。
/// </summary>
public class CheckVersion
{
private string _LocalMainVersion;
private string _LocalMainPublicKey;
private string _LocalMainCulture;
private string _RemoteMainVersion;
private string _RemoteMainPublicKey;
private string _RemoteMainCulture;
private string _UpdateFileUrl;
private string _CheckVersionExeLocalPath;
private bool _CanEscaladeClient = true;
private bool _SkipCheck = false;
/// <summary>
/// CheckVersion初始化函数
/// </summary>
public CheckVersion()
{
CheckUpdateSwitch();
Initialize();
}
/// <summary>
/// 开始版本比对入口函数
/// </summary>
public void StartCheck()
{
// GetUpdateFileUrl();
GetRemotingMainVersion();
}
/// <summary>
/// 获取运行时程序自身的版本,地区,公钥标识.
/// </summary>
private void Initialize()
{
try
{
Assembly Asm = Assembly.LoadFrom("App.exe");
AssemblyName AsmName = Asm.GetName();
this._LocalMainVersion = AsmName.Version.ToString();
this._LocalMainCulture = AsmName.CultureInfo.ToString();
this._LocalMainPublicKey = Convert.ToString(AsmName.GetPublicKeyToken());
}
catch
{
throw new Exception();
}
}
/// <summary>
/// 获取远端Buggit Client 版本
/// </summary>
/// <returns>版本</returns>
public string GetRemotingMainVersion()
{
try
{
UpdateSystem upws = new UpdateSystem();
this._RemoteMainVersion = upws.GetClientVersion();
}
catch (Exception e)
{
throw new Exception("无法连接到升级服务器!\n(" + e.Message + ")\n");
}
return this._RemoteMainVersion;
}
/// <summary>
/// 对本地和远端版本进行比较
/// </summary>
/// <returns>版本是否相符 0 为相符,1 为更新,2 为更旧</returns>
public int CompareVersion()
{
string f_LocalVersion = this._LocalMainVersion;
string f_RemoteVersion = this._RemoteMainVersion;
int f_LocalNum;
int f_RemoteNum;
if (f_LocalVersion == f_RemoteVersion)
{
return 0;
}
int i;
for (i = 0; i < 4; i++)
{
if (f_LocalVersion.LastIndexOf(@".") > 0)
{
f_LocalNum = int.Parse(f_LocalVersion.Substring(0, f_LocalVersion.IndexOf(@".")));
f_RemoteNum = int.Parse(f_RemoteVersion.Substring(0, f_RemoteVersion.IndexOf(@".")));
}
else
{
f_LocalNum = int.Parse(f_LocalVersion);
f_RemoteNum = int.Parse(f_RemoteVersion);
}
if (f_LocalNum != f_RemoteNum)
{
if (f_LocalNum < f_RemoteNum)
{
return 1;
}
else
{
return 2;
}
}
f_LocalVersion = f_LocalVersion.Substring(f_LocalVersion.IndexOf(@".") + 1);
f_RemoteVersion = f_RemoteVersion.Substring(f_RemoteVersion.IndexOf(@".") + 1);
}
return 0;
}
/// <summary>
/// 调用CheckVersion.exe
/// </summary>
public void CallUpdateFile()
{
string ErrorMsg = "";
try
{
string strTemp = Application.ExecutablePath;
strTemp = strTemp.Substring(0, strTemp.LastIndexOf("\\") + 1);
this._CheckVersionExeLocalPath = strTemp;
FileInfo fileinfo = new FileInfo(this._CheckVersionExeLocalPath + @"\LiveUpdate.exe");
if (!fileinfo.Exists)
{
ErrorMsg = "在当前目录找不到LiveUpdate.exe升级程序!\n";
}
Process myProcess = new Process();
myProcess.StartInfo.FileName = this._CheckVersionExeLocalPath + @"\LiveUpdate.exe";
// 传入"-S"的参数表示启动LiveUpdate.exe后,可自动开始升级过程
myProcess.StartInfo.Arguments = "-S";
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
myProcess.Start();
}
catch (Exception e)
{
throw new Exception(ErrorMsg + e.Message);
}
}
private void CheckUpdateSwitch()
{
string f_UpdateSwitch = "";
try
{
UpdateSystem upws = new UpdateSystem();
f_UpdateSwitch = upws.GetUpdateSwitch();
}
catch
{
f_UpdateSwitch = "";
}
if (f_UpdateSwitch == "True")
{
this._SkipCheck = true;
}
else
{
this._SkipCheck = false;
}
}
/// <summary>
/// 当前程序主版本
/// </summary>
public string LocalMainVersion
{
get
{
return _LocalMainVersion;
}
set
{
_LocalMainVersion = value;
}
}
/// <summary>
/// 当前程序公钥标识
/// </summary>
public string LocalMainPublicKey
{
get
{
return _LocalMainPublicKey;
}
set
{
_LocalMainPublicKey = value;
}
}
/// <summary>
/// 当前程序地区标识
/// </summary>
public string LocalMainCulture
{
get
{
return _LocalMainCulture;
}
set
{
_LocalMainCulture = value;
}
}
/// <summary>
/// 远端程序主版本
/// </summary>
public string RemoteMainVersion
{
get
{
return _RemoteMainVersion;
}
set
{
_RemoteMainVersion = value;
}
}
/// <summary>
/// 远端主程序公钥标识
/// </summary>
public string RemoteMainPublicKey
{
get
{
return _RemoteMainPublicKey;
}
set
{
_RemoteMainPublicKey = value;
}
}
/// <summary>
/// 远端程序地区标识
/// </summary>
public string RemoteMainCulture
{
get
{
return _RemoteMainCulture;
}
set
{
_RemoteMainCulture = value;
}
}
/// <summary>
/// 更新的Buggit Client URL地址
/// </summary>
public string UpdateFileUrl
{
get
{
return _UpdateFileUrl;
}
set
{
_UpdateFileUrl = value;
}
}
/// <summary>
/// 更新程序的本地相对路径
/// </summary>
public string CheckVersionExeLocalPath
{
get
{
return _CheckVersionExeLocalPath;
}
set
{
_CheckVersionExeLocalPath = value;
}
}
/// <summary>
/// 是否继续运行Buggit Client标志位
/// </summary>
public bool CanEscaladeClient
{
get
{
return _CanEscaladeClient;
}
set
{
_CanEscaladeClient = value;
}
}
/// <summary>
/// 是否略过版本检查
/// </summary>
public bool SkipCheck
{
get
{
return _SkipCheck;
}
set
{
_SkipCheck = value;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace App.CrystalReport {
using System;
using System.ComponentModel;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportSource;
using CrystalDecisions.CrystalReports.Engine;
public class CrystalReportCH : ReportClass {
public CrystalReportCH() {
}
public override string ResourceName {
get {
return "CrystalReportCH.rpt";
}
set {
// Do nothing
}
}
public override bool NewGenerator {
get {
return true;
}
set {
// Do nothing
}
}
public override string FullResourceName {
get {
return "App.CrystalReport.CrystalReportCH.rpt";
}
set {
// Do nothing
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section1 {
get {
return this.ReportDefinition.Sections[0];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section2 {
get {
return this.ReportDefinition.Sections[1];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section3 {
get {
return this.ReportDefinition.Sections[2];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section4 {
get {
return this.ReportDefinition.Sections[3];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section5 {
get {
return this.ReportDefinition.Sections[4];
}
}
}
[System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.ExportOptions), "report.bmp")]
public class CachedCrystalReportCH : Component, ICachedReport {
public CachedCrystalReportCH() {
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual bool IsCacheable {
get {
return true;
}
set {
//
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual bool ShareDBLogonInfo {
get {
return false;
}
set {
//
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual System.TimeSpan CacheTimeOut {
get {
return CachedReportConstants.DEFAULT_TIMEOUT;
}
set {
//
}
}
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
CrystalReportCH rpt = new CrystalReportCH();
rpt.Site = this.Site;
return rpt;
}
public virtual string GetCustomizedCacheKey(RequestContext request) {
String key = null;
// // The following is the code used to generate the default
// // cache key for caching report jobs in the ASP.NET Cache.
// // Feel free to modify this code to suit your needs.
// // Returning key == null causes the default cache key to
// // be generated.
//
// key = RequestContext.BuildCompleteCacheKey(
// request,
// null, // sReportFilename
// this.GetType(),
// this.ShareDBLogonInfo );
return key;
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行库版本:2.0.50727.1433
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace App.CrystalReport {
using System;
using System.ComponentModel;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportSource;
using CrystalDecisions.CrystalReports.Engine;
public class CrystalReportCH1 : ReportClass {
public CrystalReportCH1() {
}
public override string ResourceName {
get {
return "CrystalReportCH1.rpt";
}
set {
// Do nothing
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section1 {
get {
return this.ReportDefinition.Sections[0];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section2 {
get {
return this.ReportDefinition.Sections[1];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section3 {
get {
return this.ReportDefinition.Sections[2];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section4 {
get {
return this.ReportDefinition.Sections[3];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section5 {
get {
return this.ReportDefinition.Sections[4];
}
}
}
[System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.ExportOptions), "report.bmp")]
public class CachedCrystalReportCH1 : Component, ICachedReport {
public CachedCrystalReportCH1() {
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual bool IsCacheable {
get {
return true;
}
set {
//
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual bool ShareDBLogonInfo {
get {
return false;
}
set {
//
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual System.TimeSpan CacheTimeOut {
get {
return CachedReportConstants.DEFAULT_TIMEOUT;
}
set {
//
}
}
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
CrystalReportCH1 rpt = new CrystalReportCH1();
rpt.Site = this.Site;
return rpt;
}
public virtual string GetCustomizedCacheKey(RequestContext request) {
String key = null;
// // The following is the code used to generate the default
// // cache key for caching report jobs in the ASP.NET Cache.
// // Feel free to modify this code to suit your needs.
// // Returning key == null causes the default cache key to
// // be generated.
//
// key = RequestContext.BuildCompleteCacheKey(
// request,
// null, // sReportFilename
// this.GetType(),
// this.ShareDBLogonInfo );
return key;
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace App.CrystalReport {
using System;
using System.ComponentModel;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportSource;
using CrystalDecisions.CrystalReports.Engine;
public class CrystalReportEN : ReportClass {
public CrystalReportEN() {
}
public override string ResourceName {
get {
return "CrystalReportEN.rpt";
}
set {
// Do nothing
}
}
public override bool NewGenerator {
get {
return true;
}
set {
// Do nothing
}
}
public override string FullResourceName {
get {
return "App.CrystalReport.CrystalReportEN.rpt";
}
set {
// Do nothing
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section1 {
get {
return this.ReportDefinition.Sections[0];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section2 {
get {
return this.ReportDefinition.Sections[1];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section3 {
get {
return this.ReportDefinition.Sections[2];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section4 {
get {
return this.ReportDefinition.Sections[3];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section5 {
get {
return this.ReportDefinition.Sections[4];
}
}
}
[System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.ExportOptions), "report.bmp")]
public class CachedCrystalReportEN : Component, ICachedReport {
public CachedCrystalReportEN() {
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual bool IsCacheable {
get {
return true;
}
set {
//
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual bool ShareDBLogonInfo {
get {
return false;
}
set {
//
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public virtual System.TimeSpan CacheTimeOut {
get {
return CachedReportConstants.DEFAULT_TIMEOUT;
}
set {
//
}
}
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
CrystalReportEN rpt = new CrystalReportEN();
rpt.Site = this.Site;
return rpt;
}
public virtual string GetCustomizedCacheKey(RequestContext request) {
String key = null;
// // The following is the code used to generate the default
// // cache key for caching report jobs in the ASP.NET Cache.
// // Feel free to modify this code to suit your needs.
// // Returning key == null causes the default cache key to
// // be generated.
//
// key = RequestContext.BuildCompleteCacheKey(
// request,
// null, // sReportFilename
// this.GetType(),
// this.ShareDBLogonInfo );
return key;
}
}
}
namespace CreatingCrystalReports {
partial class DataSet1
{
partial class DataTable1DataTable
{
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<!--<autogenerated>
This code was generated by a tool.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TableUISettings />
</DataSetUISetting>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--<autogenerated>
This code was generated by a tool to store the dataset designer's layout information.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="25" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:DataTable1" ZOrder="1" X="144" Y="103" Height="257" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="24" SplitterPosition="349" />
</Shapes>
<Connectors />
</DiagramLayout>
\ No newline at end of file
此文件类型无法预览

\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace App
{
class FittingFunction
{
/**
* 多项式拟合函数,输出系数是y=a0+a1*x+a2*x*x+.........,按a0,a1,a2输出
*
* @param y
* @param x
* @param order
* @return
*/
public static double[] polyfit(double[] y, double[] x, int order)
{
double[,] guass = get_Array(y, x, order);
double[] ratio = cal_Guass(guass, order + 1);
return ratio;
}
/**
* 一次拟合函数,y=a0+a1*x,输出次序是a0,a1
*
* @param y
* @param x
* @return
*/
public static double[] linear(double[] y, double[] x)
{
double[] ratio = polyfit(y, x, 1);
return ratio;
}
/**
* 对数拟合函数,.y= c*(ln x)+b,输出为b,c
*
* @param y
* @param x
* @return
*/
public static double[] Logest(double[] y, double[] x)
{
double[] lnX = new double[x.Length];
for (int i = 0; i < x.Length; i++)
{
if (x[i] == 0 || x[i] < 0)
{
//System.out.println("正对非正数取对数!");
return null;
}
lnX[i] = Math.Log(x[i]);
}
return linear(y, lnX);
}
/**
* 幂函数拟合模型, y=c*x^b,输出为c,b
*
* @param y
* @param x
* @return
*/
public static double[] PowEST(double[] y, double[] x)
{
double[] lnX = new double[x.Length];
double[] lnY = new double[y.Length];
double[] dlinestRet;
for (int i = 0; i < x.Length; i++)
{
lnX[i] = Math.Log(x[i]);
lnY[i] = Math.Log(y[i]);
}
dlinestRet = linear(lnY, lnX);
dlinestRet[0] = Math.Exp(dlinestRet[0]);
return dlinestRet;
}
/**
* 指数函数拟合函数模型,公式为 y=c*m^x;输出为 c,m
*
* @param y
* @param x
* @return
*/
public static double[] indexEST(double[] y, double[] x)
{
double[] lnY = new double[y.Length];
double[] ratio;
for (int i = 0; i < y.Length; i++)
{
lnY[i] = Math.Log(y[i]);
}
ratio = linear(lnY, x);
for (int i = 1; i < ratio.Length; i++)
{
ratio[i] = Math.Exp(ratio[i]);
}
return ratio;
}
/**
* 最小二乘法部分, 计算增广矩阵
*
* @param guass
* @param count
* @return
*/
private static double[] cal_Guass(double[,] guass, int count)
{
double temp;
double[] x_value;
for (int j = 0; j < count; j++)
{
int k = j;
double min = guass[j, j];
for (int i = j; i < count; i++)
{
if (Math.Abs(guass[i, j]) < min)
{
min = guass[i, j];
k = i;
}
}
if (k != j)
{
for (int x = j; x <= count; x++)
{
temp = guass[k, x];
guass[k, x] = guass[j, x];
guass[j, x] = temp;
}
}
for (int m = j + 1; m < count; m++)
{
double div = guass[m, j] / guass[j, j];
for (int n = j; n <= count; n++)
{
guass[m, n] = guass[m, n] - guass[j, n] * div;
}
}
}
x_value = get_Value(guass, count);
return x_value;
}
/**
* 回带计算X值
*
* @param guass
* @param count
* @return
*/
private static double[] get_Value(double[,] guass, int count)
{
double[] x = new double[count];
double[,] X_Array = new double[count, count];
for (int i = 0; i < count; i++)
for (int j = 0; j < count; j++)
X_Array[i, j] = guass[i, j];
if (2 < count - 1)// 表示有多解
{
return null;
}
// 回带计算x值
x[count - 1] = guass[count - 1, count] / guass[count - 1, count - 1];
for (int i = count - 2; i >= 0; i--)
{
double temp = 0;
for (int j = i; j < count; j++)
{
temp += x[j] * guass[i, j];
}
x[i] = (guass[i, count] - temp) / guass[i, i];
}
return x;
}
/**
* 得到数据的法矩阵,输出为发矩阵的增广矩阵
*
* @param y
* @param x
* @param n
* @return
*/
private static double[,] get_Array(double[] y, double[] x, int n)
{
double[,] result = new double[n + 1, n + 2];
if (y.Length != x.Length)
{
//System.out.println("两个输入数组长度不一!");
}
for (int i = 0; i <= n; i++)
{
for (int j = 0; j <= n; j++)
{
result[i, j] = cal_sum(x, i + j);
}
result[i, n + 1] = cal_multi(y, x, i);
}
return result;
}
/**
* 累加的计算
*
* @param input
* @param order
* @return
*/
private static double cal_sum(double[] input, int order)
{
double result = 0;
int Length = input.Length;
for (int i = 0; i < Length; i++)
{
result += Math.Pow(input[i], order);
}
return result;
}
/**
* 计算∑(x^j)*y
*
* @param y
* @param x
* @param order
* @return
*/
private static double cal_multi(double[] y, double[] x, int order)
{
double result = 0;
int Length = x.Length;
for (int i = 0; i < Length; i++)
{
result += Math.Pow(x[i], order) * y[i];
}
return result;
}
public static double calRSquare_linear(double[] x, double[] y, double a, double b)
{
int num = y.Length;
double[] yLine = new double[num];
for (int i = 0; i < num; i++)
{
yLine[i] = x[i] * b + a;
}
return calRSquare(x, y, yLine, a, b);
}
public static double calRSquare_Logest(double[] x, double[] y, double a, double b)
{
int num = y.Length;
double[] yLine = new double[num];
for (int i = 0; i < num; i++)
{
yLine[i] = Math.Log(x[i]) * b + a;
}
return calRSquare(x, y, yLine, a, b);
}
public static double calRSquare_PowEST(double[] x, double[] y, double c, double b)
{
int num = y.Length;
double[] yLine = new double[num];
for (int i = 0; i < num; i++)
{
// y=c*x^b,输出为c,b
yLine[i] = c * Math.Pow(x[i], b);
}
return calRSquare(x, y, yLine, c, b);
}
public static double calRSquare_indexEST(double[] x, double[] y, double c, double m)
{
int num = y.Length;
double[] yLine = new double[num];
for (int i = 0; i < num; i++)
{
// y=c*m^x
yLine[i] = c * Math.Pow(m, x[i]);
}
return calRSquare(x, y, yLine, c, m);
}
/**
* 计算R?值:R?=1-SSE/SST。SSE为实际值减去预测值的平方和;SST为实际值减去平均值的平方和
*
* @param x
* 实际坐标x的值数组
* @param y
* 实际坐标y的值数组
* @param yLine
* 预测线坐标y的值数组
* @param a
* 前一个参数
* @param b
* 后一个参数
* @return
*/
private static double calRSquare(double[] x, double[] y, double[] yLine,
double a, double b)
{
// 1、获取线性函数对应的数组值
int num = y.Length;
// 2、y平均值
double sum = 0;
foreach (double yi in y)
{
sum = sum + yi;
}
double yAverage = sum / num;
// 3、计算实际值减去预算值的平方和
double sse = 0;
for (int i = 0; i < num; i++)
{
sse = sse + (y[i] - yLine[i]) * (y[i] - yLine[i]);
}
// 4、计算实际值减去平均值的平方和
double sst = 0;
for (int i = 0; i < num; i++)
{
sst = sst + (y[i] - yAverage) * (y[i] - yAverage);
}
return 1 - sse / sst;
}
}
}
namespace App
{
partial class Form1
{
/// <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.components = new System.ComponentModel.Container();
this.zedGraphControl1 = new ZedGraph.ZedGraphControl();
this.SuspendLayout();
//
// zedGraphControl1
//
this.zedGraphControl1.Location = new System.Drawing.Point(43, 76);
this.zedGraphControl1.Name = "zedGraphControl1";
this.zedGraphControl1.ScrollGrace = 0;
this.zedGraphControl1.ScrollMaxX = 0;
this.zedGraphControl1.ScrollMaxY = 0;
this.zedGraphControl1.ScrollMaxY2 = 0;
this.zedGraphControl1.ScrollMinX = 0;
this.zedGraphControl1.ScrollMinY = 0;
this.zedGraphControl1.ScrollMinY2 = 0;
this.zedGraphControl1.Size = new System.Drawing.Size(443, 255);
this.zedGraphControl1.TabIndex = 0;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(550, 404);
this.Controls.Add(this.zedGraphControl1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
private ZedGraph.ZedGraphControl zedGraphControl1;
}
}
\ No newline at end of file
此文件类型无法预览
<?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=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
namespace App
{
partial class FormSetting
{
/// <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.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtBaud = new System.Windows.Forms.TextBox();
this.txtDataBits = new System.Windows.Forms.TextBox();
this.btnConfirm = new System.Windows.Forms.Button();
this.btnDefault = new System.Windows.Forms.Button();
this.cmbPortName = new System.Windows.Forms.ComboBox();
this.cmbParity = new System.Windows.Forms.ComboBox();
this.cmbStopBits = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(36, 29);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 0;
this.label1.Text = "通信口";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(36, 60);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 0;
this.label2.Text = "波特率";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(36, 91);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 0;
this.label3.Text = "数据位";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(36, 122);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(41, 12);
this.label4.TabIndex = 0;
this.label4.Text = "校验位";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(36, 153);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(41, 12);
this.label5.TabIndex = 0;
this.label5.Text = "停止位";
//
// txtBaud
//
this.txtBaud.Location = new System.Drawing.Point(107, 57);
this.txtBaud.Name = "txtBaud";
this.txtBaud.Size = new System.Drawing.Size(100, 21);
this.txtBaud.TabIndex = 1;
this.txtBaud.Text = "9600";
//
// txtDataBits
//
this.txtDataBits.Location = new System.Drawing.Point(107, 88);
this.txtDataBits.Name = "txtDataBits";
this.txtDataBits.Size = new System.Drawing.Size(100, 21);
this.txtDataBits.TabIndex = 1;
this.txtDataBits.Text = "8";
//
// btnConfirm
//
this.btnConfirm.Location = new System.Drawing.Point(91, 200);
this.btnConfirm.Name = "btnConfirm";
this.btnConfirm.Size = new System.Drawing.Size(75, 23);
this.btnConfirm.TabIndex = 2;
this.btnConfirm.Text = "确认";
this.btnConfirm.UseVisualStyleBackColor = true;
this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click);
//
// btnDefault
//
this.btnDefault.Location = new System.Drawing.Point(2, 211);
this.btnDefault.Name = "btnDefault";
this.btnDefault.Size = new System.Drawing.Size(75, 23);
this.btnDefault.TabIndex = 3;
this.btnDefault.Text = "默认";
this.btnDefault.UseVisualStyleBackColor = true;
this.btnDefault.Visible = false;
this.btnDefault.Click += new System.EventHandler(this.btnDefault_Click);
//
// cmbPortName
//
this.cmbPortName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPortName.FormattingEnabled = true;
this.cmbPortName.Items.AddRange(new object[] {
"COM1",
"COM2",
"COM3",
"COM4"});
this.cmbPortName.Location = new System.Drawing.Point(107, 26);
this.cmbPortName.Name = "cmbPortName";
this.cmbPortName.Size = new System.Drawing.Size(100, 20);
this.cmbPortName.TabIndex = 4;
//
// cmbParity
//
this.cmbParity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbParity.FormattingEnabled = true;
this.cmbParity.Items.AddRange(new object[] {
"无",
"奇数校验",
"偶数校验"});
this.cmbParity.Location = new System.Drawing.Point(107, 119);
this.cmbParity.Name = "cmbParity";
this.cmbParity.Size = new System.Drawing.Size(100, 20);
this.cmbParity.TabIndex = 5;
this.cmbParity.SelectedIndex = 0;
//
// cmbStopBits
//
this.cmbStopBits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbStopBits.FormattingEnabled = true;
this.cmbStopBits.Items.AddRange(new object[] {
"无",
"1位",
"1.5位",
"2位"});
this.cmbStopBits.Location = new System.Drawing.Point(107, 150);
this.cmbStopBits.Name = "cmbStopBits";
this.cmbStopBits.Size = new System.Drawing.Size(100, 20);
this.cmbStopBits.TabIndex = 6;
this.cmbStopBits.SelectedIndex = 1;
//
// FormSetting
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(257, 246);
this.Controls.Add(this.cmbStopBits);
this.Controls.Add(this.cmbParity);
this.Controls.Add(this.cmbPortName);
this.Controls.Add(this.btnDefault);
this.Controls.Add(this.btnConfirm);
this.Controls.Add(this.txtDataBits);
this.Controls.Add(this.txtBaud);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(273, 285);
this.MinimumSize = new System.Drawing.Size(273, 285);
this.Name = "FormSetting";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "设置串口";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtBaud;
private System.Windows.Forms.TextBox txtDataBits;
private System.Windows.Forms.Button btnConfirm;
private System.Windows.Forms.Button btnDefault;
private System.Windows.Forms.ComboBox cmbPortName;
private System.Windows.Forms.ComboBox cmbParity;
private System.Windows.Forms.ComboBox cmbStopBits;
}
}
\ No newline at end of file
using System.IO.Ports;
using System.Windows.Forms;
using MachineDll;
namespace App
{
public partial class FormSetting : Form
{
public FormSetting()
{
InitializeComponent();
ReadItsValue();
}
private void ReadItsValue()
{
cmbPortName.SelectedItem = SerialPortSetting.PortName;
txtBaud.Text = SerialPortSetting.BautRate.ToString();
txtDataBits.Text = SerialPortSetting.DataBits.ToString();
BindParity();
BindStopBits();
}
private void BindStopBits()
{
switch (SerialPortSetting.StopBits)
{
case StopBits.None:
cmbStopBits.SelectedIndex = 0;
break;
case StopBits.One:
cmbStopBits.SelectedIndex = 1;
break;
case StopBits.OnePointFive:
cmbStopBits.SelectedIndex = 2;
break;
case StopBits.Two:
cmbStopBits.SelectedIndex = 3;
break;
default:
ShowError();
break;
}
}
private void BindParity()
{
switch(SerialPortSetting.Parity)
{
case Parity.None:
cmbParity.SelectedIndex = 0;
break;
case Parity.Odd:
cmbParity.SelectedIndex = 1;
break;
case Parity.Even:
cmbParity.SelectedIndex = 2;
break;
default:
ShowError();
break;
}
}
private void ShowError()
{
MessageBox.Show("无效的数据读取");
btnConfirm.Enabled = false;
}
private void btnDefault_Click(object sender, System.EventArgs e)
{
SetDefaultValue();
}
private void SetDefaultValue()
{
cmbPortName.SelectedIndex = 0;
txtBaud.Text = "9600";
txtDataBits.Text = "8";
cmbParity.SelectedIndex = 0;
cmbStopBits.SelectedIndex = 1;
}
private void btnConfirm_Click(object sender, System.EventArgs e)
{
bool port = SetPortName();
bool baud = SetBaudRate();
bool Data = SetDataBits();
bool Parity = SetParity();
bool Stop = SetStopBits();
if (port && baud && Data && Parity && Stop)
{
Close();
}
else
{
MessageBox.Show("有错误的输入,请检查");
}
}
private bool SetStopBits()
{
switch (cmbStopBits.SelectedIndex)
{
case 0:
SerialPortSetting.StopBits = StopBits.None;
return true;
case 1:
SerialPortSetting.StopBits = StopBits.One;
return true;
case 2:
SerialPortSetting.StopBits = StopBits.OnePointFive;
return true;
case 3:
SerialPortSetting.StopBits = StopBits.Two;
return true;
default:
return false;
}
}
private bool SetParity()
{
switch(cmbParity.SelectedIndex)
{
case 0:
SerialPortSetting.Parity = Parity.None;
return true;
case 1:
SerialPortSetting.Parity = Parity.Odd;
return true;
case 2:
SerialPortSetting.Parity = Parity.Even;
return true;
default:
return false;
}
}
private bool SetDataBits()
{
int dataBits;
if (int.TryParse(txtDataBits.Text, out dataBits))
{
SerialPortSetting.DataBits = dataBits;
return true;
}
else
{
return false;
}
}
private bool SetBaudRate()
{
int baudRate;
if (int.TryParse(txtBaud.Text, out baudRate))
{
SerialPortSetting.BautRate = baudRate;
return true;
}
else
{
return false;
}
}
private bool SetPortName()
{
SerialPortSetting.PortName = cmbPortName.SelectedItem.ToString();
return true;
}
}
}
\ No newline at end of file
<?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
namespace App
{
partial class FrmAboutUs
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAboutUs));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.lbl_CopyRight = new System.Windows.Forms.Label();
this.lbl_FrancePhone = new System.Windows.Forms.Label();
this.lbl_ChinaPhone = new System.Windows.Forms.Label();
this.tabPanel1 = new RibbonStyle.TabPanel();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tabPanel1.SuspendLayout();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(22, 28);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(137, 127);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// lbl_CopyRight
//
this.lbl_CopyRight.AutoSize = true;
this.lbl_CopyRight.BackColor = System.Drawing.Color.Transparent;
this.lbl_CopyRight.Location = new System.Drawing.Point(181, 34);
this.lbl_CopyRight.Name = "lbl_CopyRight";
this.lbl_CopyRight.Size = new System.Drawing.Size(161, 12);
this.lbl_CopyRight.TabIndex = 4;
this.lbl_CopyRight.Text = "版权所有 (C) ××有限公司";
//
// lbl_FrancePhone
//
this.lbl_FrancePhone.AutoSize = true;
this.lbl_FrancePhone.BackColor = System.Drawing.Color.Transparent;
this.lbl_FrancePhone.Location = new System.Drawing.Point(180, 74);
this.lbl_FrancePhone.Name = "lbl_FrancePhone";
this.lbl_FrancePhone.Size = new System.Drawing.Size(143, 12);
this.lbl_FrancePhone.TabIndex = 5;
this.lbl_FrancePhone.Text = "法国电话:+442032872518";
//
// lbl_ChinaPhone
//
this.lbl_ChinaPhone.AutoSize = true;
this.lbl_ChinaPhone.BackColor = System.Drawing.Color.Transparent;
this.lbl_ChinaPhone.Location = new System.Drawing.Point(180, 119);
this.lbl_ChinaPhone.Name = "lbl_ChinaPhone";
this.lbl_ChinaPhone.Size = new System.Drawing.Size(143, 12);
this.lbl_ChinaPhone.TabIndex = 6;
this.lbl_ChinaPhone.Text = "中国电话:+862151872117";
//
// tabPanel1
//
this.tabPanel1.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(227)))), ((int)(((byte)(242)))));
this.tabPanel1.BaseColorOn = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(227)))), ((int)(((byte)(242)))));
this.tabPanel1.Caption = "";
this.tabPanel1.Controls.Add(this.pictureBox1);
this.tabPanel1.Controls.Add(this.lbl_ChinaPhone);
this.tabPanel1.Controls.Add(this.lbl_CopyRight);
this.tabPanel1.Controls.Add(this.lbl_FrancePhone);
this.tabPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabPanel1.Location = new System.Drawing.Point(20, 60);
this.tabPanel1.Name = "tabPanel1";
this.tabPanel1.Opacity = 255;
this.tabPanel1.Size = new System.Drawing.Size(386, 189);
this.tabPanel1.Speed = 1;
this.tabPanel1.TabIndex = 7;
//
// FrmAboutUs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(426, 269);
this.Controls.Add(this.tabPanel1);
this.Location = new System.Drawing.Point(0, 0);
this.MaximizeBox = false;
this.Name = "FrmAboutUs";
this.Resizable = false;
this.Text = "联系我们";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tabPanel1.ResumeLayout(false);
this.tabPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label lbl_CopyRight;
private System.Windows.Forms.Label lbl_FrancePhone;
private System.Windows.Forms.Label lbl_ChinaPhone;
private RibbonStyle.TabPanel tabPanel1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace App
{
public partial class FrmAboutUs : FrmBase
{
public FrmAboutUs()
{
InitializeComponent();
this.SetLanguage(this);
}
}
}
\ No newline at end of file
此文件类型无法预览
此文件类型无法预览
<?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>
<metadata name="tabStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>124, 17</value>
</metadata>
<metadata name="Timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>213, 17</value>
</metadata>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>302, 17</value>
</metadata>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 54</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>
\ No newline at end of file
此文件的差异太大,无法显示。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace App
{
public partial class FrmAttribute : App.FrmBase
{
public FrmAttribute(string date, string time, string testTime,
string testSolvent,
string testMode ,
string solventTemp ,
string factory ,
string department ,
string operators )
{
InitializeComponent();
this.SetLanguage(this);
txt_Date.Text = date;
txt_Time.Text = time;
txt_TestTime.Text = testTime;
txt_TestSolvent.Text = testSolvent;
txt_TestMode.Text = testMode;
txt_Factory.Text = factory;
txt_Department.Text = department;
}
private void btn_OK_Click(object sender, EventArgs e)
{
this.Close();
}
private void btn_Cancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
<?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
using System.Drawing;
namespace App
{
partial class FrmBase
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBase));
this.SuspendLayout();
//
// FrmBase
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(686, 360);
this.ControlBox = false;
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(1277, 768);
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Movable = false;
this.Name = "FrmBase";
this.Padding = new System.Windows.Forms.Padding(23, 85, 23, 28);
this.Resizable = false;
this.Text = "FrmBase";
this.TransparencyKey = System.Drawing.Color.Empty;
this.ResumeLayout(false);
}
#endregion
}
}
namespace App
{
partial class FrmCrystalReprotCH
{
/// <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.SuspendLayout();
//
// FrmCrystalReprotCH
//
this.ClientSize = new System.Drawing.Size(767, 477);
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmCrystalReprotCH";
this.Text = "中文报表";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.FrmCrystalReprotCH_Load);
this.ResumeLayout(false);
}
#endregion
}
}
<?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
namespace App
{
partial class FrmCrystalReprotEN
{
/// <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.SuspendLayout();
//
// FrmCrystalReprotEN
//
this.ClientSize = new System.Drawing.Size(687, 476);
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmCrystalReprotEN";
this.Text = "English Report";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.FrmCrystalReprotEN_Load);
this.ResumeLayout(false);
}
#endregion
}
}
<?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"?>
<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>
<metadata name="tabStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>
\ No newline at end of file
namespace App
{
partial class FrmHardPara
{
/// <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.components = new System.ComponentModel.Container();
this.zedGraphControl1 = new ZedGraph.ZedGraphControl();
this.SuspendLayout();
//
// zedGraphControl1
//
this.zedGraphControl1.Location = new System.Drawing.Point(0, 0);
this.zedGraphControl1.Name = "zedGraphControl1";
this.zedGraphControl1.ScrollGrace = 0;
this.zedGraphControl1.ScrollMaxX = 0;
this.zedGraphControl1.ScrollMaxY = 0;
this.zedGraphControl1.ScrollMaxY2 = 0;
this.zedGraphControl1.ScrollMinX = 0;
this.zedGraphControl1.ScrollMinY = 0;
this.zedGraphControl1.ScrollMinY2 = 0;
this.zedGraphControl1.Size = new System.Drawing.Size(633, 446);
this.zedGraphControl1.TabIndex = 0;
//
// FrmHardPara
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.ClientSize = new System.Drawing.Size(633, 446);
this.Controls.Add(this.zedGraphControl1);
this.Name = "FrmHardPara";
this.Text = "硬件参数";
this.ResumeLayout(false);
}
#endregion
private ZedGraph.ZedGraphControl zedGraphControl1;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Dal;
namespace App
{
public partial class FrmHardPara : App.FrmBase
{
Fuction fuction = new Fuction();
public FrmHardPara()
{
InitializeComponent();
this.SetLanguage(this);
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Rectangle rectangle = new Rectangle(3, 3, 50, 50);
Color fillColor = Color.White;
Point startPoint = new Point(53, 53);
Point endPoint = new Point(100, 100);
string text = "111";
Pen p = new Pen(Color.Black);
Font font = new Font("΢ź", 8.0F);
g.DrawLine(p, startPoint, endPoint);
SolidBrush brush = new SolidBrush(fillColor);
SolidBrush brush1 = new SolidBrush(Color.Black);
//rectangle = new Rectangle(endPoint.X - 5, endPoint.Y + 5, 10, 5);
g.FillRectangle(brush, rectangle);
text = (text == null) ? string.Empty : text;
g.DrawString(text, font, brush1, rectangle);
}
}
}
<?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=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
此文件的差异太大,无法显示。
此文件类型无法预览
此文件的差异太大,无法显示。
<?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=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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Comm;
using Dal;
namespace App
{
public partial class FrmPara : App.FrmBase
{
readonly bool isInit;
readonly Fuction fuction = new Fuction();
private string para_Height;
private string operation;//判断是静态测试还是动态测试
private string testingKind;
private Control parentControl;
private LoginManager _loginManager;
public FrmPara(string o, Control parentControl, LoginManager loginManager)
{
isInit = true;
InitializeComponent();
this._loginManager = loginManager;
this.SetLanguage(this);
this.operation = o;
this.parentControl = parentControl;
isInit = false;
Init();
this.lbl_TestSolvent.Text = getMsg("FrmParalbl_TestSolvent");
this.btn_OK1.Text = getMsg("FrmParabtn_OK1");
this.btn_Cancel1.Text = getMsg("FrmParabtn_Cancel1");
}
private void Init()
{
cmb_TestSolvent.Items.Clear();
cmb_TestSolvent.Items.Add(Const.TESTSOLVENT_50IPA);
cmb_TestSolvent.Items.Add(Const.TESTSOLVENT_75IPA);
cmb_TestSolvent.SelectedIndex = 1;
/**
* 该段代码是添加测试方式:静态测试和动态测试
*/
////cmb_TestMode.Items.Clear();
if("testModeItemDYNAMIC".Equals(this.operation))
{
switch (Fuction.m_Language)
{
case Const.LANGUAGE_ENGLISH:
testingKind = Const.TESTMETHOD_DYNAMIC_EN;
break;
case Const.LANGUAGE_JAPANESE:
testingKind = Const.TESTMETHOD_DYNAMIC_JP;
break;
case Const.LANGUAGE_CHINESE:
testingKind = Const.TESTMETHOD_DYNAMIC_CH;
break;
default:
break;
}
}
else if("testModeItemSTATIC".Equals(this.operation))
{
switch (Fuction.m_Language)
{
case Const.LANGUAGE_ENGLISH:
testingKind = Const.TESTMETHOD_STATIC_EN;
break;
case Const.LANGUAGE_JAPANESE:
testingKind = Const.TESTMETHOD_STATIC_JP;
break;
case Const.LANGUAGE_CHINESE:
testingKind = Const.TESTMETHOD_STATIC_CH;
break;
default:
break;
}
}
////cmb_TestMode.Items.Add(testModeItemDYNAMIC);
////cmb_TestMode.Items.Add(testModeItemSTATIC);
////cmb_TestMode.SelectedIndex = 1;
lbl_TempUnit.Text = Fuction.m_UserTempUnit;
//lbl_LengthUnit.Text = Fuction.m_UserLengthUnit;
para_Height = fuction.GetParameterByParaName(Const.PARA_Height, "currency");
SetHeightVisible(para_Height == "");
}
private void SetHeightVisible(bool visible)
{
//txt_Height.Visible = visible;
//lbl_Height.Visible = visible;
//lbl_LengthUnit.Visible = visible;
}
private void btn_OK1_Click(object sender, EventArgs e)
{
#region checkValid
if (ckb_IfHeat.Checked)
{
if (!CheckNull(this.lbl_HeatTemp.Text, txt_HeatTemp))
return;
try
{
if (Fuction.m_UserTempUnit==Const.TEMPUNIT_C &&
(Convert.ToDecimal(txt_HeatTemp.Text.Trim())<30 ||
Convert.ToDecimal(txt_HeatTemp.Text.Trim()) > 45) ||
Fuction.m_UserTempUnit == Const.TEMPUNIT_F &&
(Convert.ToDecimal(txt_HeatTemp.Text.Trim()) < 86 ||
Convert.ToDecimal(txt_HeatTemp.Text.Trim()) > 113))
{
ShowMessageBox.ShowError(
Const.MESSAGEBOX_TITLE_NOTE, "", Const.ERROR_HEAT_TEMPERATURE);
txt_HeatTemp.Focus();
return;
}
}
catch(Exception ex)
{
LOGGER.Info(ex.StackTrace);
ShowMessageBox.ShowError(
Const.MESSAGEBOX_TITLE_NOTE, "", Const.ERROR_HEAT_TEMPERATURE);
txt_HeatTemp.Focus();
return;
}
}
if (!CheckNull(lbl_TestSolvent.Text, cmb_TestSolvent))
return;
if (para_Height=="")
{
//if (!CheckNull(lbl_Height.Text, txt_Height) ||
//!CheckNumber(lbl_Height.Text, txt_Height))
// return;
//para_Height = fuction.ChangeLUnit(txt_Height.Text);
}
#endregion
string ifHeat = ckb_IfHeat.Checked ? Const.ISHEAT_HEAT : Const.ISHEAT_NOTHEAT;
string HeatTemp = ckb_IfHeat.Checked ?
(Fuction.m_UserTempUnit==Const.TEMPUNIT_C? txt_HeatTemp.Text.Trim() :fuction.ChangeTempUnit(txt_HeatTemp.Text.Trim())):
"";
if (fuction.CreateParaConfig("", Fuction.m_UserLogin, Const.PARA_HEATTEMP, HeatTemp) &&
fuction.CreateParaConfig("", Fuction.m_UserLogin, Const.PARA_ISHEAT, ifHeat) &&
fuction.CreateParaConfig("", Fuction.m_UserLogin, Const.PARA_Height, para_Height) &&
fuction.CreateParaConfig("", Fuction.m_UserLogin, Const.PARA_TESTSOLVENT, cmb_TestSolvent.Text) &&
fuction.CreateParaConfig("", Fuction.m_UserLogin, Const.PARA_TESTMODE, testingKind)
)
{
//////((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_TESTTEMP, HeatTemp + Fuction.m_UserTempUnit);
//////((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_TESTSOLVENT, cmb_TestSolvent.Text);
//////((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_TESTMODE, cmb_TestMode.Text);
//2009年后加功能:选择加热后,提示用户打开加热器加热,如果不选择之后的流程和之前没有变化
if (ckb_IfHeat.Checked)
{
ShowMessageBox.ShowInfo(Const.MESSAGEBOX_TITLE_NOTE, Const.OPEN_HEATER);
}
try
{
//FrmTestManage frmTestManage = new FrmTestManage(HeatTemp, ifHeat, cmb_TestSolvent.Text, testingKind, _loginManager);
//if (this.parentControl.TopLevelControl is MetroDynamicTesting)
//{
// MetroDynamicTesting parentForm = (MetroDynamicTesting)this.parentControl.TopLevelControl;
// parentForm.AddToDynamicPanel(frmTestManage);
//}
//else if (this.parentControl.TopLevelControl is MetroStaticTesting)
//{
// MetroStaticTesting parentForm = (MetroStaticTesting)this.parentControl.TopLevelControl;
// parentForm.AddToStaticPanel(frmTestManage);
//}
}
catch (Exception ex)
{
Console.WriteLine("FrmParaClickOk:" + ex.StackTrace);
}
//try
//{
// frmTestManage.Show();
// frmTestManage.StartPosition = FormStartPosition.CenterParent;
// frmTestManage.Activate();//激活
//}
//catch (Exception ex)
//{
// Console.WriteLine(ex.StackTrace);
//}
}
else
{
ShowMessageBox.ShowError(Const.MESSAGEBOX_TITLE_NOTE, "", Const.ERROR_OPERATION);
}
this.Close();
}
private void btn_Cancel1_Click(object sender, EventArgs e)
{
this.Close();
}
private void ckb_IfHeat_CheckedChanged(object sender, EventArgs e)
{
if (ckb_IfHeat.Checked)
{
lbl_HeatTemp.Visible = true;
txt_HeatTemp.Visible = true;
lbl_TempUnit.Visible = true;
}
else
{
lbl_HeatTemp.Visible = false;
txt_HeatTemp.Visible = false;
lbl_TempUnit.Visible = false;
}
}
private void FrmPara_Shown(object sender, EventArgs e)
{
this.StartPosition = FormStartPosition.CenterParent;
//ResizeForm();
}
private void FrmPara_LocationChanged(object sender, EventArgs e)
{
if (isInit)
{
this.Location = new Point(0, 0);
}
}
}
}
<?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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Comm;
using Dal;
using Microsoft.Office.Interop.Word;
using ZedGraph;
using Rectangle=System.Drawing.Rectangle;
namespace App
{
public partial class FrmRemarkManage : App.FrmBase
{
private Remark _Remark;
private List<Remark> _RemarkList;
private List<Remark> _OldRemarkList;
private RectangleF _Rectangle ;
private PointF _StartPoint;
private Color _fillColor;
private string _text;
Fuction fuction = new Fuction();
private DataTable table1;
private int nameIndex;
public FrmRemarkManage(List<Remark> remarkList,RectangleF rectangle ,PointF startPoint)
{
_Rectangle = rectangle ;
_StartPoint = startPoint;
_OldRemarkList=new List<Remark>();
_OldRemarkList.AddRange(remarkList);
_RemarkList=remarkList;
InitializeComponent();
Init();
this.SetLanguage(this);
}
private void Init()
{
table1 = new DataTable(Const.REMARK);
DataColumnCollection columns = table1.Columns;
columns.Add(Const.REMARK_NO, typeof(System.String));
columns.Add(Const.REMARK_TEXT, typeof(System.String));
columns.Add(Const.REMARK_FillColor, typeof(Color));
columns.Add(Const.REMARK_LineColor, typeof(Color));
columns.Add(Const.REMARK_RectangleX, typeof(System.String));
columns.Add(Const.REMARK_RectangleY, typeof(System.String));
columns.Add(Const.REMARK_RectangleWidth, typeof(System.String));
columns.Add(Const.REMARK_RectangleHeight, typeof(System.String));
columns.Add(Const.REMARK_StartPointX, typeof(System.String));
columns.Add(Const.REMARK_StartPointY, typeof(System.String));
BindDGLogin();
}
public List<Remark> RemarkList
{
get { return _RemarkList; }
}
private void BindDGLogin()
{
table1.Rows.Clear();
DataRow dr;
for (int i = 0; i < _RemarkList.Count; i++)
{
dr = table1.NewRow();
dr[Const.REMARK_NO] = (i+1).ToString();
dr[Const.REMARK_TEXT] = _RemarkList[i].Text;
dr[Const.REMARK_FillColor] = _RemarkList[i].FillColor;
dr[Const.REMARK_LineColor] = _RemarkList[i].LineColor;
dr[Const.REMARK_RectangleX] = _RemarkList[i].Rectangle.X;
dr[Const.REMARK_RectangleY] = _RemarkList[i].Rectangle.Y;
dr[Const.REMARK_RectangleWidth] = _RemarkList[i].Rectangle.Width;
dr[Const.REMARK_RectangleHeight] = _RemarkList[i].Rectangle.Height;
dr[Const.REMARK_StartPointX] = _RemarkList[i].StartPoint.X;
dr[Const.REMARK_StartPointY] = _RemarkList[i].StartPoint.Y;
table1.Rows.Add(dr);
}
dg_Remark.DataSource = table1;
DataGridViewCellStyle dataGridViewCellStyle0 = CreatDataGridViewCellStyle();
dg_Remark.Columns[Const.REMARK_NO].DefaultCellStyle = dataGridViewCellStyle0;
dg_Remark.Columns[Const.REMARK_NO].HeaderCell.Style.BackColor = Color.SkyBlue;
dg_Remark.Columns[Const.REMARK_NO].SortMode = DataGridViewColumnSortMode.NotSortable;
dg_Remark.Columns[Const.REMARK_NO].Width = (dg_Remark.Width - 20)/4;
dg_Remark.Columns[Const.REMARK_TEXT].DefaultCellStyle = dataGridViewCellStyle0;
dg_Remark.Columns[Const.REMARK_TEXT].HeaderCell.Style.BackColor = Color.SkyBlue;
dg_Remark.Columns[Const.REMARK_TEXT].SortMode = DataGridViewColumnSortMode.NotSortable;
dg_Remark.Columns[Const.REMARK_TEXT].Width = (dg_Remark.Width - 20)*3/4;
dg_Remark.Columns[Const.REMARK_FillColor].Visible = false;
dg_Remark.Columns[Const.REMARK_LineColor].Visible = false;
dg_Remark.Columns[Const.REMARK_RectangleX].Visible = false;
dg_Remark.Columns[Const.REMARK_RectangleY].Visible = false;
dg_Remark.Columns[Const.REMARK_RectangleWidth].Visible = false;
dg_Remark.Columns[Const.REMARK_RectangleHeight].Visible = false;
dg_Remark.Columns[Const.REMARK_StartPointX].Visible = false;
dg_Remark.Columns[Const.REMARK_StartPointY].Visible = false;
if (table1.Rows.Count > 0)
{
nameIndex = 0;
dg_Remark.Rows[nameIndex].Selected = true;
ShowDetail(((DataTable) dg_Remark.DataSource).Rows[nameIndex]);
}
}
private void dg_Remark_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
{
dg_Remark.Rows[e.RowIndex].Selected = true;
nameIndex = e.RowIndex;
ShowDetail(((DataTable) dg_Remark.DataSource).Rows[nameIndex]);
}
}
private void ShowDetail(DataRow drRemark)
{
txt_Remark.Text = drRemark[Const.REMARK_TEXT].ToString();
p_BackColor.BackColor = (Color)(drRemark[Const.REMARK_FillColor]);
line.ForeColor = (Color)(drRemark[Const.REMARK_LineColor]);
}
private void btn_OK1_Click(object sender, EventArgs e)
{
this.Close();
}
private DialogResult _DialogResult;
private void btn_BackColor_Click(object sender, EventArgs e)
{
DialogResult result = colorDialog1.ShowDialog();
if (result == DialogResult.OK)//保存ʼþÏìÓ¦
{
p_BackColor.BackColor = colorDialog1.Color;//»ñÈ¡»òÉèÖÃÓû§Ñ¡ÖеÄÑÕÉ«
}
}
private void btn_ForColor_Click(object sender, EventArgs e)
{
DialogResult result = colorDialog1.ShowDialog();
if (result == DialogResult.OK)//保存ʼþÏìÓ¦
{
line.ForeColor = colorDialog1.Color;//»ñÈ¡»òÉèÖÃÓû§Ñ¡ÖеÄÑÕÉ«
}
}
private void btn_Add_Click(object sender, EventArgs e)
{
if (SameText(_RemarkList.Count + 1,txt_Remark.Text.Trim()))
{
ShowMessageBox.ShowInfo(Const.MESSAGEBOX_TITLE_NOTE, Const.SAME_REMARK);
return;
}
if (txt_Remark.Text.Length > 20 || txt_Remark.Text.Length==0)
{
ShowMessageBox.ShowInfo(Const.MESSAGEBOX_TITLE_NOTE, Const.REMARK_LENGTH_WRONG);
return;
}
_Rectangle.Width = txt_Remark.Text.Trim().Length*12;
_Remark = new Remark(p_BackColor.BackColor, line.ForeColor, _Rectangle, _StartPoint, txt_Remark.Text.Trim());
_RemarkList.Add(_Remark);
BindDGLogin();
}
private bool SameText(int No, string text)
{
for (int i = 0; i < _RemarkList.Count; i++)
{
if (_RemarkList[i].Text == text && No != (i + 1))
return true;
}
return false;
}
private void btn_Update_Click(object sender, EventArgs e)
{
if (SameText(nameIndex + 1, txt_Remark.Text.Trim()))
{
ShowMessageBox.ShowInfo(Const.MESSAGEBOX_TITLE_NOTE, Const.SAME_REMARK);
return;
}
if (txt_Remark.Text.Length > 20 || txt_Remark.Text.Length == 0)
{
ShowMessageBox.ShowInfo(Const.MESSAGEBOX_TITLE_NOTE, Const.REMARK_LENGTH_WRONG);
return;
}
_Remark = new Remark(p_BackColor.BackColor, line.ForeColor,
_RemarkList[nameIndex].Rectangle, _RemarkList[nameIndex].StartPoint, txt_Remark.Text.Trim());
_RemarkList[nameIndex]=_Remark;
BindDGLogin();
}
private void btn_Delete_Click(object sender, EventArgs e)
{
_RemarkList.RemoveAt(nameIndex);
BindDGLogin();
}
private void btn_Cancel1_Click(object sender, EventArgs e)
{
_RemarkList = _OldRemarkList;
this.Close();
}
private void btn_OK_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件的差异太大,无法显示。
此文件类型无法预览
此文件类型无法预览
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件类型无法预览
此文件类型无法预览
此文件的差异太大,无法显示。
此文件类型无法预览
此文件类型无法预览
此文件太大,无法显示。
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!