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


C# IViewContent类代码示例

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


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


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