| 34 |  | function CloseConnectionByIndex(Index: Integer; var Msg: TStatusMessages): Boolean; overload; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 35 |  | function CloseConnection(ID: Integer; var Msg: TStatusMessages): Boolean; overload; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 36 |  | function CloseConnection(FileName: String; var Msg: TStatusMessages): Boolean; overload; | 
 
 
 
 
 
 
 
 | 37 | + | function FileOpened(FileName: String): Integer; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 38 |  | published | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 39 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 40 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 261 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 262 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 263 |  |  | 
 
 
 
 
 
 
 
 | 264 | + | function TConnectionManager.FileOpened(FileName: String): Integer; | 
 
 
 
 
 
 
 
 | 265 | + | var | 
 
 
 
 
 
 
 
 | 266 | + | i: Integer; | 
 
 
 
 
 
 
 
 | 267 | + | begin | 
 
 
 
 
 
 
 
 | 268 | + | Result := -1; | 
 
 
 
 
 
 
 
 | 269 | + | if Length(FConnections) > 0 then | 
 
 
 
 
 
 
 
 | 270 | + | for i := 0 to High(FConnections) do | 
 
 
 
 
 
 
 
 | 271 | + | if FConnections[i].FileName = FileName then | 
 
 
 
 
 
 
 
 | 272 | + | begin | 
 
 
 
 
 
 
 
 | 273 | + | Result := FConnections[i].ConnectionID; | 
 
 
 
 
 
 
 
 | 274 | + | Exit; | 
 
 
 
 
 
 
 
 | 275 | + | end; | 
 
 
 
 
 
 
 
 | 276 | + | end; | 
 
 
 
 
 
 
 
 | 277 | + |  | 
 
 
 
 
 
 
 
 | 278 | + |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 279 |  | initialization | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 280 |  | ConManager := TConnectionManager.Create; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 281 |  | finalization |