Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions SharedProject/Output/OutputToolWindowControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ public OutputToolWindowControl(ScriptManager scriptManager,IFCCEngine fccEngine)
});
};


this.fccEngine = fccEngine;
}
}

protected override void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi)
{
Expand All @@ -114,23 +113,27 @@ protected override void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi)

private void OutputToolWindowControl_Loaded(object sender, RoutedEventArgs e)
{
if (!hasLoaded)
{
if(FCCOutputBrowser.Document == null)
{
fccEngine.ReadyForReport();
}

hasLoaded = true;
if (!hasLoaded)
{
fccEngine.ReadyForReport();
FCCOutputBrowser.Visibility = Visibility.Visible;
}
hasLoaded = false;
}
}

public object InvokeScript(string scriptName, params object[] args)
{
if (FCCOutputBrowser.Document != null)
{
return FCCOutputBrowser.InvokeScript(scriptName, args);
try
{
// Can use FCCOutputBrowser.IsLoaded but
// it is possible for this to be successful when IsLoaded false.
return FCCOutputBrowser.InvokeScript(scriptName, args);
}
catch {
// todo what to do about missed
}
}
return null;
}
Expand Down