コード例 #1
0
		public TagListViewContent(OpenedFile file)
		{
			Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);
			TabPageText = "Design";
		}
コード例 #2
0
		public AppConfigViewContent(OpenedFile file)
		{
			TabPageText = "Design";

			Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);
		}
コード例 #3
0
ファイル: XmlEditorView.cs プロジェクト: Xtremrules/dot42
 /// <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;
 }
コード例 #4
0
		public HexEditView(OpenedFile file)
		{
			hexEditContainer = new HexEditContainer();
			hexEditContainer.hexEditControl.DocumentChanged += new EventHandler(DocumentChanged);
			
			this.Files.Add(file);
			
			file.ForceInitializeView(this);
		}
コード例 #5
0
ファイル: Editor.cs プロジェクト: kingjiang/SharpDevelopLite
		public Editor(OpenedFile file)
		{			
			Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);

			rtb.Dock = DockStyle.Fill;
			rtb.TextChanged += TextChanged;			
		}
コード例 #6
0
ファイル: XmlView.cs プロジェクト: BackupTheBerlios/nantgui
        public XmlView(OpenedFile file)
            : this()
        {
            this.Files.Add(file);
            OnFileNameChanged(file);
            file.ForceInitializeView(this);

            xmlTreeView = new XmlTreeView(this);
            SecondaryViewContents.Add(xmlTreeView);
        }
コード例 #7
0
		public DriverViewContent(OpenedFile file)
		{			
			_control = new DriverUserControl(this);
			
			Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);
			
			TabPageText = "Design";
		}
コード例 #8
0
		public EDMDesignerViewContent(OpenedFile primaryFile)
			: base(primaryFile)
		{
			if (primaryFile == null)
				throw new ArgumentNullException("primaryFile");
			
			primaryFile.ForceInitializeView(this); // call Load()

			EDMDesignerChangeWatcher.AddEDMDesignerViewContent(this);
		}
コード例 #9
0
ファイル: HexEditView.cs プロジェクト: nylen/SharpDevelop
		public HexEditView(OpenedFile file)
		{
			hexEditContainer = new HexEditContainer();
			hexEditContainer.hexEditControl.DocumentChanged += new EventHandler(DocumentChanged);
			
			this.Files.Add(file);
			
			file.ForceInitializeView(this);
			
			AnalyticsMonitorService.TrackFeature(typeof(HexEditView));
		}
コード例 #10
0
ファイル: XmlView.cs プロジェクト: kingjiang/SharpDevelopLite
		/// <summary>
		/// Sets the primary file. Public because it is used by some unit tests.
		/// </summary>
		public void SetPrimaryFileUnitTestMode(OpenedFile file)
		{
			if (PrimaryFile != null)
				throw new InvalidOperationException("primary file is already set");
			
			isInUnitTest = true;
			
			this.Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);
		}
コード例 #11
0
		public TagGroupViewContent(OpenedFile file)
		{
			TabPageText = "Design";
			Files.Add(file);
			OnFileNameChanged(file);
			file.ForceInitializeView(this);

			//_control.dataGridViewTagGroup.CurrentCellDirtyStateChanged += new EventHandler(_control_dataGridViewTagGroup_CurrentCellDirtyStateChanged);

			BindingSource bs = _control.dataGridViewTagGroup.DataSource as BindingSource;
			bs.ListChanged += _control_dataGridViewTagGroup_CurrentCellDirtyStateChanged;
		}
コード例 #12
0
		void TryOpenAppConfig(bool createIfNotExists)
		{
			if (appConfigFile != null) // already open
				return;
			if (ProjectService.OpenSolution == null)
				return;
			IProject p = ProjectService.OpenSolution.FindProjectContainingFile(this.PrimaryFileName);
			if (p == null)
				return;
			FileName appConfigFileName = CompilableProject.GetAppConfigFile(p, createIfNotExists);
			if (appConfigFileName != null) {
				appConfigFile = FileService.GetOrCreateOpenedFile(appConfigFileName);
				this.Files.Add(appConfigFile);
				if (createIfNotExists)
					appConfigFile.MakeDirty();
				appConfigFile.ForceInitializeView(this);
			}
		}
コード例 #13
0
		public AvalonEditViewContent(OpenedFile file, Encoding fixedEncodingForLoading = null)
		{
			if (fixedEncodingForLoading != null) {
				codeEditor.UseFixedEncoding = true;
				codeEditor.PrimaryTextEditor.Encoding = fixedEncodingForLoading;
			}
			this.TabPageText = "${res:FormsDesigner.DesignTabPages.SourceTabPage}";
			
			if (file.FileName != null) {
				string filetype = Path.GetExtension(file.FileName);
				if (!ProjectService.GetFileFilters().Any(f => f.ContainsExtension(filetype)))
					filetype = ".?";
				trackedFeature = AnalyticsMonitorService.TrackFeature(typeof(AvalonEditViewContent), "open" + filetype.ToLowerInvariant());
			}
			
			this.Files.Add(file);
			file.ForceInitializeView(this);
			
			file.IsDirtyChanged += PrimaryFile_IsDirtyChanged;
			codeEditor.Document.UndoStack.PropertyChanged += codeEditor_Document_UndoStack_PropertyChanged;
			codeEditor.CaretPositionChanged += CaretChanged;
			codeEditor.TextCopied += codeEditor_TextCopied;
		}
コード例 #14
0
		public ImageViewContent(OpenedFile file)
		{
			this.TabPageText = "Image Viewer";
			this.Files.Add(file);
			file.ForceInitializeView(this);
		}
コード例 #15
0
		public EDMDesignerViewContent(OpenedFile primaryFile)
			: base(primaryFile)
		{
			if (primaryFile == null)
				throw new ArgumentNullException("primaryFile");
			
			try {
				primaryFile.ForceInitializeView(this); // call Load()
			} catch (WizardCancelledException) {
				this.Files.Clear(); // unregister with OpenedFile
				throw;
			}

			EDMDesignerChangeWatcher.AddEDMDesignerViewContent(this);
		}