コード例 #1
0
 public DatabaseCollection(TreeView tv)
 {
     base.useNamespaces = true;
     this.Databases     = new List <DatabaseElement>();
     this.Queries       = new List <QueryElement>();
     foreach (TreeNode node in tv.Nodes)
     {
         System.Windows.Forms.MessageBox.Show(node.Tag.ToString());
         if (node.Tag is DatabaseCollection)
         {
             TreeNode[] nodes = tv.Nodes.Find(ref_asm_node, true);
             bool       hasit = nodes.Length > 0;
             Global.statR("DC");
             if (hasit)
             {
                 MessageBox.Show("we have assembly entries");
                 TreeNode found = nodes[0];
             }
             DatabaseCollection dc = node.Tag as DatabaseCollection;
             Global.statR("we're moving past the continue statement at DatabaseCollection level");
             foreach (TreeNode node1 in node.Nodes)
             {
                 if (node1.Tag is DatabaseElement)
                 {
                     Databases.Add(new DatabaseElement(node1));
                 }
                 else
                 if (node1.Tag == (queryContainer))
                 {
                     foreach (TreeNode qnode in node1.Nodes)
                     {
                         QueryElement element = QueryElement.FromNode(qnode);
                         Queries.Add(element);
                     }
                 }
                 else
                 if (node1.Tag is QueryElement)
                 {
                     Queries.Add(QueryElement.FromNode(node1));
                 }
         #if ASMREF
                 else if (node1.Tag is ReferenceAssemblyCollection)
                 {
                     Assemblies = node1.Tag as ReferenceAssemblyCollection;
                 }
         #endif
             }
         }
     }
 }
コード例 #2
0
        //  Call this method via a proxy.
        public void SomeMethod(string callingDomainName)
        {
            // Get this AppDomain's settings and display some of them.
            AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation;

            Global.statY(
                "AppName={0}, AppBase={1}, ConfigFile={2}",
                ads.ApplicationName,
                ads.ApplicationBase,
                ads.ConfigurationFile
                );
            // Display the name of the calling AppDomain and the name
            // of the second domain.
            // NOTE: The application's thread has transitioned between
            // AppDomains.
            Global.statY(
                "Calling from '{0}' to '{1}'.",
                callingDomainName, System.Threading
                .Thread.GetDomain().FriendlyName
                );
        }
コード例 #3
0
 /// <summary>
 /// See: GetMatches
 /// </summary>
 public FieldMatch(MatchCollection mc)
 {
     if (mc.Count >= 1)
     {
         Match m = mc[0];
         if (m.Groups.Count >= 1)
         {
             Global.statG("orig");
             orig = mc[0].Groups[0].Value;
         }
         if (m.Groups.Count >= 2)
         {
             Global.statG("name");
             name = mc[0].Groups[1].Value;
         }
         if (m.Groups.Count >= 3)
         {
             Global.statG("values");
             values = mc[0].Groups[2].Value;
         }
     }
 }