基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
@@ -0,0 +1,103 @@
namespace Lskj.PubTaskPlan.Control
{
partial class DayControl
{
/// <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
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.lb_interval1 = new System.Windows.Forms.Label();
this.spin_interval = new DevExpress.XtraEditors.SpinEdit();
this.lb_interval = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.spin_interval.Properties)).BeginInit();
this.SuspendLayout();
//
// lb_interval1
//
this.lb_interval1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_interval1.Location = new System.Drawing.Point(258, 3);
this.lb_interval1.Name = "lb_interval1";
this.lb_interval1.Size = new System.Drawing.Size(42, 18);
this.lb_interval1.TabIndex = 10;
this.lb_interval1.Text = "天";
//
// spin_interval
//
this.spin_interval.EditValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_interval.Location = new System.Drawing.Point(96, 0);
this.spin_interval.Name = "spin_interval";
this.spin_interval.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.spin_interval.Properties.IsFloatValue = false;
this.spin_interval.Properties.Mask.EditMask = "N00";
this.spin_interval.Properties.MaxValue = new decimal(new int[] {
365,
0,
0,
0});
this.spin_interval.Properties.MinValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_interval.Size = new System.Drawing.Size(156, 24);
this.spin_interval.TabIndex = 9;
//
// lb_interval
//
this.lb_interval.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_interval.Location = new System.Drawing.Point(0, 3);
this.lb_interval.Name = "lb_interval";
this.lb_interval.Size = new System.Drawing.Size(94, 18);
this.lb_interval.TabIndex = 8;
this.lb_interval.Text = "执行间隔(R):";
//
// DayControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lb_interval1);
this.Controls.Add(this.spin_interval);
this.Controls.Add(this.lb_interval);
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "DayControl";
this.Size = new System.Drawing.Size(354, 43);
((System.ComponentModel.ISupportInitialize)(this.spin_interval.Properties)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lb_interval1;
private System.Windows.Forms.Label lb_interval;
public DevExpress.XtraEditors.SpinEdit spin_interval;
}
}
@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Lskj.PubTaskPlan.Control
{
public partial class DayControl : UserControl
{
/// <summary>
/// 主窗体
/// </summary>
public FrmAddTaskPlan MainControl;
public DayControl()
{
InitializeComponent();
}
/// <summary>
/// 初始化事件
/// </summary>
public void InitEvent()
{
spin_interval.EditValueChanged += OnChanged;
}
/// <summary>
/// 时间控件时间改变时
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnChanged(object sender, EventArgs e)
{
if (MainControl != null)
{
MainControl.tips_memoEdit.Text = MainControl.GetTips();
}
}
}
}
@@ -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>
@@ -0,0 +1,269 @@
namespace Lskj.PubTaskPlan.Control
{
partial class MonthControl
{
/// <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
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.radio_monthDay = new System.Windows.Forms.RadioButton();
this.radio_monthWeek = new System.Windows.Forms.RadioButton();
this.lb_monthDay1 = new System.Windows.Forms.Label();
this.spin_MonthDayM = new DevExpress.XtraEditors.SpinEdit();
this.lb_monthDay2 = new System.Windows.Forms.Label();
this.spin_MonthDayD = new DevExpress.XtraEditors.SpinEdit();
this.lb_monthDay3 = new System.Windows.Forms.Label();
this.lb_monthWeek2 = new System.Windows.Forms.Label();
this.spin_MonthWeekM = new DevExpress.XtraEditors.SpinEdit();
this.lb_monthWeek1 = new System.Windows.Forms.Label();
this.comboBox_dayOfWeek = new DevExpress.XtraEditors.ComboBoxEdit();
this.comboBox_weekCount = new DevExpress.XtraEditors.ComboBoxEdit();
((System.ComponentModel.ISupportInitialize)(this.spin_MonthDayM.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.spin_MonthDayD.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.spin_MonthWeekM.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.comboBox_dayOfWeek.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.comboBox_weekCount.Properties)).BeginInit();
this.SuspendLayout();
//
// radio_monthDay
//
this.radio_monthDay.AutoSize = true;
this.radio_monthDay.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.radio_monthDay.ForeColor = System.Drawing.Color.Black;
this.radio_monthDay.Location = new System.Drawing.Point(3, 1);
this.radio_monthDay.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.radio_monthDay.Name = "radio_monthDay";
this.radio_monthDay.Size = new System.Drawing.Size(66, 22);
this.radio_monthDay.TabIndex = 1;
this.radio_monthDay.TabStop = true;
this.radio_monthDay.Text = "天(Y)";
this.radio_monthDay.UseVisualStyleBackColor = true;
//
// radio_monthWeek
//
this.radio_monthWeek.AutoSize = true;
this.radio_monthWeek.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.radio_monthWeek.ForeColor = System.Drawing.Color.Black;
this.radio_monthWeek.Location = new System.Drawing.Point(3, 28);
this.radio_monthWeek.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.radio_monthWeek.Name = "radio_monthWeek";
this.radio_monthWeek.Size = new System.Drawing.Size(66, 22);
this.radio_monthWeek.TabIndex = 2;
this.radio_monthWeek.TabStop = true;
this.radio_monthWeek.Text = "在(H)";
this.radio_monthWeek.UseVisualStyleBackColor = true;
//
// lb_monthDay1
//
this.lb_monthDay1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_monthDay1.Location = new System.Drawing.Point(93, 3);
this.lb_monthDay1.Name = "lb_monthDay1";
this.lb_monthDay1.Size = new System.Drawing.Size(49, 18);
this.lb_monthDay1.TabIndex = 3;
this.lb_monthDay1.Text = "每(R):";
//
// spin_MonthDayM
//
this.spin_MonthDayM.EditValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_MonthDayM.Location = new System.Drawing.Point(148, 0);
this.spin_MonthDayM.Name = "spin_MonthDayM";
this.spin_MonthDayM.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.spin_MonthDayM.Properties.IsFloatValue = false;
this.spin_MonthDayM.Properties.Mask.EditMask = "N00";
this.spin_MonthDayM.Properties.MaxValue = new decimal(new int[] {
12,
0,
0,
0});
this.spin_MonthDayM.Properties.MinValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_MonthDayM.Size = new System.Drawing.Size(47, 24);
this.spin_MonthDayM.TabIndex = 10;
//
// lb_monthDay2
//
this.lb_monthDay2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_monthDay2.Location = new System.Drawing.Point(201, 3);
this.lb_monthDay2.Name = "lb_monthDay2";
this.lb_monthDay2.Size = new System.Drawing.Size(84, 18);
this.lb_monthDay2.TabIndex = 11;
this.lb_monthDay2.Text = "个月-第(R):";
//
// spin_MonthDayD
//
this.spin_MonthDayD.EditValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_MonthDayD.Location = new System.Drawing.Point(290, 0);
this.spin_MonthDayD.Name = "spin_MonthDayD";
this.spin_MonthDayD.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.spin_MonthDayD.Properties.IsFloatValue = false;
this.spin_MonthDayD.Properties.Mask.EditMask = "N00";
this.spin_MonthDayD.Properties.MaxValue = new decimal(new int[] {
31,
0,
0,
0});
this.spin_MonthDayD.Properties.MinValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_MonthDayD.Size = new System.Drawing.Size(47, 24);
this.spin_MonthDayD.TabIndex = 13;
//
// lb_monthDay3
//
this.lb_monthDay3.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_monthDay3.Location = new System.Drawing.Point(343, 3);
this.lb_monthDay3.Name = "lb_monthDay3";
this.lb_monthDay3.Size = new System.Drawing.Size(43, 18);
this.lb_monthDay3.TabIndex = 14;
this.lb_monthDay3.Text = "天";
//
// lb_monthWeek2
//
this.lb_monthWeek2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_monthWeek2.Location = new System.Drawing.Point(201, 30);
this.lb_monthWeek2.Name = "lb_monthWeek2";
this.lb_monthWeek2.Size = new System.Drawing.Size(83, 18);
this.lb_monthWeek2.TabIndex = 17;
this.lb_monthWeek2.Text = "个月-第(F):";
//
// spin_MonthWeekM
//
this.spin_MonthWeekM.EditValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_MonthWeekM.Location = new System.Drawing.Point(148, 27);
this.spin_MonthWeekM.Name = "spin_MonthWeekM";
this.spin_MonthWeekM.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.spin_MonthWeekM.Properties.IsFloatValue = false;
this.spin_MonthWeekM.Properties.Mask.EditMask = "N00";
this.spin_MonthWeekM.Properties.MaxValue = new decimal(new int[] {
12,
0,
0,
0});
this.spin_MonthWeekM.Properties.MinValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_MonthWeekM.Size = new System.Drawing.Size(47, 24);
this.spin_MonthWeekM.TabIndex = 16;
//
// lb_monthWeek1
//
this.lb_monthWeek1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_monthWeek1.Location = new System.Drawing.Point(93, 30);
this.lb_monthWeek1.Name = "lb_monthWeek1";
this.lb_monthWeek1.Size = new System.Drawing.Size(48, 18);
this.lb_monthWeek1.TabIndex = 15;
this.lb_monthWeek1.Text = "每(F):";
//
// comboBox_dayOfWeek
//
this.comboBox_dayOfWeek.Location = new System.Drawing.Point(392, 27);
this.comboBox_dayOfWeek.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.comboBox_dayOfWeek.Name = "comboBox_dayOfWeek";
this.comboBox_dayOfWeek.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.comboBox_dayOfWeek.Properties.DropDownRows = 8;
this.comboBox_dayOfWeek.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.comboBox_dayOfWeek.Size = new System.Drawing.Size(96, 24);
this.comboBox_dayOfWeek.TabIndex = 35;
//
// comboBox_weekCount
//
this.comboBox_weekCount.Location = new System.Drawing.Point(290, 27);
this.comboBox_weekCount.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.comboBox_weekCount.Name = "comboBox_weekCount";
this.comboBox_weekCount.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.comboBox_weekCount.Properties.DropDownRows = 8;
this.comboBox_weekCount.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.comboBox_weekCount.Size = new System.Drawing.Size(96, 24);
this.comboBox_weekCount.TabIndex = 36;
//
// MonthControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.comboBox_weekCount);
this.Controls.Add(this.comboBox_dayOfWeek);
this.Controls.Add(this.lb_monthWeek2);
this.Controls.Add(this.spin_MonthWeekM);
this.Controls.Add(this.lb_monthWeek1);
this.Controls.Add(this.lb_monthDay3);
this.Controls.Add(this.spin_MonthDayD);
this.Controls.Add(this.lb_monthDay2);
this.Controls.Add(this.spin_MonthDayM);
this.Controls.Add(this.lb_monthDay1);
this.Controls.Add(this.radio_monthWeek);
this.Controls.Add(this.radio_monthDay);
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "MonthControl";
this.Size = new System.Drawing.Size(557, 73);
((System.ComponentModel.ISupportInitialize)(this.spin_MonthDayM.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.spin_MonthDayD.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.spin_MonthWeekM.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.comboBox_dayOfWeek.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.comboBox_weekCount.Properties)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lb_monthDay1;
private System.Windows.Forms.Label lb_monthDay2;
private System.Windows.Forms.Label lb_monthDay3;
private System.Windows.Forms.Label lb_monthWeek2;
private System.Windows.Forms.Label lb_monthWeek1;
public System.Windows.Forms.RadioButton radio_monthDay;
public System.Windows.Forms.RadioButton radio_monthWeek;
public DevExpress.XtraEditors.SpinEdit spin_MonthDayM;
public DevExpress.XtraEditors.SpinEdit spin_MonthDayD;
public DevExpress.XtraEditors.SpinEdit spin_MonthWeekM;
public DevExpress.XtraEditors.ComboBoxEdit comboBox_dayOfWeek;
public DevExpress.XtraEditors.ComboBoxEdit comboBox_weekCount;
}
}
@@ -0,0 +1,163 @@
using DevExpress.XtraEditors.Controls;
using Lskj.PubTaskPlan.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Lskj.PubTaskPlan.Control
{
public partial class MonthControl : UserControl
{
/// <summary>
/// 主窗体
/// </summary>
public FrmAddTaskPlan MainControl;
public MonthControl()
{
InitializeComponent();
InitControls();
}
#region
/// <summary>
/// 选择切换事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnRadioCheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton == radio_monthDay && radioButton.Checked)
{
//按天控件组
lb_monthDay1.Enabled = true;
spin_MonthDayM.Enabled = true;
lb_monthDay2.Enabled = true;
spin_MonthDayD.Enabled = true;
lb_monthDay3.Enabled = true;
//按周控件组
lb_monthWeek1.Enabled = false;
spin_MonthWeekM.Enabled = false;
lb_monthWeek2.Enabled = false;
comboBox_weekCount.Enabled = false;
comboBox_dayOfWeek.Enabled = false;
OnChanged(null, null);
}
else if (radioButton == radio_monthWeek && radioButton.Checked)
{
//按天控件组
lb_monthDay1.Enabled = false;
spin_MonthDayM.Enabled = false;
lb_monthDay2.Enabled = false;
spin_MonthDayD.Enabled = false;
lb_monthDay3.Enabled = false;
//按周控件组
lb_monthWeek1.Enabled = true;
spin_MonthWeekM.Enabled = true;
lb_monthWeek2.Enabled = true;
comboBox_weekCount.Enabled = true;
comboBox_dayOfWeek.Enabled = true;
OnChanged(null, null);
}
}
#endregion
#region
/// <summary>
/// 初始化控件
/// </summary>
private void InitControls()
{
InitRadios();
InitWeekCountComboBox();
InitWeekComboBox();
}
/// <summary>
/// 初始化第几个星期下拉框
/// </summary>
private void InitWeekCountComboBox()
{
ComboBoxItemCollection weekCountItems = comboBox_weekCount.Properties.Items;
weekCountItems.BeginUpdate();
try
{
weekCountItems.Add(new ComboBoxModel(0, "第一个"));
weekCountItems.Add(new ComboBoxModel(1, "第二个"));
weekCountItems.Add(new ComboBoxModel(2, "第三个"));
weekCountItems.Add(new ComboBoxModel(3, "第四个"));
weekCountItems.Add(new ComboBoxModel(4, "最后一个"));
}
finally
{
weekCountItems.EndUpdate();
}
}
/// <summary>
/// 初始化星期几下拉框
/// </summary>
private void InitWeekComboBox()
{
ComboBoxItemCollection weekItems = comboBox_dayOfWeek.Properties.Items;
weekItems.BeginUpdate();
try
{
weekItems.Add(new ComboBoxModel(0, "星期一"));
weekItems.Add(new ComboBoxModel(1, "星期二"));
weekItems.Add(new ComboBoxModel(2, "星期三"));
weekItems.Add(new ComboBoxModel(3, "星期四"));
weekItems.Add(new ComboBoxModel(4, "星期五"));
weekItems.Add(new ComboBoxModel(5, "星期六"));
weekItems.Add(new ComboBoxModel(6, "星期日"));
//weekItems.Add(new ComboBoxModel(7, "工作日"));
//weekItems.Add(new ComboBoxModel(8, "周末"));
}
finally
{
weekItems.EndUpdate();
}
}
/// <summary>
/// 初始化选择控件
/// </summary>
private void InitRadios()
{
radio_monthDay.CheckedChanged += OnRadioCheckedChanged;
radio_monthWeek.CheckedChanged += OnRadioCheckedChanged;
}
/// <summary>
/// 初始化事件
/// </summary>
public void InitEvent()
{
spin_MonthDayM.EditValueChanged += OnChanged;
spin_MonthDayD.EditValueChanged += OnChanged;
spin_MonthWeekM.EditValueChanged += OnChanged;
comboBox_weekCount.EditValueChanged += OnChanged;
comboBox_dayOfWeek.EditValueChanged += OnChanged;
}
/// <summary>
/// 时间控件时间改变时
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnChanged(object sender, EventArgs e)
{
try
{
if (MainControl != null)
{
MainControl.tips_memoEdit.Text = MainControl.GetTips();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
#endregion
}
}
@@ -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>
@@ -0,0 +1,131 @@
namespace Lskj.PubTaskPlan.Control
{
partial class WeekControl
{
/// <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
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.lb_interval = new System.Windows.Forms.Label();
this.lb_interval1 = new System.Windows.Forms.Label();
this.spin_interval = new DevExpress.XtraEditors.SpinEdit();
this.lb_interval2 = new System.Windows.Forms.Label();
this.checkComBox_dayOfWeek = new DevExpress.XtraEditors.CheckedComboBoxEdit();
((System.ComponentModel.ISupportInitialize)(this.spin_interval.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkComBox_dayOfWeek.Properties)).BeginInit();
this.SuspendLayout();
//
// lb_interval
//
this.lb_interval.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_interval.Location = new System.Drawing.Point(0, 3);
this.lb_interval.Name = "lb_interval";
this.lb_interval.Size = new System.Drawing.Size(94, 18);
this.lb_interval.TabIndex = 11;
this.lb_interval.Text = "执行间隔(R):";
//
// lb_interval1
//
this.lb_interval1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_interval1.Location = new System.Drawing.Point(94, 3);
this.lb_interval1.Name = "lb_interval1";
this.lb_interval1.Size = new System.Drawing.Size(49, 18);
this.lb_interval1.TabIndex = 12;
this.lb_interval1.Text = "每(R):";
//
// spin_interval
//
this.spin_interval.EditValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_interval.Location = new System.Drawing.Point(149, 0);
this.spin_interval.Name = "spin_interval";
this.spin_interval.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.spin_interval.Properties.IsFloatValue = false;
this.spin_interval.Properties.Mask.EditMask = "N00";
this.spin_interval.Properties.MaxValue = new decimal(new int[] {
48,
0,
0,
0});
this.spin_interval.Properties.MinValue = new decimal(new int[] {
1,
0,
0,
0});
this.spin_interval.Size = new System.Drawing.Size(55, 24);
this.spin_interval.TabIndex = 13;
//
// lb_interval2
//
this.lb_interval2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_interval2.Location = new System.Drawing.Point(210, 3);
this.lb_interval2.Name = "lb_interval2";
this.lb_interval2.Size = new System.Drawing.Size(53, 18);
this.lb_interval2.TabIndex = 15;
this.lb_interval2.Text = "周,在";
//
// checkComBox_dayOfWeek
//
this.checkComBox_dayOfWeek.Location = new System.Drawing.Point(269, 0);
this.checkComBox_dayOfWeek.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.checkComBox_dayOfWeek.Name = "checkComBox_dayOfWeek";
this.checkComBox_dayOfWeek.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.checkComBox_dayOfWeek.Properties.DropDownRows = 8;
this.checkComBox_dayOfWeek.Size = new System.Drawing.Size(305, 24);
this.checkComBox_dayOfWeek.TabIndex = 35;
//
// WeekControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.checkComBox_dayOfWeek);
this.Controls.Add(this.lb_interval2);
this.Controls.Add(this.spin_interval);
this.Controls.Add(this.lb_interval1);
this.Controls.Add(this.lb_interval);
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "WeekControl";
this.Size = new System.Drawing.Size(593, 49);
((System.ComponentModel.ISupportInitialize)(this.spin_interval.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkComBox_dayOfWeek.Properties)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lb_interval;
private System.Windows.Forms.Label lb_interval1;
private System.Windows.Forms.Label lb_interval2;
public DevExpress.XtraEditors.SpinEdit spin_interval;
public DevExpress.XtraEditors.CheckedComboBoxEdit checkComBox_dayOfWeek;
}
}
@@ -0,0 +1,77 @@
using DevExpress.XtraEditors.Controls;
using Lskj.PubTaskPlan.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Lskj.PubTaskPlan.Control
{
public partial class WeekControl : UserControl
{
/// <summary>
/// 主窗体
/// </summary>
public FrmAddTaskPlan MainControl;
public WeekControl()
{
InitializeComponent();
InitControls();
}
/// <summary>
/// 初始化控件数据
/// </summary>
private void InitControls()
{
InitWeekComboBox();
}
/// <summary>
/// 初始化星期几下拉框
/// </summary>
private void InitWeekComboBox()
{
CheckedListBoxItemCollection weekItems = checkComBox_dayOfWeek.Properties.Items;
weekItems.BeginUpdate();
try
{
weekItems.Add(new ComboBoxModel(0, "星期一"));
weekItems.Add(new ComboBoxModel(1, "星期二"));
weekItems.Add(new ComboBoxModel(2, "星期三"));
weekItems.Add(new ComboBoxModel(3, "星期四"));
weekItems.Add(new ComboBoxModel(4, "星期五"));
weekItems.Add(new ComboBoxModel(5, "星期六"));
weekItems.Add(new ComboBoxModel(6, "星期日"));
weekItems.Add(new ComboBoxModel(7, "工作日"));
weekItems.Add(new ComboBoxModel(8, "休息日"));
}
finally
{
weekItems.EndUpdate();
}
}
/// <summary>
/// 初始化事件
/// </summary>
public void InitEvent()
{
spin_interval.EditValueChanged += OnChanged;
checkComBox_dayOfWeek.EditValueChanged += OnChanged;
}
/// <summary>
/// 时间控件时间改变时
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnChanged(object sender, EventArgs e)
{
if (MainControl != null)
{
MainControl.tips_memoEdit.Text = MainControl.GetTips();
}
}
}
}
@@ -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>
+284
View File
@@ -0,0 +1,284 @@
namespace Lskj.PubTaskPlan
{
partial class FrmMain
{
/// <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 Windows Form 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.pl_main = new System.Windows.Forms.Panel();
this.mainGridControl = new DevExpress.XtraGrid.GridControl();
this.mainGridView = new DevExpress.XtraGrid.Views.Grid.GridView();
this.ScheduleID = new DevExpress.XtraGrid.Columns.GridColumn();
this.TaskPlanName = new DevExpress.XtraGrid.Columns.GridColumn();
this.Tips = new DevExpress.XtraGrid.Columns.GridColumn();
this.TipsMemoExEdit = new DevExpress.XtraEditors.Repository.RepositoryItemMemoExEdit();
this.Sql = new DevExpress.XtraGrid.Columns.GridColumn();
this.SqlMemoExEdit = new DevExpress.XtraEditors.Repository.RepositoryItemMemoExEdit();
this.NextDateTime = new DevExpress.XtraGrid.Columns.GridColumn();
this.EnableCheckState = new DevExpress.XtraGrid.Columns.GridColumn();
this.StateCheckEdit = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
this.pl_bottom = new System.Windows.Forms.Panel();
this.deleteBtn = new DevExpress.XtraEditors.SimpleButton();
this.addBtn = new DevExpress.XtraEditors.SimpleButton();
this.updateBtn = new DevExpress.XtraEditors.SimpleButton();
this.pl_main.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.mainGridControl)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.mainGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TipsMemoExEdit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.SqlMemoExEdit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.StateCheckEdit)).BeginInit();
this.pl_bottom.SuspendLayout();
this.SuspendLayout();
//
// pl_main
//
this.pl_main.Controls.Add(this.mainGridControl);
this.pl_main.Controls.Add(this.pl_bottom);
this.pl_main.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_main.Location = new System.Drawing.Point(0, 0);
this.pl_main.Name = "pl_main";
this.pl_main.Size = new System.Drawing.Size(1082, 653);
this.pl_main.TabIndex = 10;
//
// mainGridControl
//
this.mainGridControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainGridControl.Location = new System.Drawing.Point(0, 0);
this.mainGridControl.MainView = this.mainGridView;
this.mainGridControl.Name = "mainGridControl";
this.mainGridControl.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.StateCheckEdit,
this.TipsMemoExEdit,
this.SqlMemoExEdit});
this.mainGridControl.Size = new System.Drawing.Size(1082, 610);
this.mainGridControl.TabIndex = 13;
this.mainGridControl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.mainGridView});
//
// mainGridView
//
this.mainGridView.Appearance.HeaderPanel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.mainGridView.Appearance.HeaderPanel.Options.UseFont = true;
this.mainGridView.Appearance.HeaderPanel.Options.UseTextOptions = true;
this.mainGridView.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.mainGridView.Appearance.HeaderPanel.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.mainGridView.Appearance.Row.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.mainGridView.Appearance.Row.Options.UseFont = true;
this.mainGridView.Appearance.Row.Options.UseTextOptions = true;
this.mainGridView.Appearance.Row.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
this.mainGridView.Appearance.Row.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.mainGridView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.ScheduleID,
this.TaskPlanName,
this.Tips,
this.Sql,
this.NextDateTime,
this.EnableCheckState});
this.mainGridView.GridControl = this.mainGridControl;
this.mainGridView.IndicatorWidth = 60;
this.mainGridView.Name = "mainGridView";
this.mainGridView.OptionsBehavior.Editable = false;
this.mainGridView.OptionsCustomization.AllowFilter = false;
this.mainGridView.OptionsCustomization.AllowSort = false;
this.mainGridView.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never;
this.mainGridView.OptionsView.ShowGroupPanel = false;
//
// ScheduleID
//
this.ScheduleID.Caption = "序号";
this.ScheduleID.FieldName = "ScheduleID";
this.ScheduleID.Name = "ScheduleID";
this.ScheduleID.Width = 30;
//
// TaskPlanName
//
this.TaskPlanName.Caption = "任务名称";
this.TaskPlanName.FieldName = "TaskPlanName";
this.TaskPlanName.MaxWidth = 150;
this.TaskPlanName.MinWidth = 100;
this.TaskPlanName.Name = "TaskPlanName";
this.TaskPlanName.Visible = true;
this.TaskPlanName.VisibleIndex = 0;
this.TaskPlanName.Width = 150;
//
// Tips
//
this.Tips.Caption = "摘要";
this.Tips.ColumnEdit = this.TipsMemoExEdit;
this.Tips.FieldName = "Tips";
this.Tips.MaxWidth = 500;
this.Tips.MinWidth = 200;
this.Tips.Name = "Tips";
this.Tips.Visible = true;
this.Tips.VisibleIndex = 1;
this.Tips.Width = 300;
//
// TipsMemoExEdit
//
this.TipsMemoExEdit.AutoHeight = false;
this.TipsMemoExEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.TipsMemoExEdit.Name = "TipsMemoExEdit";
//
// Sql
//
this.Sql.Caption = "执行SQL";
this.Sql.ColumnEdit = this.SqlMemoExEdit;
this.Sql.FieldName = "Sql";
this.Sql.MaxWidth = 500;
this.Sql.MinWidth = 200;
this.Sql.Name = "Sql";
this.Sql.Visible = true;
this.Sql.VisibleIndex = 2;
this.Sql.Width = 300;
//
// SqlMemoExEdit
//
this.SqlMemoExEdit.AutoHeight = false;
this.SqlMemoExEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.SqlMemoExEdit.Name = "SqlMemoExEdit";
//
// NextDateTime
//
this.NextDateTime.Caption = "下次执行时间";
this.NextDateTime.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.NextDateTime.FieldName = "NextDateTime";
this.NextDateTime.MaxWidth = 200;
this.NextDateTime.MinWidth = 150;
this.NextDateTime.Name = "NextDateTime";
this.NextDateTime.Visible = true;
this.NextDateTime.VisibleIndex = 3;
this.NextDateTime.Width = 200;
//
// EnableCheckState
//
this.EnableCheckState.Caption = "已启用";
this.EnableCheckState.ColumnEdit = this.StateCheckEdit;
this.EnableCheckState.FieldName = "EnableCheckState";
this.EnableCheckState.MaxWidth = 80;
this.EnableCheckState.MinWidth = 80;
this.EnableCheckState.Name = "EnableCheckState";
this.EnableCheckState.Visible = true;
this.EnableCheckState.VisibleIndex = 4;
this.EnableCheckState.Width = 80;
//
// StateCheckEdit
//
this.StateCheckEdit.AutoHeight = false;
this.StateCheckEdit.Name = "StateCheckEdit";
//
// pl_bottom
//
this.pl_bottom.Controls.Add(this.deleteBtn);
this.pl_bottom.Controls.Add(this.addBtn);
this.pl_bottom.Controls.Add(this.updateBtn);
this.pl_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pl_bottom.Location = new System.Drawing.Point(0, 610);
this.pl_bottom.Name = "pl_bottom";
this.pl_bottom.Size = new System.Drawing.Size(1082, 43);
this.pl_bottom.TabIndex = 10;
//
// deleteBtn
//
this.deleteBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.deleteBtn.Appearance.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.deleteBtn.Appearance.Options.UseFont = true;
this.deleteBtn.Location = new System.Drawing.Point(994, 8);
this.deleteBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.Size = new System.Drawing.Size(80, 28);
this.deleteBtn.TabIndex = 13;
this.deleteBtn.TabStop = false;
this.deleteBtn.Text = "删除";
//
// addBtn
//
this.addBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.addBtn.Appearance.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.addBtn.Appearance.Options.UseFont = true;
this.addBtn.Location = new System.Drawing.Point(822, 8);
this.addBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.addBtn.Name = "addBtn";
this.addBtn.Size = new System.Drawing.Size(80, 28);
this.addBtn.TabIndex = 12;
this.addBtn.TabStop = false;
this.addBtn.Text = "新增";
//
// updateBtn
//
this.updateBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.updateBtn.Appearance.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.updateBtn.Appearance.Options.UseFont = true;
this.updateBtn.Location = new System.Drawing.Point(908, 8);
this.updateBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.updateBtn.Name = "updateBtn";
this.updateBtn.Size = new System.Drawing.Size(80, 28);
this.updateBtn.TabIndex = 11;
this.updateBtn.TabStop = false;
this.updateBtn.Text = "修改";
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1082, 653);
this.Controls.Add(this.pl_main);
this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "任务计划";
this.pl_main.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.mainGridControl)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.mainGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.TipsMemoExEdit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.SqlMemoExEdit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.StateCheckEdit)).EndInit();
this.pl_bottom.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel pl_main;
private DevExpress.XtraGrid.GridControl mainGridControl;
private DevExpress.XtraGrid.Views.Grid.GridView mainGridView;
private DevExpress.XtraGrid.Columns.GridColumn ScheduleID;
private DevExpress.XtraGrid.Columns.GridColumn TaskPlanName;
private DevExpress.XtraGrid.Columns.GridColumn Tips;
private DevExpress.XtraGrid.Columns.GridColumn Sql;
private DevExpress.XtraGrid.Columns.GridColumn NextDateTime;
private DevExpress.XtraGrid.Columns.GridColumn EnableCheckState;
private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit StateCheckEdit;
private System.Windows.Forms.Panel pl_bottom;
private DevExpress.XtraEditors.SimpleButton addBtn;
private DevExpress.XtraEditors.SimpleButton updateBtn;
private DevExpress.XtraEditors.Repository.RepositoryItemMemoExEdit TipsMemoExEdit;
private DevExpress.XtraEditors.Repository.RepositoryItemMemoExEdit SqlMemoExEdit;
private DevExpress.XtraEditors.SimpleButton deleteBtn;
}
}
+219
View File
@@ -0,0 +1,219 @@
using DevExpress.Utils;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Columns;
using Lskj.Core;
using System;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
namespace Lskj.PubTaskPlan
{
public partial class FrmMain : Form
{
/// <summary>
/// 主配置数据源
/// </summary>
private DataTable sourceTable = new DataTable();
public FrmMain()
{
InitializeComponent();
this.Load += OnFrmMainLoad;
this.addBtn.Click += OnAddBtnClick;
this.updateBtn.Click += OnUpdateBtnClick;
this.deleteBtn.Click += OnDeleteBtnClick;
}
/// <summary>
/// 窗体加载完成后
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnFrmMainLoad(object sender, EventArgs e)
{
try
{
InitGrid();
InitColumns();
if (DBConfig.Instance.CreateConnection())
{
sourceTable = SqlHelper.ExecuteDataTable("select * from Schedules");
mainGridControl.DataSource = sourceTable;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
this.Close();
this.Dispose();
}
}
/// <summary>
/// 添加按钮点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnAddBtnClick(object sender, EventArgs e)
{
try
{
FrmAddTaskPlan frmAdd = new FrmAddTaskPlan(null);
DialogResult dialogResult = frmAdd.ShowDialog();
if (dialogResult == DialogResult.OK)
{
SqlHelper.ExecuteNonQuery(frmAdd.ExecSql);
}
frmAdd.Dispose();
int focusedRowHandle = mainGridView.FocusedRowHandle;
sourceTable = SqlHelper.ExecuteDataTable("select * from Schedules");
mainGridControl.DataSource = sourceTable;
mainGridView.FocusedRowHandle = focusedRowHandle;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
/// <summary>
/// 更新按钮点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnUpdateBtnClick(object sender, EventArgs e)
{
try
{
DataRow focusedRow = mainGridView.GetFocusedDataRow();
if (focusedRow != null)
{
FrmAddTaskPlan frmAdd = new FrmAddTaskPlan(focusedRow);
DialogResult dialogResult = frmAdd.ShowDialog();
if (dialogResult == DialogResult.OK)
{
SqlHelper.ExecuteNonQuery(frmAdd.ExecSql);
}
frmAdd.Dispose();
int focusedRowHandle = mainGridView.FocusedRowHandle;
sourceTable = SqlHelper.ExecuteDataTable("select * from Schedules");
mainGridControl.DataSource = sourceTable;
mainGridView.FocusedRowHandle = focusedRowHandle;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
/// <summary>
/// 删除按钮点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnDeleteBtnClick(object sender, EventArgs e)
{
try
{
DataRow focusedRow = mainGridView.GetFocusedDataRow();
if (focusedRow != null)
{
int scheduleID = focusedRow.Table.Columns.Contains("ScheduleID") ? Convert.ToInt32(focusedRow["ScheduleID"] + "") : 0;
string deleteSql = $"delete from Schedules where ScheduleID = '{scheduleID}'";
SqlHelper.ExecuteNonQuery(deleteSql);
int focusedRowHandle = mainGridView.FocusedRowHandle;
sourceTable = SqlHelper.ExecuteDataTable("select * from Schedules");
mainGridControl.DataSource = sourceTable;
mainGridView.FocusedRowHandle = focusedRowHandle;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
/// <summary>
/// 表格双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnMainGridViewDoubleClick(object sender, EventArgs e)
{
try
{
DataRow focusedRow = mainGridView.GetFocusedDataRow();
if (focusedRow != null)
{
FrmAddTaskPlan frmAdd = new FrmAddTaskPlan(focusedRow);
DialogResult dialogResult = frmAdd.ShowDialog();
if (dialogResult == DialogResult.OK)
{
SqlHelper.ExecuteNonQuery(frmAdd.ExecSql);
}
frmAdd.Dispose();
int focusedRowHandle = mainGridView.FocusedRowHandle;
sourceTable = SqlHelper.ExecuteDataTable("select * from Schedules");
mainGridControl.DataSource = sourceTable;
mainGridView.FocusedRowHandle = focusedRowHandle;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
/// <summary>
/// 行选中改变颜色
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnGridViewCustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
{
try
{
if (e.RowHandle == mainGridView.FocusedRowHandle)
{
e.Appearance.BackColor = ColorTranslator.FromHtml("#9feb6a");
}
}
catch (Exception)
{
}
}
/// <summary>
/// 初始化表
/// </summary>
private void InitGrid()
{
mainGridView.CustomDrawCell += OnGridViewCustomDrawCell;
mainGridView.DoubleClick += OnMainGridViewDoubleClick;
}
/// <summary>
/// 初始化列
/// </summary>
private void InitColumns()
{
mainGridView.OptionsBehavior.Editable = true;
foreach (GridColumn gridColumn in mainGridView.Columns)
{
if (gridColumn.ColumnEdit != null)
{
gridColumn.ColumnEdit.ReadOnly = true;
}
else
{
gridColumn.OptionsColumn.AllowEdit = false;
}
}
TipsMemoExEdit.WordWrap = true;
TipsMemoExEdit.ShowDropDown = ShowDropDown.DoubleClick;
TipsMemoExEdit.ShowIcon = false;
TipsMemoExEdit.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
TipsMemoExEdit.AllowDropDownWhenReadOnly = DefaultBoolean.True;
SqlMemoExEdit.WordWrap = true;
SqlMemoExEdit.ShowDropDown = ShowDropDown.DoubleClick;
SqlMemoExEdit.ShowIcon = false;
SqlMemoExEdit.Appearance.TextOptions.WordWrap = WordWrap.Wrap;
SqlMemoExEdit.AllowDropDownWhenReadOnly = DefaultBoolean.True;
}
}
}
+120
View File
@@ -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>
@@ -0,0 +1,205 @@
<?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>{47DC1317-AE22-47C3-B654-53F02A44A4C7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Lskj.PubTaskPlan</RootNamespace>
<AssemblyName>Lskj.PubTaskPlan</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="API">
<HintPath>..\..\引用DLL\GpyApi\API.dll</HintPath>
</Reference>
<Reference Include="AxInterop.CamCaptureCtlLib">
<HintPath>..\..\引用DLL\AxInterop.CamCaptureCtlLib.dll</HintPath>
</Reference>
<Reference Include="DevExpress.Data.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Spreadsheet.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraBars.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v15.2.UI, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v15.2.Extensions, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraRichEdit.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraScheduler.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraScheduler.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraSpreadsheet.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraTreeList.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="FastReport">
<HintPath>..\..\引用DLL\FastReport.dll</HintPath>
</Reference>
<Reference Include="Geckofx-Core">
<HintPath>..\..\引用DLL\Geckofx-Core.dll</HintPath>
</Reference>
<Reference Include="Geckofx-Winforms">
<HintPath>..\..\引用DLL\Geckofx-Winforms.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Core">
<HintPath>..\..\引用DLL\GpyApi\IKVM.OpenJDK.Core.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Security">
<HintPath>..\..\引用DLL\GpyApi\IKVM.OpenJDK.Security.dll</HintPath>
</Reference>
<Reference Include="itextsharp">
<HintPath>..\..\引用DLL\itextsharp.dll</HintPath>
</Reference>
<Reference Include="libzkfpcsharp">
<HintPath>..\..\引用DLL\libzkfpcsharp.dll</HintPath>
</Reference>
<Reference Include="NPOI">
<HintPath>..\..\引用DLL\NPOI.dll</HintPath>
</Reference>
<Reference Include="O2S.Components.PDFView4NET">
<HintPath>..\..\引用DLL\O2S.Components.PDFView4NET.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="Spire.Barcode">
<HintPath>..\..\引用DLL\Spire.Barcode.dll</HintPath>
</Reference>
<Reference Include="Spire.Doc">
<HintPath>..\..\引用DLL\Spire.Doc.dll</HintPath>
</Reference>
<Reference Include="Spire.Pdf">
<HintPath>..\..\引用DLL\Spire.Pdf.dll</HintPath>
</Reference>
<Reference Include="Spire.XLS">
<HintPath>..\..\引用DLL\Spire.XLS.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Xilium.CefGlue">
<HintPath>..\..\引用DLL\Xilium.CefGlue.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Control\DayControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Control\DayControl.Designer.cs">
<DependentUpon>DayControl.cs</DependentUpon>
</Compile>
<Compile Include="Control\MonthControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Control\MonthControl.Designer.cs">
<DependentUpon>MonthControl.cs</DependentUpon>
</Compile>
<Compile Include="Control\WeekControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Control\WeekControl.Designer.cs">
<DependentUpon>WeekControl.cs</DependentUpon>
</Compile>
<Compile Include="FrmAddTaskPlan.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmAddTaskPlan.Designer.cs">
<DependentUpon>FrmAddTaskPlan.cs</DependentUpon>
</Compile>
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="HttpUtil.cs" />
<Compile Include="Model\ComboBoxModel.cs" />
<Compile Include="Model\DayControlModel.cs" />
<Compile Include="Model\MonthControlModel.cs" />
<Compile Include="Model\TaskPlanModel.cs" />
<Compile Include="Model\WeekControlModel.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Control\DayControl.resx">
<DependentUpon>DayControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Control\MonthControl.resx">
<DependentUpon>MonthControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Control\WeekControl.resx">
<DependentUpon>WeekControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmAddTaskPlan.resx">
<DependentUpon>FrmAddTaskPlan.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<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>
<ProjectReference Include="..\Lskj.Core\Lskj.Core.csproj">
<Project>{2A1BE6AC-1077-491B-A754-C5822FE8121E}</Project>
<Name>Lskj.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Lskj.Util\Lskj.Util.csproj">
<Project>{A51BF642-6543-4DE3-8948-83F558B72BD4}</Project>
<Name>Lskj.Util</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lskj.PubTaskPlan.Model
{
public class ComboBoxModel
{
/// <summary>
/// 隐藏值
/// </summary>
public int EditValue { get; set; }
/// <summary>
/// 显示值
/// </summary>
public string EditText { get; set; }
/// <summary>
/// 构造函数
/// </summary>
/// <param name="editValue"></param>
/// <param name="editText"></param>
public ComboBoxModel(int editValue, string editText)
{
EditValue = editValue;
EditText = editText;
}
public override string ToString()
{
return EditText;
}
}
}
@@ -0,0 +1,30 @@
using Lskj.PubTaskPlan.Control;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace Lskj.PubTaskPlan.Model
{
public class DayControlModel
{
private DayControl MianFormDayControl;
public DayControlModel(DayControl dayControl, DataRow dataRow)
{
if (dayControl != null)
{
MianFormDayControl = dayControl;
D_Day = dataRow != null && dataRow.Table.Columns.Contains("D_Day") ? Convert.ToInt32(dataRow["D_Day"] + "") : 1;
}
}
/// <summary>
/// 按天,执行间隔
/// </summary>
public int D_Day
{
get { return (int)MianFormDayControl.spin_interval.Value; }
set { MianFormDayControl.spin_interval.Value = value; }
}
}
}
@@ -0,0 +1,93 @@
using Lskj.PubTaskPlan.Control;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace Lskj.PubTaskPlan.Model
{
public class MonthControlModel
{
private MonthControl MainFormMonthControl;
public MonthControlModel(MonthControl monthControl, DataRow dataRow)
{
if (monthControl != null)
{
MainFormMonthControl = monthControl;
MonthType = dataRow != null && dataRow.Table.Columns.Contains("MonthType") ? Convert.ToInt32(dataRow["MonthType"] + "") : 0;
M_Month = dataRow != null && dataRow.Table.Columns.Contains("M_Month") ? Convert.ToInt32(dataRow["M_Month"] + "") : 1;
M_Day = dataRow != null && dataRow.Table.Columns.Contains("M_Day") ? Convert.ToInt32(dataRow["M_Day"] + "") : 1;
M_WeekMonth = dataRow != null && dataRow.Table.Columns.Contains("M_WeekMonth") ? Convert.ToInt32(dataRow["M_WeekMonth"] + "") : 1;
M_Week = dataRow != null && dataRow.Table.Columns.Contains("M_Week") ? Convert.ToInt32(dataRow["M_Week"] + "") : 0;
M_DayOfWeek = dataRow != null && dataRow.Table.Columns.Contains("M_DayOfWeek") ? Convert.ToInt32(dataRow["M_DayOfWeek"] + "") : 0;
}
}
/// <summary>
/// 按月,类型
/// </summary>
public int MonthType
{
get
{
int monthType = 0;
if (MainFormMonthControl.radio_monthWeek.Checked)
{
monthType = 1;
}
return monthType;
}
set
{
if (value == 0)
{
MainFormMonthControl.radio_monthDay.Checked = true;
}
else if (value == 1)
{
MainFormMonthControl.radio_monthWeek.Checked = true;
}
}
}
/// <summary>
/// 按月第几月
/// </summary>
public int M_Month
{
get { return (int)MainFormMonthControl.spin_MonthDayM.Value; }
set { MainFormMonthControl.spin_MonthDayM.Value = value; }
}
/// <summary>
/// 按月第几天
/// </summary>
public int M_Day
{
get { return (int)MainFormMonthControl.spin_MonthDayD.Value; }
set { MainFormMonthControl.spin_MonthDayD.Value = value; }
}
/// <summary>
/// 按周第几月
/// </summary>
public int M_WeekMonth
{
get { return (int)MainFormMonthControl.spin_MonthWeekM.Value; }
set { MainFormMonthControl.spin_MonthWeekM.Value = value; }
}
/// <summary>
/// 按周第几周
/// </summary>
public int M_Week
{
get { return MainFormMonthControl.comboBox_weekCount.SelectedIndex; }
set { MainFormMonthControl.comboBox_weekCount.SelectedIndex = value; }
}
/// <summary>
/// 按周星期几
/// </summary>
public int M_DayOfWeek
{
get { return MainFormMonthControl.comboBox_dayOfWeek.SelectedIndex; }
set { MainFormMonthControl.comboBox_dayOfWeek.SelectedIndex = value; }
}
}
}
@@ -0,0 +1,256 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace Lskj.PubTaskPlan.Model
{
public class TaskPlanModel
{
private FrmAddTaskPlan MainForm;
public TaskPlanModel(FrmAddTaskPlan frmMain, DataRow dataRow)
{
if (frmMain != null)
{
MainForm = frmMain;
ScheduleID = dataRow != null && dataRow.Table.Columns.Contains("ScheduleID") ? Convert.ToInt32(dataRow["ScheduleID"] + "") : 0;
NextDateTime = dataRow != null && dataRow.Table.Columns.Contains("NextDateTime") ? Convert.ToDateTime(dataRow["NextDateTime"] + "") : new DateTime();
MoudleId = dataRow != null && dataRow.Table.Columns.Contains("MoudleId") ? dataRow["MoudleId"] + "" : "";
TaskPlanName = dataRow != null && dataRow.Table.Columns.Contains("TaskPlanName") ? dataRow["TaskPlanName"] + "" : "";
TaskPlanType = dataRow != null && dataRow.Table.Columns.Contains("TaskPlanType") ? Convert.ToInt32(dataRow["TaskPlanType"] + "") : 0;
EnableCheckState = dataRow != null && dataRow.Table.Columns.Contains("EnableCheckState") ? Convert.ToBoolean(dataRow["EnableCheckState"] + "") : true;
OnetimeDate = dataRow != null && dataRow.Table.Columns.Contains("OneTimeDate") ? Convert.ToDateTime(dataRow["OneTimeDate"] + "") : DateTime.Now;
OnetimeTime = dataRow != null && dataRow.Table.Columns.Contains("OneTimeTime") ? Convert.ToDateTime(dataRow["OneTimeTime"] + "") : DateTime.Now;
LoopType = dataRow != null && dataRow.Table.Columns.Contains("LoopType") ? Convert.ToInt32(dataRow["LoopType"] + "") : 0;
LoopDayType = dataRow != null && dataRow.Table.Columns.Contains("LoopDayType") ? Convert.ToInt32(dataRow["LoopDayType"] + "") : 0;
LoopDayOnetimeTime = dataRow != null && dataRow.Table.Columns.Contains("LoopDayOnetimeTime") ? Convert.ToDateTime(dataRow["LoopDayOnetimeTime"] + "") : new DateTime();
LoopDayStartTime = dataRow != null && dataRow.Table.Columns.Contains("LoopDayStartTime") ? Convert.ToDateTime(dataRow["LoopDayStartTime"] + "") : new DateTime();
LoopDayEndTime = dataRow != null && dataRow.Table.Columns.Contains("LoopDayEndTime") ? Convert.ToDateTime(dataRow["LoopDayEndTime"] + "") : new DateTime().AddHours(23).AddMinutes(59).AddSeconds(59);
LoopDayInterval = dataRow != null && dataRow.Table.Columns.Contains("LoopDayInterval") ? Convert.ToInt32(dataRow["LoopDayInterval"] + "") : 1;
LoopDayIntervalUnit = dataRow != null && dataRow.Table.Columns.Contains("LoopDayIntervalUnit") ? Convert.ToInt32(dataRow["LoopDayIntervalUnit"] + "") : 0;
LoopStartDate = dataRow != null && dataRow.Table.Columns.Contains("LoopStartDate") ? Convert.ToDateTime(dataRow["LoopStartDate"] + "") : DateTime.Now;
LoopEndDate = dataRow != null && dataRow.Table.Columns.Contains("LoopEndDate") ? Convert.ToDateTime(dataRow["LoopEndDate"] + "") : DateTime.Now;
DateEndCheckState = dataRow != null && dataRow.Table.Columns.Contains("DateEndCheckState") ? Convert.ToBoolean(dataRow["DateEndCheckState"] + "") : true;
Sql = dataRow != null && dataRow.Table.Columns.Contains("Sql") ? dataRow["Sql"] + "" : "";
Tips = dataRow != null && dataRow.Table.Columns.Contains("Tips") ? dataRow["Tips"] + "" : "";
}
}
/// <summary>
/// 任务id
/// </summary>
private int scheduleID;
public int ScheduleID
{
get
{
return scheduleID;
}
set
{
scheduleID = value;
}
}
/// <summary>
/// 任务下次执行时间
/// </summary>
private DateTime nextDateTime;
public DateTime NextDateTime
{
get
{
return nextDateTime;
}
set
{
nextDateTime = value;
}
}
/// <summary>
/// 模块编号
/// </summary>
public string MoudleId
{
get;
set;
}
/// <summary>
/// 计划任务名称
/// </summary>
public string TaskPlanName
{
get { return MainForm.nameEdit.Text; }
set { MainForm.nameEdit.Text = value; }
}
/// <summary>
/// 计划任务类型
/// </summary>
public int TaskPlanType
{
get { return MainForm.comboBox_type.SelectedIndex; }
set { MainForm.comboBox_type.SelectedIndex = value; }
}
/// <summary>
/// 启用状态
/// </summary>
public bool EnableCheckState
{
get { return MainForm.enableCheck.Checked; }
set { MainForm.enableCheck.Checked = value; }
}
/// <summary>
/// 单次执行日期
/// </summary>
public DateTime OnetimeDate
{
get { return MainForm.oneTime_date.DateTime; }
set { MainForm.oneTime_date.DateTime = value; }
}
/// <summary>
/// 单次执行时间
/// </summary>
public DateTime OnetimeTime
{
get { return MainForm.oneTime_time.Time; ; }
set { MainForm.oneTime_time.Time = value; }
}
/// <summary>
/// 重复执行类型
/// </summary>
public int LoopType
{
get { return MainForm.comboBox_freq.SelectedIndex; }
set { MainForm.comboBox_freq.SelectedIndex = value; }
}
/// <summary>
/// 重复按天执行Model
/// </summary>
public DayControlModel LoopDayControlModel
{
get;
set;
}
/// <summary>
/// 重复按周执行Model
/// </summary>
public WeekControlModel LoopWeekControlModel
{
get;
set;
}
/// <summary>
/// 重复按月执行Model
/// </summary>
public MonthControlModel LoopMonthControlModel
{
get;
set;
}
/// <summary>
/// 重复每天频率类型
/// </summary>
public int LoopDayType
{
get
{
int freqType = 0;
if (MainForm.radio_interval.Checked)
{
freqType = 1;
}
return freqType;
}
set
{
if (value == 0)
{
MainForm.radio_oneTime.Checked = true;
}
else if (value == 1)
{
MainForm.radio_interval.Checked = true;
}
}
}
/// <summary>
/// 重复每天执行一次时间
/// </summary>
public DateTime LoopDayOnetimeTime
{
get { return MainForm.time_oneTime.Time; }
set { MainForm.time_oneTime.Time = value; }
}
/// <summary>
/// 重复每天执行间隔开始时间
/// </summary>
public DateTime LoopDayStartTime
{
get { return MainForm.time_start.Time; }
set { MainForm.time_start.Time = value; }
}
/// <summary>
/// 重复每天执行间隔结束时间
/// </summary>
public DateTime LoopDayEndTime
{
get { return MainForm.time_end.Time; }
set { MainForm.time_end.Time = value; }
}
/// <summary>
/// 重复每天执行间隔数量
/// </summary>
public int LoopDayInterval
{
get { return (int)MainForm.spin_interval.Value; }
set { MainForm.spin_interval.Value = value; }
}
/// <summary>
/// 重复每天执行间隔单位
/// </summary>
public int LoopDayIntervalUnit
{
get { return MainForm.comboBox_unit.SelectedIndex; }
set { MainForm.comboBox_unit.SelectedIndex = value; }
}
/// <summary>
/// 重复执行开始日期
/// </summary>
public DateTime LoopStartDate
{
get { return MainForm.date_start.DateTime; }
set { MainForm.date_start.DateTime = value; }
}
/// <summary>
/// 重复执行结束日期
/// </summary>
public DateTime LoopEndDate
{
get { return MainForm.date_end.DateTime; }
set { MainForm.date_end.DateTime = value; }
}
/// <summary>
/// 无结束日期复选框状态
/// </summary>
public bool DateEndCheckState
{
get { return MainForm.dateEndCheck.Checked; }
set { MainForm.dateEndCheck.Checked = value; }
}
/// <summary>
/// 执行语句
/// </summary>
public string Sql
{
get { return MainForm.sql_memoEdit.Text; }
set { MainForm.sql_memoEdit.Text = value; }
}
/// <summary>
/// 摘要
/// </summary>
public string Tips
{
get { return MainForm.tips_memoEdit.Text; }
set { MainForm.tips_memoEdit.Text = value; }
}
}
}
@@ -0,0 +1,39 @@
using Lskj.PubTaskPlan.Control;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace Lskj.PubTaskPlan.Model
{
public class WeekControlModel
{
private WeekControl MianFormWeekControl;
public WeekControlModel(WeekControl weekControl, DataRow dataRow)
{
if (weekControl != null)
{
MianFormWeekControl = weekControl;
W_Week = dataRow != null && dataRow.Table.Columns.Contains("W_Week") ? Convert.ToInt32(dataRow["W_Week"] + "") : 1;
W_DayOfWeek = dataRow != null && dataRow.Table.Columns.Contains("W_DayOfWeek") ? dataRow["W_DayOfWeek"] + "" : "";
}
}
/// <summary>
/// 按周,执行间隔
/// </summary>
public int W_Week
{
get { return (int)MianFormWeekControl.spin_interval.Value; }
set { MianFormWeekControl.spin_interval.Value = value; }
}
/// <summary>
/// 按周,星期几
/// </summary>
public string W_DayOfWeek
{
get { return MianFormWeekControl.checkComBox_dayOfWeek.EditValue + ""; }
set { MianFormWeekControl.checkComBox_dayOfWeek.EditValue = value; }
}
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Lskj.PubTaskPlan
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Lskj.PubTaskPlan.dll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lskj.PubTaskPlan.dll")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("47dc1317-ae22-47c3-b654-53f02a44a4c7")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lskj.PubTaskPlan.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lskj.PubTaskPlan.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;
}
}
}
}
@@ -0,0 +1,117 @@
<?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>
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lskj.PubTaskPlan.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.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;
}
}
}
}
@@ -0,0 +1,7 @@
<?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>