Exemple #1
0
        public ResearchOutput LoadRO()
        {

            //get the address to load from 
            OpenFileDialog open = new OpenFileDialog();
            open.DefaultExt = "rod"; // Research Output Draft
            open.AddExtension = true;
            open.FileName = "";
            open.Title = "Open Research Output";
            open.ValidateNames = true;
            this.IsEnabled = false;
            open.Filter = "Research Output Drafts (.rod)|*.rod";
            try
            {
                if (open.ShowDialog().Value)
                {
                    ResearchOutput cur = Serializer.Load(open.FileName);
                    curDoc = cur;
                    curDoc.PushRTB(this.rtbDocument);
                    curDoc.DisplayDraft();
                    OutputDrafts.Add(curDoc);
                    ListRODrafts();
                    this.Title = "Research Information System: " + curDoc.Title;
                    ShowRich();
                    setRODataSource();
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("Loading Error: Save file corrupted or outdated.", "Error");
            }
            finally
            {
                this.IsEnabled = true;
            }

            return null;
        }
Exemple #2
0
        public void addExample()
        {
            
            
            curDoc = new JournalArticle("Example Article", new RichTextBox(), curUser);
            curDoc.PushRTB(rtbDocument);
            curDoc.CaptureDraft();

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