更新UI
This commit is contained in:
parent
7a48856b1b
commit
6241b74048
Binary file not shown.
@ -318,6 +318,11 @@ namespace AIProofread
|
||||
Globals.ThisAddIn.ShowLoginForm(action);
|
||||
}
|
||||
|
||||
public void MoveCursor(int pos) {
|
||||
var rng = Globals.ThisAddIn.Application.ActiveDocument.Range(pos, pos);
|
||||
rng.Select();
|
||||
}
|
||||
|
||||
public void SelectMarkById(int proofreadId)
|
||||
{
|
||||
if (proofreadId == selectProofreadId) return;
|
||||
@ -331,6 +336,7 @@ namespace AIProofread
|
||||
{
|
||||
Globals.ThisAddIn.SendMessageToWeb("select", proofreadId);
|
||||
marks[proofreadId].Select();
|
||||
var doc = Globals.ThisAddIn.Application.ActiveDocument;
|
||||
}
|
||||
Globals.ThisAddIn.SendMessageToWeb("select_proofread", proofreadId);
|
||||
}
|
||||
|
@ -66,6 +66,13 @@ namespace UtilLib
|
||||
public void Select()
|
||||
{
|
||||
if (mark == null) return;
|
||||
if(content.tag == "i")
|
||||
{
|
||||
var endPos = mark.Range.End;
|
||||
var rng = Globals.ThisAddIn.Application.ActiveDocument.Range(endPos, endPos);
|
||||
rng.Select();
|
||||
return;
|
||||
}
|
||||
mark.Range.Font.Size = originSize + 2; // 将选中标签文本放大字体
|
||||
mark.Select();
|
||||
|
||||
|
115
AIProofread/Ribbon1.Designer.cs
generated
115
AIProofread/Ribbon1.Designer.cs
generated
@ -36,39 +36,24 @@
|
||||
{
|
||||
this.tabAIProofread = this.Factory.CreateRibbonTab();
|
||||
this.group1 = this.Factory.CreateRibbonGroup();
|
||||
this.BtnProofreadAll = this.Factory.CreateRibbonButton();
|
||||
this.btnClear = this.Factory.CreateRibbonButton();
|
||||
this.group3 = this.Factory.CreateRibbonGroup();
|
||||
this.btnOpenLexicon = this.Factory.CreateRibbonButton();
|
||||
this.group2 = this.Factory.CreateRibbonGroup();
|
||||
this.btnSetting = this.Factory.CreateRibbonButton();
|
||||
this.group4 = this.Factory.CreateRibbonGroup();
|
||||
this.BtnGetContact = this.Factory.CreateRibbonButton();
|
||||
this.BtnUpdate = this.Factory.CreateRibbonButton();
|
||||
this.gpLogin = this.Factory.CreateRibbonGroup();
|
||||
this.btnLogin = this.Factory.CreateRibbonButton();
|
||||
this.gpLogout = this.Factory.CreateRibbonGroup();
|
||||
this.btnLogout = this.Factory.CreateRibbonButton();
|
||||
this.LblNickname = this.Factory.CreateRibbonLabel();
|
||||
this.LblPhone = this.Factory.CreateRibbonLabel();
|
||||
this.LblVersion = this.Factory.CreateRibbonLabel();
|
||||
this.BtnProofreadAll = this.Factory.CreateRibbonButton();
|
||||
this.btnClear = this.Factory.CreateRibbonButton();
|
||||
this.btnOpenLexicon = this.Factory.CreateRibbonButton();
|
||||
this.btnSetting = this.Factory.CreateRibbonButton();
|
||||
this.BtnGetContact = this.Factory.CreateRibbonButton();
|
||||
this.BtnUpdate = this.Factory.CreateRibbonButton();
|
||||
this.btnLogin = this.Factory.CreateRibbonButton();
|
||||
this.btnLogout = this.Factory.CreateRibbonButton();
|
||||
this.tabAIProofread.SuspendLayout();
|
||||
this.group1.SuspendLayout();
|
||||
this.group3.SuspendLayout();
|
||||
this.group2.SuspendLayout();
|
||||
this.group4.SuspendLayout();
|
||||
this.gpLogin.SuspendLayout();
|
||||
this.gpLogout.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tabAIProofread
|
||||
//
|
||||
this.tabAIProofread.Groups.Add(this.group1);
|
||||
this.tabAIProofread.Groups.Add(this.group3);
|
||||
this.tabAIProofread.Groups.Add(this.group2);
|
||||
this.tabAIProofread.Groups.Add(this.group4);
|
||||
this.tabAIProofread.Groups.Add(this.gpLogin);
|
||||
this.tabAIProofread.Groups.Add(this.gpLogout);
|
||||
this.tabAIProofread.Label = "AI校对王";
|
||||
this.tabAIProofread.Name = "tabAIProofread";
|
||||
this.tabAIProofread.Position = this.Factory.RibbonPosition.AfterOfficeId("TabHelp");
|
||||
@ -77,8 +62,32 @@
|
||||
//
|
||||
this.group1.Items.Add(this.BtnProofreadAll);
|
||||
this.group1.Items.Add(this.btnClear);
|
||||
this.group1.Items.Add(this.btnOpenLexicon);
|
||||
this.group1.Items.Add(this.btnSetting);
|
||||
this.group1.Items.Add(this.BtnGetContact);
|
||||
this.group1.Items.Add(this.BtnUpdate);
|
||||
this.group1.Items.Add(this.btnLogin);
|
||||
this.group1.Items.Add(this.btnLogout);
|
||||
this.group1.Items.Add(this.LblNickname);
|
||||
this.group1.Items.Add(this.LblPhone);
|
||||
this.group1.Items.Add(this.LblVersion);
|
||||
this.group1.Name = "group1";
|
||||
//
|
||||
// LblNickname
|
||||
//
|
||||
this.LblNickname.Label = "张三 已登录";
|
||||
this.LblNickname.Name = "LblNickname";
|
||||
//
|
||||
// LblPhone
|
||||
//
|
||||
this.LblPhone.Label = "188****8888";
|
||||
this.LblPhone.Name = "LblPhone";
|
||||
//
|
||||
// LblVersion
|
||||
//
|
||||
this.LblVersion.Label = "企业内测版";
|
||||
this.LblVersion.Name = "LblVersion";
|
||||
//
|
||||
// BtnProofreadAll
|
||||
//
|
||||
this.BtnProofreadAll.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
|
||||
@ -97,11 +106,6 @@
|
||||
this.btnClear.ShowImage = true;
|
||||
this.btnClear.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnClear_Click);
|
||||
//
|
||||
// group3
|
||||
//
|
||||
this.group3.Items.Add(this.btnOpenLexicon);
|
||||
this.group3.Name = "group3";
|
||||
//
|
||||
// btnOpenLexicon
|
||||
//
|
||||
this.btnOpenLexicon.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
|
||||
@ -111,11 +115,6 @@
|
||||
this.btnOpenLexicon.ShowImage = true;
|
||||
this.btnOpenLexicon.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnOpenLexicon_Click);
|
||||
//
|
||||
// group2
|
||||
//
|
||||
this.group2.Items.Add(this.btnSetting);
|
||||
this.group2.Name = "group2";
|
||||
//
|
||||
// btnSetting
|
||||
//
|
||||
this.btnSetting.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
|
||||
@ -125,12 +124,6 @@
|
||||
this.btnSetting.ShowImage = true;
|
||||
this.btnSetting.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnSetting_Click);
|
||||
//
|
||||
// group4
|
||||
//
|
||||
this.group4.Items.Add(this.BtnGetContact);
|
||||
this.group4.Items.Add(this.BtnUpdate);
|
||||
this.group4.Name = "group4";
|
||||
//
|
||||
// BtnGetContact
|
||||
//
|
||||
this.BtnGetContact.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
|
||||
@ -149,11 +142,6 @@
|
||||
this.BtnUpdate.ShowImage = true;
|
||||
this.BtnUpdate.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnUpdate_Click);
|
||||
//
|
||||
// gpLogin
|
||||
//
|
||||
this.gpLogin.Items.Add(this.btnLogin);
|
||||
this.gpLogin.Name = "gpLogin";
|
||||
//
|
||||
// btnLogin
|
||||
//
|
||||
this.btnLogin.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
|
||||
@ -163,15 +151,6 @@
|
||||
this.btnLogin.ShowImage = true;
|
||||
this.btnLogin.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnLogin_Click);
|
||||
//
|
||||
// gpLogout
|
||||
//
|
||||
this.gpLogout.Items.Add(this.btnLogout);
|
||||
this.gpLogout.Items.Add(this.LblNickname);
|
||||
this.gpLogout.Items.Add(this.LblPhone);
|
||||
this.gpLogout.Items.Add(this.LblVersion);
|
||||
this.gpLogout.Name = "gpLogout";
|
||||
this.gpLogout.Visible = false;
|
||||
//
|
||||
// btnLogout
|
||||
//
|
||||
this.btnLogout.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
|
||||
@ -181,21 +160,6 @@
|
||||
this.btnLogout.ShowImage = true;
|
||||
this.btnLogout.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnLogout_Click);
|
||||
//
|
||||
// LblNickname
|
||||
//
|
||||
this.LblNickname.Label = "张三 已登录";
|
||||
this.LblNickname.Name = "LblNickname";
|
||||
//
|
||||
// LblPhone
|
||||
//
|
||||
this.LblPhone.Label = "188****8888";
|
||||
this.LblPhone.Name = "LblPhone";
|
||||
//
|
||||
// LblVersion
|
||||
//
|
||||
this.LblVersion.Label = "企业内测版";
|
||||
this.LblVersion.Name = "LblVersion";
|
||||
//
|
||||
// Ribbon1
|
||||
//
|
||||
this.Name = "Ribbon1";
|
||||
@ -206,16 +170,6 @@
|
||||
this.tabAIProofread.PerformLayout();
|
||||
this.group1.ResumeLayout(false);
|
||||
this.group1.PerformLayout();
|
||||
this.group3.ResumeLayout(false);
|
||||
this.group3.PerformLayout();
|
||||
this.group2.ResumeLayout(false);
|
||||
this.group2.PerformLayout();
|
||||
this.group4.ResumeLayout(false);
|
||||
this.group4.PerformLayout();
|
||||
this.gpLogin.ResumeLayout(false);
|
||||
this.gpLogin.PerformLayout();
|
||||
this.gpLogout.ResumeLayout(false);
|
||||
this.gpLogout.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -224,8 +178,6 @@
|
||||
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonTab tabAIProofread;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonGroup group1;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonGroup gpLogin;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonGroup gpLogout;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnLogout;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonLabel LblNickname;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonLabel LblPhone;
|
||||
@ -233,11 +185,8 @@
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnLogin;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnProofreadAll;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnClear;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonGroup group3;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnOpenLexicon;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonGroup group2;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnSetting;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonGroup group4;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnGetContact;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnUpdate;
|
||||
}
|
||||
|
@ -46,8 +46,13 @@ namespace AIProofread
|
||||
// 处理是否登录的展示
|
||||
private void ToggleLogin()
|
||||
{
|
||||
gpLogin.Visible = !IS_LOGIN;
|
||||
gpLogout.Visible = IS_LOGIN;
|
||||
|
||||
btnLogin.Visible = !IS_LOGIN;
|
||||
|
||||
btnLogout.Visible = IS_LOGIN;
|
||||
LblNickname.Visible = IS_LOGIN;
|
||||
LblPhone.Visible = IS_LOGIN;
|
||||
LblVersion.Visible = IS_LOGIN;
|
||||
}
|
||||
|
||||
// 弹出登录窗口
|
||||
|
@ -18,7 +18,7 @@ namespace AIProofread
|
||||
|
||||
public static SynchronizationContext FmainThreadContext;
|
||||
|
||||
public string AddinName = "AI校对王";
|
||||
public string AddinName = Config.APP_NAME;
|
||||
/// <summary>
|
||||
/// 最小宽度
|
||||
/// </summary>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user