|
#region Using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.IO;
using SmartInstitute.Automation.Commands.Framework;
using SmartInstitute.Client.Automation.Commands.Students;
#endregion
namespace SmartInstitute.Client.Automation.Documents.MiscViews
{
public partial class WelcomeDocumentUI : DocumentUIBase
{
public WelcomeDocumentUI()
{
InitializeComponent();
}
private void WelcomeViewUI_Load(object sender, EventArgs e)
{
if (!base.DesignMode)
{
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "welcome/welcome.htm");
//browser.Navigate(path);
this.LoadData();
}
}
private void LoadData()
{
// 1. Start the progress bar
this.progressPanel.Visible = true;
this.progressPanel.Start();
// 2. Start the background thread
this.worker.RunWorkerAsync();
}
private void worker_DoWork(object sender, DoWorkEventArgs e)
{
// This method will run on a thread other than the UI thread.
// Be sure not to manipulate any Windows Forms controls created
// on the UI thread from this method.
// 2. Load student list
ICommand studentListCommand = new ReloadStudentListCommand();
studentListCommand.Execute();
}
private void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
// 1. Refresh the student list drop down on the main form
_Application.Students.Refresh();
// 2. stop the progrss
this.progressPanel.Stop();
this.progressPanel.Visible = false;
// 3. Show that the app is ready to run now
statusLabel.Visible = true;
}
private void noticeLabel_Click(object sender, EventArgs e)
{
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here