Esempio n. 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog open = new Microsoft.Win32.OpenFileDialog();
            var r = open.ShowDialog();

            if (r.HasValue && r.Value)
            {
                FileDocumentEngine _fvm = new FileDocumentEngine();

                _fvm.SetdData(this.document, open.FileName);

                this.filedocument.DataContext = _fvm;
            }
        }
Esempio n. 2
0
        private void DocumentPage_Loaded(object sender, RoutedEventArgs e)
        {
            BindDocumentEngine _vm = new BindDocumentEngine();

            string path = this.GetPath("ProtocolDocument.ini");

            string title = "四川省家庭医生签约服务协议";

            _vm.SetData(this.document, DocumentModel.CreateTestDemo(), path, title);

            this.document.DataContext = _vm;


            FileDocumentEngine _fvm = new FileDocumentEngine();

            _fvm.SetdData(this.document, path);

            this.filedocument.DataContext = _fvm;
        }