示例#1
0
        public void SaveRO(ResearchOutput RO)
        {
            

            RO.CaptureDraft();

            SaveFileDialog save = new SaveFileDialog();
            save.DefaultExt = "rod";
            save.AddExtension = true;
            save.FileName = RO.Title;
            save.OverwritePrompt = true;
            save.Title = "Save Research Output";
            save.ValidateNames = true;
            this.IsEnabled = false;
            save.Filter = "Research Output Drafts (.rod)|*.rod";
            try
            {

                if (save.ShowDialog().Value)
                {
                    Serializer.Save(save.FileName,RO);
                    
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("Saving Error: Please remove illegal characters from the title.", "Error");

            }
            finally
            {
                this.IsEnabled = true;
            }
        }
示例#2
0
        public void addExample()
        {
            
            
            curDoc = new JournalArticle("Example Article", new RichTextBox(), curUser);
            curDoc.PushRTB(rtbDocument);
            curDoc.CaptureDraft();

            OutputDrafts.Add(curDoc);
            ListRODrafts();
            ShowRich();
            setRODataSource();
        }