Пример #1
0
 public DeviceDisplay(ApplicationSettings settings, SystemServices services)
 {
     Settings = settings;
     //SystemServices = new SystemServices(settings.BuildFileName("PVBC.log"));
     SystemServices = services;
     DeviceList = new ObservableCollection<DeviceDisplayInfo>();
 }
        public PVPublisherService()
        {
            InitializeComponent();

            ApplicationSettings = new ApplicationSettings();
            SystemServices = new MackayFisher.Utilities.SystemServices(ApplicationSettings.BuildFileName("PVPublisher.log"));
            ApplicationSettings.SetSystemServices(SystemServices);

            LoadLogSettings();

            SystemServices.LogMessage("PVPublisher", "Service starting", LogEntryType.Information);
        }
Пример #3
0
        public EnergyEvents(ApplicationSettings settings, IDeviceManagerManager managerManager)
        {
            ApplicationSettings = settings;
            ManagerManager = managerManager;
            SystemServices = GlobalSettings.SystemServices;
            PVEventReadyEvent = new ManualResetEvent(false);
            NodeReaderWriterLock = new ReaderWriterLock();
            NodeUpdateMutex = new Mutex();
            PendingListMutex = new Mutex();

            PendingEvents = new List<EventPending>();
            LastEmitErrorReported = DateTime.MinValue;
        }
        public DeviceManagerSettings(ApplicationSettings root, XmlElement element)
            : base(root, element)
        {
            ApplicationSettings = (ApplicationSettings)root;
            SerialPort = null;

            _DeviceGroupName = new GenericSetting<String>("", this, "DeviceGroupName");
            _Enabled = new GenericSetting<bool>(true, this, "Enabled");
            _Name = new GenericSetting<String>("", this, "Name");

            String deviceGroupName = DeviceGroupName;
            DeviceGroup = ApplicationSettings.DeviceManagementSettings.GetDeviceGroup(deviceGroupName);
            ProtocolSettings = ApplicationSettings.DeviceManagementSettings.GetProtocol(DeviceGroup.Protocol);

            LoadDetails();
        }
        public MainWindow()
        {
            InitializeComponent();
            Subscriber = null;
            BrushSelected = comboBoxLocalMachines.Background;
            BrushAvailable = comboBoxLocalMachines2.Background;

            visibleDispatcherTimer = new DispatcherTimer();
            visibleDispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
            visibleDispatcherTimer.Interval = new TimeSpan(0, 0, 5);

            try
            {
                ApplicationSettings = new ApplicationSettings();
                LocateOrCreateDirectory(ApplicationSettings.DefaultDirectory);
                SystemServices = new MackayFisher.Utilities.SystemServices(ApplicationSettings.BuildFileName("PVMonitor.log"));
                ApplicationSettings.SetSystemServices(SystemServices);
                LoadLogSettings();

                Subscriber = new Subscriber.MyTransientSubscriber(SystemServices, this);
                expanderSettings.DataContext = Subscriber;
                stackPanelMain.DataContext = Subscriber;
                stackPanelGauges.DataContext = Subscriber;
                //listViewActiveEvents.ItemsSource = Subscriber.ActiveEvents;

                GenThreadManager = new GenThreadManager(SystemServices);
                ManageSubscription manageSubscription = new ManageSubscription(GenThreadManager, SystemServices, Subscriber, this);
                int threadId = GenThreadManager.AddThread(manageSubscription);
                GenThreadManager.StartThread(threadId);

                Rect bounds = Properties.Settings.Default.WindowPosition;
                this.Top = bounds.Top;
                this.Left = bounds.Left;
            }
            catch (Exception)
            {
            }
        }
 public PVOutputDaySettings(ApplicationSettings root, XmlElement element)
     : base(root, element)
 {
     ApplicationSettings = root;
 }
Пример #7
0
 public TestDatabase(ApplicationSettings settings, SystemServices services)
 {
     Settings = settings;
     SystemServices = services;
 }
 public CheckEnvironment(ApplicationSettings settings, SystemServices services)
 {
     Settings = settings;
     SystemServices = services;
 }
Пример #9
0
 public DeviceDisplayInfo(ApplicationSettings settings)
 {
     ApplicationSettings = settings;
     InitialLoad = true;
 }
 public PvOutputSiteSettings(ApplicationSettings root, XmlElement element)
     : base(root, element)
 {
     ApplicationSettings = (ApplicationSettings)root;
     LoadPVOutputDays();
 }
 public DeviceManagerDeviceSettings(ApplicationSettings root, XmlElement element, DeviceManagerSettings deviceManagerSettings)
     : base(root, element)
 {
     ApplicationSettings = root;
     _DeviceManagerSettings = deviceManagerSettings;
     RemoveOldElements();
     LoadDetails();
 }
 public ConsolidateDeviceSettings(ApplicationSettings root, XmlElement element, DeviceManagerDeviceSettings fromDevice)
     : base(root, element)
 {
     ApplicationSettings = root;
     ConsolidateFromDevice = fromDevice;
 }
 public DeviceEventSettings(ApplicationSettings root, XmlElement element, DeviceManagerDeviceSettings device)
     : base(root, element)
 {
     ApplicationSettings = root;
     Device = device;
     if (_EventTypeList == null)
     {
         LoadEventTypeNameLists();
         DoPropertyChanged("EventTypeList");
     }
 }