コード例 #1
0
        public static AltiumDblibPath BrowseForDbLib()
        {
            AltiumDblibPath path = new AltiumDblibPath();

            var dialog = new CommonOpenFileDialog()
            {
                EnsureFileExists = true,
                Title            = "Locate DbLib File",
                Multiselect      = false
            };

            dialog.Filters.Add(new CommonFileDialogFilter("Altium Database File", "*.DbLib"));

            if (dialog.ShowDialog() != CommonFileDialogResult.Ok)
            {
                path.Error = "DbLib not selected.";
                return(path);
            }

            path.Success = true;
            path.Path    = dialog.FileName;

            path.ConnectionStringPath = ReadUdlLocation(path.Path);

            return(path);
        }
コード例 #2
0
 public static UdlCredentials ReadUdlFile(AltiumDblibPath p)
 {
     return(ReadUdlFile(p.ConnectionStringPath));
 }