private void Run() { if (MathPerm.isValidMN_giaDywnymo(this.m, this.n)) { sw = System.Diagnostics.Stopwatch.StartNew(); System.Func <int, int, int[][]> f = new Func <int, int, int[][]>(MathPerm.dywnymo); f.BeginInvoke(this.m, this.n, new AsyncCallback(this.telosYpologismos), f); } else { MessageBox.Show("invalid input"); } }
public static bool isValidMN_giaDywnymo(int m, int n) { if (m < 1 || n < 1 || m > n) { return(false); } ulong posa; try { posa = MathPerm.dywnymo_posa(m, n); return(true); } catch (ArgumentOutOfRangeException) { return(false); } // return (m <= n) && (posa <= MEXRI_TOSA_APOT); }
public void checkValidMN(int m, int n) { this.btnGo.Enabled = MathPerm.isValidMN_giaDywnymo(m, n); }