void JD_OnGaCodeOk(GoogleAuthSettings GASettings) { EditGa GA = new EditGa(GASettings.flags); DialogResult tmp = GA.ShowDialog(); if (tmp == System.Windows.Forms.DialogResult.Yes) { JD.DoneEditGa(GA.code, GA.flags); } else if (tmp == System.Windows.Forms.DialogResult.No) { JD.DisableGa(GA.code); } else { } }
private void button1_Click(object sender, EventArgs e) { if (JD.ga.active) { EditGa tmpGa = new EditGa(JD.ga.flags); DialogResult tmp = tmpGa.ShowDialog(); if (tmp == System.Windows.Forms.DialogResult.Yes) //if ok { JD.DoneEditGa(tmpGa.code, tmpGa.flags); } else if (tmp == DialogResult.No) //if disable { JD.DisableGa(tmpGa.code); } else // if cancel { } } else { JD.EditGa(); } }