private void Button_Click(object sender, RoutedEventArgs e) { M2BClean mclean = new M2BClean(_IsParamCmd); byte[] sendcmd = mclean.EnCode(); comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length); }
private void clean_start(object sender, RoutedEventArgs e) { Button obj = sender as Button; if (obj != null) { byte action = byte.Parse(obj.Tag.ToString()); lock (this) { M2BClean cleancmd = new M2BClean(action); byte[] sendcmd = cleancmd.EnCode(); comunication.Getinstance().AddtoSend(sendcmd, (byte)sendcmd.Length); } } }