Files
cyf ab56a9bcf7 基线 SVN r240
SVN-Revision: r240
2025-02-06 06:46:06 +00:00

1050 lines
39 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: System.Reflection.AssemblyVersion("1.0.0.0")]
[assembly: System.Windows.Forms.AxHost.TypeLibraryTimeStamp("07/22/2018 15:23:50")]
namespace Lskj.PubCadViewer
{
[System.Windows.Forms.AxHost.ClsidAttribute("{3f029cf6-b113-4551-a719-5bb2620d3cb1}")]
[System.ComponentModel.DesignTimeVisibleAttribute(true)]
public class AxCADViewerX : System.Windows.Forms.AxHost
{
private CADViewerXLib._CADViewerX ocx;
private AxCADViewerXEventMulticaster eventMulticaster;
private System.Windows.Forms.AxHost.ConnectionPointCookie cookie;
public AxCADViewerX() :
base("3f029cf6-b113-4551-a719-5bb2620d3cb1")
{
this.SetAboutBoxDelegate(new AboutBoxDelegate(AboutBox));
}
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.Runtime.InteropServices.DispIdAttribute(41)]
public virtual int ViewState
{
get
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ViewState", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet);
}
return this.ocx.ViewState;
}
set
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ViewState", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet);
}
this.ocx.ViewState = value;
}
}
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.Runtime.InteropServices.DispIdAttribute(52)]
public virtual int Skin
{
get
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Skin", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet);
}
return this.ocx.Skin;
}
set
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Skin", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet);
}
this.ocx.Skin = value;
}
}
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.Runtime.InteropServices.DispIdAttribute(53)]
public virtual string FuncsHide
{
get
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FuncsHide", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet);
}
return this.ocx.FuncsHide;
}
set
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FuncsHide", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet);
}
this.ocx.FuncsHide = value;
}
}
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.Runtime.InteropServices.DispIdAttribute(57)]
public virtual int EnableMark
{
get
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("EnableMark", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet);
}
return this.ocx.EnableMark;
}
set
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("EnableMark", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet);
}
this.ocx.EnableMark = value;
}
}
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.Runtime.InteropServices.DispIdAttribute(70)]
public virtual int TTFToSHX
{
get
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TTFToSHX", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet);
}
return this.ocx.TTFToSHX;
}
set
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TTFToSHX", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet);
}
this.ocx.TTFToSHX = value;
}
}
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.Runtime.InteropServices.DispIdAttribute(71)]
public virtual int EnableEditor
{
get
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("EnableEditor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet);
}
return this.ocx.EnableEditor;
}
set
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("EnableEditor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet);
}
this.ocx.EnableEditor = value;
}
}
public event _CADViewerXEvents_OnFileOpenEventHandler OnFileOpen;
public event _CADViewerXEvents_OnFileProgressEventHandler OnFileProgress;
public event _CADViewerXEvents_OnSelectBoxEventHandler OnSelectBox;
public event System.EventHandler OnInit;
public event _CADViewerXEvents_OnObjectClickedEventHandler OnObjectClicked;
public event _CADViewerXEvents_OnViewClickedEventHandler OnViewClicked;
public event _CADViewerXEvents_OnFileOpenReadyEventHandler OnFileOpenReady;
public virtual void AboutBox()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("AboutBox", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
this.ocx.AboutBox();
}
public virtual int InitViewer(string docFile, int toolbarState)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("InitViewer", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.InitViewer(docFile, toolbarState)));
return returnValue;
}
public virtual int SetRegCode(string code)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetRegCode", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetRegCode(code)));
return returnValue;
}
public virtual int SetAccessCode(string code)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetAccessCode", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetAccessCode(code)));
return returnValue;
}
public virtual int SetToolBar(int show)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetToolBar", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetToolBar(show)));
return returnValue;
}
public virtual int SelectBox()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SelectBox", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SelectBox()));
return returnValue;
}
public virtual int OpenFile(string fileName)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("OpenFile", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.OpenFile(fileName)));
return returnValue;
}
public virtual int OpenMarkFile(string fileName)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("OpenMarkFile", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.OpenMarkFile(fileName)));
return returnValue;
}
public virtual int SaveAsDwg(string dwgName)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SaveAsDwg", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SaveAsDwg(dwgName)));
return returnValue;
}
public virtual int Save()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Save", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.Save()));
return returnValue;
}
public virtual int ZoomIn()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ZoomIn", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.ZoomIn()));
return returnValue;
}
public virtual int ZoomOut()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ZoomOut", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.ZoomOut()));
return returnValue;
}
public virtual int ZoomWin()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ZoomWin", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.ZoomWin()));
return returnValue;
}
public virtual int ZoomAll()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ZoomAll", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.ZoomAll()));
return returnValue;
}
public virtual int Dolly()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Dolly", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.Dolly()));
return returnValue;
}
public virtual int Rotate()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Rotate", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.Rotate()));
return returnValue;
}
public virtual int RegenAll()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("RegenAll", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.RegenAll()));
return returnValue;
}
public virtual int SetViewRect(int left, int top, int right, int bottom)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetViewRect", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetViewRect(left, top, right, bottom)));
return returnValue;
}
public virtual int GetViewRect(ref int left, ref int top, ref int right, ref int bottom)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("GetViewRect", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.GetViewRect(ref left, ref top, ref right, ref bottom)));
return returnValue;
}
public virtual int FullScreen()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FullScreen", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FullScreen()));
return returnValue;
}
public virtual int DistTool()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("DistTool", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.DistTool()));
return returnValue;
}
public virtual int AreaTool()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("AreaTool", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.AreaTool()));
return returnValue;
}
public virtual int LayerMgr()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LayerMgr", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.LayerMgr()));
return returnValue;
}
public virtual int SnapOption()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SnapOption", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SnapOption()));
return returnValue;
}
public virtual int MarkPen()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkPen", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkPen()));
return returnValue;
}
public virtual int MarkText()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkText", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkText()));
return returnValue;
}
public virtual int MarkMText()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkMText", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkMText()));
return returnValue;
}
public virtual int MarkDelEnt()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkDelEnt", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkDelEnt()));
return returnValue;
}
public virtual int MarkLine()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkLine", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkLine()));
return returnValue;
}
public virtual int MarkPLine()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkPLine", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkPLine()));
return returnValue;
}
public virtual int MarkRect()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkRect", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkRect()));
return returnValue;
}
public virtual int MarkMgr()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkMgr", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkMgr()));
return returnValue;
}
public virtual string MarkGetText(string userName)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkGetText", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
string returnValue = ((string)(this.ocx.MarkGetText(userName)));
return returnValue;
}
public virtual int MarkEditText()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkEditText", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkEditText()));
return returnValue;
}
public virtual int HttpOpen(string srcUrl, string destPath)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HttpOpen", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.HttpOpen(srcUrl, destPath)));
return returnValue;
}
public virtual int HttpSave(string saveUrl)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HttpSave", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.HttpSave(saveUrl)));
return returnValue;
}
public virtual int HttpOpenMark(string urlOpen, string urlSave)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HttpOpenMark", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.HttpOpenMark(urlOpen, urlSave)));
return returnValue;
}
public virtual int FtpInfo(string server, int port, string user, string pass)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FtpInfo", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FtpInfo(server, port, user, pass)));
return returnValue;
}
public virtual int FtpOpen(string srcUrl, string destPath)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FtpOpen", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FtpOpen(srcUrl, destPath)));
return returnValue;
}
public virtual int FtpSave(string saveUrl)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FtpSave", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FtpSave(saveUrl)));
return returnValue;
}
public virtual int FtpOpenMark(string urlOpen, string urlSave)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FtpOpenMark", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FtpOpenMark(urlOpen, urlSave)));
return returnValue;
}
public virtual int SetBackgroundColor(int red, int green, int blue)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetBackgroundColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetBackgroundColor(red, green, blue)));
return returnValue;
}
public virtual string GetErrorMsg()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("GetErrorMsg", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
string returnValue = ((string)(this.ocx.GetErrorMsg()));
return returnValue;
}
public virtual int FtpInfoEncode(string enCodeInfo)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FtpInfoEncode", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FtpInfoEncode(enCodeInfo)));
return returnValue;
}
public virtual int GetToolBar()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("GetToolBar", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.GetToolBar()));
return returnValue;
}
public virtual int OpenOption(int msgShow, int op2, int op3, int op4, int op5)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("OpenOption", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.OpenOption(msgShow, op2, op3, op4, op5)));
return returnValue;
}
public virtual int SetServiceCode(string user, string date, string can, string code)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetServiceCode", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetServiceCode(user, date, can, code)));
return returnValue;
}
public virtual int SetDisplayDriver(int driverType)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetDisplayDriver", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetDisplayDriver(driverType)));
return returnValue;
}
public virtual int FtpDown(string srcUrl)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FtpDown", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FtpDown(srcUrl)));
return returnValue;
}
public virtual int SetTZServices(string tZSrvUrl)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetTZServices", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetTZServices(tZSrvUrl)));
return returnValue;
}
public virtual int MarkCircle()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkCircle", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkCircle()));
return returnValue;
}
public virtual int MarkSetName(string name)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkSetName", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkSetName(name)));
return returnValue;
}
public virtual int MarkSetColor(int colorIndex)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkSetColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkSetColor(colorIndex)));
return returnValue;
}
public virtual int MarkImage(string imgSrcUrl, double x, double y, int imgWidth, int imgHeight, int keyId)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkImage", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkImage(imgSrcUrl, x, y, imgWidth, imgHeight, keyId)));
return returnValue;
}
public virtual int MarkSelEnt()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkSelEnt", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkSelEnt()));
return returnValue;
}
public virtual int QueryProp()
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("QueryProp", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.QueryProp()));
return returnValue;
}
public virtual int FtpDownFile(string srcUrl, string destFileName, string destFileTime)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FtpDownFile", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FtpDownFile(srcUrl, destFileName, destFileTime)));
return returnValue;
}
public virtual int HttpDownFile(string srcUrl, string destFileName, string destFileTime)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HttpDownFile", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.HttpDownFile(srcUrl, destFileName, destFileTime)));
return returnValue;
}
public virtual int MarkBlock(string blockSrcUrl, double x, double y, double s, double a, int keyId)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkBlock", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkBlock(blockSrcUrl, x, y, s, a, keyId)));
return returnValue;
}
public virtual int SetEditMode(int isEdit)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SetEditMode", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.SetEditMode(isEdit)));
return returnValue;
}
public virtual int FindLocation(string keyWord)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FindLocation", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.FindLocation(keyWord)));
return returnValue;
}
public virtual int MarkBlockEx(string blockSrcUrl, string layerName, double x, double y, double s, double a, int keyId)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkBlockEx", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkBlockEx(blockSrcUrl, layerName, x, y, s, a, keyId)));
return returnValue;
}
public virtual int MarkSaveFile(string userName, string destFile)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkSaveFile", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkSaveFile(userName, destFile)));
return returnValue;
}
public virtual int MarkInsertFile(string srcFile)
{
if ((this.ocx == null))
{
throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MarkInsertFile", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke);
}
int returnValue = ((int)(this.ocx.MarkInsertFile(srcFile)));
return returnValue;
}
protected override void CreateSink()
{
try
{
this.eventMulticaster = new AxCADViewerXEventMulticaster(this);
this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(CADViewerXLib._CADViewerXEvents));
}
catch (System.Exception)
{
}
}
protected override void DetachSink()
{
try
{
this.cookie.Disconnect();
}
catch (System.Exception)
{
}
}
protected override void AttachInterfaces()
{
try
{
this.ocx = ((CADViewerXLib._CADViewerX)(this.GetOcx()));
}
catch (System.Exception)
{
}
}
internal void RaiseOnOnFileOpen(object sender, _CADViewerXEvents_OnFileOpenEvent e)
{
if ((this.OnFileOpen != null))
{
this.OnFileOpen(sender, e);
}
}
internal void RaiseOnOnFileProgress(object sender, _CADViewerXEvents_OnFileProgressEvent e)
{
if ((this.OnFileProgress != null))
{
this.OnFileProgress(sender, e);
}
}
internal void RaiseOnOnSelectBox(object sender, _CADViewerXEvents_OnSelectBoxEvent e)
{
if ((this.OnSelectBox != null))
{
this.OnSelectBox(sender, e);
}
}
internal void RaiseOnOnInit(object sender, System.EventArgs e)
{
if ((this.OnInit != null))
{
this.OnInit(sender, e);
}
}
internal void RaiseOnOnObjectClicked(object sender, _CADViewerXEvents_OnObjectClickedEvent e)
{
if ((this.OnObjectClicked != null))
{
this.OnObjectClicked(sender, e);
}
}
internal void RaiseOnOnViewClicked(object sender, _CADViewerXEvents_OnViewClickedEvent e)
{
if ((this.OnViewClicked != null))
{
this.OnViewClicked(sender, e);
}
}
internal void RaiseOnOnFileOpenReady(object sender, _CADViewerXEvents_OnFileOpenReadyEvent e)
{
if ((this.OnFileOpenReady != null))
{
this.OnFileOpenReady(sender, e);
}
}
}
public delegate void _CADViewerXEvents_OnFileOpenEventHandler(object sender, _CADViewerXEvents_OnFileOpenEvent e);
public class _CADViewerXEvents_OnFileOpenEvent
{
public string displayString;
public _CADViewerXEvents_OnFileOpenEvent(string displayString)
{
this.displayString = displayString;
}
}
public delegate void _CADViewerXEvents_OnFileProgressEventHandler(object sender, _CADViewerXEvents_OnFileProgressEvent e);
public class _CADViewerXEvents_OnFileProgressEvent
{
public int percent;
public int progressPos;
public _CADViewerXEvents_OnFileProgressEvent(int percent, int progressPos)
{
this.percent = percent;
this.progressPos = progressPos;
}
}
public delegate void _CADViewerXEvents_OnSelectBoxEventHandler(object sender, _CADViewerXEvents_OnSelectBoxEvent e);
public class _CADViewerXEvents_OnSelectBoxEvent
{
public string boxValue;
public _CADViewerXEvents_OnSelectBoxEvent(string boxValue)
{
this.boxValue = boxValue;
}
}
public delegate void _CADViewerXEvents_OnObjectClickedEventHandler(object sender, _CADViewerXEvents_OnObjectClickedEvent e);
public class _CADViewerXEvents_OnObjectClickedEvent
{
public int objType;
public int objKeyId;
public _CADViewerXEvents_OnObjectClickedEvent(int objType, int objKeyId)
{
this.objType = objType;
this.objKeyId = objKeyId;
}
}
public delegate void _CADViewerXEvents_OnViewClickedEventHandler(object sender, _CADViewerXEvents_OnViewClickedEvent e);
public class _CADViewerXEvents_OnViewClickedEvent
{
public double x;
public double y;
public _CADViewerXEvents_OnViewClickedEvent(double x, double y)
{
this.x = x;
this.y = y;
}
}
public delegate void _CADViewerXEvents_OnFileOpenReadyEventHandler(object sender, _CADViewerXEvents_OnFileOpenReadyEvent e);
public class _CADViewerXEvents_OnFileOpenReadyEvent
{
public string dwgFile;
public _CADViewerXEvents_OnFileOpenReadyEvent(string dwgFile)
{
this.dwgFile = dwgFile;
}
}
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
public class AxCADViewerXEventMulticaster : CADViewerXLib._CADViewerXEvents
{
private AxCADViewerX parent;
public AxCADViewerXEventMulticaster(AxCADViewerX parent)
{
this.parent = parent;
}
public virtual void OnFileOpen(string displayString)
{
_CADViewerXEvents_OnFileOpenEvent onfileopenEvent = new _CADViewerXEvents_OnFileOpenEvent(displayString);
this.parent.RaiseOnOnFileOpen(this.parent, onfileopenEvent);
}
public virtual void OnFileProgress(int percent, int progressPos)
{
_CADViewerXEvents_OnFileProgressEvent onfileprogressEvent = new _CADViewerXEvents_OnFileProgressEvent(percent, progressPos);
this.parent.RaiseOnOnFileProgress(this.parent, onfileprogressEvent);
}
public virtual void OnSelectBox(string boxValue)
{
_CADViewerXEvents_OnSelectBoxEvent onselectboxEvent = new _CADViewerXEvents_OnSelectBoxEvent(boxValue);
this.parent.RaiseOnOnSelectBox(this.parent, onselectboxEvent);
}
public virtual void OnInit()
{
System.EventArgs oninitEvent = new System.EventArgs();
this.parent.RaiseOnOnInit(this.parent, oninitEvent);
}
public virtual void OnObjectClicked(int objType, int objKeyId)
{
_CADViewerXEvents_OnObjectClickedEvent onobjectclickedEvent = new _CADViewerXEvents_OnObjectClickedEvent(objType, objKeyId);
this.parent.RaiseOnOnObjectClicked(this.parent, onobjectclickedEvent);
}
public virtual void OnViewClicked(double x, double y)
{
_CADViewerXEvents_OnViewClickedEvent onviewclickedEvent = new _CADViewerXEvents_OnViewClickedEvent(x, y);
this.parent.RaiseOnOnViewClicked(this.parent, onviewclickedEvent);
}
public virtual void OnFileOpenReady(string dwgFile)
{
_CADViewerXEvents_OnFileOpenReadyEvent onfileopenreadyEvent = new _CADViewerXEvents_OnFileOpenReadyEvent(dwgFile);
this.parent.RaiseOnOnFileOpenReady(this.parent, onfileopenreadyEvent);
}
}
}