Ejemplo n.º 1
0
        private void HandleSettingsError(object sender, SettingsErrorEventArgs e)
        {
            var activeContent = _dockManager.ActiveContent as MainOutputWindow;

            if (activeContent != null)
            {
                var outputWindow = _outputWindows.FirstOrDefault(x => { return(x.Uid == activeContent.RootModel.Uid); });

                if (outputWindow != null)
                {
                    outputWindow.RootModel.PushMessageToConveyor(new ErrorMessage(e.Message));
                }
            }
            else if (_outputWindows.Count > 0)
            {
                _outputWindows.First().RootModel.PushMessageToConveyor(new ErrorMessage(e.Message));
            }
        }
Ejemplo n.º 2
0
 public void ConstructorTest()
 {
     AssertHelper.ExpectedException <ArgumentNullException>(() => new SettingsErrorEventArgs(null !, SettingsServiceAction.Open, "file"));
     var settings = new SettingsErrorEventArgs(new InvalidOperationException("Test"), SettingsServiceAction.Open, null);
 }
Ejemplo n.º 3
0
 /// <summary>Raise the ErrorOccurred event.</summary>
 /// <param name="e">The error event args.</param>
 public void RaiseErrorOccurred(SettingsErrorEventArgs e)
 {
     ErrorOccurred?.Invoke(this, e);
 }
Ejemplo n.º 4
0
 private void OnErrorOccurred(SettingsErrorEventArgs e)
 {
     ErrorOccurred?.Invoke(this, e);
 }