Exemplo n.º 1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     FiresecSerializedClient = new FiresecSerializedClient();
     var result = FiresecSerializedClient.Connect("adm", "").Result;
     JournalItems.Add(result ? "Соединение установлено" : "Ошибка при установлении соединения");
     SetLastEvent();
     FiresecSerializedClient.NewEvent += new Action<int>(FiresecClient_NewEvent);
 }
		public FiresecDriver(int lastJournalNo, string FS_Address, int FS_Port, string FS_Login, string FS_Password, bool isPing)
		{
			LoadingErrors = new StringBuilder();
			try
			{
				FiresecSerializedClient = new FiresecSerializedClient();
				FiresecSerializedClient.Connect(FS_Address, FS_Port, FS_Login, FS_Password, isPing);
				ConfigurationConverter = new ConfigurationConverter()
				{
					FiresecSerializedClient = FiresecSerializedClient
				};
				ConfigurationConverter.ConvertMetadataFromFiresec();
			}
			catch (Exception e)
			{
				Logger.Error(e, "FiresecDriver.Synchronyze");
				FiresecDriver.LoadingErrors.Append(e.Message);
			}
		}