Exemplo n.º 1
0
        private static void ShowEngineOptions(EngineOptionsMessage message)
        {
            try
            {
                if (message.EngineOptionsVM.Options.Count == 0)
                {
                    throw new Exception("This engine exposes no options to set.");
                }

                EngineOptionsWindow window = new EngineOptionsWindow
                {
                    DataContext = message.EngineOptionsVM,
                    Owner       = Application.Current.MainWindow,
                };
                message.EngineOptionsVM.RequestClose += (sender, e) =>
                {
                    window.Close();
                };
                window.ShowDialog();
                message.Process();
            }
            catch (Exception ex)
            {
                ExceptionUtils.HandleException(ex);
            }
        }
Exemplo n.º 2
0
        private static void ShowEngineOptions(EngineOptionsMessage message)
        {
            EngineOptionsWindow window = new EngineOptionsWindow
            {
                DataContext = message.EngineOptionsVM
            };

            message.EngineOptionsVM.RequestClose += (sender, e) =>
            {
                window.Close();
            };
            window.ShowDialog();
            message.Process();
        }