Esempio n. 1
0
        public MaterialScanViewModel(WindowMaterialScan _window, string barCode = "")
        {
            WindowHelper.IsOpenMaterialScanWindow = true;

            LoadData();

            if (!string.IsNullOrEmpty(barCode))
            {
                IsShowButton = "Hidden";
                BarCodeScan(barCode);
            }

            BarCodeScanCommand = new DelegateCommand(obj => BarCodeScan(obj));
            ExitCommand        = new DelegateCommand(new Action <object>(obj => { _window.Close(); }));
            OperateCommand     = new DelegateCommand(new Action <object>(obj => { _window.OperateType = 1; _window.Close(); }));
        }
 public void Exit(object obj)
 {
     window.Close();
 }