public static void SetFlowCombom(ResultWorkflows getResult, ComboBox WorkflowCombo) { Dict.Clear(); foreach (Workflow info in getResult.data) { try { Dict.Add(info.title, info.id); WorkflowCombo.Items.Add(info.title); } catch (Exception e) { continue; } } }
public void GetData() { try { WorkflowCombo.Items.Clear(); ResultWorkflows getResult = PageCommon.GetWorkflows(MainWindow.main.Token); if (getResult == null || getResult.successful == false) { return; } PageCommon.SetFlowCombom(getResult, WorkflowCombo); } catch (Exception ex) { return; } }
private void DownloadMenuItem_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(Token.token)) { MessageBox.Show("请登录后再试!"); return; } Token tempToken = new Token(); tempToken.token = Token.token;//"a08074ead1a8f3b4ffa42895b28d02938f3aacbf"; ResultWorkflows getResult = GetWorkflows(Token); if (getResult == null || getResult.successful == false) { return; } DownloadVoiceDialog dlg = new DownloadVoiceDialog(); dlg.Data = getResult; dlg.Token = tempToken; dlg.ShowDialog(); }
private void TestPageStripMenuItem_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(Token.token)) { MessageBox.Show("请登录后再试!"); return; } try { TestPageDialog dlg = new TestPageDialog(); ResultWorkflows getResult = GetWorkflows(Token); if (getResult == null || getResult.successful == false) { return; } dlg.Data = getResult; dlg.Token = this.Token; dlg.ShowDialog(); } catch (Exception ex) { return; } }