Example #1
0
        public MainWindow()
        {
            InitializeComponent();

            // load Jared's Procreate software
            ControlPoint = new ControlPoint();

            // bind the level data to the application
            LevelElements.ItemsSource = ControlPoint.Level.Elements;
            // set the algorithm type values for the combo box
            MethodAlgorithm.ItemsSource = ControlPoint.Algorithms;

            // default focused method
            // bind the method name data to the application
            // default focused method and game object
            FocusedMethod          = ControlPoint.MethodFactory.CreateMethod();
            MethodName.DataContext = FocusedMethod;
            FocusedGameObject      = ControlPoint.GameObjectFactory.CreateGameObject();
            // bind game object attribute data to the application
            GameObjectName.DataContext       = FocusedGameObject;
            GameObjectType.DataContext       = FocusedGameObject;
            GameObjectImagePath.DataContext  = FocusedGameObject;
            GameObjectAppearRate.DataContext = FocusedGameObject;
            GameObjectPreview.DataContext    = FocusedGameObject;
            // bind the generator's lists
            GeneratorMethodList.ItemsSource = ControlPoint.Generator.Methods;
        }
Example #2
0
 private void AddMethodToGenerator_Click(object sender, RoutedEventArgs e)
 {
     // add the method to the generator
     ControlPoint.Generator.AddMethod(FocusedMethod);
     // reset
     FocusedMethod          = ControlPoint.MethodFactory.CreateMethod(FocusedMethod);
     MethodName.DataContext = FocusedMethod;
 }
Example #3
0
 private void NewMethodButton_Click(object sender, RoutedEventArgs e)
 {
     // create a new method
     FocusedMethod          = ControlPoint.MethodFactory.CreateMethod();
     MethodName.DataContext = FocusedMethod;
     MethodAlgorithm.Text   = ControlPoint.Algorithms[(int)FocusedMethod.AlgorithmType];
     // update GUI labels for the method's parameters
     UpdateAlgorithmParameterLabels();
 }