15,915,094 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by MarioPT (Top 7 by date)
MarioPT
11-May-16 6:55am
View
It´s working!!! Thanks i just had to change the bool to another side like this:
<pre>private void btnSubmit_Click(object sender, EventArgs e)
{
bool isExists = false;
if (check())
{
}
else
{
foreach (ListViewItem item in listView1.Items)
if (item.SubItems[2].Text == txtName.Text)
{
isExists = true;
break;
}
if (isExists)
MessageBox.Show("Your list already contains one person with that Name.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
add();
}
}
</pre>
MarioPT
11-May-16 6:53am
View
And when i start my listview already with persons he will get inside the foreach and verify, so the problem is just when my listview is empty
MarioPT
11-May-16 6:52am
View
My problem is just when my listview is empty it will leave the foreach and i don't want that, if the listvew is empty he can add the person
MarioPT
11-May-16 6:50am
View
my add method is working fine and it's adding items to my listview, if i let just this code:
private void btnSubmit_Click(object sender, EventArgs e)
{
if (check())
{
}
else
add();
}
it will check if my textboxes are empty if not he will add if some are empty it will popup one messageBox warning
MarioPT
9-May-16 6:33am
View
Well i also think that im not far from the solution the problem is that i don't know how to replace
public Person(TypeTimer s1) : this()
{
//I have removed the switch from here and put in my elapsed and now i need something that tells wich one is checked in my elapsed so i need some code here that i don't know, and yes i have done the code with some help, im still in school learning C# and this way of doing this code is completly new for me
}
MarioPT
9-May-16 6:18am
View
Yes
MarioPT
14-Apr-16 7:52am
View
Thanks i got it, that was so simple i don't know why i didn't remember that i was trying something like:
$minutes = floor(($timeleft / 60) % 60);
$seconds = $timeleft % 60;
echo"$minutes:$seconds";
but i was gotting 2:0 and no 02:00
Show More