public AbilityManager(MainWindow parent)
 {
     mw = parent;
     InitializeComponent();
     cancel.Content = "X";
     label1.Content = "Copy/Load Ability String";
 }
        public ChampionSelect(MainWindow parent)
        {
            this.parent = parent;
            InitializeComponent();
            sortedChampions = new HeroData[parent.heroData.Count];
            int i = 0;
            foreach (HeroData h in parent.heroData.Values.OrderBy(x => x.name))
            {
                sortedChampions[i] = h;
                i++;
            }
            leftPadding = (Width - championsPerRow * (championSize + xPadding)) / 2;

            //add the images to the form
            int championNum = 0;

            foreach (HeroData h in sortedChampions)
            {
                double imgX = /*leftPadding + */(championNum % championsPerRow) * (championSize + xPadding);
                double imgY = /*topPadding + */(championNum / championsPerRow) * (championSize + yPadding);
                Image cImg = new Image();
                Canvas.SetLeft(cImg, imgX);
                Canvas.SetTop(cImg, imgY);
                cImg.Width = championSize;
                cImg.Height = championSize;
                cImg.Source = h.icon;
                cImg.Tag = h.codeName;
                cImg.MouseDown += new MouseButtonEventHandler(cImg_MouseDown);
                cImg.MouseEnter += new MouseEventHandler(cImg_MouseEnter);
                cImg.MouseLeave += new MouseEventHandler(cImg_MouseLeave);

                Label cName = new Label();
                Canvas.SetLeft(cName, imgX - xPadding/2);
                Canvas.SetTop(cName, imgY + cImg.Height - 2);
                cName.Width = cImg.Width + xPadding;
                cName.Height = yPadding;
                cName.Padding = new Thickness(0);
                cName.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
                cName.Content = h.name;
                cName.FontFamily = new FontFamily("Miramonte");
                cName.FontSize = 12;
                cName.Foreground = new SolidColorBrush(Colors.White);

                Canvas fillerCanvas = new Canvas();
                fillerCanvas.Children.Add(cImg);
                fillerCanvas.Children.Add(cName);
                championPanel.Children.Add(fillerCanvas);
                championNum++;
            }
            championPanel.Width = ((championSize + xPadding) * championsPerRow);
            scrollViewer1.Width = ((championSize + xPadding) * championsPerRow + 20);

            championPanel.Height = ((championNum * (championSize + yPadding + 12)) / championsPerRow);
        }
        public AutoAbilityTool(MainWindow parent)
        {
            InitializeComponent();

            this.parent = parent;
            //init champion level labels
            championLevelLabels = new Label[18];
            int championLevelLabelWidth = 19;
            int championLevelLabelHeight = 15;
            FontFamily championLevelLabelFF = new FontFamily("Miramonte");
            SolidColorBrush championLevelLabelColor = new SolidColorBrush(Colors.White);

            for (int i = 0; i < 18; i++)
            {
                Label l = new Label();
                l.Content = (i + 1).ToString();
                l.Width = championLevelLabelWidth;
                l.Height = championLevelLabelHeight;
                l.FontFamily = championLevelLabelFF;
                l.Foreground = championLevelLabelColor;
                l.FontSize = 13;
                l.Padding = new Thickness(0);
                l.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
                l.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
                Canvas.SetLeft(l, 3 + (championLevelLabelWidth) * i);
                Canvas.SetTop(l, 40 - championLevelLabelHeight);
                Canvas.SetZIndex(l, 0);
                mainCanvas.Children.Add(l);

                l = new Label();
                l.Content = "";
                l.Width = championLevelLabelWidth;
                l.Height = championLevelLabelHeight;
                l.FontFamily = championLevelLabelFF;
                l.Foreground = championLevelLabelColor;
                l.FontSize = 13;
                l.Padding = new Thickness(0);
                l.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;
                l.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;

                Canvas.SetLeft(l, 3 + (championLevelLabelWidth) * i);
                Canvas.SetTop(l, 45);
                Canvas.SetZIndex(l, 0);
                mainCanvas.Children.Add(l);
                championLevelLabels[i] = l;

            }
        }
 public ItemSelect(MainWindow parent)
 {
     this.parent = parent;
     InitializeComponent();
 }
 public SetManager(MainWindow parent)
 {
     this.parent = parent;
     InitializeComponent();
 }
 public HelpScreen(MainWindow parent)
 {
     this.parent = parent;
     InitializeComponent();
 }