void DisplayTimeEntryList(bool open)
 {
     if (InvokeRequired)
     {
         Invoke((MethodInvoker) delegate { DisplayTimeEntryList(open); });
         return;
     }
     if (open)
     {
         Controls.Remove(loginViewController);
         Controls.Remove(timeEntryEditViewController);
         Controls.Add(timeEntryListViewController);
         timeEntryListViewController.SetAcceptButton(this);
     }
 }
예제 #2
0
 void DisplayTimeEntryList(bool open, List <KopsikApi.KopsikTimeEntryViewItem> list)
 {
     if (InvokeRequired)
     {
         Invoke((MethodInvoker) delegate { DisplayTimeEntryList(open, list); });
         return;
     }
     if (open)
     {
         Controls.Remove(loginViewController);
         Controls.Remove(timeEntryEditViewController);
         Controls.Add(timeEntryListViewController);
         timeEntryListViewController.SetAcceptButton(this);
         timeEntryListViewController.DrawEntriesList(list);
     }
 }
예제 #3
0
 void OnTimeEntryList(bool open, List <Toggl.TimeEntry> list)
 {
     if (InvokeRequired)
     {
         Invoke((MethodInvoker) delegate { OnTimeEntryList(open, list); });
         return;
     }
     if (open)
     {
         troubleBox.Visible    = false;
         contentPanel.Location = defaultContentPosition;
         contentPanel.Controls.Remove(loginViewController);
         MinimumSize = new Size(230, 86);
         contentPanel.Controls.Add(timeEntryListViewController);
         timeEntryListViewController.SetAcceptButton(this);
         if (editForm.Visible)
         {
             editForm.Hide();
             editForm.GUID = null;
         }
     }
 }
예제 #4
0
        void OnTimeEntryList(bool open, List <Toggl.TogglTimeEntryView> list)
        {
            if (this.TryBeginInvoke(this.OnTimeEntryList, open, list))
            {
                return;
            }

            if (open)
            {
                troubleBox.Visible    = false;
                contentPanel.Location = defaultContentPosition;
                contentPanel.Controls.Remove(loginViewController);
                setCorrectMinimumSize();
                contentPanel.Controls.Add(timeEntryListViewController);
                timeEntryListViewController.SetAcceptButton(this);
                if (editForm.Visible)
                {
                    editForm.Hide();
                    editForm.GUID = null;
                    timeEntryListViewController.DisableHighlight();
                }
            }
        }