我为Revit (Autodesk)制作了一个插件,它使用: System.Windows.Forms;在c#中从程序集PresentationCore启动一个外部表单。知道我想用Zendesk聊天(Zopim)来填充这个窗口。不幸的是,我不知道如何在c#中使用REST。今天我只想谈谈这个话题。
详细说明我想要的内容:当表单打开时,程序加载Zopim聊天表单并将其放入我的c#表单中。
我已经知道,我需要得到聊天的形式,我需要将它解析为我的表单。
问题是:我找不到zopim聊天表格。我不知道如何把它转换成UI。
我的表格代码:
[Transaction(TransactionMode.Manual)]
class DoSomething : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
this.StartForm();
return Result.Succeeded;
}
public void StartForm()
{
//EXECUTE AN EXTERNAL WINDOW
System.Windows.Forms.Form myF = new System.Windows.Forms.Form();
myF.FormBorderStyle = FormBorderStyle.SizableToolWindow;
myF.StartPosition = FormStartPosition.CenterScreen;
myF.Width = 400;
myF.Height = 600;
myF.HelpButton = true;
Button cButton = new Button();
cButton.Text = "Cancel";
myF.CancelButton = cButton;
myF.FormClosing += delegate (object sender, FormClosingEventArgs e)
{
e.Cancel = true;
myF.WindowState = FormWindowState.Minimized;
};
myF.Show();
}
}发布于 2017-07-11 08:26:29
我找到了另一种方法。Zendesk (Zopim)确实提供了一个JavaScript插件。最好的方法是启动一个System.Windows.Forms.WebBrowser并在您的HTML中实现JavaScript代码,该文件引用了WebBrowser的应用程序。
https://stackoverflow.com/questions/44968187
复制相似问题