本文整理汇总了C#中NetOffice类的典型用法代码示例。如果您正苦于以下问题:C# NetOffice类的具体用法?C# NetOffice怎么用?C# NetOffice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NetOffice类属于命名空间,在下文中一共展示了NetOffice类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnConnection
// ITaskpane Member
public void OnConnection(COMObject application, NetOffice.OfficeApi._CustomTaskPane parentPane, object[] customArguments)
{
ParentPane = parentPane;
LastParentPaneVisible = parentPane.Visible;
commandPane1.OnConnection(application, parentPane, customArguments);
propertyPane1.OnConnection(application, parentPane, customArguments);
infoPane1.OnConnection(application, parentPane, customArguments);
}
开发者ID:netintellect,项目名称:NetOffice,代码行数:10,代码来源:DeveloperPane.cs
示例2: OnConnection
public void OnConnection(COMObject application, NetOffice.OfficeApi._CustomTaskPane parentPane, object[] customArguments)
{
ApplicationHandler = new OfficeApplicationManager(application);
AvailableProxy[] proxies = ApplicationHandler.GetAvailableProxies();
if (proxies.Length > 0)
{
comboBoxTarget.DataSource = proxies;
comboBoxTarget.SelectedIndex = 0;
}
}
开发者ID:netintellect,项目名称:NetOffice,代码行数:10,代码来源:PropertyPane.cs
示例3: CreateCompetitorListWorksheet
protected void CreateCompetitorListWorksheet(NetOffice.ExcelApi.Worksheet worksheet)
{
var competitors = _reporter.GetCompetitors()
.OrderBy(x => x.LastName);
var row = 1;
worksheet.Name = "Competitor List";
PrintWorksheetTitle("Competitor List", worksheet, row++);
var startRow = row;
PrintTableColumnNames(worksheet, Competitor.TableFullColumnNames(), row++);
foreach (var competitor in competitors)
{
PrintTableColumnData(worksheet, competitor.TableFullRowData(), row++);
}
var endRow = row - 1;
string firstCol = ExcelColumnFromNumber(1);
string lastCol = ExcelColumnFromNumber(Competitor.TableFullColumnNames().Length);
worksheet.Columns[firstCol + ":" + lastCol].AutoFit();
var tableRange = worksheet.Range(
worksheet.Cells[startRow, firstCol],
worksheet.Cells[endRow, lastCol]);
var table = worksheet.ListObjects.Add(
NetOffice.ExcelApi.Enums.XlListObjectSourceType.xlSrcRange,
tableRange,
Type.Missing,
NetOffice.ExcelApi.Enums.XlYesNoGuess.xlYes,
Type.Missing);
table.Name = "CompetitorList";
}
开发者ID:btowntkd,项目名称:Tourney2015ReportGenerator,代码行数:32,代码来源:ExcelReportPrinter.cs
示例4: get_StateOf
public NetOffice.OWC10Api.Enums.PivotFilterUpdateMemberStateEnum get_StateOf(NetOffice.OWC10Api.PivotMember member)
{
object[] paramsArray = Invoker.ValidateParamsArray(member);
object returnItem = Invoker.PropertyGet(this, "StateOf", paramsArray);
int intReturnItem = NetRuntimeSystem.Convert.ToInt32(returnItem);
return (NetOffice.OWC10Api.Enums.PivotFilterUpdateMemberStateEnum)intReturnItem;
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:7,代码来源:PivotFilterUpdate.cs
示例5: get_NewDetailCell
public object get_NewDetailCell(NetOffice.OWC10Api.PivotDetailCell detailCell)
{
object[] paramsArray = Invoker.ValidateParamsArray(detailCell);
object returnItem = Invoker.PropertyGet(this, "NewDetailCell", paramsArray);
COMObject newObject = NetOffice.Factory.CreateObjectFromComProxy(this,returnItem);
return newObject;
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:7,代码来源:PivotClassFactory.cs
示例6: get_ReferencesEvents
public NetOffice.VBIDEApi.ReferencesEvents get_ReferencesEvents(NetOffice.VBIDEApi.VBProject vBProject)
{
object[] paramsArray = Invoker.ValidateParamsArray(vBProject);
object returnItem = Invoker.PropertyGet(this, "ReferencesEvents", paramsArray);
NetOffice.VBIDEApi.ReferencesEvents newObject = NetOffice.Factory.CreateKnownObjectFromComProxy(this,returnItem,NetOffice.VBIDEApi.ReferencesEvents.LateBindingApiWrapperType) as NetOffice.VBIDEApi.ReferencesEvents;
return newObject;
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:7,代码来源:Events.cs
示例7: FindBehavior
public NetOffice.MSHTMLApi.IElementBehavior FindBehavior(string bstrBehavior, string bstrBehaviorUrl, NetOffice.MSHTMLApi.IElementBehaviorSite pSite)
{
object[] paramsArray = Invoker.ValidateParamsArray(bstrBehavior, bstrBehaviorUrl, pSite);
object returnItem = Invoker.MethodReturn(this, "FindBehavior", paramsArray);
NetOffice.MSHTMLApi.IElementBehavior newObject = NetOffice.Factory.CreateKnownObjectFromComProxy(this, returnItem,NetOffice.MSHTMLApi.IElementBehavior.LateBindingApiWrapperType) as NetOffice.MSHTMLApi.IElementBehavior;
return newObject;
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:7,代码来源:IElementBehaviorFactory.cs
示例8: Add
public NetOffice.VBIDEApi.VBProject Add(NetOffice.VBIDEApi.Enums.vbext_ProjectType type)
{
object[] paramsArray = Invoker.ValidateParamsArray(type);
object returnItem = Invoker.MethodReturn(this, "Add", paramsArray);
NetOffice.VBIDEApi.VBProject newObject = NetOffice.Factory.CreateKnownObjectFromComProxy(this, returnItem,NetOffice.VBIDEApi.VBProject.LateBindingApiWrapperType) as NetOffice.VBIDEApi.VBProject;
return newObject;
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:7,代码来源:_VBProjects.cs
示例9: TestAddin_OnConnection
private void TestAddin_OnConnection(object Application, NetOffice.Tools.ext_ConnectMode ConnectMode, object AddInInst, ref Array custom)
{
Factory.Initialize();
Office.COMAddIn addin = new Office.COMAddIn(null, AddInInst);
addin.Object = this;
addin.Dispose();
}
开发者ID:netintellect,项目名称:NetOffice,代码行数:7,代码来源:TestAddin.cs
示例10: PutSampleData
private static NetOffice.ExcelApi.Range PutSampleData(NetOffice.ExcelApi.Worksheet workSheet)
{
workSheet.Cells[2, 2].Value = "Datum";
workSheet.Cells[3, 2].Value = DateTime.Now.ToShortDateString();
workSheet.Cells[4, 2].Value = DateTime.Now.ToShortDateString();
workSheet.Cells[5, 2].Value = DateTime.Now.ToShortDateString();
workSheet.Cells[6, 2].Value = DateTime.Now.ToShortDateString();
workSheet.Cells[2, 3].Value = "Columns1";
workSheet.Cells[3, 3].Value = 25;
workSheet.Cells[4, 3].Value = 33;
workSheet.Cells[5, 3].Value = 30;
workSheet.Cells[6, 3].Value = 22;
workSheet.Cells[2, 4].Value = "Column2";
workSheet.Cells[3, 4].Value = 25;
workSheet.Cells[4, 4].Value = 33;
workSheet.Cells[5, 4].Value = 30;
workSheet.Cells[6, 4].Value = 22;
workSheet.Cells[2, 5].Value = "Column3";
workSheet.Cells[3, 5].Value = 25;
workSheet.Cells[4, 5].Value = 33;
workSheet.Cells[5, 5].Value = 30;
workSheet.Cells[6, 5].Value = 22;
return workSheet.Range("$B2:$E6");
}
开发者ID:HydAu,项目名称:PowershellUISamples,代码行数:28,代码来源:Test.cs
示例11: GetDefaultExtension
/// <summary>
/// returns the valid file extension for the instance. for example ".xls" or ".xlsx"
/// </summary>
/// <param name="application">the instance</param>
/// <returns>the extension</returns>
private static string GetDefaultExtension(NetOffice.ExcelApi.Application application)
{
double Version = Convert.ToDouble(application.Version, CultureInfo.InvariantCulture);
if (Version >= 12.00)
return ".xlsx";
else
return ".xls";
}
开发者ID:HydAu,项目名称:PowershellUISamples,代码行数:13,代码来源:Test.cs
示例12: Clone
public Int32 Clone(out NetOffice.MSHTMLApi.IEnumRegisterWordA ppEnum)
{
ParameterModifier[] modifiers = Invoker.CreateParamModifiers(true);
ppEnum = null;
object[] paramsArray = Invoker.ValidateParamsArray(ppEnum);
object returnItem = Invoker.MethodReturn(this, "Clone", paramsArray);
ppEnum = (NetOffice.MSHTMLApi.IEnumRegisterWordA)paramsArray[0];
return NetRuntimeSystem.Convert.ToInt32(returnItem);
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:9,代码来源:IEnumRegisterWordA.cs
示例13: CreateMarkupPointer
public Int32 CreateMarkupPointer(out NetOffice.MSHTMLApi.IMarkupPointer ppPointer)
{
ParameterModifier[] modifiers = Invoker.CreateParamModifiers(true);
ppPointer = null;
object[] paramsArray = Invoker.ValidateParamsArray(ppPointer);
object returnItem = Invoker.MethodReturn(this, "CreateMarkupPointer", paramsArray);
ppPointer = (NetOffice.MSHTMLApi.IMarkupPointer)paramsArray[0];
return NetRuntimeSystem.Convert.ToInt32(returnItem);
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:9,代码来源:IMarkupServices.cs
示例14: GetActiveIMM
public Int32 GetActiveIMM(out NetOffice.MSHTMLApi.IActiveIMMApp ppActiveIMM)
{
ParameterModifier[] modifiers = Invoker.CreateParamModifiers(true);
ppActiveIMM = null;
object[] paramsArray = Invoker.ValidateParamsArray(ppActiveIMM);
object returnItem = Invoker.MethodReturn(this, "GetActiveIMM", paramsArray);
ppActiveIMM = (NetOffice.MSHTMLApi.IActiveIMMApp)paramsArray[0];
return NetRuntimeSystem.Convert.ToInt32(returnItem);
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:9,代码来源:IIMEServices.cs
示例15: Current
public Int32 Current(out NetOffice.MSHTMLApi.ISegment ppISegment)
{
ParameterModifier[] modifiers = Invoker.CreateParamModifiers(true);
ppISegment = null;
object[] paramsArray = Invoker.ValidateParamsArray(ppISegment);
object returnItem = Invoker.MethodReturn(this, "Current", paramsArray);
ppISegment = (NetOffice.MSHTMLApi.ISegment)paramsArray[0];
return NetRuntimeSystem.Convert.ToInt32(returnItem);
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:9,代码来源:ISegmentListIterator.cs
示例16: HrInitConverter
public Int32 HrInitConverter(NetOffice.OfficeApi.IConverterApplicationPreferences pcap, out NetOffice.OfficeApi.IConverterPreferences ppcp, NetOffice.OfficeApi.IConverterUICallback pcuic)
{
ParameterModifier[] modifiers = Invoker.CreateParamModifiers(false,true,false);
ppcp = null;
object[] paramsArray = Invoker.ValidateParamsArray(pcap, ppcp, pcuic);
object returnItem = Invoker.MethodReturn(this, "HrInitConverter", paramsArray);
ppcp = (NetOffice.OfficeApi.IConverterPreferences)paramsArray[1];
return NetRuntimeSystem.Convert.ToInt32(returnItem);
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:9,代码来源:IConverter.cs
示例17: OwningDoc
public Int32 OwningDoc(out NetOffice.MSHTMLApi.IHTMLDocument2 ppDoc)
{
ParameterModifier[] modifiers = Invoker.CreateParamModifiers(true);
ppDoc = null;
object[] paramsArray = Invoker.ValidateParamsArray(ppDoc);
object returnItem = Invoker.MethodReturn(this, "OwningDoc", paramsArray);
ppDoc = (NetOffice.MSHTMLApi.IHTMLDocument2)paramsArray[0];
return NetRuntimeSystem.Convert.ToInt32(returnItem);
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:9,代码来源:IMarkupContainer.cs
示例18: CommonUtils
/// <summary>
/// Creates an instance of the class
/// </summary>
/// <param name="owner">addin owner instance</param>
/// <param name="isAutomation">host application is started for automation</param>
protected internal CommonUtils(NetOffice.Tools.COMAddinBase owner, bool isAutomation)
{
if (null == owner)
throw new ArgumentNullException("owner");
Owner = owner;
_ownerApplication = owner.AppInstance;
_isAutomation = isAutomation;
_headerCaptionLine = _headerCaptionLineDefault;
_infos = new Infos(this);
}
开发者ID:swatt6400,项目名称:NetOffice,代码行数:15,代码来源:CommonUtils.cs
示例19: RemoteNext
public Int32 RemoteNext(Int32 cElt, out NetOffice.OWC10Api.IOleUndoUnit rgElt, out Int32 pcEltFetched)
{
ParameterModifier[] modifiers = Invoker.CreateParamModifiers(false,true,true);
rgElt = null;
pcEltFetched = 0;
object[] paramsArray = Invoker.ValidateParamsArray(cElt, rgElt, pcEltFetched);
object returnItem = Invoker.MethodReturn(this, "RemoteNext", paramsArray);
rgElt = (NetOffice.OWC10Api.IOleUndoUnit)paramsArray[1];
pcEltFetched = (Int32)paramsArray[2];
return NetRuntimeSystem.Convert.ToInt32(returnItem);
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:11,代码来源:IEnumOleUndoUnits.cs
示例20: Next
public Int32 Next(Int32 celt, out NetOffice.VisioApi.IVAccelTable rgelt, out Int32 pceltFetched)
{
ParameterModifier[] modifiers = Invoker.CreateParamModifiers(false,true,true);
rgelt = null;
pceltFetched = 0;
object[] paramsArray = Invoker.ValidateParamsArray(celt, rgelt, pceltFetched);
object returnItem = Invoker.MethodReturn(this, "Next", paramsArray);
rgelt = (NetOffice.VisioApi.IVAccelTable)paramsArray[1];
pceltFetched = (Int32)paramsArray[2];
return NetRuntimeSystem.Convert.ToInt32(returnItem);
}
开发者ID:vnkolt,项目名称:NetOffice,代码行数:11,代码来源:LPVISIOENUMVACCELTABLE.cs
注:本文中的NetOffice类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论