예제 #1
0
        private void btnNewProject_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (ThisDocument != null && ThisDocument.FileName != null)
            {
                // save previous file
            }

            ThisDocument = new Model.Document();
            ThisDocument.InitNewFile();

            // ... add tabs , create tree
        }
예제 #2
0
        private void btnOpenProject_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (ThisDocument != null && ThisDocument.FileName != null)
            {
                // save previous file
            }

            using (var dlg = new XtraOpenFileDialog()
            {
                Filter = Model.Document.FILTER
            }) {
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    ThisDocument = new Model.Document();
                    ThisDocument.LoadDocument(dlg.FileName);
                    // ... add tabs , create tree
                }
            }

            //var tab = AddEditor("Test of topic");
            //tabPane.SelectedPage = tab;
        }