示例#1
0
        public ScriptSelector()
        {
            DataContext = _vm = new ScriptSelectorViewModel();
            InitializeComponent();

            ComponentsStore.Add(this);
        }
示例#2
0
        private void Add(object?sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(_vm.Name))
            {
                return;
            }

            ScriptsList.Instance.Add(_vm.Name);

            var editor = ComponentsStore.Get <ScriptEditor>();

            editor?.Load(_vm.Name);
        }