• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IViewContent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IViewContent的典型用法代码示例。如果您正苦于以下问题:C# IViewContent类的具体用法?C# IViewContent怎么用?C# IViewContent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IViewContent类属于命名空间,在下文中一共展示了IViewContent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SdiWorkspaceWindow

		public SdiWorkspaceWindow (DefaultWorkbench workbench, IViewContent content, Notebook tabControl, TabLabel tabLabel) : base ()
		{
			this.workbench = workbench;
			this.tabControl = tabControl;
			this.content = content;
			this.tabLabel = tabLabel;
			this.tabPage = content.Control;
			
			ShadowType = ShadowType.None;
			box = new VBox ();
			Add (box);
			box.PackStart (content.Control);
			
			fileTypeCondition.SetFileName (content.ContentName ?? content.UntitledName);
			extensionContext = AddinManager.CreateExtensionContext ();
			extensionContext.RegisterCondition ("FileType", fileTypeCondition);
			
			content.WorkbenchWindow = this;
			
			content.ContentNameChanged += new EventHandler(SetTitleEvent);
			content.DirtyChanged       += new EventHandler(SetTitleEvent);
			content.BeforeSave         += new EventHandler(BeforeSave);
			content.ContentChanged     += new EventHandler (OnContentChanged);
			
			box.Show ();
			
			SetTitleEvent(null, null);
			
			commandHandler = new ViewCommandHandlers (this);
			Show ();
		}
开发者ID:kangaroo,项目名称:monodevelop,代码行数:31,代码来源:SdiWorkspaceWindow.cs


