Esempio n. 1
0
 public MainForm()
 {
     m_business = new MainFormBusiness();
     m_settingDialog = new Setting();
     BusinessLogic.Config.GetInstance().ReadConfiguration();
     m_currentProject        = new ProjectDisplay();
     InitializeComponent();
 }
Esempio n. 2
0
 private void deselectProjects(object sender, EventArgs e)
 {
     foreach (Control ctrl in m_projectList.Controls)
     {
         ProjectDisplay prj = ctrl as ProjectDisplay;
         prj.deselect(null, EventArgs.Empty);
     }
 }
Esempio n. 3
0
 private void selectAllProjects(object sender, EventArgs e)
 {
     foreach (Control ctrl in m_projectList.Controls)
     {
         ProjectDisplay prj = ctrl as ProjectDisplay;
         prj.select();
     }
 }
Esempio n. 4
0
 private void m_btnCreate_Click(object sender, EventArgs e)
 {
     m_createdObject = new ProjectDisplay();
     m_createdObject.SetGroupName(m_txtboxGroupName.Text);
     m_createdObject.SetProgess(0);
     m_createdObject.SetProjectName(m_txtboxProjectName.Text);
     m_createdObject.UpdateLastCheckedTime();
     this.Close();
 }
Esempio n. 5
0
 private void m_btnCreate_Click(object sender, EventArgs e)
 {
     m_createdObject = new ProjectDisplay();
     m_createdObject.SetGroupName(m_txtboxGroupName.Text);
     m_createdObject.SetProgess(0);
     m_createdObject.SetProjectName(m_txtboxProjectName.Text);
     m_createdObject.UpdateLastCheckedTime();
     this.Close();
 }
 public void SeachForProjects(string name)
 {
     m_projectList.Controls.Clear();
     if (name.Length == 0)
         return;
     List<DTO_Project> projectInfoList = m_business.GetProjectByName(name);
     foreach (DTO_Project project in projectInfoList)
     {
         ProjectDisplay prj = new ProjectDisplay();
         /// TODO: change ProjectID to ProjectName.
         prj.SetProjectName(project.ProjectName);
         // seach for other info and set it here.
         prj.SetGroupName(project.GroupName);
         m_projectList.Controls.Add(prj);
     }
 }
Esempio n. 7
0
        private void deleteSelectedProjects(object sender, EventArgs e)
        {
            int prevCount = m_projectList.Controls.Count;

            for (int i = 0; i < m_projectList.Controls.Count; ++i)
            {
                ProjectDisplay prj = m_projectList.Controls[i] as ProjectDisplay;
                if (prj.isSelected())
                {
                    m_projectList.Controls.Remove(prj);
                    i--;
                }
            }
            int newCount = m_projectList.Controls.Count;

            m_projectList.HorizontalScroll.Maximum *= (int)((double)newCount / (double)prevCount);
        }
Esempio n. 8
0
        public void SeachForProjects(string name)
        {
            m_projectList.Controls.Clear();
            if (name.Length == 0)
            {
                return;
            }
            List <DTO_Project> projectInfoList = m_business.GetProjectByName(name);

            foreach (DTO_Project project in projectInfoList)
            {
                ProjectDisplay prj = new ProjectDisplay();
                /// TODO: change ProjectID to ProjectName.
                prj.SetProjectName(project.ProjectName);
                // seach for other info and set it here.
                prj.SetGroupName(project.GroupName);
                m_projectList.Controls.Add(prj);
            }
        }
Esempio n. 9
0
 public void AddProject(ProjectDisplay prjdp)
 {
     m_projectList.Controls.Add(prjdp);
     prjdp.Dock = DockStyle.Top;
 }
Esempio n. 10
0
 private void m_btnCancel_Click(object sender, EventArgs e)
 {
     m_createdObject = null;
     this.Close();
 }
Esempio n. 11
0
 private void m_btnCancel_Click(object sender, EventArgs e)
 {
     m_createdObject = null;
     this.Close();
 }
 public void AddProject(ProjectDisplay prjdp)
 {
     m_projectList.Controls.Add(prjdp);
     prjdp.Dock = DockStyle.Top;
 }