Пример #1
0
 public ApplicationExitCommand(ApplicationExitEventArgs args, LayoutIOModel layoutIO, SelectedProfileModel selectedProfile,
                               Database database, UserPreferencesModel preferences)
 {
     this.args            = args;
     this.layoutIO        = layoutIO;
     this.selectedProfile = selectedProfile;
     this.database        = database;
     this.preferences     = preferences;
 }
Пример #2
0
        private void sensor_ApplicationExit(object sender, ApplicationExitEventArgs e)
        {
            ApplicationExit?.Invoke(sender, e);

            var sensorsWithReceiveApplicationExitSupport = _sensors.Where(x => x as IReceiveExit != null).Select(x => (IReceiveExit)x).ToList();

            foreach (var sensor in sensorsWithReceiveApplicationExitSupport)
            {
                bool sensorIsSender = sender.GetType().Name == sensor.GetType().Name;
                if (!sensorIsSender)
                {
                    sensor.OnApplicationExit(sender, e);
                }
            }
        }
Пример #3
0
 private void _sensorHub_ApplicationExit(object sender, ApplicationExitEventArgs e)
 {
     Stop();
 }