callmeyan 089e0bc64a 更新数据交互流程;
优化框架架构;
调整数据结构;
2024-11-05 13:40:39 +08:00

38 lines
989 B
C#

using System;
using System.Windows.Forms;
using AIProofread.Controls;
using Office = Microsoft.Office.Core;
namespace AIProofread
{
public static class PanelModule
{
public static ProofreadMainControl uc;
public static Microsoft.Office.Tools.CustomTaskPane ctp;
/// <summary>
/// 显示panel
/// </summary>
public static void ShowProofreadPanel()
{
if (ctp == null)
{
uc = new ProofreadMainControl();
ctp = Globals.ThisAddIn.CustomTaskPanes.Add(control: uc, title: "AI校对王");
ctp.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight;
}
ctp.Visible = true;
}
public static void DisposeCTP()
{
if (ctp != null)
{
ctp.Dispose();
uc.Dispose();
ctp = null;
uc = null;
}
}
}
}