Exemple #1
0
        public IDE()
        {
            loadDummyObjects();

            InitializeComponent();
            this.DataContext             = _myVM = new IDEVM();
            _myVM.ShowNewDocumentDialog += _myVM_ShowNewDocumentDialog;
            _myVM.ShowResourcesDialog   += _myVM_ShowResourcesDialog;
        }
Exemple #2
0
        private void _myVM_ShowNewDocumentDialog(IDEVM sender, DOM.DocumentVM document)
        {
            NewDocument newDocDialog = new NewDocument()
            {
                DataContext = document
            };

            newDocDialog.Closed += (object sender1, EventArgs e1) =>
            {
                if (newDocDialog.DialogResult.GetValueOrDefault(false))
                {
                    _myVM.CreateDocument(document);
                }
            };
            newDocDialog.Show();
        }