public override bool SaveOptions() { try { using (FileStream stream = _project.GetOwnedProject().Source.OpenWrite()) { _project.GetWriter().Write(_project.GetOwnedProject(), stream); } MarkDirty(false); } catch (Exception ex) { SD.MessageService.ShowException(ex); } return(base.SaveOptions()); }
public override void LoadOptions() { _project = (IVbpProject)this.Owner; _viewModel = new ViewModel(_project.GetOwnedProject(), this); this.DataContext = _viewModel; base.LoadOptions(); }
internal static IVbpProjectSymbolCache FromProject(IVbpProject project) { VbpProjectSymbolCache impl = new VbpProjectSymbolCache(project); /* Initially iterate over each module, create its parse information, and cache it! */ List <ElementBase> files = new List <ElementBase>(); files.AddRange(project.GetOwnedProject().Modules); files.AddRange(project.GetOwnedProject().Classes); files.AddRange(project.GetOwnedProject().Forms); files.AddRange(project.GetOwnedProject().UserControls); foreach (ElementBase file in files) { string fn = file.GetAbsoluteFileName(project.GetOwnedProject()); ITextSource ts = new StringTextSource(File.ReadAllText(fn)); impl._cache[fn] = CreateParseInformation(fn, ts, project); } return(impl); }
private VbpProjectSymbolCache(IVbpProject project) : this() { _project = project; _namespace = new VB6Namespace(project.GetOwnedProject()); _assembly = new VB6Assembly(); _assembly.RootNamespace = _namespace; _assembly.Compilation = _compilation; _namespace.Compilation = _compilation; _compilation = new VB6Compilation(this); }
public override void Start(bool withDebugging) { if (!VB6Helper.GetIsVB6Available()) { ICSharpCode.SharpDevelop.SD.MessageService.ShowError("Cannot locate VB6.EXE. Please make sure that you have entered the correct path to the VB6-directory under 'Tools -> VB6'."); } else { if (withDebugging) { VB6Helper.RunProject(_project.GetOwnedProject()); } else { // TODO: Just run the EXE! } } }
internal static IVbpProjectSymbolCache FromProject(IVbpProject project) { VbpProjectSymbolCache impl = new VbpProjectSymbolCache(project); /* Initially iterate over each module, create its parse information, and cache it! */ List<ElementBase> files = new List<ElementBase>(); files.AddRange(project.GetOwnedProject().Modules); files.AddRange(project.GetOwnedProject().Classes); files.AddRange(project.GetOwnedProject().Forms); files.AddRange(project.GetOwnedProject().UserControls); foreach (ElementBase file in files) { string fn = file.GetAbsoluteFileName(project.GetOwnedProject()); ITextSource ts = new StringTextSource(File.ReadAllText(fn)); impl._cache[fn] = CreateParseInformation(fn, ts, project); } return impl; }