示例2: CreateSecondaryViewContent

		public IViewContent[] CreateSecondaryViewContent(IViewContent viewContent)
		{
			List<IViewContent> views = new List<IViewContent>();
			XmlSchemaCompletion defaultSchema = XmlEditorService.XmlSchemaFileAssociations.GetSchemaCompletion(viewContent.PrimaryFileName);
			views.Add(new XmlTreeView(viewContent, XmlEditorService.RegisteredXmlSchemas.Schemas, defaultSchema));
			return views.ToArray();
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:XmlDisplayBinding.cs


示例3: CanAttachTo

		public bool CanAttachTo(IViewContent viewContent)
		{
			if (viewContent is ITextEditorControlProvider) {
				ITextEditorControlProvider textAreaControlProvider = (ITextEditorControlProvider)viewContent;
				string fileExtension = String.Empty;
				string fileName      = viewContent.PrimaryFileName;
				if (fileName == null)
					return false;
				
				fileExtension = Path.GetExtension(fileName).ToLowerInvariant();
				
				switch (fileExtension) {
					case ".cs":
					case ".vb":
						ParseInformation info = ParserService.ParseFile(fileName, textAreaControlProvider.TextEditorControl.Document.TextContent, false);
						
						if (IsDesignable(info))
							return true;
						break;
					case ".xfrm":
						return true;
				}
			}
			return false;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:25,代码来源:SecondaryDisplayBinding.cs


示例4: DriverUserControl

		public DriverUserControl(IViewContent viewContent)
		{
			_viewContent = viewContent;
			
			InitializeComponent();
			CreateDriverTab();
		}
开发者ID:garryforreg,项目名称:iview-scada,代码行数:7,代码来源:DriverUserControl.cs


示例5: SetPosition

		public static void SetPosition(IViewContent viewContent, int markerStartLine, int markerStartColumn, int markerEndLine, int markerEndColumn)
		{
			ITextEditorProvider tecp = viewContent as ITextEditorProvider;
			if (tecp != null) {
				SetPosition(tecp.TextEditor.FileName, tecp.TextEditor.Document, markerStartLine, markerStartColumn, markerEndLine, markerEndColumn);
			}
		}
开发者ID:rbrunhuber,项目名称:SharpDevelop,代码行数:7,代码来源:CurrentLineBookmark.cs


示例6: CanAttachTo

		/// <summary>
		/// Wix dialog designer can attach to Wix source files (.wxs) and 
		/// Wix include files (.wxi).
		/// </summary>
		public bool CanAttachTo(IViewContent view)
		{
			if (IsViewTextEditorProvider(view)) {
				return WixFileName.IsWixFileName(view.PrimaryFileName);
			}
			return false;
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:11,代码来源:WixDialogDesignerDisplayBinding.cs


示例7: CanAttachTo

		public bool CanAttachTo (IViewContent content)
		{
			if (content.GetContent (typeof(MonoDevelop.Ide.Gui.Content.IEditableTextBuffer)) == null)
				return false;
			else
				return CodeBehind.IsDesigneable (content.Project.GetProjectFile (content.ContentName));
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:7,代码来源:DesignSurfaceDisplayBinding.cs


示例8: ForViewContent

		public static XmlView ForViewContent(IViewContent view)
		{
			if ((view == null) || (view.PrimaryFile == null)) {
				return null;
			}
			return ForFile(view.PrimaryFile);
		}
开发者ID:kristjan84,项目名称:SharpDevelop,代码行数:7,代码来源:XmlView.cs


示例9: TestWPFReportPreview

//		IExportRunner exportRunner = new ExportRunner();
		
		public TestWPFReportPreview(ReportDesignerLoader loader,IViewContent content):base(content)
		{
			this.designerLoader = loader;
			viewer = new ICSharpCode.Reporting.WpfReportViewer.WpfReportViewer();
			base.TabPageText = "TestWpf View";
			Pages = new Collection<Page>();
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:9,代码来源:TestWPFReportPreview.cs


示例10: DiffPanel

		public DiffPanel(IViewContent viewContent)
		{
			this.viewContent = viewContent;
			
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			textEditor = new TextEditorControl();
			textEditor.Dock = DockStyle.Fill;
			diffViewPanel.Controls.Add(textEditor);
			
			textEditor.TextEditorProperties = SharpDevelopTextEditorProperties.Instance;
			textEditor.Document.ReadOnly = true;
			textEditor.Enabled = false;
			
			textEditor.Document.HighlightingStrategy = HighlightingManager.Manager.FindHighlighter("Patch");
			
			ListViewItem newItem;
			newItem = new ListViewItem(new string[] { "Base", "", "", "" });
			newItem.Tag = Revision.Base;
			leftListView.Items.Add(newItem);
			newItem.Selected = true;
			newItem = new ListViewItem(new string[] { "Work", "", "", "" });
			newItem.Tag = Revision.Working;
			rightListView.Items.Add(newItem);
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:28,代码来源:DiffPanel.cs


示例11: SupportsSwitchToThisWithoutSaveLoad

		public override bool SupportsSwitchToThisWithoutSaveLoad(OpenedFile file, IViewContent oldView)
		{
			if (file == this.PrimaryFile)
				return oldView.SupportsSwitchToThisWithoutSaveLoad(file, primaryViewContent);
			else
				return base.SupportsSwitchFromThisWithoutSaveLoad(file, oldView);
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:AbstractSecondaryViewContent.cs


示例12: SwitchFromThisWithoutSaveLoad

		public override void SwitchFromThisWithoutSaveLoad(OpenedFile file, IViewContent newView)
		{
			if (file == this.PrimaryFile && this != newView) {
				SaveToPrimary();
				primaryViewContent.SwitchFromThisWithoutSaveLoad(file, newView);
			}
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:AbstractSecondaryViewContent.cs


示例13: Init

		void Init(IViewContent view)
		{
			this.view = view;
			editable = view.GetService<IEditable>();
			textEditor = view.GetService<ITextEditor>();
			textEditorOptions = textEditor.Options;
		}
开发者ID:kristjan84,项目名称:SharpDevelop,代码行数:7,代码来源:ScriptingTextEditorViewContent.cs


示例14: SwitchToThisWithoutSaveLoad

		public override void SwitchToThisWithoutSaveLoad(OpenedFile file, IViewContent oldView)
		{
			if (file == this.PrimaryFile && oldView != this) {
				primaryViewContent.SwitchToThisWithoutSaveLoad(file, oldView);
				LoadFromPrimary();
			}
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:7,代码来源:AbstractSecondaryViewContent.cs


示例15: SdiWorkspaceWindow

		public SdiWorkspaceWindow (DefaultWorkbench workbench, IViewContent content, Notebook tabControl, TabLabel tabLabel) : base ()
		{
			this.workbench = workbench;
			this.tabControl = tabControl;
			this.content = content;
			this.tabLabel = tabLabel;
			this.tabPage = content.Control;
			
			content.WorkbenchWindow = this;
			
			content.ContentNameChanged += new EventHandler(SetTitleEvent);
			content.DirtyChanged       += new EventHandler(SetTitleEvent);
			content.BeforeSave         += new EventHandler(BeforeSave);
			content.ContentChanged     += new EventHandler (OnContentChanged);
			
			ShadowType = ShadowType.None;
			box = new VBox ();
			box.PackStart (content.Control);
			Add (box);
			box.Show ();
			
			SetTitleEvent(null, null);
			
			commandHandler = new ViewCommandHandlers (this);
			Show ();
		}
开发者ID:acken,项目名称:monodevelop,代码行数:26,代码来源:SdiWorkspaceWindow.cs


示例16: WpfPreview

 public WpfPreview(ReportDesignerLoader loader,IViewContent content)
     : base(content)
 {
     LoggingService.Info("Create WpfPreview");
     this.designerLoader = loader;
     TabPageText = "WpfPreview";
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:WpfPreview.cs


示例17: IsUntitled

		static bool IsUntitled(IViewContent viewContent)
		{
			OpenedFile file = viewContent.PrimaryFile;
			if (file == null)
				return false;
			else
				return file.IsUntitled;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:8,代码来源:OpenWindowStateEvaluator.cs


示例18: Init

		void Init(IViewContent view)
		{
			this.view = view;
			editable = view as IEditable;
			textEditorProvider = view as ITextEditorProvider;
			textEditor = textEditorProvider.TextEditor;
			textEditorOptions = textEditor.Options;
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:ScriptingTextEditorViewContent.cs


示例19: CanAttachTo

 public bool CanAttachTo(IViewContent parent)
 {
     string filename = parent.ContentName;
     string mimetype = Gnome.Vfs.MimeType.GetMimeTypeForUri (filename);
     if (mimetype == "text/html")
         return true;
     return false;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:8,代码来源:BrowserDisplayBinding.cs


示例20: ReportPreview

		/// <summary>
		/// Creates a new ReportPreview object
		/// </summary>

		public ReportPreview(ReportDesignerLoader loader,IViewContent content):base(content)
		{
			if (loader == null) {
				throw new ArgumentNullException("loader");
			}
			this.designerLoader = loader;
			base.TabPageText = ResourceService.GetString("SharpReport.Preview");
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:12,代码来源:ReportPreview.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IViewDataContainer类代码示例发布时间:2022-05-24
下一篇:
C# IView类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap