private void startDebugCommandEvents_BeforeExecute(string Guid, int ID, object CustomIn, object CustomOut, ref bool CancelDefault)
{
bool bbPlatform = false;
if (_dte.Solution.SolutionBuild.ActiveConfiguration != null)
{
isDebugConfiguration = checkDebugConfiguration();
SolutionContexts scCollection = _dte.Solution.SolutionBuild.ActiveConfiguration.SolutionContexts;
foreach (SolutionContext sc in scCollection)
{
if (sc.PlatformName == "BlackBerry" || sc.PlatformName == "BlackBerrySimulator")
{
bbPlatform = true;
if (sc.PlatformName == "BlackBerrySimulator")
_isSimulator = true;
else
_isSimulator = false;
}
}
}
Debug.WriteLine("Before Start Debug");
if (VSNDK.Package.ControlDebugEngine.isDebugEngineRunning || !bbPlatform)
{
// Disable the override of F5 (this allows the debugged process to continue execution)
CancelDefault = false;
}
else
{
// Create a reference to the Output window.
// Create a tool window reference for the Output window
// and window pane.
OutputWindow ow = ((DTE2)_dte).ToolWindows.OutputWindow;
// Select the Build pane in the Output window.
_owP = ow.OutputWindowPanes.Item("Build");
_owP.Activate();
if (isDebugConfiguration)
{
UpdateManagerData upData = new UpdateManagerData();
if (!upData.validateDeviceVersion(_isSimulator))
{
CancelDefault = true;
}
else
{
BuildBar();
CancelDefault = true;
}
}
else
{
BuildBar();
CancelDefault = true;
}
}
}