internal void OnReceivedCommand(Common.Command cmd) { string c = cmd.Content.Trim('"'); string[] p = c.Split(';'); string str = Convert.ToString(int.Parse(p[3]), 2); if (str.Length > 24) { return; } int index = 24 - str.Length; for (int i = 0; i < index; i++) { str = "0" + str; } int datalen = str.Length; string[] data = new string[datalen]; for (int i = 0; i < datalen; i++) { data[i] = str.Substring(datalen - 1 - i, 1); } SearchBitStatus(data, p); }
public PlantViewModel(int id) { Setup(id); ViewScheduleCommand = new Common.Command(ViewSchedule, CanExecute); ViewProgressCommand = new Common.Command(ViewProgress, CanExecute); EditPlantCommand = new Common.Command(EditPlant, CanExecute); CreateProgressReportCommand = new Common.Command(CreateProgressReport, CanExecute); }