예제 #1
0
        public void RemoveObjective(ESAPIX.Facade.API.OptimizationObjective objective)
        {
            if ((XC.Instance.CurrentContext) != (null))
            {
                XC.Instance.CurrentContext.Thread.Invoke(() =>
                {
                    _client.RemoveObjective(objective._client);
                }

                                                         );
            }
            else
            {
                _client.RemoveObjective(objective);
            }
        }
        public System.Boolean AddTradeoffObjective(ESAPIX.Facade.API.OptimizationObjective objective)
        {
            if ((XC.Instance) != (null))
            {
                var vmsResult = (XC.Instance.GetValue(sc =>
                {
                    var fromClient = (_client.AddTradeoffObjective(objective._client));
                    if (fromClient.Equals(default(System.Boolean)))
                    {
                        return(default(System.Boolean));
                    }

                    return((System.Boolean)(fromClient));
                }

                                                      ));
                return(vmsResult);
            }
            else
            {
                return((System.Boolean)(_client.AddTradeoffObjective(objective)));
            }
        }