Esempio n. 1
0
 //common method for opening alarm creation window for PLC structure
 private void OpenS7AlarmStructureCreationWindow(PLCstructuresEnum type)
 {
     if (CheckModifyingOrAddingNewAlarmsConditions())
     {
         S7StructureAlarmsCreatorViewModel s7sacvm = new S7StructureAlarmsCreatorViewModel(type, SelectedShortPLCconnection, _realmProvider);
         _manager.ShowDialog(s7sacvm);
         GetAlarmsForS7Connection(SelectedShortPLCconnection.PLCconnectionID);
     }
 }
Esempio n. 2
0
        public S7StructureAlarmsCreatorViewModel(PLCstructuresEnum structureType,
                                                 PLCconnectionComboBoxModel plcConnectionModel, IRealmProvider realmProvider)
        {
            _realmProvider = realmProvider;
            _logger        = NLog.LogManager.GetCurrentClassLogger();

            PlcConnectionName  = plcConnectionModel.ConnectionName;
            _plcConnectionID   = plcConnectionModel.PLCconnectionID;
            _structureType     = structureType;
            NameOfPLCstructure = "";

            GetListOfActualProfiles();
            GetListOfActualSMSgroups();
            CreateListOfAvailableAlarms();

            _logger.Info($"Window for creating alarms for standard PLC structure created. Structure: {structureType.ToString()}.");
        }