Beispiel #1
0
        private void selectWorkspace(Toggl.TogglGenericView item)
        {
            if (this.selectedWorkspaceId != item.ID && !this.isInNewClientMode)
            {
                this.selectClient(new Toggl.TogglGenericView());
            }

            this.selectedWorkspaceId   = item.ID;
            this.selectedWorkspaceName = item.Name;
            this.workspaceTextBox.SetText(item.Name);
        }
 public static ulong SelectedItemID(ComboBox combobox)
 {
     for (int i = 0; i < combobox.Items.Count; i++)
     {
         Toggl.TogglGenericView item = (Toggl.TogglGenericView)combobox.Items[i];
         if (item.Name == combobox.Text)
         {
             return(item.ID);
         }
     }
     return(0);
 }
        private void selectClient(Toggl.TogglGenericView item)
        {
            this.selectedClientGUID = item.GUID;
            this.selectedClientId   = item.ID;
            this.selectedClientName = item.Name;
            this.clientTextBox.SetText(item.Name);

            if (item.WID != 0)
            {
                this.selectedWorkspaceId   = item.WID;
                this.selectedWorkspaceName = this.workspaces.First(ws => ws.ID == item.WID).Name;
                this.workspaceTextBox.SetText(this.selectedWorkspaceName);
            }
        }