public TagListViewContent(OpenedFile file) { Files.Add(file); OnFileNameChanged(file); file.ForceInitializeView(this); TabPageText = "Design"; }
public AppConfigViewContent(OpenedFile file) { TabPageText = "Design"; Files.Add(file); OnFileNameChanged(file); file.ForceInitializeView(this); }
/// <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; }
public HexEditView(OpenedFile file) { hexEditContainer = new HexEditContainer(); hexEditContainer.hexEditControl.DocumentChanged += new EventHandler(DocumentChanged); this.Files.Add(file); file.ForceInitializeView(this); }
public Editor(OpenedFile file) { Files.Add(file); OnFileNameChanged(file); file.ForceInitializeView(this); rtb.Dock = DockStyle.Fill; rtb.TextChanged += TextChanged; }
public XmlView(OpenedFile file) : this() { this.Files.Add(file); OnFileNameChanged(file); file.ForceInitializeView(this); xmlTreeView = new XmlTreeView(this); SecondaryViewContents.Add(xmlTreeView); }
public DriverViewContent(OpenedFile file) { _control = new DriverUserControl(this); Files.Add(file); OnFileNameChanged(file); file.ForceInitializeView(this); TabPageText = "Design"; }
public EDMDesignerViewContent(OpenedFile primaryFile) : base(primaryFile) { if (primaryFile == null) throw new ArgumentNullException("primaryFile"); primaryFile.ForceInitializeView(this); // call Load() EDMDesignerChangeWatcher.AddEDMDesignerViewContent(this); }
public HexEditView(OpenedFile file) { hexEditContainer = new HexEditContainer(); hexEditContainer.hexEditControl.DocumentChanged += new EventHandler(DocumentChanged); this.Files.Add(file); file.ForceInitializeView(this); AnalyticsMonitorService.TrackFeature(typeof(HexEditView)); }
/// <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); }
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; }
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); } }
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; }
public ImageViewContent(OpenedFile file) { this.TabPageText = "Image Viewer"; this.Files.Add(file); file.ForceInitializeView(this); }
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); }