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

C# SharpDevelop.OpenedFile类代码示例

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

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



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

示例1: Create

		public static MyTypeFinder Create(OpenedFile file)
		{
			MyTypeFinder f = new MyTypeFinder();
			f.file = file;
			f.ImportFrom(CreateWpfTypeFinder());
			return f;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:7,代码来源:MyTypeFinder.cs


示例2: Load

		public override void Load(OpenedFile file, Stream stream)
		{
			XmlDocument doc = new XmlDocument();
			doc.Load(stream);
			projectContent = ParserService.GetProjectContent(ProjectService.CurrentProject);
			canvas.LoadFromXml(doc, projectContent);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:ClassDiagramViewContent.cs


示例3: WpfViewContent

		public WpfViewContent(OpenedFile file) : base(file)
		{
			BasicMetadata.Register();
			
			this.TabPageText = "${res:FormsDesigner.DesignTabPages.DesignTabPage}";
			this.IsActiveViewContentChanged += OnIsActiveViewContentChanged;
		}
开发者ID:pluraldj,项目名称:SharpDevelop,代码行数:7,代码来源:WpfViewContent.cs


示例4: ResourceEditWrapper

		public ResourceEditWrapper(OpenedFile file)
		{
			this.TabPageText = "Resource editor";
			base.UserControl = resourceEditor;
			resourceEditor.ResourceList.Changed += new EventHandler(SetDirty);
			this.Files.Add(file);
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:DisplayDefinition.cs


示例5: CreateContentForFile

		public IViewContent CreateContentForFile(OpenedFile file)
		{
			var codons = DisplayBindingService.GetCodonsPerFileName(file.FileName);
			DisplayBindingDescriptor bestMatch = null;
			double max = double.NegativeInfinity;
			const int BUFFER_LENGTH = 4 * 1024;
			
			using (var stream = file.OpenRead()) {
				string mime = "text/plain";
				if (stream.Length > 0) {
					stream.Position = 0;
					mime = MimeTypeDetection.FindMimeType(new BinaryReader(stream).ReadBytes(BUFFER_LENGTH));
				}
				foreach (var codon in codons) {
					stream.Position = 0;
					double value = codon.Binding.AutoDetectFileContent(file.FileName, stream, mime);
					if (value > max) {
						max = value;
						bestMatch = codon;
					}
				}
			}
			
			if (bestMatch == null)
				throw new InvalidOperationException();
			
			return bestMatch.Binding.CreateContentForFile(file);
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:28,代码来源:AutoDetectDisplayBinding.cs


示例6: LoadInternal

		protected override void LoadInternal(OpenedFile file, Stream stream)
		{
			if (file == this.PrimaryFile) {
				// The FormsDesignerViewContent normally operates independently of any
				// text editor. The following statements connect the forms designer
				// directly to the underlying XML text editor so that the caret positioning
				// and text selection operations done by the WiX designer actually
				// become visible in the text editor.
				if (!this.SourceCodeStorage.ContainsFile(file)) {
					TextEditorControl editor = ((ITextEditorControlProvider)this.PrimaryViewContent).TextEditorControl;
					this.SourceCodeStorage.AddFile(file, editor.Document, editor.Encoding ?? ParserService.DefaultFileEncoding, true);
				}
				
				try {
					if (!ignoreDialogIdSelectedInTextEditor) {
						string dialogId = GetDialogIdSelectedInTextEditor();
						if (dialogId == null) {
							dialogId = GetFirstDialogIdInTextEditor();
							JumpToDialogElement(dialogId);
						}
						DialogId = dialogId;
					}
					wixProject = GetProject();
				} catch (XmlException ex) {
					// Let the Wix designer loader try to load the XML and generate
					// an error message.
					DialogId = "InvalidXML";
					AddToErrorList(ex);
				}
			}
			base.LoadInternal(file, stream);
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:32,代码来源:WixDialogDesigner.cs


示例7: TagListViewContent

		public TagListViewContent(OpenedFile file)
		{
			Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);
			TabPageText = "Design";
		}
开发者ID:garryforreg,项目名称:iview-scada,代码行数:7,代码来源:TagListViewContent.cs


示例8: GetSourceFiles

		public IEnumerable<OpenedFile> GetSourceFiles(out OpenedFile designerCodeFile)
		{
			// get new initialize components
			ParseInformation info = ParserService.ParseFile(this.viewContent.PrimaryFileName, this.viewContent.PrimaryFileContent);
			ICompilationUnit cu = info.CompilationUnit;
			foreach (IClass c in cu.Classes) {
				if (FormsDesignerSecondaryDisplayBinding.BaseClassIsFormOrControl(c)) {
					this.currentClassPart = c;
					this.initializeComponents = FormsDesignerSecondaryDisplayBinding.GetInitializeComponents(c);
					if (this.initializeComponents != null) {
						string designerFileName = this.initializeComponents.DeclaringType.CompilationUnit.FileName;
						if (designerFileName != null) {
							
							designerCodeFile = FileService.GetOrCreateOpenedFile(designerFileName);
							
							CompoundClass compound = c.GetCompoundClass() as CompoundClass;
							if (compound == null) {
								return new [] {designerCodeFile};
							} else {
								return compound.Parts
									.Select(cl => FileService.GetOrCreateOpenedFile(cl.CompilationUnit.FileName))
									.Distinct();
							}
							
						}
					}
				}
			}
			
			throw new FormsDesignerLoadException("Could not find InitializeComponent method in any part of the open class.");
		}
开发者ID:TiberiuGal,项目名称:SharpDevelop,代码行数:31,代码来源:AbstractDesignerGenerator.cs


示例9: Create

		public static MyTypeFinder Create(OpenedFile file)
		{
			MyTypeFinder f = new MyTypeFinder();
			f.file = file;
			f.ImportFrom(CreateWpfTypeFinder());
			
			var pc = MyTypeFinder.GetProjectContent(file);
			foreach (var referencedProjectContent in pc.ThreadSafeGetReferencedContents()) {
				string fileName = null;
				try{
					if (referencedProjectContent is ParseProjectContent)
					{
						var prj = ((ParseProjectContent)referencedProjectContent).Project as AbstractProject;
						if (prj != null)
							fileName = prj.OutputAssemblyFullPath;
					}
					else if (referencedProjectContent is ReflectionProjectContent)
					{
						fileName = ((ReflectionProjectContent) referencedProjectContent).AssemblyLocation;
					}
					var assembly = Assembly.LoadFrom(fileName);
					f.RegisterAssembly(assembly);
				}
				catch (Exception ex) {
					ICSharpCode.Core.LoggingService.Warn("Error loading Assembly : "+ (fileName ?? ""), ex);
				}
			}
			return f;
		}
开发者ID:netide,项目名称:SharpDevelop,代码行数:29,代码来源:MyTypeFinder.cs


示例10: Save

		public override void Save(OpenedFile file, Stream stream)
		{
			AnalyticsMonitorService.TrackFeature(typeof(HexEditView), "Save");
			this.hexEditContainer.SaveFile(file, stream);
			this.TitleName = Path.GetFileName(file.FileName);
			this.TabPageText = this.TitleName;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:7,代码来源:HexEditView.cs


示例11: AssertAreEqual

		void AssertAreEqual(OpenedFile expectedOpenedFile, OpenedFile actualOpenedFile)
		{	
			string fileName = actualOpenedFile.FileName.ToString();
			string expectedFileName = expectedOpenedFile.FileName.ToString();
			
			Assert.AreEqual(expectedFileName, fileName);
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:7,代码来源:ScriptingDesignerGeneratorTests.cs


示例12: Load

		public override void Load(OpenedFile file, Stream stream)
		{
			_file = file;
			TitleName = Path.GetFileName(file.FileName);
			
			_control.Load(stream);
			_control.DataChanged += new EventHandler(DataChanged);
		}
开发者ID:garryforreg,项目名称:iview-scada,代码行数:8,代码来源:DataSourceViewContent.cs


示例13: AppConfigViewContent

		public AppConfigViewContent(OpenedFile file)
		{
			TabPageText = "Design";

			Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);
		}
开发者ID:garryforreg,项目名称:iview-scada,代码行数:8,代码来源:AppConfigViewContent.cs


示例14: CreateContentForFile

		public IViewContent CreateContentForFile(OpenedFile file)
		{
			try {
				return new EDMDesignerViewContent(file);
			} catch (WizardCancelledException) {
				return null;
			}
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:8,代码来源:EDMDesignerDisplayBinding.cs


示例15: SetupDesigner

		public static ReportDesignerView SetupDesigner (OpenedFile file)
		{
			if (file == null) {
				throw new ArgumentNullException("file");
			}
			IDesignerGenerator generator = new ReportDesignerGenerator();
			return new ReportDesignerView(file, generator);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:ViewCommands.cs


示例16: XmlEditorView

 /// <summary>
 /// Default ctor
 /// </summary>
 internal XmlEditorView(OpenedFile file, XmlViewModel viewModel, IDesignerControl control)
 {
     this.viewModel = viewModel;
     this.control = control;
     Files.Add(file);
     file.ForceInitializeView(this);
     ComponentDispatcher.ThreadIdle += OnIdle;
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:11,代码来源:XmlEditorView.cs


示例17: HexEditView

		public HexEditView(OpenedFile file)
		{
			hexEditContainer = new HexEditContainer();
			hexEditContainer.hexEditControl.DocumentChanged += new EventHandler(DocumentChanged);
			
			this.Files.Add(file);
			
			file.ForceInitializeView(this);
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:9,代码来源:HexEditView.cs


示例18: Editor

		public Editor(OpenedFile file)
		{			
			Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);

			rtb.Dock = DockStyle.Fill;
			rtb.TextChanged += TextChanged;			
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:9,代码来源:Editor.cs


示例19: SettingsViewContent

		public SettingsViewContent(OpenedFile file) : base(file)
		{
			view.SelectionChanged += delegate {
				propertyContainer.SelectedObjects = view.GetSelectedEntriesForPropertyGrid().ToArray();
			};
			view.SettingsChanged += delegate {
				this.PrimaryFile.MakeDirty();
			};
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:9,代码来源:SettingsViewContent.cs


示例20: Load

		public override void Load(OpenedFile file, Stream stream)
		{
			_file = file;
			_control.Load(stream);
			TitleName = Path.GetFileName(file.FileName);

			BindingSource bs = _control.dataGridViewTags.DataSource as BindingSource;
			bs.ListChanged += _control_dataGridViewTags_CurrentCellDirtyStateChanged;
		}
开发者ID:garryforreg,项目名称:iview-scada,代码行数:9,代码来源:TagListViewContent.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Dom.ExpressionResult类代码示例发布时间:2022-05-26
下一篇:
C# RubyBinding.NRefactoryToRubyConverter类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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