예제 #1
0
 private void AsynchronousSearch()
 {
     while (true)
     {
         if (NewNumber != OldNumber)
         {
             if (SearchTaskTextBox.Text.Length != 0)
             {
                 ResultForSearchLabel.Text = BuisinessLogicClass.NormalizeText(BuisinessLogicClass.FindIssue(Convert.ToInt32(SearchTaskTextBox.Text)), 30);
             }
             if (ResultForSearchLabel.Text.Length > 0)
             {
                 AcceptButton.Enabled = true;
             }
             else
             {
                 AcceptButton.Enabled = false;
             }
             OldNumber           = NewNumber;
             pictureBox1.Visible = false;
         }
         else
         {
             Thread.Sleep(100);
         }
     }
 }
예제 #2
0
        private void SetIssueList()
        {
            GridContents   = BuisinessLogicClass.GetAllIssues();
            AmountOfIssues = GridContents.Length;
            Issue_list_GridView.Rows.Clear();
            DataStructureClass.DataStructure GridLine = new DataStructureClass.DataStructure();
            for (int x = 0; x < AmountOfIssues; x++)  //adding rows into GridView
            {
                GridLine = GridContents[x];
                string startDate = "";
                string dueDate   = "";
                if (GridLine._startDateCh)
                {
                    startDate = BuisinessLogicClass.ConvertDate(GridLine._startDate);
                }
                if (GridLine._dueDateCh)
                {
                    dueDate = BuisinessLogicClass.ConvertDate(GridLine._dueDate);
                }

                string donePercent = Convert.ToString(GridLine._percentDone + "%");

                Issue_list_GridView.Rows.Add(GridLine._id, GridLine._subjectName, startDate, dueDate, donePercent);

                if (GridLine._description != null)
                {
                    Issue_list_GridView.Rows[x].Cells[1].ToolTipText = GridLine._subjectName + "\r\n" + BuisinessLogicClass.NormalizeText(GridLine._description, 120);
                }
                Issue_list_GridView.Rows[x].Cells[0].ToolTipText = "double click opens the edit window.";
            }
            try { Issue_list_GridView.Rows[0].Cells[0].Selected = true; } catch { }
            Selection_changed();
        }