本文整理汇总了C#中Ecell.Objects.EcellObject.GetEcellValue方法的典型用法代码示例。如果您正苦于以下问题:C# EcellObject.GetEcellValue方法的具体用法?C# EcellObject.GetEcellValue怎么用?C# EcellObject.GetEcellValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ecell.Objects.EcellObject
的用法示例。
在下文中一共展示了EcellObject.GetEcellValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataChanged
/// <summary>
/// The event sequence on changing value of data at other plugin.
/// </summary>
/// <param name="modelID">The model ID before value change.</param>
/// <param name="oldKey">The ID before value change.</param>
/// <param name="type">The data type before value change.</param>
/// <param name="eo">Changed value of object.</param>
public void DataChanged(string modelID, string oldKey, string type, EcellObject eo)
{
// Select Canvas
if (m_canvas == null)
return;
// Reset unreached flag.
m_unreachedFlag = false;
if (type.Equals(EcellObject.MODEL))
{
EcellModel model = (EcellModel)eo;
m_layerView.ResetLayers(model.Layers);
m_canvas.RefreshEdges();
m_animCon.SetAnimationSettings((XmlElement)model.Animations);
}
PPathwayObject obj;
// If case SystemSize
if (type == Constants.xpathVariable)
{
if (eo.LocalID == "SIZE")
{
obj = m_canvas.Systems[eo.ParentSystemID];
((EcellSystem)obj.EcellObject).SizeInVolume = (double)eo.GetEcellValue("Value");
obj.Refresh();
}
}
// Select changed object.
obj = m_canvas.GetObject(oldKey, type);
if (obj != null)
{
// Change data.
if (!obj.Setting.Name.Equals(eo.Layout.Figure))
obj.Setting = m_csManager.GetSetting(eo.Type, eo.Layout.Figure);
obj.EcellObject = eo;
m_canvas.DataChanged(oldKey, eo.Key, obj);
}
// Update Animation.
if (IsAnimation)
m_animCon.SetAnimation();
}
示例2: createSystem
private static void createSystem(EcellObject anEml, Model aSBMLModel)
{
if ( anEml.LocalID == "SBMLParameter" || anEml.LocalID == "SBMLRule" )
return;
// create Compartment object
Compartment aCompartment = aSBMLModel.createCompartment();
// set ID ROOT System and Other System
string aCompartmentID = "";
if (anEml.LocalID == "/")
aCompartmentID = "default"; // Root system
else
aCompartmentID = anEml.LocalID;
// aCompartmentID = "default" + anEml.Key.Replace( "/", "__" );
ID_Namespace.Add( aCompartmentID );
if (aSBMLModel.getLevel() == 1)
aCompartment.setName( aCompartmentID );
else if (aSBMLModel.getLevel() == 2)
aCompartment.setId( aCompartmentID );
foreach(EcellObject child in anEml.Children)
{
if (!(child is EcellVariable))
continue;
// set Size and constant of Compartment
if( child.LocalID == "SIZE" )
{
double size = ((EcellSystem)anEml).SizeInVolume;
aCompartment.setSize(size);
EcellValue value = anEml.GetEcellValue("Fixed");
if(value != null)
aCompartment.setConstant(System.Convert.ToBoolean((int)value));
}
// set Dimensions of Compartment
else if( child.LocalID == "Dimensions" )
{
int dimension = (int)child.GetEcellValue("Value");
aCompartment.setSpatialDimensions(dimension);
}
}
// set Outside element of Compartment
if( anEml.ParentSystemID == "/" && anEml.LocalID != "")
{
aCompartment.setOutside( "default" );
}
else if (!string.IsNullOrEmpty(anEml.ParentSystemID))
{
aCompartment.setOutside(
getCurrentCompartment( anEml.ParentSystemID ));
}
}