Esempio n. 1
0
 private void method_0()
 {
     try
     {
         if (this.AGSServerConnection != null)
         {
             IAGSEnumServerObjectName name = this.AGSServerConnection.get_ServerObjectNamesEx(this.FolderName);
             name.Reset();
             for (IAGSServerObjectName name2 = name.Next(); name2 != null; name2 = name.Next())
             {
                 IGxObject obj2;
                 bool      flag;
                 if (name2.Type.ToLower() == "mapserver")
                 {
                     obj2 = new GxAGSMap();
                     (obj2 as IGxAGSObject).AGSServerObjectName = name2;
                     flag = true;
                     if (((this.Parent as IGxAGSConnection).ConnectionMode == 0) &&
                         ((obj2 as IGxAGSObject).Status != "Started"))
                     {
                         flag = false;
                     }
                     if (flag)
                     {
                         obj2.Attach(this, this.igxCatalog_0);
                     }
                 }
                 else if (name2.Type.ToLower() == "featureserver")
                 {
                     if ((this.Parent as IGxAGSConnection).ConnectionMode == 0)
                     {
                         obj2 = new GxFeatureService();
                         (obj2 as IGxAGSObject).AGSServerObjectName = name2;
                         if ((obj2 as IGxAGSObject).Status == "Started")
                         {
                             obj2.Attach(this, this.igxCatalog_0);
                         }
                     }
                 }
                 else if (name2.Type.ToLower() == "gpserver")
                 {
                     obj2 = new GxGPServer();
                     (obj2 as IGxAGSObject).AGSServerObjectName = name2;
                     flag = true;
                     if (((this.Parent as IGxAGSConnection).ConnectionMode == 0) &&
                         ((obj2 as IGxAGSObject).Status != "Started"))
                     {
                         flag = false;
                     }
                     if (flag)
                     {
                         obj2.Attach(this, this.igxCatalog_0);
                     }
                 }
                 else if (name2.Type.ToLower() == "geometryserver")
                 {
                     if ((this.Parent as IGxAGSConnection).ConnectionMode > 0)
                     {
                         obj2 = new GxGeometryServer();
                         (obj2 as IGxAGSObject).AGSServerObjectName = name2;
                         obj2.Attach(this, this.igxCatalog_0);
                     }
                 }
                 else if (name2.Type.ToLower() == "searchserver")
                 {
                     obj2 = new GxSearchServer();
                     (obj2 as IGxAGSObject).AGSServerObjectName = name2;
                     flag = true;
                     if (((this.Parent as IGxAGSConnection).ConnectionMode == 0) &&
                         ((obj2 as IGxAGSObject).Status != "Started"))
                     {
                         flag = false;
                     }
                     if (flag)
                     {
                         obj2.Attach(this, this.igxCatalog_0);
                     }
                 }
             }
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
         Logger.Current.Error("", exception, "");
     }
 }
Esempio n. 2
0
 private void method_1()
 {
     try
     {
         object    obj2;
         object    obj3;
         IGxObject obj4;
         this.ipropertySet_0.GetAllProperties(out obj2, out obj3);
         string[] strArray = (string[])obj2;
         if ((strArray.Length == 6) && (strArray[1] == "MANAGERURL"))
         {
             obj4 = new GxAddAGSObject();
             obj4.Attach(this, this.igxCatalog_0);
         }
         if (this.iagsserverConnection2_0 != null)
         {
             IEnumBSTR folders = this.iagsserverConnection2_0.GetFolders("");
             folders.Reset();
             for (string str = folders.Next(); str != null; str = folders.Next())
             {
                 IGxServersFolder folder = new GxServersFolder
                 {
                     AGSServerConnection = this.iagsserverConnection2_0,
                     FolderName          = str
                 };
                 (folder as IGxObject).Attach(this, this.igxCatalog_0);
             }
             IAGSEnumServerObjectName name = this.iagsserverConnection2_0.get_ServerObjectNamesEx("");
             name.Reset();
             for (IAGSServerObjectName name2 = name.Next(); name2 != null; name2 = name.Next())
             {
                 bool flag;
                 if (name2.Type.ToLower() == "mapserver")
                 {
                     if (this.method_0(name2.Name))
                     {
                         obj4 = new GxAGSMap();
                         (obj4 as IGxAGSObject).AGSServerObjectName = name2;
                         flag = true;
                         if ((this.ConnectionMode == 0) && ((obj4 as IGxAGSObject).Status != "Started"))
                         {
                             flag = false;
                         }
                         if (flag)
                         {
                             obj4.Attach(this, this.igxCatalog_0);
                         }
                     }
                 }
                 else if (name2.Type.ToLower() == "gpserver")
                 {
                     if (this.method_0(name2.Name))
                     {
                         obj4 = new GxGPServer();
                         (obj4 as IGxAGSObject).AGSServerObjectName = name2;
                         flag = true;
                         if ((this.ConnectionMode == 0) && ((obj4 as IGxAGSObject).Status != "Started"))
                         {
                             flag = false;
                         }
                         if (flag)
                         {
                             obj4.Attach(this, this.igxCatalog_0);
                         }
                     }
                 }
                 else if (name2.Type.ToLower() == "featureserver")
                 {
                     if (this.ConnectionMode == 0)
                     {
                         obj4 = new GxFeatureService();
                         (obj4 as IGxAGSObject).AGSServerObjectName = name2;
                         if ((obj4 as IGxAGSObject).Status == "Started")
                         {
                             obj4.Attach(this, this.igxCatalog_0);
                         }
                     }
                 }
                 else if ((name2.Type.ToLower() == "geometryserver") && (this.ConnectionMode > 0))
                 {
                     obj4 = new GxGeometryServer();
                     (obj4 as IGxAGSObject).AGSServerObjectName = name2;
                     obj4.Attach(this, this.igxCatalog_0);
                 }
             }
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
         Logger.Current.Error("", exception, "");
     }
 }