public DeviceView()
 {
     InitializeComponent();
     devicePresenter = new DevicePresenter(this);
     DataContext = devicePresenter;
     PeripheralDeviceMethods per = new PeripheralDeviceMethods();
     ComboBox_Devies.ItemsSource = per.GetAllPeripheralDevAsStringArray();
     ComboBox_Devies.SelectedIndex = 0;
 }
 public static ObservableCollection<DeviceModel> CreateDevicesList(object[] table)
 {
     PeripheralDeviceMethods sm = new PeripheralDeviceMethods();
     ObservableCollection<DeviceModel> devicesList = new ObservableCollection<DeviceModel>();
     DeviceModel temp;
     foreach (Device dev in table)
     {
         temp = new DeviceModel();
         temp.comment = dev.comment;
         temp.id = dev.id;
         temp.id_fixed_asset = dev.id_fixed_asset;
         temp.id_peripheral_device = dev.id_peripheral_device;
         temp.ip_address = dev.ip_address;
         temp.mac_address = dev.mac_address;
         temp.model = dev.model;
         temp.producer = dev.producer;
         temp.serial_number = dev.serial_number;
         temp.name_peripheral_device = sm.GetNameById(dev.id_peripheral_device);
         devicesList.Add(temp);
     }
     return devicesList;
 }