public static GetApplicationFolder ( ) : String | ||
return | String |
GetApplicationFolder()
{
// This works whether the application is running within ClickOnce, in
// which case it returns something like this:
//
// "...\Some ClickOnce Folder".
//
// ...or in the development environment, in which case it returns
// something like this:
//
// "C:\NodeXL\ExcelTemplate\bin\Debug"
//
return ( Path.GetDirectoryName( GetExecutingAssemblyPath() ) );
}
//************************************************************************* // Constructor: GraphMetricCalculationManager() // /// <summary> /// Initializes a new instance of the <see /// cref="GraphMetricCalculationManager" /> class. /// </summary> //************************************************************************* public GraphMetricCalculationManager() { m_oBackgroundWorker = null; // Set the path to the executable that calculates graph metrics using // the SNAP library. GraphMetricCalculatorBase.SetSnapGraphMetricCalculatorPath( Path.Combine(ApplicationUtil.GetApplicationFolder(), GraphMetricCalculatorBase .DefaultSnapGraphMetricCalculatorFileName)); AssertValid(); }