15,922,007 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 Visual Basic questions
View Javascript 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 hojatIzadi (Top 14 by date)
hojatIzadi
21-Jul-16 9:04am
View
Ok .thank you
hojatIzadi
21-Jul-16 8:52am
View
Griff please look at some more codes:
Int32 staff = 0;
Int32 triad = 0;
int h = (e.Y / 5) * 5;
if (e.Y >= 100 && e.Y < 300)
{
staff = 1;
noteloc = (h / 5) - 12;
}
else if (e.Y >= 340 && e.Y < 540)
{
staff = 2;
noteloc = (h / 5) - 60;
}
else if (e.Y >= 580 && e.Y < 780)
{
staff = 3;
noteloc = (h / 5) - 108;
}
if (e.X >= 100 && e.X < 300)
{
triad = 1;
}
else if (e.X >= 300 && e.X < 500)
{
triad = 2;
}
else if (e.X >= 500 && e.X < 700)
{
triad = 3;
}
else if (e.X >= 700 && e.X < 900)
{
triad = 4;
}
if (staff == 0 || triad == 0)
{
// MessageBox.Show("Out of range");
return;
}
if (staff > 4 || triad > 4)
{
MessageBox.Show("Out of range");
return;
}
if (!Staffs.Keys.Contains(staff))
{
Staffs.Add(staff, new Dictionary<int, list<int="">>());
}
if (!Staffs[staff].Keys.Contains(triad))
{
Staffs[staff].Add(triad, new List<int>());
}
if (Staffs[staff][triad].Count >= 4)
{
if(myVar.sitnote)
MessageBox.Show("Maximum notes reached");
return;
}
hojatIzadi
21-Jul-16 6:15am
View
Deleted
Hi OriginalGriff
you said true but I have this problem just when I have 4 items in the list .
result for 3 item (count=3) after remove is count=2.
result for 2 item (count=3) after remove is count=1.
result for 1 item (count=3) after remove is count=0.
hojatIzadi
21-Jul-16 6:14am
View
Hi OriginalGriff
you said true but I have this problem just when I have 4 items in the list .
result for 3 item (count=3) after remove is count=2.
result for 2 item (count=2) after remove is count=1.
result for 1 item (count=1) after remove is count=0.
hojatIzadi
21-Jul-16 3:56am
View
Dictionary<int32, dictionary<int32,="" list<int32="">>> Staffs = new Dictionary<int, dictionary<int,="" list<int="">>>();
//---------------
if (!Staffs.Keys.Contains(staff))
{
Staffs.Add(staff, new Dictionary<int, list<int="">>());
}
if (!Staffs[staff].Keys.Contains(triad))
{
Staffs[staff].Add(triad, new List<int>());
}
if (Staffs[staff][triad].Count >= 4)
{
if(myVar.sitnote)
MessageBox.Show("Maximum notes reached");
return;
}
//--------------------
if (staff == 1 && triad == 1)
{
triad1 = Staffs[1][1].ToArray(); Array.Sort(triad1);
mypoint.Add(newpoint);
}
//--------------------------
foreach (int value in Staffs[1][1])
{
if (value == noteloc)
{
a = true;
qq = value;
}
}
if (a)
Staffs[1][1].Remove(qq);
triad1 = Staffs[1][1].ToArray();
hojatIzadi
20-Jul-16 11:06am
View
thanks and sorry I want to remove an int value from the list that is Tvalue in inner dictionary
hojatIzadi
20-Jul-16 10:43am
View
yes a dictionary that is a value inside the Staffs dictionary
hojatIzadi
7-May-16 4:09am
View
Actually,the problem is How can I input mouse position in my panel that the cursor moves on or between lines .and when user click there the note(character note) write on or between lines(by: {note.DrawString("w", f1, Brushes.Black,e.X ,e.Y );}// "w" is whole note character.
hojatIzadi
7-May-16 4:00am
View
Hi ralf and thank you .can you send an example code please
hojatIzadi
7-May-16 3:59am
View
Deleted
hi ralf and thank you .can you send an example code please.
hojatIzadi
4-May-16 1:18am
View
Ok,I try it.thanke you
hojatIzadi
3-May-16 12:18pm
View
thank you sergey .I think more about picture box and I will send more information for you
hojatIzadi
12-Apr-16 9:22am
View
OK , ))))))))))))))).absolutely
hojatIzadi
12-Apr-16 8:40am
View
Thank you, Sergey, for your notification. I am a software student .this project is a test. I'm not well in C#. so I need to see an example code for musical notation for at least one kind of note (like whole note) please.
Thank you
Show More