• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Manhattanisgr8

Members
  • Content count

    60
  • Joined

  • Last visited

Community Reputation

487 Neutral

About Manhattanisgr8

  • Rank
    Member
  1. Thanks guys. The combination of using ArrayList<Object> and then casting the Object to a specific class type worked. You guys saved me several hours of coding. I can't thank you guys enough.
  2. Thank you megadan, I now have it reading the ArrayList using Class<?>. Now my problem is adding elements to an ArrayList<Class> from ArrayList<Class<?>>.   Example: ArrayList<Moves> moves; ArrayList<Class<?>> importedMoves; for (int x = 0; x < importedMoves.size(); x++){ moves.add(importedMoves.get(x)); Is there a way around this?
  3. I am currently working on a text based game using swing. In it, I have the user create a game world (essentially just a new folder name and then some serialized files in it). I a trying to make a way to import what data they want from one world to another. My problems is, instead of making a new popup for each object, I want to create just one and pass a string to it in order to get what serialized object for the popup to get. I have tried to turn the string into a class name via Class className = Class.forName("com.package.class") method, however, when I try to input that into ArrayList<className> arrayList, it tells me className cannot be resolved to a type. Is there anyway i can achieve this? Or am I going to have to make a popup for each object I want to have imported?
  4. I am currently making a text based game using swing. I plan on using a wrapper to distribute the program. The question I have is; How do I make a new directory without knowing where the user installed the game? Basically I want to have something like this:   GameFolder\Data\(This is where I would want to make the new directory with the name the end user specifies)   Any help or direction would greatly be appreciated.
  5. I am currently making a text based game using swing and I am running into a problem. I currently have a JFrame and 2 different panels(much more will be added). However, I can't figure out how to switch between the two panels. The first panel has a JList for a list of characters with some buttons at the bottom. One button in particular is an Add button. When the user clicks on the button, I want the first panel not to be visible, and for the second panel to become visible. Once they click save on the second panel, I want the second panel not to be visible, and the first panel to become visible. I am using a method to pass the character information back to the first panel to add the new character to the list. Just having trouble displaying the two panels. I am trying not to make the classes static. With a bunch on other panels to add and display, I want to be able to dispose of the panels not being used to free up memory. Any advice would greatly be appreciated.
  6. Forgot to mention that I am targeting Windows users. In the manual, I am going to instruct the users how to use it in Linux via makefile due to the lack of information I was finding on the internet for packaging distros.
  7. I didn't even think about the permissions. I was having the installer put it into the program files folder in the windows directory. Could I perhaps have the program write to the public folder in users? If so would the following statement be correct?: outFile.open("C:\\Users\\Public\\Documents\\ProductManager\\inventory.txt");
  8.   Thanks Alvaro, I fixed the problem I was having by consuming the newline character with cin.ignore() before it looped back around to the getline() statement.
  9. I have created a simple console application that allows a user to manage a product inventory. After the user quits, it saves the data into a txt file. When the user opens the application again, it reads the information from the text file. I am using Inno to "distribute" the application. My question is, the program works, however, after installing it, it doesn't create the txt file, thus it can't read from it. Could this be a simple path finding problem? If so, how can I fix this? Below is the code in question: side note: this is an application I developed but have to write a manual for it for my technical writing class. Thus, the reason for using Inno. // File Name: ProductInventory.cpp // // Author: Travis Alt // Date: 3/31/2014 // Assignment Number: 5 // CS 2308.256 Spring 2014 // Instructor: Jill Seaman // // An object that holds an array of Products. You can // add or remove a product, sort the array by product name, // get the total quantity in the inventory, or display the // inventory in a table format. #include <iostream> #include <fstream> #include "ProductInventory.h" using namespace std; ProductInventory::ProductInventory() { count = 0; capacity = 0; ifstream inFile; inFile.open("inventory.txt"); if (inFile.is_open()) { Product product; string productName, locator; int quantity; double price; while (getline(inFile, productName)) { //getline(inFile, productName); inFile >> locator; inFile >> quantity; inFile >> price; product.setProductName(productName); product.setLocator(locator); product.setQuantity(quantity); product.setPrice(price); inFile.ignore(50, '\n'); addProduct(product); } } else { inFile.close(); ofstream outFile; outFile.open("inventory.txt"); outFile.close(); } } //*********************************************************** // ProductInventory: constructor of the product inventory // // size: size of the array // returns nothing //*********************************************************** ProductInventory::ProductInventory(int size) { //inventory = new vector<Product>; count = 0; capacity = size; ifstream inFile; inFile.open("inventory.txt"); if (inFile.is_open()) { Product product; string productName, locator; int quantity; double price; while ((inFile.peek() != '\n') && (getline(inFile, productName))) //while (getline(inFile, productName)) { inFile >> locator; inFile >> quantity; inFile >> price; product.setProductName(productName); product.setLocator(locator); product.setQuantity(quantity); product.setPrice(price); addProduct(product); } } else { inFile.close(); ofstream outFile; outFile.open("inventory.txt"); outFile.close(); } } //*********************************************************** // addProduct: adds a new product to the array. If the array is full // it calls resize to double the size of the array. // // product: the product to be added // returns false if there is a product with the same name and location, // otherwise returns true if the product was added //*********************************************************** bool ProductInventory::addProduct(Product product) { /*if (count == capacity) { resize(); }*/ for (int x = 0; x < count; x++) { if (inventory[x].getProductName() == product.getProductName() && inventory[x].getLocator() == product.getLocator()) { return false; } } inventory.push_back(product); sortInventory(); writeToFile(); count++; return true; } //*********************************************************** // removeProduct: removes the product from the list by hiding it // at the end of the array until it is replaced by another product // // productName: name of the product to be removed // locator: the location of the product to be removed // return true if the product was removed, else return false if it // can't find the product and location. //*********************************************************** bool ProductInventory::removeProduct(Product product) { int index = 0; // index of where the product is in the array for (int x = 0; x < count; x++) { if (product.getProductName() == inventory[x].getProductName() && product.getLocator() == inventory[x].getLocator()) { index = x; inventory.erase(inventory.begin() + index); count--; return true; } } return false; } //*********************************************************** // showInventory: displays the current inventory in the form of // a table // // returns void //*********************************************************** void ProductInventory::showInventory() { sortInventory(); cout << "\nLocation Quantity Price Name" << endl; cout << "--------------------------------------------------------------------------" << endl; for (int x = 0; x < count; x++) { cout << inventory[x].getLocator() << "\t\t"; cout << inventory[x].getQuantity() << "\t\t"; cout << inventory[x].getPrice() << "\t\t"; cout << inventory[x].getProductName() << endl; } } //*********************************************************** // getTotalQuantity: adds up the quantity of each product in the array // // returns total number of products in the array //*********************************************************** int ProductInventory::getTotalQuantity() { int totalQuantity = 0; // initial size of the total quantity for (int x = 0; x < count; x++) { totalQuantity += inventory[x].getQuantity(); } return totalQuantity; } //*********************************************************** // sortInventory: reorders the array by name from A-Z // // returns void //*********************************************************** void ProductInventory::sortInventory() { for (int i = 0; i < count - 1; i++) { for (int x = 0; x < count - 1; x++) { if (inventory[x] > inventory[x + 1]) { Product temp = inventory[x + 1]; inventory[x + 1] = inventory[x]; inventory[x] = temp; } else { continue; } } } } //*********************************************************** // resize: doubles the current size of the array if there is // not enough space to add more products // // returns void //*********************************************************** void ProductInventory::resize() { int newSize = capacity * 2; Product *newInventory = new Product[newSize]; for (int x = 0; x < count; x++) { newInventory[x] = inventory[x]; } capacity = newSize; //delete[] inventory; //inventory = newInventory; } void ProductInventory::writeToFile() { ofstream outFile; outFile.open("inventory.txt"); for (int x = 0; x < count; x++) { outFile << inventory[x].getProductName() << endl << inventory[x].getLocator() << endl << inventory[x].getQuantity() << endl << inventory[x].getPrice() << endl; } outFile.close(); outFile.open("inventory_print.txt"); outFile << "Location Quantity Price Name" << endl; outFile << "--------------------------------------------------------------------------" << endl; for (int x = 0; x < inventory.size(); x++) { outFile << inventory[x].getLocator() << "\t"; outFile << inventory[x].getQuantity() << "\t\t"; outFile << inventory[x].getPrice() << "\t\t"; outFile << inventory[x].getProductName() << endl; } outFile.close(); } bool ProductInventory::adjustQuantity(Product product) { for (int x = 0; x < inventory.size(); x++) { if (inventory[x].getProductName() == product.getProductName() && inventory[x].getLocator() == product.getLocator()) { inventory[x].setQuantity(product.getQuantity()); return true; } else return false; } return false; } bool ProductInventory::adjustPrice(Product product) { for (int x = 0; x < inventory.size(); x++) { if (inventory[x].getProductName() == product.getProductName() && inventory[x].getLocator() == product.getLocator()) { inventory[x].setPrice(product.getPrice()); return true; } else return false; } return false; } double ProductInventory::getTotalPrice() { double totalPrice = 0.0; for (int x = 0; x < inventory.size(); x++) { totalPrice += inventory[x].getPrice(); } return totalPrice; }
  10. I need help with fstream and linked lists. Basically I am creating a basic inventory program for a school project where I have to write a manual for it. What I am trying to do is store products in a linked list. When the user quits, it writes stores the data into a txt file. When the user opens it again, I want it to read from the text file to re-populate the list. The problem I am having is reading a line with spaces. I can get it to read once, but when it goes to the next list, it doesn't copy all the information from the second product. Below is all the code I have so far and commented out what I have tried. The problem lays in LinkedProductInventory.cpp in the constructor. LinkedProductInventory.h [spoiler] #include <cstddef> #include "Product.h" using namespace std; class LinkedProductInventory { private: struct ListNode { Product product; ListNode *next; }; void sort(); ListNode *head; int count; public: LinkedProductInventory(); //~LinkedProductInventory(); void appendNode(Product); void insertNode(Product); void deleteNode(Product); void displayList(); void writeToFile(); }; ,[/spoiler] LinkedProductInventory.cpp [spoiler] #include <iostream> #include <fstream> #include <string> #include "LinkedProductInventory.h" using namespace std; LinkedProductInventory::LinkedProductInventory() {     head = NULL;     count = 0;     ifstream inFile;     inFile.open("inventory.txt");     if (inFile)     {         Product product;         string productName, locator;         int quantity;         double price;         //while ((inFile.peek() != '\n') && (getline(inFile, productName)))         //while (getline(inFile, productName))         while (inFile.getline(productName,productName.length))         {             //getline(inFile, productName);             inFile >> locator;             inFile >> quantity;             inFile >> price;             product.setProductName(productName);             product.setLocator(locator);             product.setQuantity(quantity);             product.setPrice(price);             inFile.clear();             appendNode(product);         }     }     else         inFile.close(); } void LinkedProductInventory::appendNode(Product product) {     ListNode *newNode; // To point to the new node     // Create a new node and store data in it     newNode = new ListNode;     newNode->product = product;     newNode->next = NULL;     //If empty, make head point to new node     if (head == NULL)     {         head = newNode;     }     else     {         ListNode *p = head; // To move through the list         //traverse list to find last node         while (p->next != NULL)             p = p->next;         // now p points to last node         // make last node point to newNode         p->next = newNode;     }     count++; //    sort(); } void LinkedProductInventory::displayList() {     ListNode *p;     // start at head of the list     p = head;     cout << "\nLocation    Quantity    Price            Name" << endl;     cout << "--------------------------------------------------------------------------" << endl;     // while p points to something, continue     while (p)     {         //Display the value in the current node         cout << p->product.getLocator() << "\t";         cout << p->product.getQuantity() << "\t\t";         cout << p->product.getPrice() << "\t\t";         cout << p->product.getProductName() << endl;         //Move to the next node         p = p->next;     }     cout << endl; } //LinkedProductInventory::~LinkedProductInventory() //{ //    ListNode *p; // traversal pointer //    ListNode *n; // saves the next node //    p = head; // //    while (p) //    { //        n = p->next; //save the next //        delete p; // delete current //        p = n; //    } //} void LinkedProductInventory::deleteNode(Product product) {     ListNode *p = head; // to traverse list     ListNode *n = p; // trailing node pointer     // skip nodes not equal to product, stop at last     while (p && p->product.getProductName() != product.getProductName() && p->product.getLocator() != product.getLocator())     {         n = p;         p = p->next;     }     //p not null: product was found, set links + delete     if (p)     {         if (p == head)         {             head = p->next;             delete p;         }         else         {             n->next = p->next;             delete p;         }     }     count--; } void LinkedProductInventory::writeToFile() {     ofstream outFile;     outFile.open("inventory.txt");     ListNode *p = head;     while (p)     {         outFile << p->product.getProductName() << endl;         outFile << p->product.getLocator() << endl;         outFile << p->product.getQuantity() << endl;         outFile << p->product.getPrice() << endl;         p = p->next;     }     outFile.close(); } void LinkedProductInventory::sort() {     ListNode *p = head; //used to traverse     ListNode *temp;     for (int x = 0; x < count; x++)     {         while (p)         {             if (p->product.getProductName() > p->next->product.getProductName())             {                 temp = p->next;                 p->next = p;                 p = temp;             }             else                 continue;         }     } } [/spoiler] Product.h [spoiler] // File Name: Product.h // // Author: Travis Alt // Date: 3/31/2014 // Assignment Number: 5 // CS 2308.256 Spring 2014 // Instructor: Jill Seaman // // Header file for Product.cpp #include <string> using namespace std; class Product { private:     string productName; // name of the product     string locator; // location of the product     int quantity; // number of products     double price; // price of the products public:     Product();     Product(string, int, double, string);     string getProductName();     string getLocator();     int getQuantity();     double getPrice();     void setProductName(string);     void setLocator(string);     void setQuantity(int);     void setPrice(double);     bool operator<(Product);     bool operator>(Product);     bool operator==(Product); }; [/spoiler] Product.cpp [spoiler] // File Name: Product.cpp // // Author: Travis Alt // Date: 3/31/2014 // Assignment Number: 5 // CS 2308.256 Spring 2014 // Instructor: Jill Seaman // // A representation of a Product object that stores // the product name, quantity, price, and location #include "Product.h" using namespace std; //*********************************************************** // Product: Constructor of Product that takes no arguments // // returns nothing //*********************************************************** Product::Product() {     productName = " ";     locator = " ";     quantity = 0;     price = 0.00; } //*********************************************************** // Product: Constructor of Product that sets each member variable // // locator: location of the product // quantity: the number of products // price: the price of the products // productName: name of the product // returns nothing //*********************************************************** Product::Product(string locator, int quantity, double price, string productName) {     this->productName = productName;     this->locator = locator;     this->quantity = quantity;     this->price = price; } //*********************************************************** // getProductName: gets the name of the product stored in the // member variable // // returns member variable productName //*********************************************************** string Product::getProductName() {     return productName; } //*********************************************************** // getLocator: gets the location of the product stored in the // member variable // // returns member variable locator //*********************************************************** string Product::getLocator() {     return locator; } //*********************************************************** // getQuantity: gets the number of the products stored in the // member variable // // returns member variable quantity //*********************************************************** int Product::getQuantity() {     return quantity; } //*********************************************************** // getPrice: gets the price of the product stored in the // member variable // // returns member variable price //*********************************************************** double Product::getPrice() {     return price; } //*********************************************************** // setProductName: sets the name of the product stored in the // member variable // // returns void //*********************************************************** void Product::setProductName(string productName) {     this->productName = productName; } //*********************************************************** // setLocator: sets the location of the product stored in the // member variable // // returns void //*********************************************************** void Product::setLocator(string locator) {     this->locator = locator; } //*********************************************************** // setQuantity: sets the number of products stored in the // member variable // // returns void //*********************************************************** void Product::setQuantity(int quantity) {     this->quantity = quantity; } //*********************************************************** // setPrice: sets the price of the product stored in the // member variable // // returns void //*********************************************************** void Product::setPrice(double price) {     this->price = price; } //*********************************************************** // operator<: An overloaded operator that checks if the product // name is less than product on the right // // right: the product on the right side of the argument // returns true if the product on the left is less than the product // on the right //*********************************************************** bool Product::operator<(Product right) {     if (productName < right.getProductName())     {         return true;     }     else         return false; } //*********************************************************** // operator>: An overloaded operator that checks if the product // name is greater than product on the right // // right: the product on the right side of the argument // returns true if the product on the left is greater than the product // on the right //*********************************************************** bool Product::operator>(Product right) {     if (productName > right.getProductName())     {         return true;     }     else     {         return false;     } } //*********************************************************** // operator==: An overloaded operator that checks if the product // name is equal to than product on the right // // right: the product on the right side of the argument // returns true if the product on the left is equal to than the product // on the right //*********************************************************** bool Product::operator==(Product right) {     if (productName == right.getProductName())     {         return true;     }     else     {         return false;     } } [/spoiler] ProductDriver.cpp [spoiler] #include <iostream> #include <string> #include "LinkedProductInventory.h" using namespace std; void readFromFile(); Product *addProduct(); Product *removeProduct(); Product *adjustQuantity(); string displayProduct(); int main() {     const int ADD_NEW = 1,         REMOVE = 2,         ADJUST_QUANTITY = 3,         DISPLAY_INFO = 4,         DISPLAY_INVENTORY = 5,         QUIT = 6;     int userSelection;     LinkedProductInventory pi;     do     {         cout << "Manage Inventory Menu" << endl;         cout << "1. Add product" << endl;         cout << "2. Remove product" << endl;         cout << "3. Adjust Quantity of A Product" << endl;         cout << "4. Display A Product" << endl;         cout << "5. Display Inventory" << endl;         cout << "6. Quit The Program" << endl;         cout << "\nEnter your choice: ";         cin >> userSelection;         string productName, locator;         int quantity;         double price;         Product product;         switch (userSelection)         {         case 1:                          cout << endl;             cout << "Please enter the product's name: ";             cin.ignore(100, '\n');             getline(cin, productName);             product.setProductName(productName);             cout << "Please enter the product's location: ";             cin >> locator;             product.setLocator(locator);             cout << "Please enter the quantity of the product (DO NOT INCLUDE SPACES): ";             cin >> quantity;             product.setQuantity(quantity);             cout << "Please enter the price of the product: ";             cin >> price;             product.setPrice(price);             pi.appendNode(product);             cout << endl;             break;         case 2: pi.deleteNode(*removeProduct());             cout << endl;             break;         case 3: adjustQuantity();             cout << endl;             break;         case 4: displayProduct();             cout << endl;             break;         case 5: pi.displayList();             cout << endl;             break;         case 6: pi.writeToFile();             break;         }     } while (userSelection != QUIT);      } Product *addProduct() {     string productName;     string locator;     int quantity;     double price;     cout << endl;     cout << "Please enter the product's name: ";     cin.ignore(100, '\n');     getline(cin, productName);     //product.setProductName(productName);     cout << "Please enter the product's location: ";     cin >> locator;     //cin.ignore(100, '\n');     //getline(cin, locator);     //product.setLocator(locator);     cout << "Please enter the quantity of the product (DO NOT INCLUDE SPACES): ";     cin >> quantity;     //product.setQuantity(quantity);     cout << "Please enter the price of the product: ";     cin >> price;     //product.setPrice(price);     Product product(locator, quantity, price, productName);     Product *p = &product;     return p; } Product *removeProduct() {     string productName, locator;     cout << endl;     cout << "Please enter the product's name to remove: ";     cin.ignore(100, '\n');     getline(cin, productName);     cout << "Please enter the location of the product: ";     cin.ignore(100, '\n');     getline(cin, locator);          Product product(locator, 0, 0.0, productName);     Product *p = &product;     return p; } // may have to redo this Product *adjustQuantity() {     Product product;     string productName, locator;     int newQuantity;     cout << endl;     cout << "Enter the name of the product: ";     cin.ignore(100, '\n');     getline(cin, productName);     cout << "Enter the location of the product: ";     cin.ignore(100, '\n');     getline(cin, locator);     cout << "Enter the new quantity of the product: ";     cin >> newQuantity;     product.setProductName(productName);     product.setLocator(locator);     product.setQuantity(newQuantity);     Product *p = &product;     return p; } string displayProduct() {     Product product;     string productName;     cout << endl;     cout << "Enter the product name: ";     cin.ignore(100, '\n');     getline(cin, productName);     return productName; } [/spoiler]   EDIT: Here is what the txt file looks like: Samsung Livingroom 2 12.99 Test this Livingroom 4 56.88
  11. I figured it out, thank you for your help and patience.
  12. Which lines do I change? All the initializing of the buttons are in the classxx.deigner.cs portion of the panel.
  13. How would I go around this? I tried to implement your second example, however, instead of setting the list, I tried to set the visibility of another panel, and that didn't work.  
  14. Form 1: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace InterfacesTest { public partial class Form1 : Form { public Panel1 panel1 = new Panel1(); public ListboxPanel listboxPanel = new ListboxPanel(); public AddItems addItems = new AddItems(); public Form1() { InitializeComponent(); this.Controls.Add(panel1); this.Controls.Add(listboxPanel); this.Controls.Add(addItems); panel1.Link = listboxPanel.Link; listboxPanel.Link = panel1; } } } panel1 - first panel the user sees using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace InterfacesTest { public partial class Panel1 : UserControl { public Panel1 Link; public Panel1() { InitializeComponent(); this.Visible = false; button1.Click += delegate { if (Link != null) Link.Visible = !Link.Visible; }; } } } ListboxPanel using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace InterfacesTest { public partial class ListboxPanel : UserControl { public ListboxPanel Link; public ListboxPanel() { InitializeComponent(); this.Visible = false; button1.Click += delegate { if (Link != null) Link.Visible = !Link.Visible; }; } } } AddPanel - will be used to add items to listbox in ListboxPanel using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace InterfacesTest { public partial class AddItems : UserControl { public AddItems Link; public AddItems() { InitializeComponent(); this.Visible = false; button1.Click += delegate { if (Link != null) Link.Visible = !Link.Visible; }; } } } Hope this helps, didn't add the other .designer.cs of the classes that VS uses for the design
  15. Ok, created a new project and tried to implement the link controls where they all use the same namespace. However, now I am getting this:   Error    1    Cannot implicitly convert type 'InterfacesTest.ListboxPanel' to 'InterfacesTest.Panel1'    c:\users\travis\google drive\visual studio 2013\projects\interfacestest\interfacestest\form1.cs    26   in Form1.