当前位置: 首页>>代码示例>>C#>>正文


C# IRibbonControl.Window方法代码示例

本文整理汇总了C#中IRibbonControl.Window方法的典型用法代码示例。如果您正苦于以下问题:C# IRibbonControl.Window方法的具体用法?C# IRibbonControl.Window怎么用?C# IRibbonControl.Window使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IRibbonControl的用法示例。


在下文中一共展示了IRibbonControl.Window方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IsPresentation

		public bool IsPresentation(IRibbonControl control) {
			var window = control.Window();
			return window != null && window.Presentation != null;
		}
开发者ID:ShomreiTorah,项目名称:Journal,代码行数:4,代码来源:JournalRibbon.cs

示例2: ShowProperties

		public void ShowProperties(IRibbonControl control) {
			var window = control.Window();
			Globals.ThisAddIn.ShowProperties(window.Presentation);
		}
开发者ID:ShomreiTorah,项目名称:Journal,代码行数:4,代码来源:JournalRibbon.cs

示例3: InsertSpecialPage

		public void InsertSpecialPage(IRibbonControl control) {
			control.Window().View.Slide = control.Window().Presentation.Slides.Add(1, PpSlideLayout.ppLayoutBlank);
		}
开发者ID:ShomreiTorah,项目名称:Journal,代码行数:3,代码来源:JournalRibbon.cs

示例4: SavePdf

		public void SavePdf(IRibbonControl control) {
			using (var dialog = new SaveFileDialog {
				Filter = "PDF Files (*.pdf)|*.pdf",
				FileName = Path.ChangeExtension(control.Journal().Presentation.FullName, ".pdf"),
				Title = "Export PDF"
			}) {
				if (dialog.ShowDialog(new ArbitraryWindow((IntPtr)control.Window().HWND)) == DialogResult.Cancel)
					return;
				control.Journal().Presentation.ExportAsFixedFormat(dialog.FileName,
					PpFixedFormatType.ppFixedFormatTypePDF, PpFixedFormatIntent.ppFixedFormatIntentPrint,
					RangeType: control.Id == "SavePdfSlide" ? PpPrintRangeType.ppPrintCurrent : PpPrintRangeType.ppPrintAll);
			}
		}
开发者ID:ShomreiTorah,项目名称:Journal,代码行数:13,代码来源:JournalRibbon.cs

示例5: SavePdfTypes

		public void SavePdfTypes(IRibbonControl control) {
			using (var dialog = new FolderBrowserDialog {
				Description = "Export PDFs by ad type",
				ShowNewFolderButton = true
			}) {
				if (dialog.ShowDialog(new ArbitraryWindow((IntPtr)control.Window().HWND)) == DialogResult.Cancel)
					return;
				var ranges = new List<PageRange>();
				var presentation = control.Journal().Presentation;
				for (int i = 1; i <= presentation.Slides.Count; i++) {
					var currentType = presentation.Slides[i].CustomLayout.Name;
					if (ranges.Count == 0 || ranges.Last().Type != currentType)
						ranges.Add(new PageRange { Type = currentType, Start = i, End = i });
					else
						ranges.Last().End = i;
				}

				for (int i = 0; i < ranges.Count; i++) {
					var range = ranges[i];
					presentation.ExportAsFixedFormat(
						Path.Combine(dialog.SelectedPath, $"{i:00} - {range.Type} "
														+ (range.Start == range.End ? $"(Page {range.Start}).pdf" : $"(Pages {range.Start} - {range.End}).pdf")),
						PpFixedFormatType.ppFixedFormatTypePDF, PpFixedFormatIntent.ppFixedFormatIntentPrint,
						PrintRange: presentation.PrintOptions.Ranges.Add(range.Start, range.End),
						RangeType: PpPrintRangeType.ppPrintSlideRange);
				}
			}
		}
开发者ID:ShomreiTorah,项目名称:Journal,代码行数:28,代码来源:JournalRibbon.cs

示例6: ShowImportForm

		public void ShowImportForm(IRibbonControl control) {
			if (!control.Journal().ConfirmModification())
				return;
			AppFramework.LoadTables(EmailAddress.Schema, ImportedPayment.Schema);
			Program.Current.MefContainer.Value
				.GetExport<Billing.PaymentImport.ImportForm>()
				.SetPledgeTypes(Names.JournalPledgeType)
				.RequirePledge()
				.SetCreationCallback(control.Journal().ImportAd)
				.SetJournalMode(control.Journal().Year)
				.Show(new ArbitraryWindow((IntPtr)control.Window().HWND));
		}
开发者ID:ShomreiTorah,项目名称:Journal,代码行数:12,代码来源:JournalRibbon.cs

示例7: ShowDetailPane

		public void ShowDetailPane(IRibbonControl control) {
			var window = control.Window();
			var jp = control.Journal();
			// CustomTaskPanes cannot be reused; I need to create a new one.
			Globals.ThisAddIn.CustomTaskPanes.Add(new AdPane(jp), "Ad Details", jp.Presentation.Windows[1]).Visible = true;
		}
开发者ID:ShomreiTorah,项目名称:Journal,代码行数:6,代码来源:JournalRibbon.cs


注:本文中的IRibbonControl.Window方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。