///////////////////////////////////////////////////////////////////////////// public bool Open(string filename) { Close(); if (m_Document != null) return false; bool fakeUserData = (filename == null); if (fakeUserData) { List<Account> accounts = WebResources.Accounts; if (accounts == null) return false; m_Document = new Document(this); // Load the account table for (int i = 0; i < accounts.Count; i++) m_Document.AddAccount(accounts[i]); } else m_Document = Document.Open(filename); m_Document.DocHolder = this; JulianDay lStartDate = new JulianDay(1, 1, 1955); JulianDay lEndDate = new JulianDay(12, 31, 1955 + 120); JulianDay lDate = DateTime.Today.ToJulian(); Run(lStartDate, lEndDate, lDate); SendChangeEvent(); return true; }
///////////////////////////////////////////////////////////////////////////// private void Draw(Document document) { if (document == null) return; List<Account> accounts = document.AccountList; }
///////////////////////////////////////////////////////////////////////////// // Method used to catch the document's ChangeEvent public abstract void DocumentChange(Document document, EventArgs e);
///////////////////////////////////////////////////////////////////////////// // Method used to catch the document's CloseEvent public abstract void DocumentClose(Document document, EventArgs e);
///////////////////////////////////////////////////////////////////////////// public void Close() { if (m_Document != null) SendCloseEvent(); m_Document = null; }
///////////////////////////////////////////////////////////////////////////// public DocumentHolder() { m_Document = null; }
///////////////////////////////////////////////////////////////////////////// public bool Run(Document document, JulianDay lDate, JulianDay lParentStartDate, JulianDay lParentEndDate) { return false; }
public override void DocumentChange(Document document, EventArgs e) { }
public override void DocumentClose(Document document, EventArgs e) { }
///////////////////////////////////////////////////////////////////////////// public bool Run(Document document, JulianDay lDate) { return false; }
///////////////////////////////////////////////////////////////////////////// // Method used to catch the document's CloseEvent public override void DocumentClose(Document document, EventArgs e) { //j m_AccountsTextBlock.Text = ""; }