示例#1
0
void Menu() {
    char *input;
    // Add full menu
    printf("=====================================\n");
    //printf("Welcome to TTHN_5C13_ManageProduct.\n");
    //printf("Enter a command in the menu to start.\n");
    //printf("add - Add a product.");
    //printf("display - Show all products");
    //printf("delete - Delete a product.");
    //printf("=====================================\n");

    //while(getchar()!='\n');
    input = ReadLine(100, stdin);
    if (strcmp(input, "add") == 0) {
        free(input);
        AddProduct();
    } else if (strcmp(input, "display") == 0) {
        free(input);
        Display();
    } else if (strcmp(input, "delete") == 0) {
        free(input);
        Delete();
    } else if (strcmp(input, "deletex") == 0) {
        free(input);
        DeleteX();
    } else if (strcmp(input, "deleteall") == 0) {
        free(input);
        DeleteAll();
    } else if (strcmp(input, "search") == 0) {
        free(input);
        Search();
    }

}
示例#2
0
void ASellrTable::OnInputTouchBoard(const ETouchIndex::Type FingerIndex, UPrimitiveComponent* TouchedComponent)
{

	UE_LOG(LogTemp, Warning, TEXT("Touch %s"),*TouchedComponent->GetName());
	for (auto &it : _productInfoList)
	{
		if (it->boardmesh->GetName() == TouchedComponent->GetName())
		{
			if (it->ExistBread)
			{
				PickUpProduct(it);
			}
			else
			{
				AddProduct(it);
			}
		}
	}
}
示例#3
0
void Coral_reefFactory::defineProducts() {
    // Add your own models here...
    AddProduct(Spawning, "Model of spawning event");
    AddProduct(LogisticGrowth, "Logistic growth model");
}