本文整理汇总了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 ();
}
示例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();
}
示例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;
}
示例4: DriverUserControl
public DriverUserControl(IViewContent viewContent)
{
_viewContent = viewContent;
InitializeComponent();
CreateDriverTab();
}
示例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);
}
}
示例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;
}
示例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));
}
示例8: ForViewContent
public static XmlView ForViewContent(IViewContent view)
{
if ((view == null) || (view.PrimaryFile == null)) {
return null;
}
return ForFile(view.PrimaryFile);
}
示例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>();
}
示例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);
}
示例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);
}
示例12: SwitchFromThisWithoutSaveLoad
public override void SwitchFromThisWithoutSaveLoad(OpenedFile file, IViewContent newView)
{
if (file == this.PrimaryFile && this != newView) {
SaveToPrimary();
primaryViewContent.SwitchFromThisWithoutSaveLoad(file, newView);
}
}
示例13: Init
void Init(IViewContent view)
{
this.view = view;
editable = view.GetService<IEditable>();
textEditor = view.GetService<ITextEditor>();
textEditorOptions = textEditor.Options;
}
示例14: SwitchToThisWithoutSaveLoad
public override void SwitchToThisWithoutSaveLoad(OpenedFile file, IViewContent oldView)
{
if (file == this.PrimaryFile && oldView != this) {
primaryViewContent.SwitchToThisWithoutSaveLoad(file, oldView);
LoadFromPrimary();
}
}
示例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 ();
}