修改mainform菜单加载
parent
838c3c5890
commit
90abaa006a
Binary file not shown.
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
|
||||
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<applicationSettings>
|
||||
<DevExpress.LookAndFeel.Design.AppSettings>
|
||||
<setting name="DPIAwarenessMode" serializeAs="String">
|
||||
<value>System</value>
|
||||
</setting>
|
||||
<setting name="RegisterBonusSkins" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="DefaultAppSkin" serializeAs="String">
|
||||
<value>Skin/Office 2010 Blue</value>
|
||||
</setting>
|
||||
<setting name="DefaultPalette" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="TouchUI" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="CompactUI" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="TouchScaleFactor" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="DirectX" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="RegisterUserSkins" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="FontBehavior" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="DefaultAppFont" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="CustomPaletteCollection" serializeAs="Xml">
|
||||
<value />
|
||||
</setting>
|
||||
</DevExpress.LookAndFeel.Design.AppSettings>
|
||||
</applicationSettings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<connectionStrings>
|
||||
<add name="DB" connectionString="data source=.;initial catalog=winformdevfarme;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
|
||||
<add name="Model1" connectionString="data source=192.168.21.3;initial catalog=MESDEV;persist security info=True;user id=TEST;password=TEST123;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="mssqllocaldb" />
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
</providers>
|
||||
</entityFramework>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using DevExpress.Skins;
|
||||
using DevExpress.UserSkins;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.LookAndFeel;
|
||||
|
||||
namespace WinformGeneralDeveloperFrame.Start
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
DevExpress.Skins.SkinManager.EnableFormSkins();
|
||||
UserLookAndFeel.Default.SetSkinStyle("Office 2010 Blue");
|
||||
BonusSkins.Register();
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("WinformGeneralDeveloperFrame.Start")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WinformGeneralDeveloperFrame.Start")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("ab69d376-acc7-4d9c-b5ea-b8c3e5b64103")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{AB69D376-ACC7-4D9C-B5EA-B8C3E5B64103}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WinformGeneralDeveloperFrame.Start</RootNamespace>
|
||||
<AssemblyName>WinformGeneralDeveloperFrame.Start</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</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>
|
||||
</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>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.BonusSkins.v19.2, Version=19.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\DevExpress 19.2\Components\Bin\Framework\DevExpress.BonusSkins.v19.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v19.2, Version=19.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraBars.v19.2, Version=19.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WinformGeneralDeveloperFrame.Commons\WinformGeneralDeveloperFrame.Commons.csproj">
|
||||
<Project>{6f2b061d-6116-45a4-9649-49ae4981c496}</Project>
|
||||
<Name>WinformGeneralDeveloperFrame.Commons</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WinformGeneralDeveloperFrame\WinformGeneralDeveloperFrame.csproj">
|
||||
<Project>{fccdaf3a-fc3e-4f85-b794-2aaa299fbc45}</Project>
|
||||
<Name>WinformGeneralDeveloperFrame</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.2.0" targetFramework="net48" />
|
||||
</packages>
|
||||
|
|
@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinformGeneralDeveloperFram
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinformGeneralDeveloperFrame.Commons", "WinformGeneralDeveloperFrame.Commons\WinformGeneralDeveloperFrame.Commons.csproj", "{6F2B061D-6116-45A4-9649-49AE4981C496}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinformGeneralDeveloperFrame.Start", "WinformGeneralDeveloperFrame.Start\WinformGeneralDeveloperFrame.Start.csproj", "{AB69D376-ACC7-4D9C-B5EA-B8C3E5B64103}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -21,6 +23,10 @@ Global
|
|||
{6F2B061D-6116-45A4-9649-49AE4981C496}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6F2B061D-6116-45A4-9649-49AE4981C496}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6F2B061D-6116-45A4-9649-49AE4981C496}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AB69D376-ACC7-4D9C-B5EA-B8C3E5B64103}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AB69D376-ACC7-4D9C-B5EA-B8C3E5B64103}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AB69D376-ACC7-4D9C-B5EA-B8C3E5B64103}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AB69D376-ACC7-4D9C-B5EA-B8C3E5B64103}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
namespace WinformGeneralDeveloperFrame
|
||||
{
|
||||
partial class BaseForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// BaseForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Name = "BaseForm";
|
||||
this.Size = new System.Drawing.Size(668, 450);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using DevExpress.XtraEditors;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WinformGeneralDeveloperFrame
|
||||
{
|
||||
public partial class BaseForm : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
public BaseForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<?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>
|
||||
|
|
@ -57,7 +57,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
form.Activate();
|
||||
return form;
|
||||
}
|
||||
public static Form LoadShowForm(Form mainDialog, Type formType,string caption)
|
||||
public static Form LoadShowForm(Form mainDialog, Type formType,string caption,int formId)
|
||||
{
|
||||
|
||||
bool flag = false;
|
||||
|
|
@ -76,10 +76,13 @@ namespace WinformGeneralDeveloperFrame
|
|||
{
|
||||
form = (Form)Activator.CreateInstance(formType);
|
||||
form.MdiParent = mainDialog;
|
||||
form.Show();
|
||||
|
||||
}
|
||||
FrmShowForm frmShowForm=form as FrmShowForm;
|
||||
frmShowForm.Text = caption;
|
||||
frmShowForm.formId = formId;
|
||||
frmShowForm.Init();
|
||||
frmShowForm.Show();
|
||||
MainForm manForm= mainDialog as MainForm;
|
||||
frmShowForm.mainform = manForm;
|
||||
form.BringToFront();
|
||||
|
|
|
|||
|
|
@ -22,23 +22,18 @@ namespace MES.Form
|
|||
}
|
||||
private void FrmsysDictData_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new sysDictDataInfo());
|
||||
|
||||
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new sysDictDataInfo());
|
||||
}
|
||||
private void Init()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
txtdictTypeID.Properties.DataSource = GetDataTableUtils.SqlTable("字典类型");
|
||||
repositoryItemTreeListtxtdictTypeID.DataSource= GetDataTableUtils.SqlTable("字典类型");
|
||||
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxteditorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
|
||||
}
|
||||
txtdictTypeID.Properties.DataSource = GetDataTableUtils.SqlTable("字典类型");
|
||||
repositoryItemTreeListtxtdictTypeID.DataSource= GetDataTableUtils.SqlTable("字典类型");
|
||||
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxteditorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
}
|
||||
public override bool SaveFunction()
|
||||
{
|
||||
try
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,120 @@
|
|||
<?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>
|
||||
|
|
@ -22,21 +22,16 @@ namespace MES.Form
|
|||
}
|
||||
private void FrmsysDictType_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new sysDictTypeInfo());
|
||||
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new sysDictTypeInfo());
|
||||
}
|
||||
private void Init()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
txtpid.Properties.DataSource = GetDataTableUtils.SqlTable("字典类型");
|
||||
repositoryItemTreeListtxtpid.DataSource= GetDataTableUtils.SqlTable("字典类型");
|
||||
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxteditorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
txtpid.Properties.DataSource = GetDataTableUtils.SqlTable("字典类型");
|
||||
repositoryItemTreeListtxtpid.DataSource= GetDataTableUtils.SqlTable("字典类型");
|
||||
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxteditorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
|
||||
}
|
||||
public override bool SaveFunction()
|
||||
|
|
@ -64,9 +59,9 @@ namespace MES.Form
|
|||
grdList.DataSource=con.sysDictTypeInfo.ToList();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
public override bool CheckInput()
|
||||
}
|
||||
|
||||
public override bool CheckInput()
|
||||
{
|
||||
if(string.IsNullOrEmpty(txtname.EditValue.ToString()))
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -15,7 +15,8 @@ using MES.Entity;
|
|||
|
||||
namespace MES.Form
|
||||
{
|
||||
public partial class FrmsysMenu : FrmBaseForm
|
||||
|
||||
public partial class FrmsysMenu : FrmBaseForm
|
||||
{
|
||||
private Dictionary<string, string> fieldDictionary = new Dictionary<string, string>();
|
||||
public FrmsysMenu()
|
||||
|
|
@ -26,6 +27,7 @@ namespace MES.Form
|
|||
private void FrmsysMenu_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new sysMenuInfo());
|
||||
InitSearchDicData();
|
||||
}
|
||||
|
||||
public override void InitgrdListDataSource()
|
||||
|
|
@ -34,7 +36,6 @@ namespace MES.Form
|
|||
{
|
||||
grdList.DataSource = con.sysMenuInfo.ToList();
|
||||
}
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
|
|
@ -47,11 +48,12 @@ namespace MES.Form
|
|||
repositoryItemtxtcreatorId.DataSource= GetDataTableUtils.SqlTable("用户");
|
||||
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxteditorId.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
|
||||
fieldDictionary.Add("菜单名称","name");
|
||||
}
|
||||
private void InitSearchDicData()
|
||||
{
|
||||
fieldDictionary.Add("菜单名称", "name");
|
||||
fieldDictionary.Add("创建时间", "createTime");
|
||||
}
|
||||
|
||||
private void simpleButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
string file = GetIconPath();
|
||||
|
|
@ -119,7 +121,14 @@ namespace MES.Form
|
|||
string sql = frm.sql;
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
grdList.DataSource=db.sysMenuInfo.SqlQuery($"select * from sysMenu where {sql}").ToList();
|
||||
if (string.IsNullOrEmpty(sql))
|
||||
{
|
||||
grdList.DataSource = db.sysMenuInfo.SqlQuery("select * from sysMenu").ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
grdList.DataSource = db.sysMenuInfo.SqlQuery($"select * from sysMenu where {sql}").ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -344,6 +344,8 @@ namespace MES.Form
|
|||
this.grdListView.Name = "grdListView";
|
||||
this.grdListView.OptionsBehavior.Editable = false;
|
||||
this.grdListView.OptionsView.ColumnAutoWidth = false;
|
||||
this.grdListView.SortInfo.AddRange(new DevExpress.XtraGrid.Columns.GridColumnSortInfo[] {
|
||||
new DevExpress.XtraGrid.Columns.GridColumnSortInfo(this.gridColumn7, DevExpress.Data.ColumnSortOrder.Ascending)});
|
||||
//
|
||||
// tabDataDetail
|
||||
//
|
||||
|
|
|
|||
|
|
@ -23,15 +23,12 @@ namespace MES.Form
|
|||
}
|
||||
private void FrmsysUser_Load(object sender, EventArgs e)
|
||||
{
|
||||
Init();
|
||||
|
||||
InitFrom(xtraTabControl1, grdList, grdListView, new LayoutControlGroup[] { layoutControlGroup1 }, new sysUserInfo());
|
||||
}
|
||||
private void Init()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
txtdeptId.Properties.DataSource = GetDataTableUtils.SqlTable("部门");
|
||||
repositoryItemtxtdeptId.DataSource = GetDataTableUtils.SqlTable("部门");
|
||||
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
|
|
@ -39,40 +36,8 @@ namespace MES.Form
|
|||
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxteditorId.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
txtdeptId.Properties.DataSource = GetDataTableUtils.SqlTable("部门");
|
||||
repositoryItemtxtdeptId.DataSource = GetDataTableUtils.SqlTable("部门");
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
txtcreatorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxtcreatorId.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
txteditorId.Properties.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
repositoryItemtxteditorId.DataSource = GetDataTableUtils.SqlTable("用户");
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
public override bool SaveFunction()
|
||||
{
|
||||
try
|
||||
|
|
@ -97,6 +62,7 @@ namespace MES.Form
|
|||
{
|
||||
grdList.DataSource = con.sysUserInfo.ToList();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
public override bool CheckInput()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ namespace WinformGeneralDeveloperFrame
|
|||
|
||||
private void btnok_Click(object sender, EventArgs e)
|
||||
{
|
||||
sql = txtSql.Text.Substring(0,txtSql.Text.Length-txtrelation.Text.Length);
|
||||
if (!string.IsNullOrEmpty(txtSql.Text))
|
||||
{
|
||||
sql = txtSql.Text.Substring(0, txtSql.Text.Length - txtrelation.Text.Length);
|
||||
}
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,14 +31,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
{
|
||||
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
|
||||
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.simpleButton8 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton7 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton6 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton5 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
|
||||
this.panelControl1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
|
|
@ -60,110 +53,24 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.labelControl1.Size = new System.Drawing.Size(0, 14);
|
||||
this.labelControl1.TabIndex = 0;
|
||||
//
|
||||
// simpleButton8
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.simpleButton8.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.pagesetup_32x32;
|
||||
this.simpleButton8.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.TopCenter;
|
||||
this.simpleButton8.Location = new System.Drawing.Point(564, 34);
|
||||
this.simpleButton8.Name = "simpleButton8";
|
||||
this.simpleButton8.Size = new System.Drawing.Size(87, 74);
|
||||
this.simpleButton8.TabIndex = 8;
|
||||
this.simpleButton8.Text = "参数类型维护";
|
||||
this.simpleButton8.Click += new System.EventHandler(this.simpleButton8_Click);
|
||||
//
|
||||
// simpleButton7
|
||||
//
|
||||
this.simpleButton7.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.build_32x32;
|
||||
this.simpleButton7.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.TopCenter;
|
||||
this.simpleButton7.Location = new System.Drawing.Point(657, 34);
|
||||
this.simpleButton7.Name = "simpleButton7";
|
||||
this.simpleButton7.Size = new System.Drawing.Size(87, 74);
|
||||
this.simpleButton7.TabIndex = 7;
|
||||
this.simpleButton7.Text = "参数维护";
|
||||
this.simpleButton7.Click += new System.EventHandler(this.simpleButton7_Click);
|
||||
//
|
||||
// simpleButton6
|
||||
//
|
||||
this.simpleButton6.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.team_32x32;
|
||||
this.simpleButton6.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.TopCenter;
|
||||
this.simpleButton6.Location = new System.Drawing.Point(471, 34);
|
||||
this.simpleButton6.Name = "simpleButton6";
|
||||
this.simpleButton6.Size = new System.Drawing.Size(87, 74);
|
||||
this.simpleButton6.TabIndex = 6;
|
||||
this.simpleButton6.Text = "用户维护";
|
||||
this.simpleButton6.Click += new System.EventHandler(this.simpleButton6_Click);
|
||||
//
|
||||
// simpleButton5
|
||||
//
|
||||
this.simpleButton5.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.folderpanel_32x32;
|
||||
this.simpleButton5.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.TopCenter;
|
||||
this.simpleButton5.Location = new System.Drawing.Point(378, 34);
|
||||
this.simpleButton5.Name = "simpleButton5";
|
||||
this.simpleButton5.Size = new System.Drawing.Size(87, 74);
|
||||
this.simpleButton5.TabIndex = 5;
|
||||
this.simpleButton5.Text = "菜单维护";
|
||||
this.simpleButton5.Click += new System.EventHandler(this.simpleButton5_Click);
|
||||
//
|
||||
// simpleButton4
|
||||
//
|
||||
this.simpleButton4.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.boreport_32x32;
|
||||
this.simpleButton4.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.TopCenter;
|
||||
this.simpleButton4.Location = new System.Drawing.Point(285, 34);
|
||||
this.simpleButton4.Name = "simpleButton4";
|
||||
this.simpleButton4.Size = new System.Drawing.Size(87, 74);
|
||||
this.simpleButton4.TabIndex = 4;
|
||||
this.simpleButton4.Text = "代码生成";
|
||||
this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click);
|
||||
//
|
||||
// simpleButton3
|
||||
//
|
||||
this.simpleButton3.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.database_32x32;
|
||||
this.simpleButton3.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.TopCenter;
|
||||
this.simpleButton3.Location = new System.Drawing.Point(192, 34);
|
||||
this.simpleButton3.Name = "simpleButton3";
|
||||
this.simpleButton3.Size = new System.Drawing.Size(87, 74);
|
||||
this.simpleButton3.TabIndex = 3;
|
||||
this.simpleButton3.Text = "创建数据源";
|
||||
this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click);
|
||||
//
|
||||
// simpleButton2
|
||||
//
|
||||
this.simpleButton2.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.selectdata_32x32;
|
||||
this.simpleButton2.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.TopCenter;
|
||||
this.simpleButton2.Location = new System.Drawing.Point(99, 34);
|
||||
this.simpleButton2.Name = "simpleButton2";
|
||||
this.simpleButton2.Size = new System.Drawing.Size(87, 74);
|
||||
this.simpleButton2.TabIndex = 2;
|
||||
this.simpleButton2.Text = "创建数据集";
|
||||
this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click);
|
||||
//
|
||||
// simpleButton1
|
||||
//
|
||||
this.simpleButton1.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.bocustomer_32x32;
|
||||
this.simpleButton1.ImageOptions.Location = DevExpress.XtraEditors.ImageLocation.TopCenter;
|
||||
this.simpleButton1.Location = new System.Drawing.Point(6, 34);
|
||||
this.simpleButton1.Name = "simpleButton1";
|
||||
this.simpleButton1.Size = new System.Drawing.Size(87, 74);
|
||||
this.simpleButton1.TabIndex = 1;
|
||||
this.simpleButton1.Text = "测试";
|
||||
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 28);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(954, 588);
|
||||
this.flowLayoutPanel1.TabIndex = 1;
|
||||
//
|
||||
// FrmShowForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(954, 616);
|
||||
this.Controls.Add(this.simpleButton8);
|
||||
this.Controls.Add(this.simpleButton7);
|
||||
this.Controls.Add(this.simpleButton6);
|
||||
this.Controls.Add(this.simpleButton5);
|
||||
this.Controls.Add(this.simpleButton4);
|
||||
this.Controls.Add(this.simpleButton3);
|
||||
this.Controls.Add(this.simpleButton2);
|
||||
this.Controls.Add(this.simpleButton1);
|
||||
this.Controls.Add(this.flowLayoutPanel1);
|
||||
this.Controls.Add(this.panelControl1);
|
||||
this.Name = "FrmShowForm";
|
||||
this.Text = "ShowForm";
|
||||
this.Load += new System.EventHandler(this.FrmShowForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
|
||||
this.panelControl1.ResumeLayout(false);
|
||||
this.panelControl1.PerformLayout();
|
||||
|
|
@ -175,13 +82,6 @@ namespace WinformGeneralDeveloperFrame
|
|||
|
||||
private DevExpress.XtraEditors.PanelControl panelControl1;
|
||||
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton1;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton2;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton3;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton4;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton5;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton6;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton7;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton8;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,17 +4,22 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using MES.Form;
|
||||
using MES;
|
||||
using WinformGeneralDeveloperFrame.Commons;
|
||||
|
||||
namespace WinformGeneralDeveloperFrame
|
||||
{
|
||||
public partial class FrmShowForm : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
public MainForm mainform;
|
||||
public int formId;
|
||||
public FrmShowForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
|
@ -62,5 +67,55 @@ namespace WinformGeneralDeveloperFrame
|
|||
{
|
||||
ChildWinManagement.LoadMdiForm(mainform, typeof(FrmsysDictData));
|
||||
}
|
||||
|
||||
private void FrmShowForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
flowLayoutPanel1.Controls.Clear();
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
var data = db.sysMenuInfo.Where(p => p.pid == formId).ToList();
|
||||
|
||||
foreach (var item in data)
|
||||
{
|
||||
SimpleButton btn = new SimpleButton();
|
||||
btn.Name = "btn" + item.id;
|
||||
btn.Size = new System.Drawing.Size(90, 75);
|
||||
btn.Text = item.name;
|
||||
btn.Click += (o, args) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] itemArray = item.winformType.Split(new char[] {',', ';'});
|
||||
|
||||
string type = itemArray[0].Trim();
|
||||
string filePath = itemArray[1].Trim(); //必须是相对路径
|
||||
|
||||
//判断是否配置了显示模式,默认窗体为Show非模式显示
|
||||
string showDialog = (itemArray.Length > 2) ? itemArray[2].ToLower() : "";
|
||||
bool isShowDialog = (showDialog == "1") || (showDialog == "dialog");
|
||||
|
||||
string dllFullPath = Path.Combine(Application.StartupPath, filePath);
|
||||
Assembly tempAssembly = System.Reflection.Assembly.LoadFrom(dllFullPath);
|
||||
if (tempAssembly != null)
|
||||
{
|
||||
Type objType = tempAssembly.GetType(type);
|
||||
ChildWinManagement.LoadMdiForm(mainform, objType);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.Message.ShowError();
|
||||
}
|
||||
};
|
||||
flowLayoutPanel1.Controls.Add(btn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ namespace MES.Form
|
|||
{
|
||||
con.sysDataBase.AddOrUpdate(dbEntity);
|
||||
con.SaveChanges();
|
||||
"保存成功".ShowWarning();
|
||||
"保存成功".ShowTips();
|
||||
using (var db = new DB())
|
||||
{
|
||||
grdList.DataSource = db.sysDataBase.ToList();
|
||||
|
|
|
|||
|
|
@ -152,10 +152,10 @@ namespace MES.Form
|
|||
// xtraTabControl1
|
||||
//
|
||||
this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.xtraTabControl1.Location = new System.Drawing.Point(0, 34);
|
||||
this.xtraTabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.xtraTabControl1.Name = "xtraTabControl1";
|
||||
this.xtraTabControl1.SelectedTabPage = this.tabDataList;
|
||||
this.xtraTabControl1.Size = new System.Drawing.Size(1300, 766);
|
||||
this.xtraTabControl1.Size = new System.Drawing.Size(1300, 800);
|
||||
this.xtraTabControl1.TabIndex = 1;
|
||||
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
|
||||
this.tabDataList,
|
||||
|
|
@ -165,7 +165,7 @@ namespace MES.Form
|
|||
//
|
||||
this.tabDataList.Controls.Add(this.grdList);
|
||||
this.tabDataList.Name = "tabDataList";
|
||||
this.tabDataList.Size = new System.Drawing.Size(1294, 737);
|
||||
this.tabDataList.Size = new System.Drawing.Size(1294, 771);
|
||||
this.tabDataList.Text = "数据列表";
|
||||
//
|
||||
// grdList
|
||||
|
|
@ -174,7 +174,7 @@ namespace MES.Form
|
|||
this.grdList.Location = new System.Drawing.Point(0, 0);
|
||||
this.grdList.MainView = this.grdListView;
|
||||
this.grdList.Name = "grdList";
|
||||
this.grdList.Size = new System.Drawing.Size(1294, 737);
|
||||
this.grdList.Size = new System.Drawing.Size(1294, 771);
|
||||
this.grdList.TabIndex = 0;
|
||||
this.grdList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
|
||||
this.grdListView});
|
||||
|
|
@ -198,7 +198,7 @@ namespace MES.Form
|
|||
//
|
||||
this.tabDataDetail.Controls.Add(this.panelControl2);
|
||||
this.tabDataDetail.Name = "tabDataDetail";
|
||||
this.tabDataDetail.Size = new System.Drawing.Size(1294, 737);
|
||||
this.tabDataDetail.Size = new System.Drawing.Size(1294, 771);
|
||||
this.tabDataDetail.Text = "数据编辑";
|
||||
//
|
||||
// panelControl2
|
||||
|
|
@ -207,7 +207,7 @@ namespace MES.Form
|
|||
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelControl2.Location = new System.Drawing.Point(0, 0);
|
||||
this.panelControl2.Name = "panelControl2";
|
||||
this.panelControl2.Size = new System.Drawing.Size(1294, 737);
|
||||
this.panelControl2.Size = new System.Drawing.Size(1294, 771);
|
||||
this.panelControl2.TabIndex = 0;
|
||||
//
|
||||
// layoutControl1
|
||||
|
|
@ -225,7 +225,7 @@ namespace MES.Form
|
|||
this.layoutControl1.Location = new System.Drawing.Point(2, 2);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.Root;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(1290, 733);
|
||||
this.layoutControl1.Size = new System.Drawing.Size(1290, 767);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
|
|
@ -325,7 +325,7 @@ namespace MES.Form
|
|||
this.layoutControlItem7,
|
||||
this.layoutControlItem8});
|
||||
this.Root.Name = "Root";
|
||||
this.Root.Size = new System.Drawing.Size(1290, 733);
|
||||
this.Root.Size = new System.Drawing.Size(1290, 767);
|
||||
this.Root.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
|
|
@ -388,7 +388,7 @@ namespace MES.Form
|
|||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 170);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(1270, 543);
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(1270, 577);
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem9
|
||||
|
|
@ -436,7 +436,6 @@ namespace MES.Form
|
|||
this.Name = "FrmsysDataBase";
|
||||
this.Text = "数据源";
|
||||
this.Load += new System.EventHandler(this.FrmsysDataBase_Load);
|
||||
this.Controls.SetChildIndex(this.xtraTabControl1, 0);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
|
||||
this.xtraTabControl1.ResumeLayout(false);
|
||||
this.tabDataList.ResumeLayout(false);
|
||||
|
|
|
|||
|
|
@ -37,21 +37,17 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.barEditItem1 = new DevExpress.XtraBars.BarEditItem();
|
||||
this.repositoryItemTimeEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemTimeEdit();
|
||||
this.bsi_Date = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.barListItem1 = new DevExpress.XtraBars.BarListItem();
|
||||
this.barUserName = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.barStaticItem3 = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
|
||||
this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
|
||||
this.ribbonStatusBar1 = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
|
||||
this.xtraTabbedMdiManager1 = new DevExpress.XtraTabbedMdi.XtraTabbedMdiManager(this.components);
|
||||
this.navBarControl1 = new DevExpress.XtraNavBar.NavBarControl();
|
||||
this.navBarGroup1 = new DevExpress.XtraNavBar.NavBarGroup();
|
||||
this.navBarItem2 = new DevExpress.XtraNavBar.NavBarItem();
|
||||
this.navBarItem3 = new DevExpress.XtraNavBar.NavBarItem();
|
||||
this.navBarItem1 = new DevExpress.XtraNavBar.NavBarItem();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.barListItem1 = new DevExpress.XtraBars.BarListItem();
|
||||
this.bsi_UserName = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.barStaticItem1 = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.barUserName = new DevExpress.XtraBars.BarStaticItem();
|
||||
this.barStaticItem3 = new DevExpress.XtraBars.BarStaticItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ribbonControl1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.repositoryItemTimeEdit1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xtraTabbedMdiManager1)).BeginInit();
|
||||
|
|
@ -121,6 +117,27 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.bsi_Date.Name = "bsi_Date";
|
||||
this.bsi_Date.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
|
||||
//
|
||||
// barListItem1
|
||||
//
|
||||
this.barListItem1.Caption = "barListItem1";
|
||||
this.barListItem1.Id = 5;
|
||||
this.barListItem1.Name = "barListItem1";
|
||||
//
|
||||
// barUserName
|
||||
//
|
||||
this.barUserName.Caption = "用户名:admin";
|
||||
this.barUserName.Id = 6;
|
||||
this.barUserName.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.bocustomer_16x16;
|
||||
this.barUserName.ImageOptions.LargeImage = global::WinformGeneralDeveloperFrame.Properties.Resources.bocustomer_32x321;
|
||||
this.barUserName.Name = "barUserName";
|
||||
this.barUserName.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
|
||||
//
|
||||
// barStaticItem3
|
||||
//
|
||||
this.barStaticItem3.Caption = "barStaticItem3";
|
||||
this.barStaticItem3.Id = 7;
|
||||
this.barStaticItem3.Name = "barStaticItem3";
|
||||
//
|
||||
// ribbonPage1
|
||||
//
|
||||
this.ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
|
||||
|
|
@ -148,15 +165,8 @@ namespace WinformGeneralDeveloperFrame
|
|||
//
|
||||
// navBarControl1
|
||||
//
|
||||
this.navBarControl1.ActiveGroup = this.navBarGroup1;
|
||||
this.navBarControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
|
||||
this.navBarControl1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.navBarControl1.Groups.AddRange(new DevExpress.XtraNavBar.NavBarGroup[] {
|
||||
this.navBarGroup1});
|
||||
this.navBarControl1.Items.AddRange(new DevExpress.XtraNavBar.NavBarItem[] {
|
||||
this.navBarItem1,
|
||||
this.navBarItem2,
|
||||
this.navBarItem3});
|
||||
this.navBarControl1.Location = new System.Drawing.Point(0, 148);
|
||||
this.navBarControl1.Name = "navBarControl1";
|
||||
this.navBarControl1.OptionsNavPane.ExpandedWidth = 184;
|
||||
|
|
@ -166,50 +176,19 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.navBarControl1.Text = "navBarControl1";
|
||||
this.navBarControl1.View = new DevExpress.XtraNavBar.ViewInfo.StandardSkinNavigationPaneViewInfoRegistrator("Blue");
|
||||
//
|
||||
// navBarGroup1
|
||||
//
|
||||
this.navBarGroup1.Caption = "系统管理";
|
||||
this.navBarGroup1.Expanded = true;
|
||||
this.navBarGroup1.ItemLinks.AddRange(new DevExpress.XtraNavBar.NavBarItemLink[] {
|
||||
new DevExpress.XtraNavBar.NavBarItemLink(this.navBarItem2),
|
||||
new DevExpress.XtraNavBar.NavBarItemLink(this.navBarItem3),
|
||||
new DevExpress.XtraNavBar.NavBarItemLink(this.navBarItem1)});
|
||||
this.navBarGroup1.Name = "navBarGroup1";
|
||||
//
|
||||
// navBarItem2
|
||||
//
|
||||
this.navBarItem2.Caption = "权限维护";
|
||||
this.navBarItem2.Name = "navBarItem2";
|
||||
//
|
||||
// navBarItem3
|
||||
//
|
||||
this.navBarItem3.Caption = "系统维护";
|
||||
this.navBarItem3.Name = "navBarItem3";
|
||||
//
|
||||
// navBarItem1
|
||||
//
|
||||
this.navBarItem1.Caption = "数据集维护";
|
||||
this.navBarItem1.Name = "navBarItem1";
|
||||
this.navBarItem1.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.navBarItem1_LinkClicked);
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Enabled = true;
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// barListItem1
|
||||
//
|
||||
this.barListItem1.Caption = "barListItem1";
|
||||
this.barListItem1.Id = 5;
|
||||
this.barListItem1.Name = "barListItem1";
|
||||
//
|
||||
// bsi_UserName
|
||||
//
|
||||
this.bsi_UserName.Caption = "用戶名: 管理員";
|
||||
this.bsi_UserName.Id = 29;
|
||||
this.bsi_UserName.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("bsi_UserName.ImageOptions.Image")));
|
||||
this.bsi_UserName.Name = "bsi_UserName";
|
||||
this.bsi_UserName.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
|
||||
//
|
||||
// barStaticItem1
|
||||
//
|
||||
|
|
@ -217,20 +196,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
this.barStaticItem1.Id = 29;
|
||||
this.barStaticItem1.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("barStaticItem1.ImageOptions.Image")));
|
||||
this.barStaticItem1.Name = "barStaticItem1";
|
||||
//
|
||||
// barUserName
|
||||
//
|
||||
this.barUserName.Caption = "用户名:admin";
|
||||
this.barUserName.Id = 6;
|
||||
this.barUserName.ImageOptions.Image = global::WinformGeneralDeveloperFrame.Properties.Resources.bocustomer_16x16;
|
||||
this.barUserName.ImageOptions.LargeImage = global::WinformGeneralDeveloperFrame.Properties.Resources.bocustomer_32x321;
|
||||
this.barUserName.Name = "barUserName";
|
||||
//
|
||||
// barStaticItem3
|
||||
//
|
||||
this.barStaticItem3.Caption = "barStaticItem3";
|
||||
this.barStaticItem3.Id = 7;
|
||||
this.barStaticItem3.Name = "barStaticItem3";
|
||||
this.barStaticItem1.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
|
|
@ -270,10 +236,6 @@ namespace WinformGeneralDeveloperFrame
|
|||
private DevExpress.XtraEditors.Repository.RepositoryItemTimeEdit repositoryItemTimeEdit1;
|
||||
private DevExpress.XtraBars.BarStaticItem bsi_Date;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private DevExpress.XtraNavBar.NavBarGroup navBarGroup1;
|
||||
private DevExpress.XtraNavBar.NavBarItem navBarItem1;
|
||||
private DevExpress.XtraNavBar.NavBarItem navBarItem2;
|
||||
private DevExpress.XtraNavBar.NavBarItem navBarItem3;
|
||||
private DevExpress.XtraBars.BarListItem barListItem1;
|
||||
private DevExpress.XtraBars.BarStaticItem barUserName;
|
||||
private DevExpress.XtraBars.BarStaticItem barStaticItem3;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ using System.Text;
|
|||
using System.Windows.Forms;
|
||||
using DevExpress.XtraBars.Helpers;
|
||||
using DevExpress.XtraNavBar;
|
||||
using DevExpress.XtraSplashScreen;
|
||||
using MES;
|
||||
using MES.Entity;
|
||||
using MES.Form;
|
||||
using WinformGeneralDeveloperFrame.Commons;
|
||||
|
||||
|
|
@ -34,7 +36,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
{
|
||||
AppInfo.LoginUserInfo=db.sysUserInfo.ToList().First();
|
||||
}
|
||||
|
||||
Init();
|
||||
barUserName.Caption = $"用户名:{AppInfo.LoginUserInfo.username}";
|
||||
}
|
||||
|
||||
|
|
@ -45,10 +47,49 @@ namespace WinformGeneralDeveloperFrame
|
|||
bsi_Date.Caption = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
private void navBarItem1_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
|
||||
private void navBarItem1_LinkClicked(object sender, NavBarLinkEventArgs e)
|
||||
{
|
||||
NavBarItem navBarItem =sender as NavBarItem;
|
||||
ChildWinManagement.LoadShowForm(this, typeof(FrmShowForm), navBarItem.Caption);
|
||||
ChildWinManagement.LoadShowForm(this, typeof(FrmShowForm), navBarItem.Caption,1);
|
||||
}
|
||||
|
||||
private void Init()
|
||||
{
|
||||
NarBarInit();
|
||||
}
|
||||
|
||||
private void NarBarInit()
|
||||
{
|
||||
navBarControl1.Items.Clear();
|
||||
List<sysMenuInfo> menusList = new List<sysMenuInfo>();
|
||||
using (var db = new MESDB())
|
||||
{
|
||||
menusList=db.sysMenuInfo.ToList();
|
||||
}
|
||||
|
||||
foreach (var item in menusList)
|
||||
{
|
||||
if (item.pid == 0)
|
||||
{
|
||||
NavBarGroup gNavBarGroup = new NavBarGroup(item.name);
|
||||
foreach (var itemInfo in menusList)
|
||||
{
|
||||
if (itemInfo.pid == item.id)
|
||||
{
|
||||
NavBarItem navBarItem = new NavBarItem(itemInfo.name);
|
||||
navBarItem.LinkClicked += (sender, args) =>
|
||||
{
|
||||
NavBarItem nav = sender as NavBarItem;
|
||||
ChildWinManagement.LoadShowForm(this, typeof(FrmShowForm), nav.Caption, itemInfo.id);
|
||||
};
|
||||
NavBarItemLink navBarItemLink = new NavBarItemLink(navBarItem);
|
||||
gNavBarGroup.ItemLinks.Add(navBarItemLink);
|
||||
}
|
||||
}
|
||||
navBarControl1.Groups.Add(gNavBarGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace WinformGeneralDeveloperFrame
|
|||
{
|
||||
DevExpress.Skins.SkinManager.EnableFormSkins();
|
||||
UserLookAndFeel.Default.SetSkinStyle("Office 2010 Blue");
|
||||
|
||||
BonusSkins.Register();
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
|
|
|
|||
|
|
@ -23,9 +23,14 @@ namespace ${NameSpace}.Form
|
|||
}
|
||||
private void Frm${tableName}_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{layoutControlGroup1},new ${tableName}Info());
|
||||
InitSearchDicData();
|
||||
}
|
||||
/// <summary>
|
||||
/// 数据源初始化
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private void Init()
|
||||
{
|
||||
|
||||
|
|
@ -58,13 +63,25 @@ namespace ${NameSpace}.Form
|
|||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 搜索字段
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private void InitSearchDicData()
|
||||
{
|
||||
#foreach($info in $EntityList)
|
||||
#if(${info.isSearch})
|
||||
fieldDictionary.Add("${info.controlLabelName}","${info.dataBaseFieldName");
|
||||
#end
|
||||
#end
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool SaveFunction()
|
||||
{
|
||||
try
|
||||
|
|
@ -91,7 +108,10 @@ namespace ${NameSpace}.Form
|
|||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 字段为空校验
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool CheckInput()
|
||||
{
|
||||
#foreach($info in $EntityList)
|
||||
|
|
@ -106,6 +126,10 @@ namespace ${NameSpace}.Form
|
|||
#end
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool DelFunction()
|
||||
{
|
||||
try
|
||||
|
|
@ -124,5 +148,28 @@ namespace ${NameSpace}.Form
|
|||
}
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 搜索
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override void SearchFunction()
|
||||
{
|
||||
FrmSearch frm = new FrmSearch(fieldDictionary);
|
||||
if (frm.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
string sql = frm.sql;
|
||||
using (var db = new ${NameSpace}DB())
|
||||
{
|
||||
if (string.IsNullOrEmpty(sql))
|
||||
{
|
||||
grdList.DataSource = db.${tableName}Info.SqlQuery("select * from ${tableName}").ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
grdList.DataSource = db.${tableName}Info.SqlQuery($"select * from ${tableName} where {sql}").ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FCCDAF3A-FC3E-4F85-B794-2AAA299FBC45}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WinformGeneralDeveloperFrame</RootNamespace>
|
||||
<AssemblyName>WinformGeneralDeveloperFrame</AssemblyName>
|
||||
|
|
@ -120,6 +120,12 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BaseForm.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BaseForm.Designer.cs">
|
||||
<DependentUpon>BaseForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ChildWinManagement.cs" />
|
||||
<Compile Include="Commons\AppInfo.cs" />
|
||||
<Compile Include="ControlInfo.cs" />
|
||||
|
|
@ -226,6 +232,12 @@
|
|||
<Compile Include="XtraForm1.Designer.cs">
|
||||
<DependentUpon>XtraForm1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="BaseForm.resx">
|
||||
<DependentUpon>BaseForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form\FrmsysDictData.resx">
|
||||
<DependentUpon>FrmsysDictData.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form\FrmsysDictType.resx">
|
||||
<DependentUpon>FrmsysDictType.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
|||
|
|
@ -33,24 +33,24 @@ namespace WinformGeneralDeveloperFrame
|
|||
|
||||
private void XtraForm1_Load(object sender, EventArgs e)
|
||||
{
|
||||
using (var db =new Model1())
|
||||
{
|
||||
grdList.DataSource = db.T_ACL_Menu.ToList();
|
||||
treeListLookUpEdit1.Properties.DataSource = GetDataTableUtils.SqlTable("");
|
||||
lookUpEdit1.Properties.DataSource = db.T_ACL_Menu.Select(p => new {p.Name, p.ID}).ToList();
|
||||
repositoryItemTreeListLookUpEdit1TreeList.DataSource = db.T_ACL_Menu.Select(p => new { p.Name, p.ID, p.PID }).ToList();
|
||||
repositoryItemTreeListLookUpEdit1.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID, p.PID }).ToList();
|
||||
repositoryItemLookUpEdit1.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
|
||||
repositoryItemSearchLookUpEdit1.DataSource=db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
|
||||
searchLookUpEdit1.Properties.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
|
||||
checkedComboBoxEdit1.EditValue = "新增,复核";
|
||||
checkedComboBoxEdit1.Properties.DataSource= GetDataTableUtils.SqlTable("菜单tree");
|
||||
//comboBoxEdit1.Properties.Items.Add(db.T_ACL_Menu.Select(p => new { p.Name }).ToList());
|
||||
foreach (DataRow info in GetDataTableUtils.SqlTable("菜单tree").Rows)
|
||||
{
|
||||
comboBoxEdit1.Properties.Items.Add(info.ItemArray[2].ToString());
|
||||
}
|
||||
}
|
||||
//using (var db =new Model1())
|
||||
//{
|
||||
// grdList.DataSource = db.T_ACL_Menu.ToList();
|
||||
// treeListLookUpEdit1.Properties.DataSource = GetDataTableUtils.SqlTable("");
|
||||
// lookUpEdit1.Properties.DataSource = db.T_ACL_Menu.Select(p => new {p.Name, p.ID}).ToList();
|
||||
// repositoryItemTreeListLookUpEdit1TreeList.DataSource = db.T_ACL_Menu.Select(p => new { p.Name, p.ID, p.PID }).ToList();
|
||||
// repositoryItemTreeListLookUpEdit1.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID, p.PID }).ToList();
|
||||
// repositoryItemLookUpEdit1.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
|
||||
// repositoryItemSearchLookUpEdit1.DataSource=db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
|
||||
// searchLookUpEdit1.Properties.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
|
||||
// checkedComboBoxEdit1.EditValue = "新增,复核";
|
||||
// checkedComboBoxEdit1.Properties.DataSource= GetDataTableUtils.SqlTable("菜单tree");
|
||||
// //comboBoxEdit1.Properties.Items.Add(db.T_ACL_Menu.Select(p => new { p.Name }).ToList());
|
||||
// foreach (DataRow info in GetDataTableUtils.SqlTable("菜单tree").Rows)
|
||||
// {
|
||||
// comboBoxEdit1.Properties.Items.Add(info.ItemArray[2].ToString());
|
||||
// }
|
||||
//}
|
||||
//InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{Root},ne);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue