public void OnResourceChanged(PhactoryHost.Database.Resource resource) { View.View view = viewBinding[resource].View; FileInfo fileInfo = Host.GetFileInfo(resource); string fileContent = File.ReadAllText(fileInfo.FullName); view.RefreshContent(); Host.Log(resource.DisplayName + " refreshed"); }
public void OpenResource(Panel parentPanel, PhactoryHost.Database.Resource resource) { View.View view = new View.View(resource); view.Parent = parentPanel; view.Dock = System.Windows.Forms.DockStyle.Fill; viewBinding.Add(resource, new ResourceBinding(parentPanel, view)); view.RefreshContent(); view.RefreshTitle(); if (Host.IsVerboseOutput()) { Host.Log(resource.DisplayName + " loaded"); } view.IsReady = true; }