Exemplo n.º 1
0
        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);
 }
Exemplo n.º 3
0
 public void Setup()
 {
     _app = new CSiApplication(CSiData.pathApp);
     //_app.ApplicationStart(filePath: CSiData.pathResources + @"\" + CSiData.pathModelSet + CSiData.extension);
 }
Exemplo n.º 4
0
 public void Setup()
 {
     _app = CSiApplication.Factory(CSiData.pathApp);
 }
Exemplo n.º 5
0
 /// <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);
 }
Exemplo n.º 6
0
 /// <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);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Retrieves the names and labels of all defined objects.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <returns>List&lt;UniqueLabelNamePair&gt;.</returns>
 public static List <UniqueLabelNamePair> GetLabelNameList(CSiApplication app)
 {
     return(getLabelNameList(_frameObject));
 }
Exemplo n.º 8
0
        // 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;
        }
Exemplo n.º 9
0
 /// <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)));
 }
Exemplo n.º 10
0
 private void CSiApplication_Initialize_AttachToProcess_of_Nonexisting_Process()
 {
     using (CSiApplication app = new CSiApplication(startNewProcess: false))
     {
     }
 }
Exemplo n.º 11
0
 private void CSiApplication_Initialize_New_Instance_with_Invalid_Application_Path()
 {
     using (CSiApplication app = new CSiApplication("FooBar.Exe"))
     {
     }
 }