<html> <head> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>IsActive</title> <link rel="stylesheet" type="text/css" href="../../../style.css"> </head> <body> <div class="CommonContent"> <div class="CommonContentArea"> <h1>IsActive</h1><script> //We attach this function to a browser object as a variable so that if multiple of these blocks are //present on the same page, then they will simply over-write eachother with the same function instead //of generating a naming collision. window.WikiCodeFormattingCopyToClipboard = function copyToClipboard(sID){ var sContent = document.getElementById(sID).innerText; if( window.clipboardData && clipboardData.setData ) { clipboardData.setData("Text", sContent); } else { alert("You must enable javascript access to your clipboard for this feature to work. Please referr to your browser documentation or Google search for instructions."); } } </script> <p>ExtObjectContainer.isActive method provides you with means to define if the object is active.</p> <span name="cs_wiki_filter" csw_filters="cs"> <div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">UtilityExample.cs: <span class="fscMemberName">CheckActive</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57"><div><!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --><span style="color: #008080;">01</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> CheckActive() </span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Open_Text').style.display='inline';"/> </span><span id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_35_677_Open_Text"><span style="color: #000000;">{ </span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> StoreSensorPanel(); </span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> IConfiguration configuration </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.NewConfiguration(); </span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> configuration.ActivationDepth(</span><span style="color: #800080;">2</span><span style="color: #000000;">); </span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> IObjectContainer db </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(configuration, Db4oFileName); </span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">try</span><span style="color: #000000;"> </span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Open_Text').style.display='inline';"/> </span><span id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_268_634_Open_Text"><span style="color: #000000;">{ </span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> System.Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">Object container activation depth = 2</span><span style="color: #800000;">"</span><span style="color: #000000;">); </span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> IObjectSet result </span><span style="color: #000000;">=</span><span style="color: #000000;"> db.Get(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SensorPanel(</span><span style="color: #800080;">1</span><span style="color: #000000;">)); </span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> SensorPanel sensor </span><span style="color: #000000;">=</span><span style="color: #000000;"> (SensorPanel)result[</span><span style="color: #800080;">0</span><span style="color: #000000;">]; </span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> SensorPanel next </span><span style="color: #000000;">=</span><span style="color: #000000;"> sensor.Next; </span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">while</span><span style="color: #000000;"> (next </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">) </span><span style="color: #008080;">14</span><span style="color: #000000;"><img id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Open_Text').style.display='inline';"/> </span><span id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_508_629_Open_Text"><span style="color: #000000;">{ </span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> System.Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">Object </span><span style="color: #800000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> next </span><span style="color: #000000;">+</span><span style="color: #800000;">"</span><span style="color: #800000;"> is active: </span><span style="color: #800000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> db.Ext().IsActive(next)); </span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> next </span><span style="color: #000000;">=</span><span style="color: #000000;"> next.Next; </span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/> }</span></span><span style="color: #000000;"> </span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/> }</span></span><span style="color: #000000;"> </span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">finally</span><span style="color: #000000;"> </span><span style="color: #008080;">20</span><span style="color: #000000;"><img id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Open_Text').style.display='inline';"/> </span><span id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningUtility_MethodsutilityCS.ZipsUtilityExample.Cs_UtilityExample.Cs_CheckActive_155_57_651_673_Open_Text"><span style="color: #000000;">{ </span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> db.Close(); </span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/> }</span></span><span style="color: #000000;"> </span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/> }</span></span></div></pre></div></div> </span> <span name="cs_wiki_filter" csw_filters="vb"> <div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">UtilityExample.vb: <span class="fscMemberName">CheckActive</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57"><div><!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --><span style="color: #008080;">01</span><img id="ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub CheckActive()</span><span id="ResourcesReferenceTuningUtility_MethodsutilityVB.ZipsUtilityExample.Vb_UtilityExample.Vb_CheckActive_270_57_14_939_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> CheckActive() </span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> StoreSensorPanel() </span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> configuration </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IConfiguration </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.NewConfiguration() </span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> configuration.ActivationDepth(</span><span style="color: #800080;">2</span><span style="color: #000000;">) </span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> db </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(configuration, Db4oFileName) </span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;"> </span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> System.Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">Object container activation depth = 2</span><span style="color: #800000;">"</span><span style="color: #000000;">) </span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> result </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectSet </span><span style="color: #000000;">=</span><span style="color: #000000;"> db.Get(</span><span style="color: #0000FF;">New</span><span style="color: #000000;"> SensorPanel(</span><span style="color: #800080;">1</span><span style="color: #000000;">)) </span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> sensor </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> SensorPanel </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">CType</span><span style="color: #000000;">(result(</span><span style="color: #800080;">0</span><span style="color: #000000;">), SensorPanel) </span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> NextSensor </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> SensorPanel </span><span style="color: #000000;">=</span><span style="color: #000000;"> sensor.NextSensor </span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">While</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Not</span><span style="color: #000000;"> NextSensor </span><span style="color: #0000FF;">Is</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;"> </span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> System.Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">Object </span><span style="color: #800000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> NextSensor.ToString() </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;"> is active: </span><span style="color: #800000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> db.Ext().IsActive(NextSensor).ToString()) </span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> NextSensor </span><span style="color: #000000;">=</span><span style="color: #000000;"> NextSensor.NextSensor </span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">While</span><span style="color: #000000;"> </span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">Finally</span><span style="color: #000000;"> </span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> db.Close() </span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/> </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;"> </span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/> </span><span style="color: #0000FF;">End Sub</span></span></div></pre></div></div> </span> <p>This method can be useful in applications with deep object hierarchy if you prefer to use manual activation.</p></div> </div> <div id="footer"> This revision (6) was last Modified 2006-11-13T16:14:28 by Tetyana. </div> </body> </html>