Example #1
0
 public void LoadFromFile(string string_1)
 {
     this.string_0 = string_1;
     if (this.IsConnected)
     {
         this.Disconnect();
     }
     if (File.Exists(string_1))
     {
         try
         {
             IAGSServerConnectionFactory2 factory = new AGSServerConnectionFactoryClass();
             this.ipropertySet_0 = factory.ReadConnectionPropertiesFromFile(string_1);
             try
             {
                 this.ConnectionMode = Convert.ToInt32(this.ipropertySet_0.GetProperty("CONNECTIONMODE"));
             }
             catch
             {
             }
         }
         catch (Exception exception)
         {
             Logger.Current.Error("", exception, "");
         }
     }
 }
Example #2
0
 public void Connect()
 {
     try
     {
         IAGSServerConnectionFactory2 factory = new AGSServerConnectionFactoryClass();
         if (this.ipropertySet_0 == null)
         {
             this.ipropertySet_0 = factory.ReadConnectionPropertiesFromFile(this.string_0);
         }
         this.iagsserverConnection2_0 = factory.Open(this.ipropertySet_0, 0) as IAGSServerConnection2;
         this.Init(null);
         this.method_1();
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
         Logger.Current.Error("", exception, "");
     }
 }