Ejemplo n.º 1
0
        private void CreateDesign_Click(object sender, RoutedEventArgs e)
        {
            DesignGrid.Visibility = System.Windows.Visibility.Collapsed;
            Guid GenID = Guid.NewGuid();

            AMAActionableObjects.FixedDesignCollection.AddDesign(GenID, tboxDesignDescription.Text);

            clsXmlInteraction cxi = new clsXmlInteraction(GenID);

            cxi.createDesignTag(tboxDesignDescription.Text);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Used to load designed Template - need to provide ID of the template
 /// </summary>
 private void loadDesignedTemplate()
 {
     xmlInteractionClass = new clsXmlInteraction(templateId);
     xmlInteractionClass.loadDesignedTemplate(listViewDesignBgClass);
     objectCollection = new clsObjects();
     objectCollection = xmlInteractionClass.objectCollection;
     foreach (clsObject cO in objectCollection)
     {
         Grid grid = (Grid)cO.controlObject;
         listViewDesign.Items.Add(grid);
     }
 }
Ejemplo n.º 3
0
        private void populateCollection()
        {
            clearClassCollection();
            foreach (Grid g in listViewDesign.Items)
            {
                control = new clsControl();
                switch (g.Name)
                {
                case "TextBlock":
                    textBlockClass = (clsTextblock)g.DataContext;
                    textBlockCollection.addTextblock(textBlockClass);
                    control.id   = textBlockClass.propId;
                    control.type = textBlockClass.propType;
                    break;

                case "Image":
                    imageClass = (clsImage)g.DataContext;
                    imageCollection.addImage(imageClass);
                    control.id   = imageClass.propId;
                    control.type = imageClass.propType;
                    break;

                case "Button":
                    buttonClass = (clsButton)g.DataContext;
                    buttonCollection.addButton(buttonClass);
                    control.id   = buttonClass.propId;
                    control.type = buttonClass.propType;
                    break;

                case "TextBox":
                    textBoxClass = (clsTextBox)g.DataContext;
                    textBoxCollection.addTextBox(textBoxClass);
                    control.id   = textBoxClass.propId;
                    control.type = textBoxClass.propType;
                    break;

                case "ComboBox":
                    comboboxClass = (clsComboBox)g.DataContext;
                    comboboxCollection.addComboBox(comboboxClass);
                    control.id   = comboboxClass.propId;
                    control.type = comboboxClass.propType;
                    break;

                case "DatePicker":
                    datePickerClass = (clsDatePicker)g.DataContext;
                    datePickerCollection.addDatePicker(datePickerClass);
                    control.id   = datePickerClass.propId;
                    control.type = datePickerClass.propType;
                    break;
                }
                controlCollection.addControl(control.id, control.type);
            }
            xmlInteractionClass = new clsXmlInteraction(templateId,
                                                        listViewDesignBgClass,
                                                        controlCollection,
                                                        textBlockCollection,
                                                        imageCollection,
                                                        buttonCollection,
                                                        textBoxCollection,
                                                        comboboxCollection,
                                                        datePickerCollection);
        }