コード例 #1
0
        private void Command_NewText(object sender, ExecutedRoutedEventArgs e)
        {
            var newTextWindow = new NewTextWindow();

            newTextWindow.ShowDialog();

            //if(newTextWindow.NewText != null)
            //{
            //    AddComponentToCanvas(newTextWindow.NewText);
            //}
        }
コード例 #2
0
        private void Command_EditComponent(object sender, ExecutedRoutedEventArgs e)
        {
            var currentComponent = GetCanvasComponentByName(MainVM.CurrentComponentName);

            if (currentComponent is Label lbl)
            {
                var result = new NewTextWindow(lbl).ShowDialog();
            }
            else if (currentComponent is BarcodeControl bcc)
            {
                var result = new NewBarcodeWindow(bcc).ShowDialog();
            }
            else if (currentComponent is Image img)
            {
                var result = new NewImageWindow().ShowDialog();
            }
        }