Smrf.NodeXL.ExcelTemplate.ApplicationUtil.GetApplicationFolder C# (CSharp) Method

GetApplicationFolder() public static method

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() ) );
    }

Usage Example

コード例 #1
0
        //*************************************************************************
        //  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();
        }
All Usage Examples Of Smrf.NodeXL.ExcelTemplate.ApplicationUtil::GetApplicationFolder