private System.String GetConnectionString() { System.String Value = ""; try { System.String String__Value = ""; System.Int32 Length__Value = 0; if (! LibInvoke.ProjectGetIProjectConnectionString(FItemHandle, System.IntPtr.Zero, ref Length__Value) ) { throw new System.Exception("ProjectGetIProjectConnectionString"); } System.IntPtr Array__Value = System.Runtime.InteropServices.Marshal.AllocHGlobal(Length__Value + 1); if (! LibInvoke.ProjectGetIProjectConnectionString(FItemHandle, Array__Value, ref Length__Value) ) { throw new System.Exception("ProjectGetIProjectConnectionString"); } String__Value = LibInvoke.StringFromNativeUtf8(Array__Value, Length__Value); System.Runtime.InteropServices.Marshal.FreeHGlobal(Array__Value); if (Length__Value > 0) { Value = String__Value; } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } return(Value); }
// Constructor: public ProjectGroup(IProjectGroup AInterfaceHandle = 0) { try { FItemHandle = AInterfaceHandle; if (FItemHandle == 0) { if (! LibInvoke.ProjectGroupCreate(out FItemHandle) ) { throw new System.Exception("ProjectGroupCreate"); } } OnError = null; if (! LibInvoke.SetProjectGroupIProjectGroupEventsOnError(FItemHandle, ((System.IntPtr)System.Runtime.InteropServices.GCHandle.Alloc(this)).ToInt64(), FProjectGroupIProjectGroupEventsOnError) ) { throw new System.Exception("SetProjectGroupIProjectGroupEventsOnError"); } OnProgress = null; if (! LibInvoke.SetProjectGroupIProjectGroupEventsOnProgress(FItemHandle, ((System.IntPtr)System.Runtime.InteropServices.GCHandle.Alloc(this)).ToInt64(), FProjectGroupIProjectGroupEventsOnProgress) ) { throw new System.Exception("SetProjectGroupIProjectGroupEventsOnProgress"); } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } }
public void Disconnect() { try { if (! LibInvoke.ProjectIProjectDisconnect(FItemHandle) ) { throw new System.Exception("ProjectIProjectDisconnect"); } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } }
public void FinalizeEx() { try { if (! LibInvoke.ProjectGroupIProjectGroupFinalize(FItemHandle) ) { throw new System.Exception("ProjectGroupIProjectGroupFinalize"); } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } }
public void RunPeriodic() { try { if (! LibInvoke.ProjectGroupIProjectGroupRunPeriodic(FItemHandle) ) { throw new System.Exception("ProjectGroupIProjectGroupRunPeriodic"); } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } }
private static System.Boolean ProjectGroupIProjectGroupEventsOnProgress(IProjectGroupEvents ItemHandle, TProgressEvent EventCode, System.Int32 ProgressValue, System.IntPtr EventText) { System.Boolean Result = false; try { System.Object cls = ((System.Runtime.InteropServices.GCHandle)(System.IntPtr) ItemHandle).Target; if ((cls is ProjectGroup) && (((ProjectGroup)cls).OnProgress != null)) { ((ProjectGroup)cls).OnProgress(EventCode, ProgressValue, LibInvoke.StringFromNativeUtf8(EventText)); } Result = true; } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } return(Result); }
// Properties: private System.Int32 GetConnectionFRC() { System.Int32 Value = 0; try { if (! LibInvoke.ProjectGetIProjectConnectionFRC(FItemHandle, out Value) ) { throw new System.Exception("ProjectGetIProjectConnectionFRC"); } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } return(Value); }
public TBool SaveToFile(System.String Path) { TBool Result = TBool.bFalse; try { if (! LibInvoke.ProjectIProjectSaveToFile(FItemHandle, LibInvoke.NativeUtf8FromString(Path), out Result) ) { throw new System.Exception("ProjectIProjectSaveToFile"); } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } return(Result); }
// Methods: public IProject AddProject() { IProject Project = 0; try { if (! LibInvoke.ProjectGroupIProjectGroupAddProject(FItemHandle, out Project) ) { throw new System.Exception("ProjectGroupIProjectGroupAddProject"); } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } return(Project); }
// Constructor: public Project(IProject AInterfaceHandle = 0) { try { FItemHandle = AInterfaceHandle; if (FItemHandle == 0) { if (! LibInvoke.ProjectCreate(out FItemHandle) ) { throw new System.Exception("ProjectCreate"); } } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } }
public virtual void Dispose() { try { if (FItemHandle != 0) { if (! LibInvoke.ProjectDestroy(FItemHandle) ) { throw new System.Exception("ProjectDestroy"); } else { FItemHandle = 0; } } } catch (System.Exception e) { LibInvoke.LibCallError(e.Message); } }