Example #1
0
        private void addToBox(string name, string address, int rowspot, int colspot) // instantiate a box instance
        {
            box littleBox = new box(sizeOfBox);

            littleBox.MouseEnter += Mouse_Enter;
            littleBox.MouseLeave += Mouse_Leave;

            littleBox.boxName = name;
            littleBox.address = address;
            littleBox.name    = name;
            string path = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Images\\Album_Art\\" + name + ".jpg";

            littleBox.setImage(path);

            Grid.SetRow(littleBox, rowspot);
            Grid.SetColumn(littleBox, colspot);
            selectionGallary.Children.Add(littleBox);
        }
Example #2
0
        private void addToBox(string name, string address, int rowspot, int colspot, int index) // instantiate a box instance
        {
            box littleBox = new box(sizeOfBox, true);

            littleBox.index       = index;
            littleBox.MouseEnter += Mouse_Enter;
            littleBox.MouseLeave += Mouse_Leave;


            // littleBox.boxName = name;
            // littleBox.address = address;
            // littleBox.name = name;
            // string path = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Images\\Tutorial_Art\\" + name + "_tutorial.png";
            string path = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Images\\Tutorial_Art\\" + name + "_tutorial.png";

            // string path = "/Resources/Images/" + Regex.Match(name, "([a-zA-Z]+)").Value + "-tutorial.png";
            littleBox.setImage(path);

            Grid.SetRow(littleBox, rowspot);
            Grid.SetColumn(littleBox, colspot);
            selectionGallary.Children.Add(littleBox);
        }