ow
No files matched your search
@@ -0,0 +1,398 @@
|
||||
namespace CloudBuilder.AI.Gui
|
||||
{
|
||||
partial class AiBookEnquiryPage
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
|
||||
mainPanel = new TableLayoutPanel();
|
||||
topPanel = new TableLayoutPanel();
|
||||
titleLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
titleTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
searchPanel = new TableLayoutPanel();
|
||||
searchBut = new Krypton.Toolkit.KryptonButton();
|
||||
resetBut = new Krypton.Toolkit.KryptonButton();
|
||||
createBut = new Krypton.Toolkit.KryptonButton();
|
||||
contextPanel = new TableLayoutPanel();
|
||||
dataGv = new Krypton.Toolkit.KryptonDataGridView();
|
||||
gridViewPagination = new CloudBuilder.Gui.GridViewPagination();
|
||||
bottomPanel = new TableLayoutPanel();
|
||||
operationPanel = new TableLayoutPanel();
|
||||
viewBut = new Krypton.Toolkit.KryptonButton();
|
||||
amendBut = new Krypton.Toolkit.KryptonButton();
|
||||
deleteBut = new Krypton.Toolkit.KryptonButton();
|
||||
dialogPanel = new TableLayoutPanel();
|
||||
okBut = new Krypton.Toolkit.KryptonButton();
|
||||
cancelBut = new Krypton.Toolkit.KryptonButton();
|
||||
authorLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
authorTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
titleCol = new Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
|
||||
authorCol = new Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
|
||||
mainPanel.SuspendLayout();
|
||||
topPanel.SuspendLayout();
|
||||
searchPanel.SuspendLayout();
|
||||
contextPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGv).BeginInit();
|
||||
bottomPanel.SuspendLayout();
|
||||
operationPanel.SuspendLayout();
|
||||
dialogPanel.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// mainPanel
|
||||
//
|
||||
mainPanel.ColumnCount = 1;
|
||||
mainPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
mainPanel.Controls.Add(topPanel, 0, 0);
|
||||
mainPanel.Controls.Add(contextPanel, 0, 1);
|
||||
mainPanel.Controls.Add(bottomPanel, 0, 2);
|
||||
mainPanel.Dock = DockStyle.Fill;
|
||||
mainPanel.Location = new Point(0, 0);
|
||||
mainPanel.Name = "mainPanel";
|
||||
mainPanel.RowCount = 3;
|
||||
mainPanel.RowStyles.Add(new RowStyle());
|
||||
mainPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
mainPanel.RowStyles.Add(new RowStyle());
|
||||
mainPanel.Size = new Size(1024, 800);
|
||||
mainPanel.TabIndex = 0;
|
||||
//
|
||||
// topPanel
|
||||
//
|
||||
topPanel.AutoSize = true;
|
||||
topPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
topPanel.ColumnCount = 7;
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.Controls.Add(titleLabel, 0, 0);
|
||||
topPanel.Controls.Add(titleTxt, 1, 0);
|
||||
topPanel.Controls.Add(searchPanel, 6, 0);
|
||||
topPanel.Controls.Add(authorLabel, 2, 0);
|
||||
topPanel.Controls.Add(authorTxt, 3, 0);
|
||||
topPanel.Dock = DockStyle.Fill;
|
||||
topPanel.Location = new Point(3, 3);
|
||||
topPanel.Name = "topPanel";
|
||||
topPanel.RowCount = 1;
|
||||
topPanel.RowStyles.Add(new RowStyle());
|
||||
topPanel.Size = new Size(1018, 31);
|
||||
topPanel.TabIndex = 0;
|
||||
//
|
||||
// titleLabel
|
||||
//
|
||||
titleLabel.Location = new Point(3, 3);
|
||||
titleLabel.Name = "titleLabel";
|
||||
titleLabel.Size = new Size(39, 20);
|
||||
titleLabel.TabIndex = 999;
|
||||
titleLabel.Values.Text = "书名:";
|
||||
//
|
||||
// titleTxt
|
||||
//
|
||||
titleTxt.Location = new Point(48, 3);
|
||||
titleTxt.Name = "titleTxt";
|
||||
titleTxt.Size = new Size(200, 23);
|
||||
titleTxt.TabIndex = 0;
|
||||
//
|
||||
// searchPanel
|
||||
//
|
||||
searchPanel.AutoSize = true;
|
||||
searchPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
searchPanel.ColumnCount = 3;
|
||||
searchPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
searchPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
searchPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
searchPanel.Controls.Add(searchBut, 0, 0);
|
||||
searchPanel.Controls.Add(resetBut, 1, 0);
|
||||
searchPanel.Controls.Add(createBut, 2, 0);
|
||||
searchPanel.Location = new Point(562, 0);
|
||||
searchPanel.Margin = new Padding(60, 0, 0, 0);
|
||||
searchPanel.Name = "searchPanel";
|
||||
searchPanel.RowCount = 1;
|
||||
searchPanel.RowStyles.Add(new RowStyle());
|
||||
searchPanel.Size = new Size(288, 31);
|
||||
searchPanel.TabIndex = 999;
|
||||
//
|
||||
// searchBut
|
||||
//
|
||||
searchBut.Location = new Point(3, 3);
|
||||
searchBut.Name = "searchBut";
|
||||
searchBut.Size = new Size(90, 25);
|
||||
searchBut.TabIndex = 0;
|
||||
searchBut.Values.Image = Properties.Resources.search_16;
|
||||
searchBut.Values.Text = "查询(&S)";
|
||||
searchBut.Click += searchBut_Click;
|
||||
//
|
||||
// resetBut
|
||||
//
|
||||
resetBut.Location = new Point(99, 3);
|
||||
resetBut.Name = "resetBut";
|
||||
resetBut.Size = new Size(90, 25);
|
||||
resetBut.TabIndex = 0;
|
||||
resetBut.Values.Image = Properties.Resources.reset_16;
|
||||
resetBut.Values.Text = "重置(&R)";
|
||||
resetBut.Click += resetBut_Click;
|
||||
//
|
||||
// createBut
|
||||
//
|
||||
createBut.Location = new Point(195, 3);
|
||||
createBut.Name = "createBut";
|
||||
createBut.Size = new Size(90, 25);
|
||||
createBut.TabIndex = 0;
|
||||
createBut.Values.Image = Properties.Resources.create_16;
|
||||
createBut.Values.Text = "新增(&C)";
|
||||
createBut.Click += createBut_Click;
|
||||
//
|
||||
// contextPanel
|
||||
//
|
||||
contextPanel.ColumnCount = 1;
|
||||
contextPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
contextPanel.Controls.Add(dataGv, 0, 0);
|
||||
contextPanel.Controls.Add(gridViewPagination, 0, 1);
|
||||
contextPanel.Dock = DockStyle.Fill;
|
||||
contextPanel.Location = new Point(3, 40);
|
||||
contextPanel.Name = "contextPanel";
|
||||
contextPanel.RowCount = 2;
|
||||
contextPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
|
||||
contextPanel.RowStyles.Add(new RowStyle());
|
||||
contextPanel.Size = new Size(1018, 683);
|
||||
contextPanel.TabIndex = 999;
|
||||
//
|
||||
// dataGv
|
||||
//
|
||||
dataGv.AllowUserToAddRows = false;
|
||||
dataGv.AllowUserToDeleteRows = false;
|
||||
dataGv.BorderStyle = BorderStyle.None;
|
||||
dataGv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGv.Columns.AddRange(new DataGridViewColumn[] { titleCol, authorCol });
|
||||
dataGv.Dock = DockStyle.Fill;
|
||||
dataGv.Location = new Point(3, 3);
|
||||
dataGv.Name = "dataGv";
|
||||
dataGv.Size = new Size(1012, 647);
|
||||
dataGv.TabIndex = 0;
|
||||
dataGv.CellDoubleClick += dataGv_CellDoubleClick;
|
||||
//
|
||||
// gridViewPagination
|
||||
//
|
||||
gridViewPagination.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
gridViewPagination.CurrentPage = 0;
|
||||
gridViewPagination.Dock = DockStyle.Fill;
|
||||
gridViewPagination.Limit = 20;
|
||||
gridViewPagination.Location = new Point(0, 653);
|
||||
gridViewPagination.Margin = new Padding(0);
|
||||
gridViewPagination.Name = "gridViewPagination";
|
||||
gridViewPagination.Page = 0;
|
||||
gridViewPagination.Size = new Size(1018, 30);
|
||||
gridViewPagination.TabIndex = 999;
|
||||
gridViewPagination.Total = 0;
|
||||
//
|
||||
// bottomPanel
|
||||
//
|
||||
bottomPanel.AutoSize = true;
|
||||
bottomPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
bottomPanel.ColumnCount = 2;
|
||||
bottomPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
||||
bottomPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
bottomPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
|
||||
bottomPanel.Controls.Add(operationPanel, 0, 0);
|
||||
bottomPanel.Controls.Add(dialogPanel, 2, 1);
|
||||
bottomPanel.Dock = DockStyle.Fill;
|
||||
bottomPanel.Location = new Point(3, 729);
|
||||
bottomPanel.Name = "bottomPanel";
|
||||
bottomPanel.RowCount = 2;
|
||||
bottomPanel.RowStyles.Add(new RowStyle());
|
||||
bottomPanel.RowStyles.Add(new RowStyle());
|
||||
bottomPanel.Size = new Size(1018, 68);
|
||||
bottomPanel.TabIndex = 999;
|
||||
//
|
||||
// operationPanel
|
||||
//
|
||||
operationPanel.AutoSize = true;
|
||||
operationPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
operationPanel.ColumnCount = 3;
|
||||
operationPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
operationPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 101F));
|
||||
operationPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
operationPanel.Controls.Add(viewBut, 0, 0);
|
||||
operationPanel.Controls.Add(amendBut, 1, 0);
|
||||
operationPanel.Controls.Add(deleteBut, 2, 0);
|
||||
operationPanel.Location = new Point(0, 0);
|
||||
operationPanel.Margin = new Padding(0);
|
||||
operationPanel.Name = "operationPanel";
|
||||
operationPanel.RowCount = 1;
|
||||
operationPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
|
||||
operationPanel.Size = new Size(293, 31);
|
||||
operationPanel.TabIndex = 0;
|
||||
//
|
||||
// viewBut
|
||||
//
|
||||
viewBut.Location = new Point(3, 3);
|
||||
viewBut.Name = "viewBut";
|
||||
viewBut.Size = new Size(90, 25);
|
||||
viewBut.TabIndex = 0;
|
||||
viewBut.Values.Image = Properties.Resources.view_16;
|
||||
viewBut.Values.Text = "查看(&V)";
|
||||
viewBut.Click += viewBut_Click;
|
||||
//
|
||||
// amendBut
|
||||
//
|
||||
amendBut.Location = new Point(99, 3);
|
||||
amendBut.Name = "amendBut";
|
||||
amendBut.Size = new Size(90, 25);
|
||||
amendBut.TabIndex = 0;
|
||||
amendBut.Values.Image = Properties.Resources.amend_16;
|
||||
amendBut.Values.Text = "修改(&A)";
|
||||
amendBut.Click += amendBut_Click;
|
||||
//
|
||||
// deleteBut
|
||||
//
|
||||
deleteBut.Location = new Point(200, 3);
|
||||
deleteBut.Name = "deleteBut";
|
||||
deleteBut.Size = new Size(90, 25);
|
||||
deleteBut.TabIndex = 0;
|
||||
deleteBut.Values.Image = Properties.Resources.delete_16;
|
||||
deleteBut.Values.Text = "删除(&D)";
|
||||
deleteBut.Click += deleteBut_Click;
|
||||
//
|
||||
// dialogPanel
|
||||
//
|
||||
dialogPanel.AutoSize = true;
|
||||
dialogPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
dialogPanel.ColumnCount = 2;
|
||||
dialogPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
dialogPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
dialogPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
|
||||
dialogPanel.Controls.Add(okBut, 0, 0);
|
||||
dialogPanel.Controls.Add(cancelBut, 1, 0);
|
||||
dialogPanel.Dock = DockStyle.Fill;
|
||||
dialogPanel.Location = new Point(823, 34);
|
||||
dialogPanel.Name = "dialogPanel";
|
||||
dialogPanel.RowCount = 1;
|
||||
dialogPanel.RowStyles.Add(new RowStyle());
|
||||
dialogPanel.Size = new Size(192, 31);
|
||||
dialogPanel.TabIndex = 1;
|
||||
//
|
||||
// okBut
|
||||
//
|
||||
okBut.Location = new Point(3, 3);
|
||||
okBut.Name = "okBut";
|
||||
okBut.Size = new Size(90, 25);
|
||||
okBut.TabIndex = 0;
|
||||
okBut.Values.Image = Properties.Resources.ok_16;
|
||||
okBut.Values.Text = "确定(&O)";
|
||||
okBut.Click += okBut_Click;
|
||||
//
|
||||
// cancelBut
|
||||
//
|
||||
cancelBut.Location = new Point(99, 3);
|
||||
cancelBut.Name = "cancelBut";
|
||||
cancelBut.Size = new Size(90, 25);
|
||||
cancelBut.TabIndex = 0;
|
||||
cancelBut.Values.Image = Properties.Resources.close_16;
|
||||
cancelBut.Values.Text = "取消(&C)";
|
||||
cancelBut.Click += cancelBut_Click;
|
||||
//
|
||||
// authorLabel
|
||||
//
|
||||
authorLabel.Location = new Point(254, 3);
|
||||
authorLabel.Name = "authorLabel";
|
||||
authorLabel.Size = new Size(39, 20);
|
||||
authorLabel.TabIndex = 999;
|
||||
authorLabel.Values.Text = "作者:";
|
||||
//
|
||||
// authorTxt
|
||||
//
|
||||
authorTxt.Location = new Point(299, 3);
|
||||
authorTxt.Name = "authorTxt";
|
||||
authorTxt.Size = new Size(200, 23);
|
||||
authorTxt.TabIndex = 0;
|
||||
//
|
||||
// titleCol
|
||||
//
|
||||
titleCol.DataPropertyName = "Title";
|
||||
titleCol.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
titleCol.HeaderText = "书名";
|
||||
titleCol.Name = "titleCol";
|
||||
titleCol.Width = 260;
|
||||
//
|
||||
// authorCol
|
||||
//
|
||||
authorCol.DataPropertyName = "Author";
|
||||
authorCol.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
authorCol.HeaderText = "作者";
|
||||
authorCol.Name = "authorCol";
|
||||
authorCol.Width = 160;
|
||||
//
|
||||
// AiBookEnquiryPage
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(mainPanel);
|
||||
Name = "AiBookEnquiryPage";
|
||||
mainPanel.ResumeLayout(false);
|
||||
mainPanel.PerformLayout();
|
||||
topPanel.ResumeLayout(false);
|
||||
topPanel.PerformLayout();
|
||||
searchPanel.ResumeLayout(false);
|
||||
contextPanel.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGv).EndInit();
|
||||
bottomPanel.ResumeLayout(false);
|
||||
bottomPanel.PerformLayout();
|
||||
operationPanel.ResumeLayout(false);
|
||||
dialogPanel.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TableLayoutPanel mainPanel;
|
||||
private TableLayoutPanel topPanel;
|
||||
private TableLayoutPanel searchPanel;
|
||||
private Krypton.Toolkit.KryptonButton searchBut;
|
||||
private Krypton.Toolkit.KryptonButton resetBut;
|
||||
private Krypton.Toolkit.KryptonButton createBut;
|
||||
private TableLayoutPanel contextPanel;
|
||||
private TableLayoutPanel bottomPanel;
|
||||
private TableLayoutPanel operationPanel;
|
||||
private Krypton.Toolkit.KryptonButton viewBut;
|
||||
private Krypton.Toolkit.KryptonButton amendBut;
|
||||
private Krypton.Toolkit.KryptonButton deleteBut;
|
||||
private Krypton.Toolkit.KryptonLabel titleLabel;
|
||||
private Krypton.Toolkit.KryptonTextBox titleTxt;
|
||||
private Krypton.Toolkit.KryptonDataGridView dataGv;
|
||||
private TableLayoutPanel dialogPanel;
|
||||
private Krypton.Toolkit.KryptonButton okBut;
|
||||
private Krypton.Toolkit.KryptonButton cancelBut;
|
||||
private CloudBuilder.Gui.GridViewPagination gridViewPagination;
|
||||
private Krypton.Toolkit.KryptonLabel authorLabel;
|
||||
private Krypton.Toolkit.KryptonTextBox authorTxt;
|
||||
private Krypton.Toolkit.KryptonDataGridViewTextBoxColumn titleCol;
|
||||
private Krypton.Toolkit.KryptonDataGridViewTextBoxColumn authorCol;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,397 @@
|
||||
using CloudBuilder.AI.Entity;
|
||||
using CloudBuilder.AI.Linkup;
|
||||
using CloudBuilder.AI.Policy;
|
||||
using CloudBuilder.AI.SearchCriteria;
|
||||
using CloudBuilder.Core.Report;
|
||||
using CloudBuilder.Core.Service;
|
||||
using CloudBuilder.Gui;
|
||||
using CloudBuilder.Request.AI;
|
||||
using CloudBuilder.Security.Linkup;
|
||||
using CloudBuilder.Security.Policy;
|
||||
using Krypton.Toolkit;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using System.Data;
|
||||
|
||||
|
||||
namespace CloudBuilder.AI.Gui
|
||||
{
|
||||
public partial class AiBookEnquiryPage : AbstractPage
|
||||
{
|
||||
private AiBookEntity[] aiBooks = null!;
|
||||
private AiBookSearchCriteria searchCriteria = null!;
|
||||
private BindingContextAttributeProvider provider;
|
||||
private AiBookRequest aiBookRequest;
|
||||
private SecurityMessagePolicy securityMessagePolicy;
|
||||
|
||||
//初始化Page,注入容器内,不要在此做任何事情
|
||||
public AiBookEnquiryPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 第一次加载时执行,只执行一次
|
||||
/// </summary>
|
||||
public override void FunctionLoaded()
|
||||
{
|
||||
try
|
||||
{
|
||||
base.FunctionLoaded();
|
||||
//初始化容器-------------------------------------
|
||||
aiBookRequest = ServiceHelper.GetTypeService<AiBookRequest>();
|
||||
securityMessagePolicy = ServiceHelper.GetTypeService<SecurityMessagePolicy>()!;
|
||||
|
||||
//界面初始化
|
||||
InitGui();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 每次从别的界面进入时执行,不包括下面的界面切换,发生在FunctionLoaded之后
|
||||
/// 这个是有参数传入,常用于查询界面进入到操作界面发生
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
public override void FunctionActivated(object param)
|
||||
{
|
||||
base.FunctionActivated(param);
|
||||
titleTxt.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// 当Page被选中时执行,用于Tab导航的切换,没有参数变化,跟FunctionActivated有区别
|
||||
/// </summary>
|
||||
public override void FunctionSelected()
|
||||
{
|
||||
this.ParentAbstractForm.AcceptButton = this.searchBut;
|
||||
if (!IsDialog)
|
||||
this.ParentAbstractForm.CancelButton = this.resetBut;
|
||||
else
|
||||
this.ParentAbstractForm.CancelButton = this.cancelBut;
|
||||
|
||||
titleTxt.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// 控件的初始化
|
||||
/// </summary>
|
||||
private void InitGui()
|
||||
{
|
||||
//DataGridView初始化不要自动生成列,且允许重排列名操作
|
||||
dataGv.InitColumn(true, true);
|
||||
//初始化绑定设置
|
||||
InitBindingContext();
|
||||
//设置显示模式
|
||||
SetDisplayMode(true);
|
||||
|
||||
InitGridViewPagination();
|
||||
}
|
||||
/// <summary>
|
||||
/// DataGridView分页控件初始化
|
||||
/// </summary>
|
||||
private void InitGridViewPagination()
|
||||
{
|
||||
searchCriteria = new AiBookSearchCriteria();
|
||||
gridViewPagination.SetLimit(searchCriteria.limit);
|
||||
gridViewPagination.OnPaginationChanged += Search;
|
||||
gridViewPagination.OnPrint += Print;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打印当前查询结果
|
||||
/// </summary>
|
||||
private void Print()
|
||||
{
|
||||
TemplateHeader[] headers = dataGv.GetTemplateHeaders();
|
||||
|
||||
//打印Excel
|
||||
new DataToExcelHelper<AiBookEntity>(null).PrintExcel(this.Parent.Text, this.Parent.Text, null, headers, aiBooks);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 有特殊要求的UI控件初始化设置,使用guiOperateHelper管理
|
||||
/// </summary>
|
||||
private void InitBindingContext()
|
||||
{
|
||||
InitPermission();
|
||||
|
||||
guiOperateHelper = new GuiOperateHelper();
|
||||
}
|
||||
|
||||
private void InitPermission()
|
||||
{
|
||||
viewBut.Set(AIPermissionPolicy.AiBook, Operate.Find);
|
||||
createBut.Set(AIPermissionPolicy.AiBook, Operate.Insert);
|
||||
amendBut.Set(AIPermissionPolicy.AiBook, Operate.Update);
|
||||
deleteBut.Set(AIPermissionPolicy.AiBook, Operate.Delete);
|
||||
}
|
||||
|
||||
private void SetDisplayMode(bool enable)
|
||||
{
|
||||
guiOperateHelper.EnableControls(true, this.searchPanel, this.bottomPanel);
|
||||
guiOperateHelper.EnableControls(false, dataGv);
|
||||
|
||||
if (aiBooks != null)
|
||||
guiOperateHelper.EnableControls(enable, viewBut, amendBut, deleteBut);
|
||||
else
|
||||
guiOperateHelper.EnableControls(false, viewBut, amendBut, deleteBut);
|
||||
|
||||
//如果是弹出的窗口,不显示
|
||||
createBut.Visible = !IsDialog;
|
||||
dialogPanel.Visible = IsDialog;
|
||||
operationPanel.Visible = !IsDialog;
|
||||
|
||||
this.titleTxt.Focus();
|
||||
}
|
||||
|
||||
private void searchBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Search();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 与Web同步写法
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private AiBookSearchCriteria PackSearchCriteria()
|
||||
{
|
||||
searchCriteria = new AiBookSearchCriteria();
|
||||
searchCriteria.limit = gridViewPagination.Limit;
|
||||
searchCriteria.page = gridViewPagination.CurrentPage;
|
||||
|
||||
List<SearchFilter> filters = new List<SearchFilter>();
|
||||
|
||||
SearchFilter filter = new SearchFilter();
|
||||
filter.Column = AiBookEntity.DB_TITLE;
|
||||
filter.Type = SearchFilterTypePolicy.TEXT;
|
||||
filter.Operator = SearchFilterOperatorPolicy.CN_CONTAIN;
|
||||
filter.Value = titleTxt.GetValue();
|
||||
filters.Add(filter);
|
||||
|
||||
filter.Column = AiBookEntity.DB_AUTHOR;
|
||||
filter.Type = SearchFilterTypePolicy.TEXT;
|
||||
filter.Operator = SearchFilterOperatorPolicy.CN_CONTAIN;
|
||||
filter.Value = titleTxt.GetValue();
|
||||
filters.Add(filter);
|
||||
|
||||
searchCriteria.Filter = filters.ToArray();
|
||||
|
||||
return searchCriteria;
|
||||
}
|
||||
|
||||
private void Search()
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = aiBookRequest.FindBySearchCriteria(PackSearchCriteria());
|
||||
|
||||
if (data != null) aiBooks = data.Datas;
|
||||
|
||||
gridViewPagination.SetTotal(data.Total);
|
||||
|
||||
if (aiBooks == null || aiBooks.Length == 0)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
guiOperateHelper.ResetControls(this.dataGv);
|
||||
return;
|
||||
}
|
||||
|
||||
dataGv.SetDataSource(aiBooks);
|
||||
|
||||
SetDisplayMode(true);
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void resetBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
guiOperateHelper.ResetControls(this.mainPanel);
|
||||
|
||||
SetDisplayMode(false);
|
||||
|
||||
}
|
||||
|
||||
private void createBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
DisplayPage(GuiDisplayMode.Create, null);
|
||||
}
|
||||
|
||||
private void DisplayPage(GuiDisplayMode mode, string guid)
|
||||
{
|
||||
AiBookOperationLinkup linkupData = new AiBookOperationLinkup();
|
||||
linkupData.DisplayMode = Convert.ToInt32(mode);
|
||||
linkupData.Guid = guid;
|
||||
|
||||
this.DisplayAbstractPage(typeof(AiBookOperationPage).Name, linkupData);
|
||||
}
|
||||
|
||||
private void viewBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGv.RowCount <= 0 || dataGv.SelectedCells.Count <= 0)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
return;
|
||||
}
|
||||
|
||||
AiBookEntity data = dataGv.GetRowData<AiBookEntity>(dataGv.SelectedCells[0].RowIndex);
|
||||
|
||||
DisplayPage(GuiDisplayMode.View, data.Guid);
|
||||
}
|
||||
|
||||
private void amendBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGv.RowCount <= 0 || dataGv.SelectedCells.Count <= 0)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
return;
|
||||
}
|
||||
|
||||
AiBookEntity data = dataGv.GetRowData<AiBookEntity>(dataGv.SelectedCells[0].RowIndex);
|
||||
|
||||
DisplayPage(GuiDisplayMode.Amend, data.Guid);
|
||||
}
|
||||
|
||||
private void deleteBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void Delete()
|
||||
{
|
||||
if (dataGv.RowCount <= 0 || dataGv.SelectedCells.Count <= 0)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
return;
|
||||
}
|
||||
|
||||
if (DialogResult.Yes != ShowMessageBox.ShowOption(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_CONFIRM_DEL_NULL), securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_DELETE))) return;
|
||||
|
||||
AiBookEntity[] datas = dataGv.GetSelectedCellsData<AiBookEntity>();
|
||||
|
||||
aiBookRequest.Deletes(datas.Select(x => x.Guid).ToArray());
|
||||
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_SUCCEED_DELETED_NULL));
|
||||
|
||||
Search();
|
||||
}
|
||||
|
||||
private void okBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (dataGv.RowCount <= 0 || dataGv.SelectedCells.Count <= 0) return;
|
||||
AiBookEntity[] datas = dataGv.GetSelectedCellsData<AiBookEntity>();
|
||||
|
||||
this.ParentAbstractForm.OutputData = datas;
|
||||
this.ParentAbstractForm.DialogResult = DialogResult.OK;
|
||||
this.ParentAbstractForm.Close();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.ParentAbstractForm.DialogResult = DialogResult.Cancel;
|
||||
this.ParentAbstractForm.Close();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void dataGv_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (IsDialog)
|
||||
okBut_Click(null, null);
|
||||
else
|
||||
viewBut_Click(null, null);
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="mainPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="topPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="contextPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bottomPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="topPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="searchPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="searchPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="searchBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="resetBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="createBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="searchBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="resetBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="createBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="contextPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bottomPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,908 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
|
||||
namespace CloudBuilder.AI.Gui
|
||||
{
|
||||
partial class AiBookOperationPage
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
|
||||
contentPanel = new TableLayoutPanel();
|
||||
tableLayoutPanel3 = new TableLayoutPanel();
|
||||
tableLayoutPanel4 = new TableLayoutPanel();
|
||||
kryptonHeader1 = new Krypton.Toolkit.KryptonHeader();
|
||||
tabControl1 = new TabControl();
|
||||
tabPage1 = new TabPage();
|
||||
tableLayoutPanel5 = new TableLayoutPanel();
|
||||
tableLayoutPanel1 = new TableLayoutPanel();
|
||||
delBut = new Krypton.Toolkit.KryptonButton();
|
||||
addBut = new Krypton.Toolkit.KryptonButton();
|
||||
tableLayoutPanel6 = new TableLayoutPanel();
|
||||
gridViewPagination = new CloudBuilder.Gui.GridViewPagination();
|
||||
sentenceGv = new Krypton.Toolkit.KryptonDataGridView();
|
||||
sentenceIndexCol = new DataGridViewTextBoxColumn();
|
||||
dialogueIndcCol = new Krypton.Toolkit.KryptonDataGridViewCheckBoxColumn();
|
||||
personNameCol = new Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
|
||||
sentenceContentCol = new DataGridViewTextBoxColumn();
|
||||
genderCol = new Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
|
||||
sentimentCol = new Krypton.Toolkit.KryptonDataGridViewTextBoxColumn();
|
||||
sentenceStatusCol = new Krypton.Toolkit.KryptonDataGridViewComboBoxColumn();
|
||||
dataGv = new Krypton.Toolkit.KryptonDataGridView();
|
||||
chapterIndexCol = new DataGridViewTextBoxColumn();
|
||||
titleCol = new DataGridViewTextBoxColumn();
|
||||
contentCol = new DataGridViewTextBoxColumn();
|
||||
statusCol = new DataGridViewTextBoxColumn();
|
||||
tabPage2 = new TabPage();
|
||||
tableLayoutPanel2 = new TableLayoutPanel();
|
||||
statusCombo = new Krypton.Toolkit.KryptonComboBox();
|
||||
processBut = new Krypton.Toolkit.KryptonButton();
|
||||
uploadBut = new Krypton.Toolkit.KryptonButton();
|
||||
guidLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
bookTypeLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
guidTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
titleLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
titleTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
authorLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
descriptionLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
filePathLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
descriptionTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
authorTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
filePathTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
statusLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
bookTypeTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
kryptonPanel2 = new Krypton.Toolkit.KryptonPanel();
|
||||
mainPanel = new TableLayoutPanel();
|
||||
topPanel = new TableLayoutPanel();
|
||||
searchPanel = new TableLayoutPanel();
|
||||
createBut = new Krypton.Toolkit.KryptonButton();
|
||||
resetBut = new Krypton.Toolkit.KryptonButton();
|
||||
searchBut = new Krypton.Toolkit.KryptonButton();
|
||||
guidSearchLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
guidSearchTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
permissionNameSearchBut = new Krypton.Toolkit.ButtonSpecAny();
|
||||
kryptonPanel1 = new Krypton.Toolkit.KryptonPanel();
|
||||
bottomPanel = new TableLayoutPanel();
|
||||
savePanel = new TableLayoutPanel();
|
||||
cancelBut = new Krypton.Toolkit.KryptonButton();
|
||||
saveBut = new Krypton.Toolkit.KryptonButton();
|
||||
operationPanel = new TableLayoutPanel();
|
||||
deleteBut = new Krypton.Toolkit.KryptonButton();
|
||||
amendBut = new Krypton.Toolkit.KryptonButton();
|
||||
contentPanel.SuspendLayout();
|
||||
tableLayoutPanel3.SuspendLayout();
|
||||
tableLayoutPanel4.SuspendLayout();
|
||||
tabControl1.SuspendLayout();
|
||||
tabPage1.SuspendLayout();
|
||||
tableLayoutPanel5.SuspendLayout();
|
||||
tableLayoutPanel1.SuspendLayout();
|
||||
tableLayoutPanel6.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)sentenceGv).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGv).BeginInit();
|
||||
tableLayoutPanel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)statusCombo).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)kryptonPanel2).BeginInit();
|
||||
mainPanel.SuspendLayout();
|
||||
topPanel.SuspendLayout();
|
||||
searchPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)kryptonPanel1).BeginInit();
|
||||
bottomPanel.SuspendLayout();
|
||||
savePanel.SuspendLayout();
|
||||
operationPanel.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// contentPanel
|
||||
//
|
||||
contentPanel.ColumnCount = 1;
|
||||
contentPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
contentPanel.Controls.Add(tableLayoutPanel3, 0, 2);
|
||||
contentPanel.Controls.Add(tableLayoutPanel2, 0, 0);
|
||||
contentPanel.Controls.Add(kryptonPanel2, 0, 1);
|
||||
contentPanel.Dock = DockStyle.Fill;
|
||||
contentPanel.Location = new Point(3, 51);
|
||||
contentPanel.Name = "contentPanel";
|
||||
contentPanel.RowCount = 3;
|
||||
contentPanel.RowStyles.Add(new RowStyle());
|
||||
contentPanel.RowStyles.Add(new RowStyle());
|
||||
contentPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
contentPanel.Size = new Size(1018, 672);
|
||||
contentPanel.TabIndex = 3;
|
||||
//
|
||||
// tableLayoutPanel3
|
||||
//
|
||||
tableLayoutPanel3.BackColor = SystemColors.Control;
|
||||
tableLayoutPanel3.ColumnCount = 1;
|
||||
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle());
|
||||
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
|
||||
tableLayoutPanel3.Controls.Add(tableLayoutPanel4, 0, 0);
|
||||
tableLayoutPanel3.Dock = DockStyle.Fill;
|
||||
tableLayoutPanel3.Location = new Point(3, 207);
|
||||
tableLayoutPanel3.Name = "tableLayoutPanel3";
|
||||
tableLayoutPanel3.RowCount = 1;
|
||||
tableLayoutPanel3.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel3.Size = new Size(1018, 462);
|
||||
tableLayoutPanel3.TabIndex = 2;
|
||||
//
|
||||
// tableLayoutPanel4
|
||||
//
|
||||
tableLayoutPanel4.ColumnCount = 1;
|
||||
tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
||||
tableLayoutPanel4.Controls.Add(kryptonHeader1, 0, 0);
|
||||
tableLayoutPanel4.Controls.Add(tabControl1, 0, 1);
|
||||
tableLayoutPanel4.Dock = DockStyle.Fill;
|
||||
tableLayoutPanel4.Location = new Point(0, 0);
|
||||
tableLayoutPanel4.Margin = new Padding(0);
|
||||
tableLayoutPanel4.Name = "tableLayoutPanel4";
|
||||
tableLayoutPanel4.RowCount = 2;
|
||||
tableLayoutPanel4.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
tableLayoutPanel4.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
|
||||
tableLayoutPanel4.Size = new Size(1018, 463);
|
||||
tableLayoutPanel4.TabIndex = 1;
|
||||
//
|
||||
// kryptonHeader1
|
||||
//
|
||||
kryptonHeader1.Dock = DockStyle.Top;
|
||||
kryptonHeader1.Location = new Point(0, 0);
|
||||
kryptonHeader1.Margin = new Padding(0);
|
||||
kryptonHeader1.Name = "kryptonHeader1";
|
||||
kryptonHeader1.Size = new Size(1018, 31);
|
||||
kryptonHeader1.TabIndex = 0;
|
||||
kryptonHeader1.Values.Description = "";
|
||||
kryptonHeader1.Values.Heading = "小说明细";
|
||||
kryptonHeader1.Values.Image = null;
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
tabControl1.Controls.Add(tabPage1);
|
||||
tabControl1.Controls.Add(tabPage2);
|
||||
tabControl1.Dock = DockStyle.Fill;
|
||||
tabControl1.Location = new Point(3, 34);
|
||||
tabControl1.Name = "tabControl1";
|
||||
tabControl1.SelectedIndex = 0;
|
||||
tabControl1.Size = new Size(1012, 426);
|
||||
tabControl1.TabIndex = 1;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
tabPage1.Controls.Add(tableLayoutPanel5);
|
||||
tabPage1.Location = new Point(4, 24);
|
||||
tabPage1.Name = "tabPage1";
|
||||
tabPage1.Padding = new Padding(3);
|
||||
tabPage1.Size = new Size(1004, 398);
|
||||
tabPage1.TabIndex = 0;
|
||||
tabPage1.Text = "章节";
|
||||
tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tableLayoutPanel5
|
||||
//
|
||||
tableLayoutPanel5.ColumnCount = 1;
|
||||
tableLayoutPanel5.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableLayoutPanel5.Controls.Add(tableLayoutPanel1, 0, 1);
|
||||
tableLayoutPanel5.Controls.Add(tableLayoutPanel6, 0, 0);
|
||||
tableLayoutPanel5.Dock = DockStyle.Fill;
|
||||
tableLayoutPanel5.Location = new Point(3, 3);
|
||||
tableLayoutPanel5.Name = "tableLayoutPanel5";
|
||||
tableLayoutPanel5.RowCount = 2;
|
||||
tableLayoutPanel5.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
|
||||
tableLayoutPanel5.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel5.Size = new Size(998, 392);
|
||||
tableLayoutPanel5.TabIndex = 0;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
tableLayoutPanel1.AutoSize = true;
|
||||
tableLayoutPanel1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
tableLayoutPanel1.ColumnCount = 2;
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle());
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle());
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
|
||||
tableLayoutPanel1.Controls.Add(delBut, 1, 0);
|
||||
tableLayoutPanel1.Controls.Add(addBut, 0, 0);
|
||||
tableLayoutPanel1.Location = new Point(3, 358);
|
||||
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
tableLayoutPanel1.RowCount = 1;
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel1.Size = new Size(92, 31);
|
||||
tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// delBut
|
||||
//
|
||||
delBut.Location = new Point(49, 3);
|
||||
delBut.Name = "delBut";
|
||||
delBut.Size = new Size(40, 25);
|
||||
delBut.TabIndex = 2;
|
||||
delBut.Values.Image = Properties.Resources.navigate_minus;
|
||||
delBut.Values.Text = "";
|
||||
delBut.Click += delBut_Click;
|
||||
//
|
||||
// addBut
|
||||
//
|
||||
addBut.Location = new Point(3, 3);
|
||||
addBut.Name = "addBut";
|
||||
addBut.Size = new Size(40, 25);
|
||||
addBut.TabIndex = 1;
|
||||
addBut.Values.Image = Properties.Resources.navigate_plus;
|
||||
addBut.Values.Text = "";
|
||||
addBut.Click += addBut_Click;
|
||||
//
|
||||
// tableLayoutPanel6
|
||||
//
|
||||
tableLayoutPanel6.ColumnCount = 2;
|
||||
tableLayoutPanel6.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableLayoutPanel6.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableLayoutPanel6.Controls.Add(gridViewPagination, 0, 1);
|
||||
tableLayoutPanel6.Controls.Add(sentenceGv, 1, 0);
|
||||
tableLayoutPanel6.Controls.Add(dataGv, 0, 0);
|
||||
tableLayoutPanel6.Dock = DockStyle.Fill;
|
||||
tableLayoutPanel6.Location = new Point(3, 3);
|
||||
tableLayoutPanel6.Name = "tableLayoutPanel6";
|
||||
tableLayoutPanel6.RowCount = 2;
|
||||
tableLayoutPanel6.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
tableLayoutPanel6.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel6.Size = new Size(992, 349);
|
||||
tableLayoutPanel6.TabIndex = 1;
|
||||
//
|
||||
// gridViewPagination
|
||||
//
|
||||
gridViewPagination.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
gridViewPagination.CurrentPage = 0;
|
||||
gridViewPagination.Dock = DockStyle.Fill;
|
||||
gridViewPagination.Limit = 20;
|
||||
gridViewPagination.Location = new Point(0, 319);
|
||||
gridViewPagination.Margin = new Padding(0);
|
||||
gridViewPagination.Name = "gridViewPagination";
|
||||
gridViewPagination.Page = 0;
|
||||
gridViewPagination.Size = new Size(496, 30);
|
||||
gridViewPagination.TabIndex = 1000;
|
||||
gridViewPagination.Total = 0;
|
||||
//
|
||||
// sentenceGv
|
||||
//
|
||||
sentenceGv.AllowUserToAddRows = false;
|
||||
sentenceGv.AllowUserToDeleteRows = false;
|
||||
sentenceGv.BorderStyle = BorderStyle.None;
|
||||
sentenceGv.Columns.AddRange(new DataGridViewColumn[] { sentenceIndexCol, dialogueIndcCol, personNameCol, sentenceContentCol, genderCol, sentimentCol, sentenceStatusCol });
|
||||
sentenceGv.Dock = DockStyle.Fill;
|
||||
sentenceGv.Location = new Point(504, 0);
|
||||
sentenceGv.Margin = new Padding(8, 0, 0, 0);
|
||||
sentenceGv.Name = "sentenceGv";
|
||||
tableLayoutPanel6.SetRowSpan(sentenceGv, 2);
|
||||
sentenceGv.Size = new Size(488, 349);
|
||||
sentenceGv.TabIndex = 4;
|
||||
//
|
||||
// sentenceIndexCol
|
||||
//
|
||||
sentenceIndexCol.DataPropertyName = "ParagraphIndex";
|
||||
sentenceIndexCol.HeaderText = "序号";
|
||||
sentenceIndexCol.Name = "sentenceIndexCol";
|
||||
//
|
||||
// dialogueIndcCol
|
||||
//
|
||||
dialogueIndcCol.DataPropertyName = "DialogueIndc";
|
||||
dataGridViewCellStyle1.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle1.NullValue = false;
|
||||
dialogueIndcCol.DefaultCellStyle = dataGridViewCellStyle1;
|
||||
dialogueIndcCol.FalseValue = "Y";
|
||||
dialogueIndcCol.HeaderText = "旁白?";
|
||||
dialogueIndcCol.IndeterminateValue = null;
|
||||
dialogueIndcCol.Name = "dialogueIndcCol";
|
||||
dialogueIndcCol.TrueValue = "N";
|
||||
//
|
||||
// personNameCol
|
||||
//
|
||||
personNameCol.DataPropertyName = "PersonName";
|
||||
personNameCol.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
personNameCol.HeaderText = "人名";
|
||||
personNameCol.Name = "personNameCol";
|
||||
personNameCol.Width = 100;
|
||||
//
|
||||
// sentenceContentCol
|
||||
//
|
||||
sentenceContentCol.DataPropertyName = "Content";
|
||||
sentenceContentCol.HeaderText = "内容";
|
||||
sentenceContentCol.Name = "sentenceContentCol";
|
||||
sentenceContentCol.Width = 300;
|
||||
//
|
||||
// genderCol
|
||||
//
|
||||
genderCol.DataPropertyName = "Gender";
|
||||
genderCol.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
genderCol.HeaderText = "性别";
|
||||
genderCol.Name = "genderCol";
|
||||
genderCol.Width = 100;
|
||||
//
|
||||
// sentimentCol
|
||||
//
|
||||
sentimentCol.DataPropertyName = "Sentiment";
|
||||
sentimentCol.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
sentimentCol.HeaderText = "情感";
|
||||
sentimentCol.Name = "sentimentCol";
|
||||
sentimentCol.Width = 100;
|
||||
//
|
||||
// sentenceStatusCol
|
||||
//
|
||||
sentenceStatusCol.DataPropertyName = "Status";
|
||||
sentenceStatusCol.DataSource = null;
|
||||
sentenceStatusCol.DropDownWidth = 121;
|
||||
sentenceStatusCol.HeaderText = "状态";
|
||||
sentenceStatusCol.Name = "sentenceStatusCol";
|
||||
sentenceStatusCol.Width = 100;
|
||||
//
|
||||
// dataGv
|
||||
//
|
||||
dataGv.AllowUserToAddRows = false;
|
||||
dataGv.AllowUserToDeleteRows = false;
|
||||
dataGv.BorderStyle = BorderStyle.None;
|
||||
dataGv.Columns.AddRange(new DataGridViewColumn[] { chapterIndexCol, titleCol, contentCol, statusCol });
|
||||
dataGv.Dock = DockStyle.Fill;
|
||||
dataGv.Location = new Point(0, 0);
|
||||
dataGv.Margin = new Padding(0);
|
||||
dataGv.Name = "dataGv";
|
||||
dataGv.Size = new Size(496, 319);
|
||||
dataGv.TabIndex = 3;
|
||||
dataGv.CellClick += dataGv_CellClick;
|
||||
//
|
||||
// chapterIndexCol
|
||||
//
|
||||
chapterIndexCol.DataPropertyName = "ChapterIndex";
|
||||
chapterIndexCol.HeaderText = "序号";
|
||||
chapterIndexCol.Name = "chapterIndexCol";
|
||||
chapterIndexCol.Width = 80;
|
||||
//
|
||||
// titleCol
|
||||
//
|
||||
titleCol.DataPropertyName = "Title";
|
||||
titleCol.HeaderText = "标题";
|
||||
titleCol.Name = "titleCol";
|
||||
titleCol.Width = 200;
|
||||
//
|
||||
// contentCol
|
||||
//
|
||||
contentCol.DataPropertyName = "Content";
|
||||
contentCol.HeaderText = "内容";
|
||||
contentCol.Name = "contentCol";
|
||||
contentCol.Width = 160;
|
||||
//
|
||||
// statusCol
|
||||
//
|
||||
statusCol.DataPropertyName = "Status";
|
||||
statusCol.HeaderText = "状态";
|
||||
statusCol.Name = "statusCol";
|
||||
statusCol.Width = 80;
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
tabPage2.Location = new Point(4, 24);
|
||||
tabPage2.Name = "tabPage2";
|
||||
tabPage2.Padding = new Padding(3);
|
||||
tabPage2.Size = new Size(1004, 398);
|
||||
tabPage2.TabIndex = 1;
|
||||
tabPage2.Text = "段落";
|
||||
tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
tableLayoutPanel2.AutoSize = true;
|
||||
tableLayoutPanel2.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
tableLayoutPanel2.ColumnCount = 5;
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle());
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle());
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle());
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle());
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
|
||||
tableLayoutPanel2.Controls.Add(statusCombo, 3, 0);
|
||||
tableLayoutPanel2.Controls.Add(processBut, 3, 3);
|
||||
tableLayoutPanel2.Controls.Add(uploadBut, 2, 3);
|
||||
tableLayoutPanel2.Controls.Add(guidLabel, 0, 0);
|
||||
tableLayoutPanel2.Controls.Add(bookTypeLabel, 0, 4);
|
||||
tableLayoutPanel2.Controls.Add(guidTxt, 1, 0);
|
||||
tableLayoutPanel2.Controls.Add(titleLabel, 0, 1);
|
||||
tableLayoutPanel2.Controls.Add(titleTxt, 1, 1);
|
||||
tableLayoutPanel2.Controls.Add(authorLabel, 2, 1);
|
||||
tableLayoutPanel2.Controls.Add(descriptionLabel, 0, 2);
|
||||
tableLayoutPanel2.Controls.Add(filePathLabel, 0, 3);
|
||||
tableLayoutPanel2.Controls.Add(descriptionTxt, 1, 2);
|
||||
tableLayoutPanel2.Controls.Add(authorTxt, 3, 1);
|
||||
tableLayoutPanel2.Controls.Add(filePathTxt, 1, 3);
|
||||
tableLayoutPanel2.Controls.Add(statusLabel, 2, 0);
|
||||
tableLayoutPanel2.Controls.Add(bookTypeTxt, 1, 4);
|
||||
tableLayoutPanel2.Dock = DockStyle.Fill;
|
||||
tableLayoutPanel2.Location = new Point(3, 3);
|
||||
tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
tableLayoutPanel2.RowCount = 5;
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel2.Size = new Size(1018, 187);
|
||||
tableLayoutPanel2.TabIndex = 0;
|
||||
//
|
||||
// statusCombo
|
||||
//
|
||||
statusCombo.Dock = DockStyle.Fill;
|
||||
statusCombo.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
statusCombo.DropDownWidth = 300;
|
||||
statusCombo.IntegralHeight = false;
|
||||
statusCombo.Location = new Point(472, 3);
|
||||
statusCombo.Name = "statusCombo";
|
||||
statusCombo.Size = new Size(300, 22);
|
||||
statusCombo.StateCommon.ComboBox.Content.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
|
||||
statusCombo.TabIndex = 5;
|
||||
//
|
||||
// processBut
|
||||
//
|
||||
processBut.Location = new Point(472, 130);
|
||||
processBut.Name = "processBut";
|
||||
processBut.Size = new Size(86, 25);
|
||||
processBut.TabIndex = 2;
|
||||
processBut.Values.Image = Properties.Resources.MoveNext;
|
||||
processBut.Values.Text = "拆分章节";
|
||||
processBut.Click += processBut_Click;
|
||||
//
|
||||
// uploadBut
|
||||
//
|
||||
uploadBut.Location = new Point(380, 130);
|
||||
uploadBut.Name = "uploadBut";
|
||||
uploadBut.Size = new Size(86, 25);
|
||||
uploadBut.TabIndex = 2;
|
||||
uploadBut.Values.Image = Properties.Resources.page_white_get;
|
||||
uploadBut.Values.Text = "上传";
|
||||
uploadBut.Click += uploadBut_Click;
|
||||
//
|
||||
// guidLabel
|
||||
//
|
||||
guidLabel.Location = new Point(3, 3);
|
||||
guidLabel.Name = "guidLabel";
|
||||
guidLabel.Size = new Size(65, 20);
|
||||
guidLabel.TabIndex = 1;
|
||||
guidLabel.Values.Text = "小说编号:";
|
||||
//
|
||||
// bookTypeLabel
|
||||
//
|
||||
bookTypeLabel.Location = new Point(3, 161);
|
||||
bookTypeLabel.Name = "bookTypeLabel";
|
||||
bookTypeLabel.Size = new Size(39, 20);
|
||||
bookTypeLabel.TabIndex = 1;
|
||||
bookTypeLabel.Values.Text = "类型:";
|
||||
//
|
||||
// guidTxt
|
||||
//
|
||||
guidTxt.Dock = DockStyle.Fill;
|
||||
guidTxt.Location = new Point(74, 3);
|
||||
guidTxt.MaxLength = 50;
|
||||
guidTxt.Name = "guidTxt";
|
||||
guidTxt.Size = new Size(300, 23);
|
||||
guidTxt.TabIndex = 3;
|
||||
//
|
||||
// titleLabel
|
||||
//
|
||||
titleLabel.Location = new Point(3, 32);
|
||||
titleLabel.Name = "titleLabel";
|
||||
titleLabel.Size = new Size(39, 20);
|
||||
titleLabel.TabIndex = 1;
|
||||
titleLabel.Values.Text = "书名:";
|
||||
//
|
||||
// titleTxt
|
||||
//
|
||||
titleTxt.Dock = DockStyle.Fill;
|
||||
titleTxt.Location = new Point(74, 32);
|
||||
titleTxt.MaxLength = 500;
|
||||
titleTxt.Name = "titleTxt";
|
||||
titleTxt.Size = new Size(300, 23);
|
||||
titleTxt.TabIndex = 3;
|
||||
//
|
||||
// authorLabel
|
||||
//
|
||||
authorLabel.Location = new Point(401, 32);
|
||||
authorLabel.Margin = new Padding(24, 3, 3, 3);
|
||||
authorLabel.Name = "authorLabel";
|
||||
authorLabel.Size = new Size(39, 20);
|
||||
authorLabel.TabIndex = 1;
|
||||
authorLabel.Values.Text = "作者:";
|
||||
//
|
||||
// descriptionLabel
|
||||
//
|
||||
descriptionLabel.Location = new Point(3, 61);
|
||||
descriptionLabel.Name = "descriptionLabel";
|
||||
descriptionLabel.Size = new Size(39, 20);
|
||||
descriptionLabel.TabIndex = 1;
|
||||
descriptionLabel.Values.Text = "描述:";
|
||||
//
|
||||
// filePathLabel
|
||||
//
|
||||
filePathLabel.Location = new Point(3, 130);
|
||||
filePathLabel.Name = "filePathLabel";
|
||||
filePathLabel.Size = new Size(52, 20);
|
||||
filePathLabel.TabIndex = 1;
|
||||
filePathLabel.Values.Text = "文件名:";
|
||||
//
|
||||
// descriptionTxt
|
||||
//
|
||||
tableLayoutPanel2.SetColumnSpan(descriptionTxt, 3);
|
||||
descriptionTxt.Dock = DockStyle.Fill;
|
||||
descriptionTxt.Location = new Point(74, 61);
|
||||
descriptionTxt.MaxLength = 500;
|
||||
descriptionTxt.Multiline = true;
|
||||
descriptionTxt.Name = "descriptionTxt";
|
||||
descriptionTxt.Size = new Size(698, 63);
|
||||
descriptionTxt.TabIndex = 3;
|
||||
//
|
||||
// authorTxt
|
||||
//
|
||||
authorTxt.Dock = DockStyle.Fill;
|
||||
authorTxt.Location = new Point(472, 32);
|
||||
authorTxt.MaxLength = 500;
|
||||
authorTxt.Name = "authorTxt";
|
||||
authorTxt.Size = new Size(300, 23);
|
||||
authorTxt.TabIndex = 3;
|
||||
//
|
||||
// filePathTxt
|
||||
//
|
||||
filePathTxt.Location = new Point(74, 130);
|
||||
filePathTxt.MaxLength = 50;
|
||||
filePathTxt.Name = "filePathTxt";
|
||||
filePathTxt.Size = new Size(300, 23);
|
||||
filePathTxt.TabIndex = 3;
|
||||
//
|
||||
// statusLabel
|
||||
//
|
||||
statusLabel.Location = new Point(401, 3);
|
||||
statusLabel.Margin = new Padding(24, 3, 3, 3);
|
||||
statusLabel.Name = "statusLabel";
|
||||
statusLabel.Size = new Size(39, 20);
|
||||
statusLabel.TabIndex = 1;
|
||||
statusLabel.Values.Text = "状态:";
|
||||
//
|
||||
// bookTypeTxt
|
||||
//
|
||||
bookTypeTxt.Location = new Point(74, 161);
|
||||
bookTypeTxt.MaxLength = 50;
|
||||
bookTypeTxt.Name = "bookTypeTxt";
|
||||
bookTypeTxt.Size = new Size(300, 23);
|
||||
bookTypeTxt.TabIndex = 3;
|
||||
//
|
||||
// kryptonPanel2
|
||||
//
|
||||
kryptonPanel2.Dock = DockStyle.Fill;
|
||||
kryptonPanel2.Location = new Point(3, 196);
|
||||
kryptonPanel2.Name = "kryptonPanel2";
|
||||
kryptonPanel2.Size = new Size(1018, 5);
|
||||
kryptonPanel2.TabIndex = 1;
|
||||
//
|
||||
// mainPanel
|
||||
//
|
||||
mainPanel.ColumnCount = 1;
|
||||
mainPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
mainPanel.Controls.Add(topPanel, 0, 0);
|
||||
mainPanel.Controls.Add(kryptonPanel1, 0, 1);
|
||||
mainPanel.Controls.Add(bottomPanel, 0, 3);
|
||||
mainPanel.Controls.Add(contentPanel, 0, 2);
|
||||
mainPanel.Dock = DockStyle.Fill;
|
||||
mainPanel.Location = new Point(0, 0);
|
||||
mainPanel.Name = "mainPanel";
|
||||
mainPanel.RowCount = 4;
|
||||
mainPanel.RowStyles.Add(new RowStyle());
|
||||
mainPanel.RowStyles.Add(new RowStyle());
|
||||
mainPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
mainPanel.RowStyles.Add(new RowStyle());
|
||||
mainPanel.Size = new Size(1024, 800);
|
||||
mainPanel.TabIndex = 1;
|
||||
//
|
||||
// topPanel
|
||||
//
|
||||
topPanel.AutoSize = true;
|
||||
topPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
topPanel.ColumnCount = 3;
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
topPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
|
||||
topPanel.Controls.Add(searchPanel, 3, 0);
|
||||
topPanel.Controls.Add(guidSearchLabel, 0, 0);
|
||||
topPanel.Controls.Add(guidSearchTxt, 1, 0);
|
||||
topPanel.Dock = DockStyle.Fill;
|
||||
topPanel.Location = new Point(3, 3);
|
||||
topPanel.Name = "topPanel";
|
||||
topPanel.RowCount = 1;
|
||||
topPanel.RowStyles.Add(new RowStyle());
|
||||
topPanel.Size = new Size(1018, 31);
|
||||
topPanel.TabIndex = 0;
|
||||
//
|
||||
// searchPanel
|
||||
//
|
||||
searchPanel.AutoSize = true;
|
||||
searchPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
searchPanel.ColumnCount = 3;
|
||||
searchPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
searchPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
searchPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
searchPanel.Controls.Add(createBut, 2, 0);
|
||||
searchPanel.Controls.Add(resetBut, 1, 0);
|
||||
searchPanel.Controls.Add(searchBut, 0, 0);
|
||||
searchPanel.Location = new Point(437, 0);
|
||||
searchPanel.Margin = new Padding(60, 0, 0, 0);
|
||||
searchPanel.Name = "searchPanel";
|
||||
searchPanel.RowCount = 1;
|
||||
searchPanel.RowStyles.Add(new RowStyle());
|
||||
searchPanel.Size = new Size(288, 31);
|
||||
searchPanel.TabIndex = 0;
|
||||
//
|
||||
// createBut
|
||||
//
|
||||
createBut.Location = new Point(195, 3);
|
||||
createBut.Name = "createBut";
|
||||
createBut.Size = new Size(90, 25);
|
||||
createBut.TabIndex = 3;
|
||||
createBut.Values.Image = Properties.Resources.create_16;
|
||||
createBut.Values.Text = "新增(&C)";
|
||||
createBut.Click += createBut_Click;
|
||||
//
|
||||
// resetBut
|
||||
//
|
||||
resetBut.Location = new Point(99, 3);
|
||||
resetBut.Name = "resetBut";
|
||||
resetBut.Size = new Size(90, 25);
|
||||
resetBut.TabIndex = 2;
|
||||
resetBut.Values.Image = Properties.Resources.reset_16;
|
||||
resetBut.Values.Text = "重置(&R)";
|
||||
resetBut.Click += resetBut_Click;
|
||||
//
|
||||
// searchBut
|
||||
//
|
||||
searchBut.Location = new Point(3, 3);
|
||||
searchBut.Name = "searchBut";
|
||||
searchBut.Size = new Size(90, 25);
|
||||
searchBut.TabIndex = 1;
|
||||
searchBut.Values.Image = Properties.Resources.search_16;
|
||||
searchBut.Values.Text = "查询(&S)";
|
||||
searchBut.Click += searchBut_Click;
|
||||
//
|
||||
// guidSearchLabel
|
||||
//
|
||||
guidSearchLabel.Location = new Point(3, 3);
|
||||
guidSearchLabel.Name = "guidSearchLabel";
|
||||
guidSearchLabel.Size = new Size(65, 20);
|
||||
guidSearchLabel.TabIndex = 1;
|
||||
guidSearchLabel.Values.Text = "小说编号:";
|
||||
//
|
||||
// guidSearchTxt
|
||||
//
|
||||
guidSearchTxt.ButtonSpecs.Add(permissionNameSearchBut);
|
||||
guidSearchTxt.Location = new Point(74, 3);
|
||||
guidSearchTxt.Name = "guidSearchTxt";
|
||||
guidSearchTxt.Size = new Size(300, 23);
|
||||
guidSearchTxt.TabIndex = 2;
|
||||
//
|
||||
// permissionNameSearchBut
|
||||
//
|
||||
permissionNameSearchBut.Type = Krypton.Toolkit.PaletteButtonSpecStyle.WorkspaceMaximize;
|
||||
permissionNameSearchBut.UniqueName = "3a322a66645f4aff808be4720c638ad8";
|
||||
permissionNameSearchBut.Click += permissionNameSearchBut_Click;
|
||||
//
|
||||
// kryptonPanel1
|
||||
//
|
||||
kryptonPanel1.Dock = DockStyle.Fill;
|
||||
kryptonPanel1.Location = new Point(3, 40);
|
||||
kryptonPanel1.Name = "kryptonPanel1";
|
||||
kryptonPanel1.Size = new Size(1018, 5);
|
||||
kryptonPanel1.TabIndex = 1;
|
||||
//
|
||||
// bottomPanel
|
||||
//
|
||||
bottomPanel.AutoSize = true;
|
||||
bottomPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
bottomPanel.ColumnCount = 1;
|
||||
bottomPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
bottomPanel.Controls.Add(savePanel, 0, 0);
|
||||
bottomPanel.Controls.Add(operationPanel, 0, 1);
|
||||
bottomPanel.Location = new Point(0, 726);
|
||||
bottomPanel.Margin = new Padding(0);
|
||||
bottomPanel.Name = "bottomPanel";
|
||||
bottomPanel.RowCount = 2;
|
||||
bottomPanel.RowStyles.Add(new RowStyle());
|
||||
bottomPanel.RowStyles.Add(new RowStyle());
|
||||
bottomPanel.Size = new Size(198, 74);
|
||||
bottomPanel.TabIndex = 2;
|
||||
//
|
||||
// savePanel
|
||||
//
|
||||
savePanel.AutoSize = true;
|
||||
savePanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
savePanel.ColumnCount = 2;
|
||||
savePanel.ColumnStyles.Add(new ColumnStyle());
|
||||
savePanel.ColumnStyles.Add(new ColumnStyle());
|
||||
savePanel.Controls.Add(cancelBut, 1, 0);
|
||||
savePanel.Controls.Add(saveBut, 0, 0);
|
||||
savePanel.Location = new Point(3, 3);
|
||||
savePanel.Name = "savePanel";
|
||||
savePanel.RowCount = 1;
|
||||
savePanel.RowStyles.Add(new RowStyle());
|
||||
savePanel.Size = new Size(192, 31);
|
||||
savePanel.TabIndex = 0;
|
||||
//
|
||||
// cancelBut
|
||||
//
|
||||
cancelBut.Location = new Point(99, 3);
|
||||
cancelBut.Name = "cancelBut";
|
||||
cancelBut.Size = new Size(90, 25);
|
||||
cancelBut.TabIndex = 2;
|
||||
cancelBut.Values.Image = Properties.Resources.cancel_16;
|
||||
cancelBut.Values.Text = "取消(&L)";
|
||||
cancelBut.Click += cancelBut_Click;
|
||||
//
|
||||
// saveBut
|
||||
//
|
||||
saveBut.Location = new Point(3, 3);
|
||||
saveBut.Name = "saveBut";
|
||||
saveBut.Size = new Size(90, 25);
|
||||
saveBut.TabIndex = 1;
|
||||
saveBut.Values.Image = Properties.Resources.save_16;
|
||||
saveBut.Values.Text = "保存(&S)";
|
||||
saveBut.Click += saveBut_Click;
|
||||
//
|
||||
// operationPanel
|
||||
//
|
||||
operationPanel.AutoSize = true;
|
||||
operationPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
operationPanel.ColumnCount = 2;
|
||||
operationPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
operationPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
operationPanel.Controls.Add(deleteBut, 1, 0);
|
||||
operationPanel.Controls.Add(amendBut, 0, 0);
|
||||
operationPanel.Location = new Point(3, 40);
|
||||
operationPanel.Name = "operationPanel";
|
||||
operationPanel.RowCount = 1;
|
||||
operationPanel.RowStyles.Add(new RowStyle());
|
||||
operationPanel.Size = new Size(192, 31);
|
||||
operationPanel.TabIndex = 0;
|
||||
//
|
||||
// deleteBut
|
||||
//
|
||||
deleteBut.Location = new Point(99, 3);
|
||||
deleteBut.Name = "deleteBut";
|
||||
deleteBut.Size = new Size(90, 25);
|
||||
deleteBut.TabIndex = 2;
|
||||
deleteBut.Values.Image = Properties.Resources.delete_16;
|
||||
deleteBut.Values.Text = "删除(&D)";
|
||||
deleteBut.Click += deleteBut_Click;
|
||||
//
|
||||
// amendBut
|
||||
//
|
||||
amendBut.Location = new Point(3, 3);
|
||||
amendBut.Name = "amendBut";
|
||||
amendBut.Size = new Size(90, 25);
|
||||
amendBut.TabIndex = 1;
|
||||
amendBut.Values.Image = Properties.Resources.amend_16;
|
||||
amendBut.Values.Text = "修改(&M)";
|
||||
amendBut.Click += amendBut_Click;
|
||||
//
|
||||
// AiBookOperationPage
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(mainPanel);
|
||||
Name = "AiBookOperationPage";
|
||||
contentPanel.ResumeLayout(false);
|
||||
contentPanel.PerformLayout();
|
||||
tableLayoutPanel3.ResumeLayout(false);
|
||||
tableLayoutPanel4.ResumeLayout(false);
|
||||
tableLayoutPanel4.PerformLayout();
|
||||
tabControl1.ResumeLayout(false);
|
||||
tabPage1.ResumeLayout(false);
|
||||
tableLayoutPanel5.ResumeLayout(false);
|
||||
tableLayoutPanel5.PerformLayout();
|
||||
tableLayoutPanel1.ResumeLayout(false);
|
||||
tableLayoutPanel6.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)sentenceGv).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGv).EndInit();
|
||||
tableLayoutPanel2.ResumeLayout(false);
|
||||
tableLayoutPanel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)statusCombo).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)kryptonPanel2).EndInit();
|
||||
mainPanel.ResumeLayout(false);
|
||||
mainPanel.PerformLayout();
|
||||
topPanel.ResumeLayout(false);
|
||||
topPanel.PerformLayout();
|
||||
searchPanel.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)kryptonPanel1).EndInit();
|
||||
bottomPanel.ResumeLayout(false);
|
||||
bottomPanel.PerformLayout();
|
||||
savePanel.ResumeLayout(false);
|
||||
operationPanel.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TableLayoutPanel contentPanel;
|
||||
private TableLayoutPanel tableLayoutPanel3;
|
||||
private TableLayoutPanel tableLayoutPanel4;
|
||||
private Krypton.Toolkit.KryptonHeader kryptonHeader1;
|
||||
private TableLayoutPanel tableLayoutPanel2;
|
||||
private Krypton.Toolkit.KryptonLabel guidLabel;
|
||||
private Krypton.Toolkit.KryptonLabel descriptionLabel;
|
||||
private Krypton.Toolkit.KryptonLabel bookTypeLabel;
|
||||
private Krypton.Toolkit.KryptonTextBox guidTxt;
|
||||
private Krypton.Toolkit.KryptonTextBox descriptionTxt;
|
||||
private Krypton.Toolkit.KryptonPanel kryptonPanel2;
|
||||
private TableLayoutPanel mainPanel;
|
||||
private TableLayoutPanel topPanel;
|
||||
private TableLayoutPanel searchPanel;
|
||||
private Krypton.Toolkit.KryptonButton createBut;
|
||||
private Krypton.Toolkit.KryptonButton resetBut;
|
||||
private Krypton.Toolkit.KryptonButton searchBut;
|
||||
private Krypton.Toolkit.KryptonLabel guidSearchLabel;
|
||||
private Krypton.Toolkit.KryptonTextBox guidSearchTxt;
|
||||
private Krypton.Toolkit.ButtonSpecAny permissionNameSearchBut;
|
||||
private Krypton.Toolkit.KryptonPanel kryptonPanel1;
|
||||
private TableLayoutPanel bottomPanel;
|
||||
private TableLayoutPanel savePanel;
|
||||
private Krypton.Toolkit.KryptonButton cancelBut;
|
||||
private Krypton.Toolkit.KryptonButton saveBut;
|
||||
private TableLayoutPanel operationPanel;
|
||||
private Krypton.Toolkit.KryptonButton deleteBut;
|
||||
private Krypton.Toolkit.KryptonButton amendBut;
|
||||
private Krypton.Toolkit.KryptonLabel titleLabel;
|
||||
private Krypton.Toolkit.KryptonTextBox titleTxt;
|
||||
private Krypton.Toolkit.KryptonLabel authorLabel;
|
||||
private Krypton.Toolkit.KryptonTextBox authorTxt;
|
||||
private Krypton.Toolkit.KryptonLabel filePathLabel;
|
||||
private Krypton.Toolkit.KryptonButton uploadBut;
|
||||
private Krypton.Toolkit.KryptonTextBox filePathTxt;
|
||||
private Krypton.Toolkit.KryptonLabel statusLabel;
|
||||
private Krypton.Toolkit.KryptonComboBox statusCombo;
|
||||
private TableLayoutPanel tableLayoutPanel1;
|
||||
private Krypton.Toolkit.KryptonButton delBut;
|
||||
private Krypton.Toolkit.KryptonButton addBut;
|
||||
private TabControl tabControl1;
|
||||
private TabPage tabPage1;
|
||||
private TableLayoutPanel tableLayoutPanel5;
|
||||
private TabPage tabPage2;
|
||||
private Krypton.Toolkit.KryptonButton processBut;
|
||||
private Krypton.Toolkit.KryptonDataGridView dataGv;
|
||||
private TableLayoutPanel tableLayoutPanel6;
|
||||
private Krypton.Toolkit.KryptonDataGridView sentenceGv;
|
||||
private Krypton.Toolkit.KryptonTextBox bookTypeTxt;
|
||||
private DataGridViewTextBoxColumn chapterIndexCol;
|
||||
private DataGridViewTextBoxColumn titleCol;
|
||||
private DataGridViewTextBoxColumn contentCol;
|
||||
private DataGridViewTextBoxColumn statusCol;
|
||||
private CloudBuilder.Gui.GridViewPagination gridViewPagination;
|
||||
private DataGridViewTextBoxColumn sentenceIndexCol;
|
||||
private Krypton.Toolkit.KryptonDataGridViewCheckBoxColumn dialogueIndcCol;
|
||||
private Krypton.Toolkit.KryptonDataGridViewTextBoxColumn personNameCol;
|
||||
private DataGridViewTextBoxColumn sentenceContentCol;
|
||||
private Krypton.Toolkit.KryptonDataGridViewTextBoxColumn genderCol;
|
||||
private Krypton.Toolkit.KryptonDataGridViewTextBoxColumn sentimentCol;
|
||||
private Krypton.Toolkit.KryptonDataGridViewComboBoxColumn sentenceStatusCol;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,764 @@
|
||||
using CloudBuilder.AI.Data;
|
||||
using CloudBuilder.AI.Entity;
|
||||
using CloudBuilder.AI.Gui.Request;
|
||||
using CloudBuilder.AI.Linkup;
|
||||
using CloudBuilder.AI.Policy;
|
||||
using CloudBuilder.AI.SearchCriteria;
|
||||
using CloudBuilder.Core.Service;
|
||||
using CloudBuilder.Gui;
|
||||
using CloudBuilder.Request.AI;
|
||||
using CloudBuilder.Request.Security;
|
||||
using CloudBuilder.Security.Data;
|
||||
using CloudBuilder.Security.Entity;
|
||||
using CloudBuilder.Security.Linkup;
|
||||
using CloudBuilder.Security.Policy;
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
using Krypton.Toolkit;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Security.Permissions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
|
||||
|
||||
|
||||
namespace CloudBuilder.AI.Gui
|
||||
{
|
||||
public partial class AiBookOperationPage : AbstractPage
|
||||
{
|
||||
private SecurityMessagePolicy securityMessagePolicy = null!;
|
||||
private BookStatusPolicy bookStatusPolicy = null!;
|
||||
private AiBookRequest aiBookRequest = null!;
|
||||
private AiSentenceRequest aiSentenceRequest = null!;
|
||||
private AiChapterRequest aiChapterRequest = null!;
|
||||
private AiBookEntity aiBookEntity = null!;
|
||||
private AiBookData data = null!;
|
||||
private DmsFileRequestHelper dmsFileRequestHelper;
|
||||
private DmsFileRequest dmsFileRequest;
|
||||
private AiChapterSearchCriteria searchCriteria;
|
||||
public AiBookOperationPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 第一次加载时执行,只执行一次
|
||||
/// </summary>
|
||||
public override void FunctionLoaded()
|
||||
{
|
||||
try
|
||||
{
|
||||
base.FunctionLoaded();
|
||||
//初始化容器-------------------------------------
|
||||
aiBookRequest = ServiceHelper.GetTypeService<AiBookRequest>();
|
||||
aiChapterRequest = ServiceHelper.GetTypeService<AiChapterRequest>();
|
||||
aiSentenceRequest = ServiceHelper.GetTypeService<AiSentenceRequest>();
|
||||
bookStatusPolicy = ServiceHelper.GetTypeService<BookStatusPolicy>();
|
||||
securityMessagePolicy = ServiceHelper.GetTypeService<SecurityMessagePolicy>();
|
||||
dmsFileRequest = ServiceHelper.GetTypeService<DmsFileRequest>();
|
||||
dmsFileRequestHelper = new DmsFileRequestHelper();
|
||||
//界面初始化
|
||||
InitGui();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void InitGui()
|
||||
{
|
||||
InitBindingContext();
|
||||
|
||||
InitComBox();
|
||||
|
||||
InitDisplayMode();
|
||||
|
||||
InitGridViewPagination();
|
||||
|
||||
this.ParentAbstractForm.AcceptButton = this.searchBut;
|
||||
this.ParentAbstractForm.CancelButton = this.resetBut;
|
||||
}
|
||||
|
||||
private void InitComBox()
|
||||
{
|
||||
statusCombo.SetDataSource(bookStatusPolicy.GetDataSource(), true);
|
||||
}
|
||||
/// <summary>
|
||||
/// DataGridView分页控件初始化
|
||||
/// </summary>
|
||||
private void InitGridViewPagination()
|
||||
{
|
||||
searchCriteria = new AiChapterSearchCriteria();
|
||||
gridViewPagination.SetLimit(searchCriteria.limit);
|
||||
gridViewPagination.OnPaginationChanged += SearchChapter;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 有特殊要求的UI控件初始化设置,Init与Add配对后,使用guiOperateHelper管理
|
||||
/// </summary>
|
||||
private void InitBindingContext()
|
||||
{
|
||||
//需要绑定数据
|
||||
guiBindingContext = new GuiBindingContext();
|
||||
|
||||
InitPermission();
|
||||
|
||||
guidTxt.Set(AiBookEntity.GUID, guidLabel.Text, EnumEditModeColor.ReadOnly);
|
||||
|
||||
descriptionTxt.Set(AiBookEntity.DESCRIPTION);
|
||||
statusCombo.Set(AiBookEntity.STATUS, EnumEditModeColor.ReadOnly);
|
||||
titleTxt.Set(AiBookEntity.TITLE, titleLabel.Text, EnumEditModeColor.Required);
|
||||
authorTxt.Set(AiBookEntity.AUTHOR);
|
||||
bookTypeTxt.Set(AiBookEntity.BOOK_TYPE);
|
||||
filePathTxt.Set(AiBookData.FILE_NAME, EnumEditModeColor.ReadOnly);
|
||||
|
||||
dataGv.InitColumn(false, false);
|
||||
sentenceGv.InitColumn(true, false);
|
||||
|
||||
guiOperateHelper = new GuiOperateHelper();
|
||||
}
|
||||
|
||||
private void InitPermission()
|
||||
{
|
||||
createBut.Set(AIPermissionPolicy.AiBook, Operate.Insert);
|
||||
amendBut.Set(AIPermissionPolicy.AiBook, Operate.Update);
|
||||
deleteBut.Set(AIPermissionPolicy.AiBook, Operate.Delete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 每次从别的界面进入时执行,发生在FunctionLoaded之后
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
public override void FunctionActivated(object param)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (param == null)
|
||||
{
|
||||
guidSearchTxt.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
InitDisplayMode();
|
||||
|
||||
AiBookOperationLinkup linkup = null;
|
||||
|
||||
if (param is AiBookOperationLinkup)
|
||||
{
|
||||
linkup = (AiBookOperationLinkup)param;
|
||||
}
|
||||
|
||||
this.DisplayMode = (GuiDisplayMode)linkup.DisplayMode;
|
||||
|
||||
guidSearchTxt.Text = linkup.Guid;
|
||||
|
||||
if (this.DisplayMode == GuiDisplayMode.View)
|
||||
{
|
||||
Search();
|
||||
}
|
||||
else if (this.DisplayMode == GuiDisplayMode.Create)
|
||||
{
|
||||
Create();
|
||||
}
|
||||
else if (this.DisplayMode == GuiDisplayMode.Amend)
|
||||
{
|
||||
Search();
|
||||
Amend();
|
||||
}
|
||||
|
||||
guidSearchTxt.Focus();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public override void FunctionSelected()
|
||||
{
|
||||
this.ParentAbstractForm.AcceptButton = this.searchBut;
|
||||
if (!IsDialog)
|
||||
this.ParentAbstractForm.CancelButton = this.resetBut;
|
||||
else
|
||||
this.ParentAbstractForm.CancelButton = this.cancelBut;
|
||||
|
||||
guidSearchTxt.Focus();
|
||||
}
|
||||
|
||||
public override bool FunctionDeactivating()
|
||||
{
|
||||
if (this.DisplayMode == GuiDisplayMode.View)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CancelEditing();
|
||||
}
|
||||
}
|
||||
|
||||
private bool CancelEditing()
|
||||
{
|
||||
DialogResult result = ShowMessageBox.ShowOption(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_CONFIRM_CANCEL), securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_CONFIRM));
|
||||
|
||||
//从外部跳转(非mainKryptonNavigator),result第一次不生效?,所以再执行一次生效
|
||||
if (result == DialogResult.Cancel)
|
||||
{
|
||||
result = ShowMessageBox.ShowOption(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_CONFIRM_CANCEL), securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_CONFIRM));
|
||||
}
|
||||
|
||||
if (result == DialogResult.No)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Cancel();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void InitDisplayMode()
|
||||
{
|
||||
this.DisplayMode = GuiDisplayMode.View;
|
||||
|
||||
SetDisplayMode();
|
||||
}
|
||||
|
||||
private void SetDisplayMode()
|
||||
{
|
||||
if (this.DisplayMode == GuiDisplayMode.View)
|
||||
{
|
||||
savePanel.Visible = false;
|
||||
operationPanel.Visible = true;
|
||||
|
||||
guiOperateHelper.EnableControls(true, topPanel);
|
||||
guiOperateHelper.EnableControls(false, contentPanel);
|
||||
//查詢有記錄時,修改等控件有效
|
||||
if (aiBookEntity != null)
|
||||
guiOperateHelper.EnableControls(true, bottomPanel, uploadBut, processBut, gridViewPagination);
|
||||
else
|
||||
guiOperateHelper.EnableControls(false, bottomPanel, uploadBut, processBut, gridViewPagination);
|
||||
}
|
||||
else if (this.DisplayMode == GuiDisplayMode.Amend || this.DisplayMode == GuiDisplayMode.Create)
|
||||
{
|
||||
savePanel.Visible = true;
|
||||
operationPanel.Visible = false;
|
||||
|
||||
guiOperateHelper.EnableControls(false, topPanel, uploadBut, processBut, gridViewPagination);
|
||||
guiOperateHelper.EnableControls(true, bottomPanel, contentPanel);
|
||||
|
||||
if (this.DisplayMode == GuiDisplayMode.Amend) guiOperateHelper.EnableControls(false, guidTxt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void PackUIToEntity()
|
||||
{
|
||||
guiBindingContext.DataPack();
|
||||
}
|
||||
|
||||
private bool SaveValidate()
|
||||
{
|
||||
if (!guiOperateHelper.CheckValidate(this.contentPanel)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void Search()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(guidSearchTxt.Text)) return;
|
||||
|
||||
Reset();
|
||||
|
||||
data = aiBookRequest.FindByKey(guidSearchTxt.Text);
|
||||
|
||||
if (data == null || data.AiBook == null)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
}
|
||||
else
|
||||
{
|
||||
aiBookEntity = data.AiBook;
|
||||
|
||||
PackEntityToUI();
|
||||
|
||||
SetDisplayMode();
|
||||
}
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 与Web同步写法
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private AiChapterSearchCriteria PackSearchCriteria()
|
||||
{
|
||||
searchCriteria = new AiChapterSearchCriteria();
|
||||
searchCriteria.limit = gridViewPagination.Limit;
|
||||
searchCriteria.page = gridViewPagination.CurrentPage;
|
||||
searchCriteria.orderby = AiChapterEntity.CHAPTER_INDEX;
|
||||
|
||||
List<SearchFilter> filters = new List<SearchFilter>();
|
||||
|
||||
SearchFilter filter = new SearchFilter();
|
||||
filter.Column = AiChapterEntity.DB_BOOK_GUID;
|
||||
filter.Type = SearchFilterTypePolicy.TEXT;
|
||||
filter.Operator = SearchFilterOperatorPolicy.EQUAL_TO;
|
||||
filter.Value = data.AiBook.Guid;
|
||||
filters.Add(filter);
|
||||
|
||||
|
||||
return searchCriteria;
|
||||
}
|
||||
|
||||
private void SearchChapter()
|
||||
{
|
||||
try
|
||||
{
|
||||
var chapterResultData = aiChapterRequest.FindBySearchCriteria(PackSearchCriteria());
|
||||
|
||||
gridViewPagination.SetTotal(chapterResultData.Total);
|
||||
|
||||
dataGv.SetDataSource(chapterResultData.Datas);
|
||||
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void Create()
|
||||
{
|
||||
this.DisplayMode = GuiDisplayMode.Create;
|
||||
|
||||
guiOperateHelper.ResetControls(this.mainPanel);
|
||||
|
||||
SetDisplayMode();
|
||||
|
||||
data = new AiBookData();
|
||||
aiBookEntity = new AiBookEntity()
|
||||
{
|
||||
Status = BookStatusPolicy.DRAFT,
|
||||
CreatedBy = string.Empty,
|
||||
UpdatedBy = string.Empty,
|
||||
CreatedDatetime = DateTime.Now,
|
||||
UpdatedDatetime = DateTime.Now,
|
||||
};
|
||||
data.AiBook = aiBookEntity;
|
||||
|
||||
PackEntityToUI();
|
||||
|
||||
guidTxt.Focus();
|
||||
}
|
||||
|
||||
private void Amend()
|
||||
{
|
||||
this.DisplayMode = GuiDisplayMode.Amend;
|
||||
|
||||
SetDisplayMode();
|
||||
}
|
||||
|
||||
private void PackEntityToUI()
|
||||
{
|
||||
guiBindingContext.DataBind(data.AiBook, this);
|
||||
|
||||
filePathTxt.Text = data.FileName;
|
||||
|
||||
SearchChapter();
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
this.DisplayMode = GuiDisplayMode.View;
|
||||
|
||||
aiBookEntity = null;
|
||||
|
||||
guiOperateHelper.ResetControls(this.contentPanel);
|
||||
|
||||
SetDisplayMode();
|
||||
|
||||
guidSearchTxt.Focus();
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(guidSearchTxt.Text))
|
||||
Search();
|
||||
else
|
||||
Reset();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void permissionNameSearchBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
//try
|
||||
//{
|
||||
// AbstractForm dialog = GetAbstractDialog(typeof(AiBookEnquiryPage).Name);
|
||||
|
||||
// if (DialogResult.OK != dialog.ShowDialog()) return;
|
||||
|
||||
// permissionNameSearchTxt.Text = ((AiBookEntity[])dialog.OutputData)[0].PermissionName;
|
||||
|
||||
// Search();
|
||||
//}
|
||||
//catch (ValidatedException ex)
|
||||
//{
|
||||
// ShowMessageBox.ShowInfo(ex.Message);
|
||||
//}
|
||||
//catch (ServiceErrorException ex)
|
||||
//{
|
||||
// ShowMessageBox.ShowError(ex.Message);
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// ShowMessageBox.ShowError(ex.Message);
|
||||
//}
|
||||
}
|
||||
|
||||
private void searchBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(guidSearchTxt.Text))
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_VALID_INPUT, GuiOperateHelper.GetLabelText(guidSearchLabel.Text)));
|
||||
this.guidSearchTxt.Focus();
|
||||
return;
|
||||
}
|
||||
this.DisplayMode = GuiDisplayMode.View;
|
||||
|
||||
Search();
|
||||
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void resetBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
guiOperateHelper.ResetControls(this.topPanel);
|
||||
Reset();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void createBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Create();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void amendBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Amend();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (aiBookEntity == null)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
return;
|
||||
}
|
||||
|
||||
if (DialogResult.Yes != ShowMessageBox.ShowOption(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_CONFIRM_DEL_NULL), securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_DELETE))) return;
|
||||
|
||||
aiBookRequest.Delete(aiBookEntity.Guid);
|
||||
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_SUCCEED_DELETED_NULL));
|
||||
|
||||
Reset();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void saveBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!SaveValidate()) return;
|
||||
|
||||
PackUIToEntity();
|
||||
|
||||
|
||||
if (this.DisplayMode == GuiDisplayMode.Create)
|
||||
{
|
||||
data = aiBookRequest.Insert(data);
|
||||
aiBookEntity.Guid = data.AiBook.Guid;
|
||||
}
|
||||
else
|
||||
aiBookRequest.Update(data);
|
||||
|
||||
|
||||
ShowMessageBox.ShowInfo((this.DisplayMode == GuiDisplayMode.Create) ?
|
||||
securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_SUCCEED_CREATED_NULL) :
|
||||
securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_SUCCEED_UPDATED_NULL));
|
||||
|
||||
guidSearchTxt.Text = aiBookEntity.Guid;
|
||||
Search();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
CancelEditing();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void addBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
//dataGv.AddRow(new AiBookDependentEntity() { CreatedBy = string.Empty, UpdatedBy = string.Empty });
|
||||
}
|
||||
|
||||
private void delBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGv.RowCount <= 0 || dataGv.SelectedCells.Count <= 0)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
return;
|
||||
}
|
||||
|
||||
dataGv.DeleteRows(dataGv.SelectedCells);
|
||||
}
|
||||
|
||||
private void uploadBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.Multiselect = false;
|
||||
|
||||
if (openFileDialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
string[] fileNames = openFileDialog.FileNames;
|
||||
|
||||
string folderName = dmsFileRequest.GetFolderName(typeof(AiBookEntity).Name);
|
||||
BookDmsFileViewEntity dmsFile = dmsFileRequestHelper.UploadFile(fileNames[0], folderName);
|
||||
if (dmsFile == null || dmsFile.FileId == 0) return;
|
||||
|
||||
data.AiBook.FileId = dmsFile.FileId;
|
||||
|
||||
aiBookRequest.Update(data);
|
||||
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_SUCCEED_UPDATED_NULL));
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void processBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
AbstractForm dialog;
|
||||
dialog = GetAbstractDialog(typeof(AiBookProcessDialogPage).Name);
|
||||
if (DialogResult.OK != dialog.ShowCreateDialog()) return;
|
||||
|
||||
AiBookProcessData d = (AiBookProcessData)dialog.OutputData;
|
||||
|
||||
data = aiBookRequest.ProcessBook(data.AiBook.Guid, d.Encoding, d.Pattern);
|
||||
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_SUCCEED_UPDATED_NULL));
|
||||
|
||||
guidSearchTxt.Text = data.AiBook.Guid;
|
||||
Search();
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void dataGv_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (e.RowIndex == -1 || e.ColumnIndex == -1) return;
|
||||
|
||||
if (dataGv.RowCount <= 0 || dataGv.SelectedCells.Count <= 0)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(securityMessagePolicy.ComposeMessage(SecurityMessagePolicy.GUI_WS_RECORD_NOT_FOUND));
|
||||
return;
|
||||
}
|
||||
|
||||
AiChapterEntity chapter = dataGv.GetRowData<AiChapterEntity>(dataGv.SelectedCells[0].RowIndex);
|
||||
|
||||
AiSentenceViewEntity[] aiSentences= aiSentenceRequest.FindByChapterGuid(chapter.Guid);
|
||||
|
||||
sentenceGv.SetDataSource(aiSentences);
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="sentenceIndexCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dialogueIndcCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="sentenceContentCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="chapterIndexCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="titleCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="contentCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="statusCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="createBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="resetBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="searchBut.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,185 @@
|
||||
namespace CloudBuilder.AI.Gui
|
||||
{
|
||||
partial class AiBookProcessDialogPage
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
mainPanel = new TableLayoutPanel();
|
||||
dialogPanel = new TableLayoutPanel();
|
||||
cancelBut = new Krypton.Toolkit.KryptonButton();
|
||||
okBut = new Krypton.Toolkit.KryptonButton();
|
||||
contentPanel = new TableLayoutPanel();
|
||||
patternLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
patternTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
encodingCombo = new Krypton.Toolkit.KryptonComboBox();
|
||||
encodingLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
mainPanel.SuspendLayout();
|
||||
dialogPanel.SuspendLayout();
|
||||
contentPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)encodingCombo).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// mainPanel
|
||||
//
|
||||
mainPanel.ColumnCount = 1;
|
||||
mainPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
mainPanel.Controls.Add(dialogPanel, 0, 1);
|
||||
mainPanel.Controls.Add(contentPanel, 0, 0);
|
||||
mainPanel.Dock = DockStyle.Fill;
|
||||
mainPanel.Location = new Point(0, 0);
|
||||
mainPanel.Name = "mainPanel";
|
||||
mainPanel.RowCount = 2;
|
||||
mainPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 65.0666656F));
|
||||
mainPanel.RowStyles.Add(new RowStyle());
|
||||
mainPanel.Size = new Size(321, 101);
|
||||
mainPanel.TabIndex = 1;
|
||||
//
|
||||
// dialogPanel
|
||||
//
|
||||
dialogPanel.AutoSize = true;
|
||||
dialogPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
dialogPanel.ColumnCount = 3;
|
||||
dialogPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
dialogPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
dialogPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
dialogPanel.Controls.Add(cancelBut, 2, 0);
|
||||
dialogPanel.Controls.Add(okBut, 1, 0);
|
||||
dialogPanel.Dock = DockStyle.Fill;
|
||||
dialogPanel.Location = new Point(3, 67);
|
||||
dialogPanel.Name = "dialogPanel";
|
||||
dialogPanel.RowCount = 1;
|
||||
dialogPanel.RowStyles.Add(new RowStyle());
|
||||
dialogPanel.Size = new Size(315, 31);
|
||||
dialogPanel.TabIndex = 999;
|
||||
//
|
||||
// cancelBut
|
||||
//
|
||||
cancelBut.Location = new Point(222, 3);
|
||||
cancelBut.Name = "cancelBut";
|
||||
cancelBut.Size = new Size(90, 25);
|
||||
cancelBut.TabIndex = 0;
|
||||
cancelBut.Values.Image = Properties.Resources.close_16;
|
||||
cancelBut.Values.Text = "取消(&C)";
|
||||
cancelBut.Click += cancelBut_Click;
|
||||
//
|
||||
// okBut
|
||||
//
|
||||
okBut.Location = new Point(126, 3);
|
||||
okBut.Name = "okBut";
|
||||
okBut.Size = new Size(90, 25);
|
||||
okBut.TabIndex = 0;
|
||||
okBut.Values.Image = Properties.Resources.ok_16;
|
||||
okBut.Values.Text = "确定(&O)";
|
||||
okBut.Click += okBut_Click;
|
||||
//
|
||||
// contentPanel
|
||||
//
|
||||
contentPanel.ColumnCount = 2;
|
||||
contentPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
contentPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
contentPanel.Controls.Add(patternLabel, 0, 0);
|
||||
contentPanel.Controls.Add(patternTxt, 1, 0);
|
||||
contentPanel.Controls.Add(encodingCombo, 1, 1);
|
||||
contentPanel.Controls.Add(encodingLabel, 0, 1);
|
||||
contentPanel.Dock = DockStyle.Fill;
|
||||
contentPanel.Location = new Point(3, 3);
|
||||
contentPanel.Name = "contentPanel";
|
||||
contentPanel.RowCount = 2;
|
||||
contentPanel.RowStyles.Add(new RowStyle());
|
||||
contentPanel.RowStyles.Add(new RowStyle());
|
||||
contentPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
|
||||
contentPanel.Size = new Size(315, 58);
|
||||
contentPanel.TabIndex = 3;
|
||||
//
|
||||
// patternLabel
|
||||
//
|
||||
patternLabel.Location = new Point(3, 3);
|
||||
patternLabel.Name = "patternLabel";
|
||||
patternLabel.Size = new Size(91, 20);
|
||||
patternLabel.TabIndex = 0;
|
||||
patternLabel.Values.Text = "分隔章节示例:";
|
||||
//
|
||||
// patternTxt
|
||||
//
|
||||
patternTxt.Dock = DockStyle.Fill;
|
||||
patternTxt.Location = new Point(100, 3);
|
||||
patternTxt.MaxLength = 50;
|
||||
patternTxt.Name = "patternTxt";
|
||||
patternTxt.Size = new Size(215, 23);
|
||||
patternTxt.TabIndex = 1;
|
||||
patternTxt.Text = "第([^】]+)章";
|
||||
//
|
||||
// encodingCombo
|
||||
//
|
||||
encodingCombo.Dock = DockStyle.Fill;
|
||||
encodingCombo.DropDownWidth = 200;
|
||||
encodingCombo.IntegralHeight = false;
|
||||
encodingCombo.Items.AddRange(new object[] { "GB2312", "UTF-8" });
|
||||
encodingCombo.Location = new Point(100, 32);
|
||||
encodingCombo.Name = "encodingCombo";
|
||||
encodingCombo.Size = new Size(215, 22);
|
||||
encodingCombo.StateCommon.ComboBox.Content.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
|
||||
encodingCombo.TabIndex = 7;
|
||||
encodingCombo.Text = "UTF-8";
|
||||
//
|
||||
// encodingLabel
|
||||
//
|
||||
encodingLabel.Location = new Point(3, 32);
|
||||
encodingLabel.Name = "encodingLabel";
|
||||
encodingLabel.Size = new Size(88, 20);
|
||||
encodingLabel.TabIndex = 0;
|
||||
encodingLabel.Values.Text = "小说原文格式";
|
||||
//
|
||||
// AiBookProcessDialogPage
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Controls.Add(mainPanel);
|
||||
Name = "AiBookProcessDialogPage";
|
||||
Size = new Size(321, 101);
|
||||
mainPanel.ResumeLayout(false);
|
||||
mainPanel.PerformLayout();
|
||||
dialogPanel.ResumeLayout(false);
|
||||
contentPanel.ResumeLayout(false);
|
||||
contentPanel.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)encodingCombo).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TableLayoutPanel mainPanel;
|
||||
private TableLayoutPanel dialogPanel;
|
||||
private Krypton.Toolkit.KryptonButton cancelBut;
|
||||
private Krypton.Toolkit.KryptonButton okBut;
|
||||
private TableLayoutPanel contentPanel;
|
||||
private Krypton.Toolkit.KryptonLabel patternLabel;
|
||||
private Krypton.Toolkit.KryptonTextBox patternTxt;
|
||||
private Krypton.Toolkit.KryptonComboBox encodingCombo;
|
||||
private Krypton.Toolkit.KryptonLabel encodingLabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using CloudBuilder.AI.Data;
|
||||
using CloudBuilder.Gui;
|
||||
using Krypton.Toolkit;
|
||||
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 CloudBuilder.AI.Gui
|
||||
{
|
||||
public partial class AiBookProcessDialogPage : AbstractPage
|
||||
{
|
||||
public AiBookProcessDialogPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void okBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ParentAbstractForm.OutputData = new AiBookProcessData()
|
||||
{
|
||||
Pattern = patternTxt.GetValue(),
|
||||
Encoding = encodingCombo.Text
|
||||
};
|
||||
|
||||
this.ParentAbstractForm.DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void cancelBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ParentAbstractForm.DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,71 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Resources\9345d688d43f8794459685b1fd2fc6fa1ad53a83.jpeg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CloudBuilder.AI">
|
||||
<HintPath>..\CloudBuilder.AI\bin\Debug\net8.0\CloudBuilder.AI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CloudBuilder.Core">
|
||||
<HintPath>..\CloudBuilder.Core\bin\Debug\net8.0\CloudBuilder.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CloudBuilder.Gui">
|
||||
<HintPath>..\CloudBuilder.Gui\bin\Debug\net8.0-windows\CloudBuilder.Gui.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CloudBuilder.Request">
|
||||
<HintPath>..\CloudBuilder.Request\bin\Debug\net8.0\CloudBuilder.Request.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CloudBuilder.Security">
|
||||
<HintPath>..\CloudBuilder.Security\bin\Debug\net8.0\CloudBuilder.Security.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Krypton.Docking" Version="85.24.10.288" />
|
||||
<PackageReference Include="Krypton.Navigator" Version="85.24.10.288" />
|
||||
<PackageReference Include="Krypton.Ribbon" Version="85.24.10.288" />
|
||||
<PackageReference Include="Krypton.Toolkit" Version="85.24.10.288" />
|
||||
<PackageReference Include="Krypton.Workspace" Version="85.24.10.288" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||
<PackageReference Include="ClosedXML" Version="0.102.1" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
<Folder Include="Utility\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Compile Update="AiBookEnquiryPage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="AiBookOperationPage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="AiBookProcessDialogPage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,303 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 這段程式碼是由工具產生的。
|
||||
// 執行階段版本:4.0.30319.42000
|
||||
//
|
||||
// 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼,
|
||||
// 變更將會遺失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CloudBuilder.AI.Gui.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用於查詢當地語系化字串等的強類型資源類別。
|
||||
/// </summary>
|
||||
// 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder
|
||||
// 類別透過 ResGen 或 Visual Studio 這類工具。
|
||||
// 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen
|
||||
// (利用 /str 選項),或重建您的 VS 專案。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 傳回這個類別使用的快取的 ResourceManager 執行個體。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CloudBuilder.AI.Gui.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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap amend_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("amend_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap cancel_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("cancel_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap close_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("close_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap create_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("create_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap delete_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("delete_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap element {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("element", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap element_minus_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("element_minus_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap element_plus_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("element_plus_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap MoveNext {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MoveNext", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap MovePrevious {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MovePrevious", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap navigate_minus {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("navigate_minus", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap navigate_plus {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("navigate_plus", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap nonImg {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("nonImg", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ok_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ok_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap page_link {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("page_link", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap page_white_delete {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("page_white_delete", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap page_white_gear {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("page_white_gear", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap page_white_get {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("page_white_get", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap page_white_go {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("page_white_go", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap reset_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("reset_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap save_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("save_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap search_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("search_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap view_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("view_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查詢類型 System.Drawing.Bitmap 的當地語系化資源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Yo7OjL6wMwgA845AU {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Yo7OjL6wMwgA845AU", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
<?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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="nonImg" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\nonImg.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="element_minus_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\element_minus_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="page_link" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="create_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\create_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Yo7OjL6wMwgA845AU" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Yo7OjL6wMwgA845AU.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="navigate_minus" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\navigate_minus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="amend_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\amend_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="search_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\search_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="view_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\view_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MovePrevious" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MovePrevious.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="close_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\close_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="save_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\save_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="page_white_go" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_white_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="page_white_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_white_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="element" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\element.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="delete_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\delete_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MoveNext" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MoveNext.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ok_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ok_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cancel_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\cancel_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="navigate_plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\navigate_plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="page_white_get" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_white_get.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="reset_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\reset_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="element_plus_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\element_plus_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="page_white_gear" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_white_gear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,135 @@
|
||||
using CloudBuilder.AI.Entity;
|
||||
using CloudBuilder.Core.DependencyInjection.Form;
|
||||
using CloudBuilder.Core.DependencyInjection.Request;
|
||||
using CloudBuilder.Core.Request;
|
||||
using CloudBuilder.Core.Service;
|
||||
using CloudBuilder.Gui;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Net.Http.Headers;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace CloudBuilder.AI.Gui.Request
|
||||
{
|
||||
public class DmsFileRequestHelper
|
||||
{
|
||||
private const int CHUNK_SIZE = 512 * 1024; // 512KB 分块大小
|
||||
|
||||
private IServiceRequest serviceRequest;
|
||||
public BookDmsFileViewEntity UploadFile(string fileName, string folderName)
|
||||
{
|
||||
var fileInfo = new FileInfo(fileName);
|
||||
var chunks = SplitFile(fileName);
|
||||
string uid = Guid.NewGuid().ToString();
|
||||
string fileFullName = fileInfo.Name;
|
||||
|
||||
return UploadChunk(chunks, fileFullName, uid, 1, folderName);
|
||||
}
|
||||
|
||||
// 分块上传方法
|
||||
private BookDmsFileViewEntity UploadChunk(IList<byte[]> chunks, string fileName, string uid, int index, string folderName)
|
||||
{
|
||||
BookDmsFileViewEntity dmsFileEntity = new BookDmsFileViewEntity();
|
||||
try
|
||||
{
|
||||
var fileExtension = Path.GetExtension(fileName);
|
||||
var chunk = chunks[index - 1];
|
||||
|
||||
using (var formData = new MultipartFormDataContent())
|
||||
{
|
||||
var content = new ByteArrayContent(chunk);
|
||||
content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/octet-stream");
|
||||
|
||||
formData.Add(content, fileName,
|
||||
$"{uid}-{index}-{chunks.Count}{fileExtension}");
|
||||
|
||||
IContext context = ApplicationServiceContext.Context;
|
||||
using (var scope = ApplicationServiceContext.ServiceProvider.CreateScope())
|
||||
{
|
||||
serviceRequest = scope.ServiceProvider.GetService<IServiceRequest>()!;
|
||||
|
||||
serviceRequest.AddHeaders("FilePath", folderName);
|
||||
|
||||
serviceRequest.SetContext(context);
|
||||
|
||||
Task.Run(async () => dmsFileEntity = await serviceRequest.PostAsync<BookDmsFileViewEntity>("/DmsFile/UploadFile", formData)).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
if (index < chunks.Count)
|
||||
{
|
||||
dmsFileEntity = UploadChunk(chunks, fileName, uid, index + 1, folderName);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
return dmsFileEntity;
|
||||
}
|
||||
|
||||
// 文件分块方法
|
||||
private IList<byte[]> SplitFile(string filePath)
|
||||
{
|
||||
var chunks = new List<byte[]>();
|
||||
using (var fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
long fileSize = fileStream.Length;
|
||||
long start = 0;
|
||||
while (start < fileSize)
|
||||
{
|
||||
long remaining = fileSize - start;
|
||||
int chunkSize = (int)Math.Min(CHUNK_SIZE, remaining);
|
||||
|
||||
byte[] buffer = new byte[chunkSize];
|
||||
fileStream.Read(buffer, 0, chunkSize);
|
||||
|
||||
chunks.Add(buffer);
|
||||
start += CHUNK_SIZE;
|
||||
}
|
||||
}
|
||||
return chunks;
|
||||
}
|
||||
|
||||
public void DownloadFile(int fileId, string saveFilePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
ServiceHelper.GetService<IServiceRequest>()!.DownloadFile("/DmsFile/DownloadFile?fileId=" + fileId, saveFilePath, null, OpenFile);
|
||||
}
|
||||
catch (ValidatedException ex)
|
||||
{
|
||||
ShowMessageBox.ShowInfo(ex.Message);
|
||||
}
|
||||
catch (ServiceErrorException ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowMessageBox.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenFile(string fileFullName)
|
||||
{
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = fileFullName,
|
||||
UseShellExecute = true // 使用Windows Shell执行
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 799 B |
|
After Width: | Height: | Size: 808 B |
|
After Width: | Height: | Size: 565 B |
|
After Width: | Height: | Size: 558 B |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 806 B |
|
After Width: | Height: | Size: 980 B |
|
After Width: | Height: | Size: 859 B |
|
After Width: | Height: | Size: 758 B |
|
After Width: | Height: | Size: 755 B |
|
After Width: | Height: | Size: 344 B |
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 500 B |
|
After Width: | Height: | Size: 316 B |
|
After Width: | Height: | Size: 582 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 630 B |
|
After Width: | Height: | Size: 830 B |
|
After Width: | Height: | Size: 536 B |
|
After Width: | Height: | Size: 402 B |
|
After Width: | Height: | Size: 516 B |
|
After Width: | Height: | Size: 612 B |
|
After Width: | Height: | Size: 483 B |
|
After Width: | Height: | Size: 685 B |
|
After Width: | Height: | Size: 816 B |
|
After Width: | Height: | Size: 644 B |
|
After Width: | Height: | Size: 759 B |