public TypeSection(ObservableCollection <Type> types, onAddType addTypeCallback, onEditType editTypeCallback, onRemoveType removeTypeCallback)
 {
     InitializeComponent();
     EnlargenedTypes     = new ObservableCollection <int>();
     Root.DataContext    = this;
     TypeClickedCallback = new onTypeClicked(typeClicked);
     Types              = types;
     AddTypeCallback    = addTypeCallback;
     EditTypeCallback   = editTypeCallback;
     RemoveTypeCallback = removeTypeCallback;
     TextCompositionManager.AddTextInputHandler(this,
                                                new TextCompositionEventHandler(OnTextComposition));
 }
Ejemplo n.º 2
0
        public EditType(Type typeToEdit, onEditType editTypeCallback)
        {
            InitializeComponent();
            this.NewType             = new Type();
            this.newType.Id          = typeToEdit.Id;
            this.newType.Name        = typeToEdit.Name;
            this.NewType.Description = typeToEdit.Description;
            this.NewType.Icon        = typeToEdit.Icon;

            Root.DataContext = this;
            EditTypeCallback = editTypeCallback;

            TextCompositionManager.AddTextInputHandler(this,
                                                       new TextCompositionEventHandler(OnTextComposition));
        }