public void CSiApplication_Initialize_AttachToProcess() { // This test should wait until all processes are closed. Process[] pname = Process.GetProcessesByName(CSiData.processName); delayTestStart(until: (pname.Length == 0), attempts: 20, wait: 1000); ProcessStartInfo processInfo = new ProcessStartInfo(CSiData.pathApp) { CreateNoWindow = true, UseShellExecute = false }; Process.Start(processInfo); bool programWasAttachedTo; using (CSiApplication app = new CSiApplication(numberOfAttempts: 60, intervalBetweenAttempts: 1000, numberOfExitAttempts: 60, intervalBetweenExitAttempts: 1000)) { Assert.IsTrue(app.IsInitialized); programWasAttachedTo = app.IsInitialized; } Assert.IsTrue(programWasAttachedTo); }
public void Setup() { _app = new CSiApplication(CSiData.pathApp); }
public void Setup() { _app = new CSiApplication(CSiData.pathApp); //_app.ApplicationStart(filePath: CSiData.pathResources + @"\" + CSiData.pathModelSet + CSiData.extension); }
public void Setup() { _app = CSiApplication.Factory(CSiData.pathApp); }
/// <summary> /// Deletes the point load assignments to the specified objects for the specified load pattern. /// </summary> /// <param name="app">The application.</param> /// <param name="loadPattern">The name of the load pattern associated with the load.</param> /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception> public void DeleteLoadPoint(CSiApplication app, string loadPattern) { app.Model.ObjectModel.FrameObject.DeleteLoadPoint(Name, loadPattern); deleteLoad(loadPattern, PointLoads); }
/// <summary> /// Deletes the temperature load assignments to the specified objects for the specified load pattern. /// </summary> /// <param name="app">The application.</param> /// <param name="loadPattern">The name of the load pattern associated with the load.</param> /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception> public void DeleteLoadTemperature(CSiApplication app, string loadPattern) { app.Model.ObjectModel.FrameObject.DeleteLoadTemperature(Name, loadPattern); deleteLoad(loadPattern, TemperatureLoads); }
/// <summary> /// Retrieves the names and labels of all defined objects. /// </summary> /// <param name="app">The application.</param> /// <returns>List<UniqueLabelNamePair>.</returns> public static List <UniqueLabelNamePair> GetLabelNameList(CSiApplication app) { return(getLabelNameList(_frameObject)); }
// public static ShearWallDesigner ShearWallDesigner { get; } = ShearWallDesigner.Instance; // public static SlabDesigner SlabDesigner { get; } = SlabDesigner.Instance; #endif #endregion // TODO: For all, handle name as null or empty for Factory methods. // TODO: Write out to text file? public static void SetApplication(CSiApplication app) { Application = app; }
/// <summary> /// Returns the names of all defined area properties for a given story. /// </summary> public List <string> GetAreaNameList(CSiApplication app) { return(new List <string>(app.Model.ObjectModel.AreaObject.GetNameListOnStory(Name))); }
private void CSiApplication_Initialize_AttachToProcess_of_Nonexisting_Process() { using (CSiApplication app = new CSiApplication(startNewProcess: false)) { } }
private void CSiApplication_Initialize_New_Instance_with_Invalid_Application_Path() { using (CSiApplication app = new CSiApplication("FooBar.Exe")) { } }