Ejemplo n.º 1
0
        public override void AddedToContainer()
        {
            base.AddedToContainer();

            var builder = new FieldBuilder();

            builder.BuildSessionStart(this);

            builder.AddResizableButtonField("Edit ANN", delegate(object sender)
            {
                EditANNForm.ShowDialogue(Parent, creature.Brain);
            }, FieldBuilder.ResizableButtonOrientation.FillWidth);
            builder.AddResizableButtonField("Edit ANN-Chromosome", delegate(object sender)
            {
                EditANNChromosomeForm.ShowDialogue(Parent, creature.CreatureGenome.NetChromosome);
            }, FieldBuilder.ResizableButtonOrientation.FillWidth);
            builder.AddResizableButtonField("Edit Genome", delegate(object sender)
            {
            }, FieldBuilder.ResizableButtonOrientation.FillWidth);
            builder.AddResizableButtonField("Edit Body", delegate(object sender)
            {
            }, FieldBuilder.ResizableButtonOrientation.FillWidth);

            builder.BuildSessionEnd();

            X = (Parent.Width / 2) - (Width / 2);
            Y = (Parent.Height / 2) - (Height / 2);

            CanResizeFormVertically = false;
        }
Ejemplo n.º 2
0
        public static EditANNForm ShowDialogue(Window window, INeuralNet _ann, CloseEvent closeFunction = null, string category = null, ISkinFile file = null)
        {
            var form = new EditANNForm();

            form.Initialize(_ann, closeFunction, "Edit ANN", true, true, category, file);
            form.Show(window);

            return(form);
        }