public void Closing(EventData data)
        {
            var args = data.EventArgs as CancelEventArgs;
            if (args == null)
                return;

            if (!_radioEnvironment.Settings.MinimizeInTray) return;

            _programManager.MainWindow.Hide();
            args.Cancel = true;
        }
                private void Handler([NotNull] object sender, [NotNull] EventArgs e)
                {
                    if (!_isDirty && !EnsureCommandStade())
                    {
                        Dispose();
                        return;
                    }

                    try
                    {
                        _scheduler.QueueTask(
                            new UserTask(
                                () =>
                                {
                                    var data = new EventData(sender, e);
                                    if (_command.CanExecute(data)) _command.Execute(data);
                                },
                                _sync));
                    }
                    catch (ArgumentException)
                    {
                        _isDirty = true;
                    }
                }