Load() 공개 정적인 메소드

Loads the specified file path.
public static Load ( string filePath ) : ManagedApplication
filePath string The file path.
리턴 ManagedApplication
예제 #1
0
        /// <summary>
        /// Adds an application to manage to the drop down menu.
        /// </summary>
        private int AddApplicationToManage(FileInfo fileInfo)
        {
            // ignore files that don't exist.
            if (fileInfo == null || !fileInfo.Exists)
            {
                return(ApplicationToManageCB.SelectedIndex);
            }

            try
            {
                ManagedApplication application = ManagedApplication.Load(fileInfo.FullName);

                if (application == null)
                {
                    return(ApplicationToManageCB.SelectedIndex);
                }

                // add to list.
                return(AddApplicationToManage(application));
            }

            // ignore errors.
            catch (Exception)
            {
                return(ApplicationToManageCB.SelectedIndex);
            }
        }