Example #1
0
        private void OpenMacroWindow(object sender, RoutedEventArgs e)
        {
            var viewModel   = new MacroViewModel(_elvenar.Symbols, _elvenar.Macros);
            var macroWindow = new MacroWindow(viewModel);

            if (macroWindow.ShowDialog() != true)
            {
                return;
            }

            _elvenar.Macros = viewModel.Macros.ToArray();
            Macros          = new ObservableCollection <Macro>(_elvenar.Macros ?? new Macro[0]);
            SetModified(true);
        }
Example #2
0
 public MacroWindow(MacroViewModel viewModel)
 {
     InitializeComponent();
     _viewModel  = viewModel;
     DataContext = viewModel;
 }