Ejemplo n.º 1
0
        protected List <GemmingTemplate> MakeGemmingTemplatesFor(int[] red, int[] yellow, int[] blue, int[] prismatic, int[] meta, int enabler)
        {
            List <GemmingTemplate> gtRes = new List <GemmingTemplate>();

            for (int x = 0; x < gemmingGroups.Length; x++)
            {
                GemmingTemplate gt = new GemmingTemplate();
                gt.Model = gemmingClass;
                gt.Group = gemmingGroups[x];

                gt.RedId       = GetRightGem(red, x);
                gt.YellowId    = GetRightGem(yellow, x);
                gt.BlueId      = GetRightGem(blue, x);
                gt.PrismaticId = prismatic[x];          // Always use the suggested gem in prismatic, as you would use JC gems in proper sockets
                gt.MetaId      = meta[0];
                gt.Enabled     = (enabler == x);

                if (gt.RedId > 0 && gt.YellowId > 0 && gt.BlueId > 0 && gt.PrismaticId > 0 && gt.MetaId > 0)
                {
                    gtRes.Add(gt);
                }
            }

            return(gtRes);
        }
        public GemmingTemplateItem(GemmingTemplates parent, GemmingTemplate template)
        {
            this.parent = parent;
            this.template = template;
            DataContext = template;
            isCustom = template.Group == "Custom";
            InitializeComponent();

            template.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(template_PropertyChanged);

            if (isCustom) DeleteButton.Visibility = Visibility.Visible;
            else DeleteButton.Visibility = Visibility.Collapsed;
        }
Ejemplo n.º 3
0
        private void AddTemplate(object sender, RoutedEventArgs e)
        {
            GemmingTemplate newTemplate = new GemmingTemplate()
            {
                Group = "Custom", Enabled = true, Model = Calculations.Instance.Name
            };

            character.CustomGemmingTemplates.Add(newTemplate);

            GemmingTemplateItem newItem = new GemmingTemplateItem(this, newTemplate);

            CustomStack.Children.Add(newItem);
            UpdateGroupChecked(newTemplate.Group);
        }
Ejemplo n.º 4
0
        public GemmingTemplateItem(GemmingTemplates parent, GemmingTemplate template)
        {
            this.parent   = parent;
            this.template = template;
            DataContext   = template;
            isCustom      = template.Group == "Custom";
            InitializeComponent();

            template.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(template_PropertyChanged);

            if (isCustom)
            {
                DeleteButton.Visibility = Visibility.Visible;
            }
            else
            {
                DeleteButton.Visibility = Visibility.Collapsed;
            }
        }
Ejemplo n.º 5
0
        protected List<GemmingTemplate> MakeGemmingTemplatesFor(int[] red, int[] yellow, int[] blue, int[] prismatic, int[] meta, int enabler)
        {
            List<GemmingTemplate> gtRes = new List<GemmingTemplate>();

            for (int x = 0; x < gemmingGroups.Length; x++)
            {
                GemmingTemplate gt = new GemmingTemplate();
                gt.Model = gemmingClass;
                gt.Group = gemmingGroups[x];
                
                gt.RedId = GetRightGem(red, x);
                gt.YellowId = GetRightGem(yellow, x);
                gt.BlueId = GetRightGem(blue, x);
                gt.PrismaticId = prismatic[x];          // Always use the suggested gem in prismatic, as you would use JC gems in proper sockets
                gt.MetaId = meta[0];              
                gt.Enabled = (enabler == x);

                if (gt.RedId > 0 && gt.YellowId > 0 && gt.BlueId > 0 && gt.PrismaticId > 0 && gt.MetaId > 0)
                    gtRes.Add(gt);
            }

            return gtRes;
        }
Ejemplo n.º 6
0
 private void AddTemplate(object sender, RoutedEventArgs e)
 {
     GemmingTemplate newTemplate = new GemmingTemplate() { Group = "Custom", Enabled = true, Model = Calculations.Instance.Name };
     character.CustomGemmingTemplates.Add(newTemplate);
     
     GemmingTemplateItem newItem = new GemmingTemplateItem(this, newTemplate);
     CustomStack.Children.Add(newItem);
     UpdateGroupChecked(newTemplate.Group);
 }