Esempio n. 1
0
        private void BuildSearchToolWindow()
        {
            if (toolPickerUC == null)
            {
                toolPickerUC  = new searchTool();
                toolPicker_VM = toolPickerUC.DataContext as searchTool_ModelView;
            }

            toolPickerWindow = new Window()
            {
                Content       = toolPickerUC,
                Title         = "Gép választó",
                SizeToContent = SizeToContent.WidthAndHeight
            };

            toolPicker_VM.ToolSelected += (s, a) =>
            {
                ToolRepresentation tool = s as ToolRepresentation;
                tool.ValidationRules   = new ToolValidationRules();
                viewModel.selectedTool = tool;
                toolPickerWindow.Hide();
            };
        }
Esempio n. 2
0
        private void BuildSearchToolWindow()
        {
            if (toolPickerUC == null)
            {
                toolPickerUC = new searchTool();
                toolPicker_VM = toolPickerUC.DataContext as searchTool_ModelView;
            }

            toolPickerWindow = new Window()
            {
                Content = toolPickerUC,
                Title = "Gép választó",
                SizeToContent = SizeToContent.WidthAndHeight
            };

            toolPicker_VM.ToolSelected += (s, a) =>
            {
                ToolRepresentation tool = s as ToolRepresentation;
                tool.ValidationRules = new ToolValidationRules();
                viewModel.selectedTool = tool;
                toolPickerWindow.Hide();
            };
        }