ow
This commit is contained in:
1 parent
30c22a3d0c
commit
0c79fb3519
11 files changed
+296
-40
No files matched your search
+112
-29
@@ -63,8 +63,6 @@ namespace CloudBuilder.AI.Gui
|
||||
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();
|
||||
@@ -78,6 +76,10 @@ namespace CloudBuilder.AI.Gui
|
||||
filePathTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
statusLabel = new Krypton.Toolkit.KryptonLabel();
|
||||
bookTypeTxt = new Krypton.Toolkit.KryptonTextBox();
|
||||
processPanel = new TableLayoutPanel();
|
||||
processBut = new Krypton.Toolkit.KryptonButton();
|
||||
extractNamesBut = new Krypton.Toolkit.KryptonButton();
|
||||
uploadBut = new Krypton.Toolkit.KryptonButton();
|
||||
kryptonPanel2 = new Krypton.Toolkit.KryptonPanel();
|
||||
mainPanel = new TableLayoutPanel();
|
||||
topPanel = new TableLayoutPanel();
|
||||
@@ -96,6 +98,9 @@ namespace CloudBuilder.AI.Gui
|
||||
operationPanel = new TableLayoutPanel();
|
||||
deleteBut = new Krypton.Toolkit.KryptonButton();
|
||||
amendBut = new Krypton.Toolkit.KryptonButton();
|
||||
tableLayoutPanel7 = new TableLayoutPanel();
|
||||
kryptonDataGridView1 = new Krypton.Toolkit.KryptonDataGridView();
|
||||
kryptonDataGridView2 = new Krypton.Toolkit.KryptonDataGridView();
|
||||
contentPanel.SuspendLayout();
|
||||
tableLayoutPanel3.SuspendLayout();
|
||||
tableLayoutPanel4.SuspendLayout();
|
||||
@@ -106,8 +111,10 @@ namespace CloudBuilder.AI.Gui
|
||||
tableLayoutPanel6.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)sentenceGv).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGv).BeginInit();
|
||||
tabPage2.SuspendLayout();
|
||||
tableLayoutPanel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)statusCombo).BeginInit();
|
||||
processPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)kryptonPanel2).BeginInit();
|
||||
mainPanel.SuspendLayout();
|
||||
topPanel.SuspendLayout();
|
||||
@@ -116,6 +123,9 @@ namespace CloudBuilder.AI.Gui
|
||||
bottomPanel.SuspendLayout();
|
||||
savePanel.SuspendLayout();
|
||||
operationPanel.SuspendLayout();
|
||||
tableLayoutPanel7.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)kryptonDataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)kryptonDataGridView2).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// contentPanel
|
||||
@@ -400,12 +410,13 @@ namespace CloudBuilder.AI.Gui
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
tabPage2.Controls.Add(tableLayoutPanel7);
|
||||
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.Text = "人物角色表";
|
||||
tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
@@ -419,8 +430,6 @@ namespace CloudBuilder.AI.Gui
|
||||
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);
|
||||
@@ -434,6 +443,7 @@ namespace CloudBuilder.AI.Gui
|
||||
tableLayoutPanel2.Controls.Add(filePathTxt, 1, 3);
|
||||
tableLayoutPanel2.Controls.Add(statusLabel, 2, 0);
|
||||
tableLayoutPanel2.Controls.Add(bookTypeTxt, 1, 4);
|
||||
tableLayoutPanel2.Controls.Add(processPanel, 2, 3);
|
||||
tableLayoutPanel2.Dock = DockStyle.Fill;
|
||||
tableLayoutPanel2.Location = new Point(3, 3);
|
||||
tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
@@ -443,6 +453,7 @@ namespace CloudBuilder.AI.Gui
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle());
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
|
||||
tableLayoutPanel2.Size = new Size(1018, 187);
|
||||
tableLayoutPanel2.TabIndex = 0;
|
||||
//
|
||||
@@ -452,32 +463,12 @@ namespace CloudBuilder.AI.Gui
|
||||
statusCombo.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
statusCombo.DropDownWidth = 300;
|
||||
statusCombo.IntegralHeight = false;
|
||||
statusCombo.Location = new Point(472, 3);
|
||||
statusCombo.Location = new Point(446, 3);
|
||||
statusCombo.Name = "statusCombo";
|
||||
statusCombo.Size = new Size(300, 22);
|
||||
statusCombo.Size = new Size(326, 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);
|
||||
@@ -559,10 +550,10 @@ namespace CloudBuilder.AI.Gui
|
||||
// authorTxt
|
||||
//
|
||||
authorTxt.Dock = DockStyle.Fill;
|
||||
authorTxt.Location = new Point(472, 32);
|
||||
authorTxt.Location = new Point(446, 32);
|
||||
authorTxt.MaxLength = 500;
|
||||
authorTxt.Name = "authorTxt";
|
||||
authorTxt.Size = new Size(300, 23);
|
||||
authorTxt.Size = new Size(326, 23);
|
||||
authorTxt.TabIndex = 3;
|
||||
//
|
||||
// filePathTxt
|
||||
@@ -590,6 +581,57 @@ namespace CloudBuilder.AI.Gui
|
||||
bookTypeTxt.Size = new Size(300, 23);
|
||||
bookTypeTxt.TabIndex = 3;
|
||||
//
|
||||
// processPanel
|
||||
//
|
||||
processPanel.AutoSize = true;
|
||||
processPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
processPanel.ColumnCount = 4;
|
||||
tableLayoutPanel2.SetColumnSpan(processPanel, 2);
|
||||
processPanel.ColumnStyles.Add(new ColumnStyle());
|
||||
processPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
processPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
processPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 80F));
|
||||
processPanel.Controls.Add(processBut, 1, 0);
|
||||
processPanel.Controls.Add(extractNamesBut, 2, 0);
|
||||
processPanel.Controls.Add(uploadBut, 0, 0);
|
||||
processPanel.Location = new Point(377, 127);
|
||||
processPanel.Margin = new Padding(0);
|
||||
processPanel.Name = "processPanel";
|
||||
processPanel.RowCount = 1;
|
||||
processPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
processPanel.Size = new Size(356, 31);
|
||||
processPanel.TabIndex = 6;
|
||||
//
|
||||
// processBut
|
||||
//
|
||||
processBut.Location = new Point(95, 3);
|
||||
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;
|
||||
//
|
||||
// extractNamesBut
|
||||
//
|
||||
extractNamesBut.Location = new Point(187, 3);
|
||||
extractNamesBut.Name = "extractNamesBut";
|
||||
extractNamesBut.Size = new Size(86, 25);
|
||||
extractNamesBut.TabIndex = 2;
|
||||
extractNamesBut.Values.Image = Properties.Resources.MoveNext;
|
||||
extractNamesBut.Values.Text = "识别人名";
|
||||
extractNamesBut.Click += extractNamesBut_Click;
|
||||
//
|
||||
// uploadBut
|
||||
//
|
||||
uploadBut.Location = new Point(3, 3);
|
||||
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;
|
||||
//
|
||||
// kryptonPanel2
|
||||
//
|
||||
kryptonPanel2.Dock = DockStyle.Fill;
|
||||
@@ -805,6 +847,37 @@ namespace CloudBuilder.AI.Gui
|
||||
amendBut.Values.Text = "修改(&M)";
|
||||
amendBut.Click += amendBut_Click;
|
||||
//
|
||||
// tableLayoutPanel7
|
||||
//
|
||||
tableLayoutPanel7.ColumnCount = 2;
|
||||
tableLayoutPanel7.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableLayoutPanel7.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableLayoutPanel7.Controls.Add(kryptonDataGridView1, 0, 0);
|
||||
tableLayoutPanel7.Controls.Add(kryptonDataGridView2, 1, 0);
|
||||
tableLayoutPanel7.Location = new Point(76, 31);
|
||||
tableLayoutPanel7.Name = "tableLayoutPanel7";
|
||||
tableLayoutPanel7.RowCount = 2;
|
||||
tableLayoutPanel7.RowStyles.Add(new RowStyle(SizeType.Percent, 69.93671F));
|
||||
tableLayoutPanel7.RowStyles.Add(new RowStyle(SizeType.Percent, 30.0632915F));
|
||||
tableLayoutPanel7.Size = new Size(622, 316);
|
||||
tableLayoutPanel7.TabIndex = 0;
|
||||
//
|
||||
// kryptonDataGridView1
|
||||
//
|
||||
kryptonDataGridView1.BorderStyle = BorderStyle.None;
|
||||
kryptonDataGridView1.Location = new Point(3, 3);
|
||||
kryptonDataGridView1.Name = "kryptonDataGridView1";
|
||||
kryptonDataGridView1.Size = new Size(209, 173);
|
||||
kryptonDataGridView1.TabIndex = 0;
|
||||
//
|
||||
// kryptonDataGridView2
|
||||
//
|
||||
kryptonDataGridView2.BorderStyle = BorderStyle.None;
|
||||
kryptonDataGridView2.Location = new Point(314, 3);
|
||||
kryptonDataGridView2.Name = "kryptonDataGridView2";
|
||||
kryptonDataGridView2.Size = new Size(209, 173);
|
||||
kryptonDataGridView2.TabIndex = 0;
|
||||
//
|
||||
// AiBookOperationPage
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
@@ -824,9 +897,11 @@ namespace CloudBuilder.AI.Gui
|
||||
tableLayoutPanel6.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)sentenceGv).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGv).EndInit();
|
||||
tabPage2.ResumeLayout(false);
|
||||
tableLayoutPanel2.ResumeLayout(false);
|
||||
tableLayoutPanel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)statusCombo).EndInit();
|
||||
processPanel.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)kryptonPanel2).EndInit();
|
||||
mainPanel.ResumeLayout(false);
|
||||
mainPanel.PerformLayout();
|
||||
@@ -838,6 +913,9 @@ namespace CloudBuilder.AI.Gui
|
||||
bottomPanel.PerformLayout();
|
||||
savePanel.ResumeLayout(false);
|
||||
operationPanel.ResumeLayout(false);
|
||||
tableLayoutPanel7.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)kryptonDataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)kryptonDataGridView2).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@@ -904,5 +982,10 @@ namespace CloudBuilder.AI.Gui
|
||||
private Krypton.Toolkit.KryptonDataGridViewTextBoxColumn genderCol;
|
||||
private Krypton.Toolkit.KryptonDataGridViewTextBoxColumn sentimentCol;
|
||||
private Krypton.Toolkit.KryptonDataGridViewComboBoxColumn sentenceStatusCol;
|
||||
private TableLayoutPanel processPanel;
|
||||
private Krypton.Toolkit.KryptonButton extractNamesBut;
|
||||
private TableLayoutPanel tableLayoutPanel7;
|
||||
private Krypton.Toolkit.KryptonDataGridView kryptonDataGridView1;
|
||||
private Krypton.Toolkit.KryptonDataGridView kryptonDataGridView2;
|
||||
}
|
||||
}
|
||||
@@ -260,21 +260,21 @@ namespace CloudBuilder.AI.Gui
|
||||
guiOperateHelper.EnableControls(false, contentPanel);
|
||||
//查詢有記錄時,修改等控件有效
|
||||
if (aiBookEntity != null)
|
||||
guiOperateHelper.EnableControls(true, bottomPanel, uploadBut, processBut, gridViewPagination);
|
||||
guiOperateHelper.EnableControls(true, bottomPanel, processPanel,gridViewPagination);
|
||||
else
|
||||
guiOperateHelper.EnableControls(false, bottomPanel, uploadBut, processBut, gridViewPagination);
|
||||
guiOperateHelper.EnableControls(false, bottomPanel, processPanel, 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(false, topPanel, processPanel, gridViewPagination);
|
||||
guiOperateHelper.EnableControls(true, bottomPanel, contentPanel);
|
||||
|
||||
if (this.DisplayMode == GuiDisplayMode.Amend) guiOperateHelper.EnableControls(false, guidTxt);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void PackUIToEntity()
|
||||
@@ -347,6 +347,7 @@ namespace CloudBuilder.AI.Gui
|
||||
filter.Value = data.AiBook.Guid;
|
||||
filters.Add(filter);
|
||||
|
||||
searchCriteria.Filter = filters.ToArray();
|
||||
|
||||
return searchCriteria;
|
||||
}
|
||||
@@ -413,7 +414,7 @@ namespace CloudBuilder.AI.Gui
|
||||
|
||||
filePathTxt.Text = data.FileName;
|
||||
|
||||
SearchChapter();
|
||||
SearchChapter();
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
@@ -743,7 +744,39 @@ namespace CloudBuilder.AI.Gui
|
||||
|
||||
AiChapterEntity chapter = dataGv.GetRowData<AiChapterEntity>(dataGv.SelectedCells[0].RowIndex);
|
||||
|
||||
AiSentenceViewEntity[] aiSentences= aiSentenceRequest.FindByChapterGuid(chapter.Guid);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
private void extractNamesBut_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
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);
|
||||
|
||||
aiBookRequest.ExtractNamesByChapterGuid(data.AiBook.Guid, chapter.Guid);
|
||||
|
||||
AiSentenceViewEntity[] aiSentences = aiSentenceRequest.FindByChapterGuid(chapter.Guid);
|
||||
|
||||
sentenceGv.SetDataSource(aiSentences);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user