private void EditBarcodeSetting(object sender, RoutedEventArgs e)
        {
            Button         button         = e.Source as Button;
            BarcodeSetting barcodeSetting = button.CommandParameter as BarcodeSetting;

            EditBarcodeSettingWindow editBarcodeSettingWindow = new EditBarcodeSettingWindow(barcodeSetting);

            if (editBarcodeSettingWindow.ShowDialog() == true)
            {
                viewModel.EditBarcodeSetting(editBarcodeSettingWindow.BarcodeSetting);
            }
        }
Exemple #2
0
        private void EditBarcodeSettingFromList(object sender, MouseButtonEventArgs e)
        {
            ListBox        list           = e.Source as ListBox;
            BarcodeSetting barcodeSetting = list.SelectedItem as BarcodeSetting;

            if (barcodeSetting != null)
            {
                BarcodeSetting           editableBarcodeSetting   = new BarcodeSetting(barcodeSetting.Id, barcodeSetting.Name, barcodeSetting.Value, barcodeSetting.Barcode, barcodeSetting.IsFixPrice);
                EditBarcodeSettingWindow editBarcodeSettingWindow = new EditBarcodeSettingWindow(editableBarcodeSetting);
                if (editBarcodeSettingWindow.ShowDialog() == true)
                {
                    viewModel.EditBarcodeSetting(editBarcodeSettingWindow.BarcodeSetting);
                }
            }
        }