15,896,154 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 Muhammad Tufail 1979 (Top 74 by date)
Muhammad Tufail 1979
4-Jul-14 12:22pm
View
sorry , Sergey Alexandrovich , could you please explain a bit more.
Muhammad Tufail 1979
4-Jul-14 11:58am
View
it mean i don't need MethodA. i can do the functionality of methodA , when intervalCounter==0.
in the area of //Do what you want...
am i right please.
and it will make my program responsible if i have a button and to click on that to stop or start or pause this counter please.
Muhammad Tufail 1979
4-Jul-14 11:47am
View
yes please, i can implement timer, and to set its interval time 20 ms and a counter which should count for it up to 10. but i don't know how methodA ( which is the caller or the starter of this timer) should wait until timer completes 10 execution of 20ms.
Muhammad Tufail 1979
4-Jul-14 11:44am
View
could you please explain me a bit more. Actually i want to keep the time constant (i.e 20ms) for each iteration, so thus the moving of picture will be smooth.
Muhammad Tufail 1979
4-Jul-14 11:42am
View
cause 200ms are for the whole task. the task is to move an object (i.e picture) from one place to another place in the panel within 10 interval and thus the time will be for each move should be 20ms.
Muhammad Tufail 1979
3-Mar-14 12:14pm
View
thank you so much. but could you please tell me about it more. i am using EmguCv. actually the problem is , the moving object is small(not too small) so the video survilence lib does not able to detect it.
now i want that to put a point or circle on the moving object and to track it and find information about it..
could you please guide me more about it.
thanks once again
Muhammad Tufail 1979
8-Feb-14 16:12pm
View
i also did try to take a bitmap image and keep it as a background image of the control. then every thread of picture should take a clone of this picture , draw it self picturebox at specific postion and to make it again the background image, but the problem comes that " the object already in used" by another process. i don't know how to remove this problem??
i also did try to use only one picture for background image every small picture( from 4) should draw on it and to move every one and do the process. but then the problem comes that when one make a clone of background image so it also contains other 3 pictures and thus it makes a continues track of all the 4 pictures. ( a long trail)
Muhammad Tufail 1979
8-Feb-14 15:46pm
View
thank you so much on your kind reply.
Actually i have 4 pictures , and want to move it. from one point ( fromPoint) to another point (toPoint) each pictures movement is control by separate thread. during this execution i choose these points according to my criteria. Now each thread put picture in the picturebox and then i start moving by changing the left and top position of picturebox by 5.
my problem is... that the line successfully drawn by every picturebox ( picture) but when any of these picturebox comeback on the same root or cross the path of another picture so it wipe up ( delete ) that path. i dont know how to permanent draw the path so that by the movement of any other picturebox should not delete.
Muhammad Tufail 1979
4-Feb-14 11:01am
View
sorry for that
Muhammad Tufail 1979
4-Feb-14 10:30am
View
could you please solve this problem.
cross-thread operation not valid: Control " accessed from a thread other than the thread it was created
Muhammad Tufail 1979
3-Feb-14 12:51pm
View
of course picturebox is problematic but could you please recommend for my problem , the control panel?
i am using a bitmap and drawing through graphics then put it into the picturebox.
i dont know how to do it with control panel please.
Muhammad Tufail 1979
28-Nov-13 7:50am
View
thank you so much for your explanation.
happy from your comments.
Muhammad Tufail 1979
28-Nov-13 7:35am
View
thank you so much, do i need something else with lock?? and please could you tell me that either it will effect my code or running time please?
i tried your idea and now its working good.
thank you so much
Muhammad Tufail 1979
28-Nov-13 7:14am
View
i never got this error when i was running this program on my office machine. but when i run it at my laptop so it give me this error
Muhammad Tufail 1979
28-Nov-13 7:07am
View
okay i did apply the above, now as i run the project so at the same time i am getting that error
Muhammad Tufail 1979
28-Nov-13 7:03am
View
okay thank you i am going toward it now. some time id does not give error even for long long time, while some time gives error after short time of starting .
i don't know whats the problem.
Muhammad Tufail 1979
28-Nov-13 6:54am
View
thank you so much on your reply,
in the method DrawCircle, i am running this at the moment on my computer and i got again this error, it is exactly at
Bitmap tempbitmap = (Bitmap)testImage.clone();
while previously i got at
g.DrawImage( rate,p.x-15,p.y-15,30,30);
thanks once again
Muhammad Tufail 1979
20-Nov-13 10:02am
View
yes , thats good , its working now...
thanks
Muhammad Tufail 1979
19-Nov-13 11:25am
View
please how i could do it without of threading ?
Muhammad Tufail 1979
19-Nov-13 11:07am
View
i did try moveCircle without of thread, but still it display some results and then stops. i did try without of threading nether moveCricleThread nor findNextThread. so then i get some other problems that, it doesnot move the circle gradaully and slowly.
Muhammad Tufail 1979
19-Nov-13 11:04am
View
here is my form load event , here i define findNextThread Please and then on the form there is a button with then name btnStartSimulator on the click event there i start this findNext thread, then the findNext method start moveCircle thread which i have already given.
private void frmTwoThreads_Load(object sender, EventArgs e)
{
testImage = new Bitmap(@"D:\Practice_Projects\TestPic.png");
rnd = new Random(DateTime.Now.Second);
findNextThread = new Thread(FindNext);
findNextThread.Name = " Find Thread";
}
Muhammad Tufail 1979
19-Nov-13 10:52am
View
Actually i want to findNext location and to pass it to moveCircle method, until and unless moveCircle does not move the circle ( gradually and slowly) , i want that, findNext method should wait for it
could you please give me a piece of code, i did try alot but in vain.
Muhammad Tufail 1979
13-Nov-13 12:19pm
View
i did try on paint event of picturebox as well, i dont know the proper way to pass , but i made a class of eventagrs deriving EventArgs Class.
i put the information i wanted to pass on, but the stupid program does not show the result what i want to ......
i am tired now...
Muhammad Tufail 1979
13-Nov-13 11:28am
View
yes enum for direction, and using name rather than number, but using names it was giving problem. actually i have to present this work to my supervisor, thats why i didnt put attention on it at the moment. i will fix it next, but still the problem is to move circle from one location to another. i dont know what to do at the moment.
Muhammad Tufail 1979
13-Nov-13 9:55am
View
Actually i am stuck in this problem and not finding any proper solution, thats why i am trying to find out the solution, i did try through timer, through threading , through loops. but still the problem exists.
Muhammad Tufail 1979
13-Nov-13 6:54am
View
could you please give me some piece of code just for the sake of example.
please.
Muhammad Tufail 1979
13-Nov-13 5:52am
View
sorry i think i made you anger sorry for that.
could you please give me an example with a piece of code please.
here is my movecircle code and drawcircle code please.
private void moveCircle(int stCell, int nxtCell)
{
bool b = false;
Sim_Timer.Stop();
Point pointp = Get_CellCenterPoint(stCell);
Point pointnxt = Get_CellCenterPoint(nxtCell);
if (!b)
{
while (pointp.X != pointnxt.X && pointp.Y != pointnxt.Y)
{
int motionDirection = FindDirection(pointp, pointnxt);
switch (motionDirection)
{
case 1:
//event for Direction1 (North)
pointp.Y -= y_moveUnit;
if ((pointp.Y - pointnxt.Y) < y_moveUnit)
pointp.Y = pointnxt.Y;
DrawCircle(pointp);
Invalidate();
break;
case 2:
//event for Direction2 (NE)
pointp.X += x_moveUnit;
pointp.Y -= y_moveUnit;
if (Math.Abs(pointp.X - pointnxt.X) < x_moveUnit)
pointp.X = pointnxt.X;
if ((pointp.Y - pointnxt.Y) < y_moveUnit)
pointp.Y = pointnxt.Y;
DrawCircle(pointp);
Invalidate();
break;
case 3:
//event for Direction3 (East)
pointp.X += x_moveUnit;
if (Math.Abs(pointp.X - pointnxt.X) < x_moveUnit)
pointp.X = pointnxt.X;
DrawCircle(pointp);
Invalidate();
break;
case 4:
//event for Direction4 ( SE)
pointp.X += x_moveUnit;
pointp.Y += y_moveUnit;
if (Math.Abs(pointp.X - pointnxt.X) < x_moveUnit)
pointp.X = pointnxt.X;
if (Math.Abs(pointp.Y - pointnxt.Y) < y_moveUnit)
pointp.Y = pointnxt.Y;
DrawCircle(pointp);
Invalidate();
break;
case 5:
//event for Direction5 (South)
pointp.Y = y_moveUnit;
if (Math.Abs(pointp.Y - pointnxt.Y) < y_moveUnit)
pointp.Y = pointnxt.Y;
DrawCircle(pointp);
Invalidate();
break;
case 6:
//event for Direction6 (SW)
pointp.X -= x_moveUnit;
pointp.Y += y_moveUnit;
if (Math.Abs(pointp.X - pointnxt.X) < x_moveUnit)
pointp.X = pointnxt.X;
if (Math.Abs(pointp.Y - pointnxt.Y) < y_moveUnit)
pointp.Y = pointnxt.Y;
DrawCircle(pointp);
Invalidate();
break;
case 7:
//event for Direction7 (West)
pointp.X -= x_moveUnit;
if (Math.Abs(pointp.X - pointnxt.X) < x_moveUnit)
pointp.X = pointnxt.X;
DrawCircle
Muhammad Tufail 1979
13-Nov-13 5:26am
View
Actually i am using a picture box and an image , i have drawn a circle on that image and want to change the position of that circle in the image and to show it in the picture box.
thats why i am not using paint event, if paint is the best option so how to use it please.
Muhammad Tufail 1979
13-Nov-13 5:00am
View
i am doing like this in one timer, ( System.Form.Timer) the problem is , i am using another timer in MoveCircle method. so that is not started and completed within this timer please.
private void Sim_Timer_Tick(object sender, EventArgs e)
{
pictureBox1.Image = testImage;
nxtno = utilObject.SelectNextCell(startCell, rnd);
moveCircle(startCell, nxtno); // call move circle method.
DrawCircle(Get_CellCenterPoint(nxtno));
startCell = nxtno;
}
Muhammad Tufail 1979
13-Nov-13 4:10am
View
windows application. please.
i used System.Form.Timer class for it. two timers objects in first i am trying to find the next location, as i get the next location then i want that timer 2 should be started and to move circle from one location to another gradually . and when timer 2 completes its task so timer 1 again search for the new location,
but the problem is that timer 1 does not allow timer 2 to start, as it find the next location.
firs timer1 completes and then timer 2 starts.
this is the problems. please.
Muhammad Tufail 1979
11-Nov-13 9:44am
View
i did try like this, but it run only once, how to set the timer for infinite please.
if (startCell != nxtno)
{
moveCircle();
}
private void moveCircle()
{
prvCellCenter = new Point(myGrid.Cells[startCell].CornerPoints[0].X + 22,
myGrid.Cells[startCell].CornerPoints[0].Y + 21);
curntCellCenter = new Point(myGrid.Cells[nxtno].CornerPoints[0].X + 22,
myGrid.Cells[nxtno].CornerPoints[0].Y + 21);
moveTimer.Start();
}
private void moveTimer_Tick(object sender, EventArgs e)
{
if (startCell < nxtno)
{
if (prvCellCenter.X < curntCellCenter.X && prvCellCenter.Y < curntCellCenter.Y)
{
prvCellCenter.X += 5;
prvCellCenter.Y += 5;
}
else if (prvCellCenter.X < curntCellCenter.X) prvCellCenter.X += 5;
else if (prvCellCenter.Y < curntCellCenter.Y) prvCellCenter.Y += 5;
DrawCircle(prvCellCenter);
}
else if (startCell > nxtno)
{
if (prvCellCenter.X > curntCellCenter.X && prvCellCenter.Y > curntCellCenter.Y)
{
prvCellCenter.X -= 5;
prvCellCenter.Y -= 5;
}
else if (prvCellCenter.X < curntCellCenter.X) prvCellCenter.X -= 5;
else if (prvCellCenter.Y < curntCellCenter.Y) prvCellCenter.Y -= 5;
DrawCircle(prvCellCenter);
}
}
Muhammad Tufail 1979
21-Oct-13 5:01am
View
thank you once again.
actually it just like a game, (but not indeed). its not like a physical collision. the moving circle will be having the capability to observe the things in front of it, if suddenly added into its path. so as the moving circle will change the direction by calculating alternative way, but i don't know how to get ride of it?. i mean that either the circle should should contains some event handler as something is added or remove from its path so as the circle take appropriate action immegitely .
Muhammad Tufail 1979
19-Oct-13 11:47am
View
thank you so much, on your quick responce.
Actually i don't want collision of moving circle and wall. i want that , when for example, an obstical ( Wall) added into the area, so at the same time moving circle should calculate alternative path for itself ( i know that how it should find the path) but i don't know that how to accomplish this exactly at the right time please
Muhammad Tufail 1979
29-May-13 15:29pm
View
Deleted
i want that to run that video clip. nothing else. at the moment
Muhammad Tufail 1979
29-May-13 12:59pm
View
Deleted
i have taken a form , picturebox, and a button,
when the project runs, it display the form, with button. i click on the button, it display a file dialogbox , where i entered a video file name, and then button call that function given above..
the expected output should be to run video but it doesnot display anything
Muhammad Tufail 1979
29-May-13 12:56pm
View
Deleted
Actually i have only copied the code of that function ....
what i am using it is given below...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Emgu.CV;
using Emgu.Util;
using Emgu.CV.Structure;
Muhammad Tufail 1979
10-May-13 9:35am
View
how to use it ? could you give me an example please
Muhammad Tufail 1979
30-Apr-13 5:30am
View
its okay, but i want to take start. and then i will share my code and idea with you people that where i am going now??
Actually i have been assigned a task of simulator. i have to develop a simulator type program in java, in which there should be a moving object( say a small ball ) the motion of the ball will be according on some algorithm.
user should be allowed to interact with the environment of that moving object, mean that,
some other moving object can be put in, some obstacles can also be put in it. now the motion should be according to that environment
and there are alot of information as well
Now, i want to start as, First to draw x,y coordinate on a panel (Frame area). then add a ball (object )to this area and then it will take start motion. i will record the x,y position of that ball in some list or array ( for further investigation).
i will find the central point of the moving object and on the bases of that central point i will keep the track of that object.
Now about the implementation, i do not know how to draw a graphical area (x,y coordinate) and then how to add a small object ( ball) and how to keep the track of that object.
Simellarly , how much number of pixel per centimeter is ?
thanks
Muhammad Tufail 1979
29-Apr-13 12:33pm
View
sorry to say, i just need the basic idea, i am student not programmer.
i need some initiatives. not idea about idea please................
Muhammad Tufail 1979
29-Apr-13 12:32pm
View
Deleted
sorry to say, i just need the basic idea, i am student not programmer.
i need some initiatives. not idea about idea please................
Muhammad Tufail 1979
22-Dec-11 7:59am
View
public class Teacher : Person
{
private int personalNumber ;
private long cnic;
private int salary;
private short result;
private string remarks;
private Subject teachingSubject;
private List<group> groups;
private DateTime dateOfJoining;
private DateTime dateOfReleave;
private string qualification;
private string scale;
public Teacher()
{
}
public Teacher(int pNo, string name, long cNIC, DateTime DOB, DateTime joiningDate, Subject sub, string qual)
:base (name)
{
PersonalNumber = pNo;
CNIC = cNIC;
DateOfBirth = DOB;
dateOfJoining = joiningDate;
Qualification = qual;
}
// Properties.......///
public int PersonalNumber
{
set
{
personalNumber = value;
}
get
{
return personalNumber;
}
}
public long CNIC
{
set
{
this.cnic = value;
}
get
{
return cnic;
}
}
public int Salary
{
set
{
salary = value;
}
get
{
return salary;
}
}
public short Result
{
set
{
result = value;
}
get
{
return result;
}
}
public string Remarks
{
set
{
remarks = value;
}
get
{
return remarks;
}
}
public Subject TeachingSubject
{
set
{
this.teachingSubject = value;
}
get
{
return this.teachingSubject ;
}
}
public List<group> Groups
{
set
{
groups = value;
}
get
{
return this.groups;
}
}
public DateTime DateOfJoining
{
set
{
dateOfJoining = value;
}
get
{
return dateOfJoining;
}
}
public DateTime DateOfReleave
{
set
{
dateOfReleave = value;
}
get
{
return dateOfReleave;
}
}
public string Qualification
{
set
{
qualification = value;
}
get
{
return qualification;
}
}
public string Scale
{
set
{
scale = value;
}
get
{
return scale;
}
}
}
}
Muhammad Tufail 1979
22-Dec-11 7:58am
View
Deleted
public class StudentDetail
{
private GroupNameEnum degreeTitle;
private string sessionyear;
private string reg_No;
private int marksObtained;
private int totalMarks;
private string remarks; // promoted , dropped , admitted..etc
public StudentDetail()
{
}
public StudentDetail(GroupNameEnum degTitle, string year, string about)
{
DegreeTitle = degTitle;
SessionYear = year;
Remarks = about;
}
public GroupNameEnum DegreeTitle
{
set
{
degreeTitle = value;
}
get
{
return degreeTitle;
}
}
public string SessionYear
{
set
{
sessionyear = value;
}
get
{
return sessionyear;
}
}
public string Reg_NO
{
set
{
reg_No = value;
}
get
{
return reg_No;
}
}
public int MarksObtained
{
set
{
marksObtained =value;
}
get
{
return marksObtained;
}
}
public int TotalMarks
{
set
{
totalMarks = value;
}
get
{
return totalMarks;
}
}
public string Remarks
{
set
{
remarks = value;
}
get
{
return remarks;
}
}
}
Muhammad Tufail 1979
22-Dec-11 7:57am
View
Deleted
public class StudentDetail
{
private GroupNameEnum degreeTitle;
private string sessionyear;
private string reg_No;
private int marksObtained;
private int totalMarks;
private string remarks; // promoted , dropped , admitted..etc
public StudentDetail()
{
}
public StudentDetail(GroupNameEnum degTitle, string year, string about)
{
DegreeTitle = degTitle;
SessionYear = year;
Remarks = about;
}
public GroupNameEnum DegreeTitle
{
set
{
degreeTitle = value;
}
get
{
return degreeTitle;
}
}
public string SessionYear
{
set
{
sessionyear = value;
}
get
{
return sessionyear;
}
}
public string Reg_NO
{
set
{
reg_No = value;
}
get
{
return reg_No;
}
}
public int MarksObtained
{
set
{
marksObtained =value;
}
get
{
return marksObtained;
}
}
public int TotalMarks
{
set
{
totalMarks = value;
}
get
{
return totalMarks;
}
}
public string Remarks
{
set
{
remarks = value;
}
get
{
return remarks;
}
}
}
Muhammad Tufail 1979
22-Dec-11 7:55am
View
public class StudentDetail
{
private GroupNameEnum degreeTitle;
private string sessionyear;
private string reg_No;
private int marksObtained;
private int totalMarks;
private string remarks; // promoted , dropped , admitted..etc
public StudentDetail()
{
}
public StudentDetail(GroupNameEnum degTitle, string year, string about)
{
DegreeTitle = degTitle;
SessionYear = year;
Remarks = about;
}
public GroupNameEnum DegreeTitle
{
set
{
degreeTitle = value;
}
get
{
return degreeTitle;
}
}
public string SessionYear
{
set
{
sessionyear = value;
}
get
{
return sessionyear;
}
}
public string Reg_NO
{
set
{
reg_No = value;
}
get
{
return reg_No;
}
}
public int MarksObtained
{
set
{
marksObtained =value;
}
get
{
return marksObtained;
}
}
public int TotalMarks
{
set
{
totalMarks = value;
}
get
{
return totalMarks;
}
}
public string Remarks
{
set
{
remarks = value;
}
get
{
return remarks;
}
}
Muhammad Tufail 1979
22-Dec-11 7:54am
View
public class Student : Person
{
private int rollNo;
private string fatherName;
private Session session; // it will be like this 2011-2012 etc....
private string yearOfExam;
private StudentDetail detail;
private SubjectCombination subjectCombination;
private Group group;
private DateTime dateOfAdmission;
public Student()
{
}
public Student(int rNo, string name, DateTime DOB, DateTime date_of_Enrolled)
: base(name)
{
RollNo = rNo;
DateOfBirth = DOB;
DateOfAdmission = date_of_Enrolled;
}
public int RollNo
{
get
{
return rollNo;
}
set
{
this.rollNo = value;
}
}
public string FatherName
{
get
{
return fatherName;
}
set
{
this.fatherName = value;
}
}
public Session Session
{
set
{
this.session = value;
}
get
{
return this.session;
}
}
public string YearOFExam
{
set
{
this.yearOfExam = value;
}
get
{
return yearOfExam;
}
}
public StudentDetail Detail
{
set
{
this.detail = value;
}
get
{
return this.detail;
}
}
public SubjectCombination SubjectCombination
{
set
{
this.subjectCombination = value;
}
get
{
return subjectCombination;
}
}
public Group Group
{
set
{
this.group = value;
}
get
{
return this.group;
}
}
public DateTime DateOfAdmission
{
get
{
return dateOfAdmission;
}
set
{
dateOfAdmission = value;
}
}
}
Muhammad Tufail 1979
22-Dec-11 7:05am
View
Deleted
there are some other classess too.. but its diffecult to uplod all of them....
Muhammad Tufail 1979
22-Dec-11 7:04am
View
thanx brother.... i have a litel bit confusion in such types which having further branches and different combination at different time i dont know how to handle that.... for example
there is a Session class... which contains different categories (i.e First year , Second year.. etc) now each category having different subject combination ..... i.e Pre- Eng, Pre- Medical.... etc... similarly each combintaion having different types of Subjects... some are optional and some are compalsory... so how to handle the subject combination for the above combination......?
Muhammad Tufail 1979
22-Dec-11 6:58am
View
public class Group
{
private int groupID;
private GroupNameEnum groupName;
private int totalCapacity;
private int studentEnrolled;
public Group()
{
}
public Group(int gID, GroupNameEnum gName)
{
GroupID = gID;
GroupName = gName;
}
// Properites ...........
public int GroupID
{
set
{
groupID = value;
}
get
{
return groupID;
}
}
public GroupNameEnum GroupName
{
set
{
groupName = value;
}
get
{
return groupName;
}
}
public int TotalCapacity
{
set
{
totalCapacity = value;
}
get
{
return totalCapacity;
}
}
public int StudentEnrolled
{
set
{
studentEnrolled = value;
}
get
{
return studentEnrolled;
}
}
}
Muhammad Tufail 1979
22-Dec-11 6:58am
View
Deleted
yes i have made it.....
Muhammad Tufail 1979
22-Dec-11 6:56am
View
public class SubjectCombination
{
private int combinationID;
private List <subject> subjects;
private string combinationTitle; // pre-medical, pre-engineering, computer-science, simple-Arts..etc
public SubjectCombination()
{
}
public SubjectCombination(int combID, string combTitle)
{
CombinationID = combID;
CombinationTitle = combTitle;
}
public int CombinationID
{
set
{
combinationID = value;
}
get
{
return combinationID;
}
}
public List<subject> Subjects
{
set
{
subjects = value;
}
get
{
return this.subjects;
}
}
public string CombinationTitle
{
set
{
combinationTitle = value;
}
get
{
return combinationTitle;
}
}
}
Muhammad Tufail 1979
22-Dec-11 6:54am
View
public class Student : Person
{
private int rollNo;
private string fatherName;
private Session session; // it will be like this 2011-2012 etc....
private string yearOfExam;
private StudentDetail detail;
private SubjectCombination subjectCombination;
private Group group;
private DateTime dateOfAdmission;
public Student()
{
}
public Student(int rNo, string name, DateTime DOB, DateTime date_of_Enrolled)
: base(name)
{
RollNo = rNo;
DateOfBirth = DOB;
DateOfAdmission = date_of_Enrolled;
}
public int RollNo
{
get
{
return rollNo;
}
set
{
this.rollNo = value;
}
}
public string FatherName
{
get
{
return fatherName;
}
set
{
this.fatherName = value;
}
}
public Session Session
{
set
{
this.session = value;
}
get
{
return this.session;
}
}
public string YearOFExam
{
set
{
this.yearOfExam = value;
}
get
{
return yearOfExam;
}
}
public StudentDetail Detail
{
set
{
this.detail = value;
}
get
{
return this.detail;
}
}
public SubjectCombination SubjectCombination
{
set
{
this.subjectCombination = value;
}
get
{
return subjectCombination;
}
}
public Group Group
{
set
{
this.group = value;
}
get
{
return this.group;
}
}
public DateTime DateOfAdmission
{
get
{
return dateOfAdmission;
}
set
{
dateOfAdmission = value;
}
}
public class StudentDetail
{
private GroupNameEnum degreeTitle;
private string sessionyear;
private string reg_No;
private int marksObtained;
private int totalMarks;
private string remarks; // promoted , dropped , admitted..etc
public StudentDetail()
{
}
public StudentDetail(GroupNameEnum degTitle, string year, string about)
{
DegreeTitle = degTitle;
SessionYear = year;
Remarks = about;
}
public GroupNameEnum DegreeTitle
{
set
{
degreeTitle = value;
}
get
{
return degreeTitle;
}
}
public string SessionYear
{
set
{
sessionyear = value;
}
get
{
return sessionyear;
}
}
public string Reg_NO
{
set
{
reg_No = value;
}
get
{
return reg_No;
}
}
public int MarksObtained
{
set
{
marksObtained =value;
}
get
{
return marksObtained;
}
}
public int TotalMarks
{
set
{
totalMarks = value;
}
get
{
return totalMarks;
}
Muhammad Tufail 1979
22-Dec-11 6:44am
View
because to discuss with u people... and u find some mistakes and give me some guide lines on that...
Muhammad Tufail 1979
22-Dec-11 6:35am
View
Deleted
i have started.. i developed some classes and their interlationships but i dont know how to upload all that creative work on this site.....
i want to upload that class diagram....
Muhammad Tufail 1979
14-Dec-11 6:44am
View
Deleted
yes i have taken start blindly ...... but hope i will do it inshallah
Muhammad Tufail 1979
11-Dec-11 10:11am
View
yes i have good idea about object oriented programming
Muhammad Tufail 1979
11-Dec-11 9:59am
View
this is book is not free to download .....
Muhammad Tufail 1979
11-Dec-11 9:54am
View
Deleted
yes i had tried from the beggining and i had found some objects like this...
student, Group, Session, teacher,subect, etc but i dont know the proper way to make association ( realationship) amoung them..... and i m confused about it ... that either it enough or not???
Muhammad Tufail 1979
29-Jun-11 3:04am
View
Yes my brother its working very well.... it gives the desired result...
but i have both Lists of same type ( i.e Supplier (dataType))
Muhammad Tufail 1979
29-Jun-11 2:25am
View
But suppliers.Except(it.suppliers) does not give { "C", "D"} it gives again all 4 i.e { "A", "B","c","D}
Muhammad Tufail 1979
29-Jun-11 2:18am
View
Deleted
But suppliers.Except(it.suppliers) does not give { "C", "D"} it gives again all 4 i.e { "A", "B","c","D}
Muhammad Tufail 1979
29-Jun-11 2:16am
View
yes exactly plz the first case is my case of problem plzzzzzz
Muhammad Tufail 1979
29-Jun-11 2:14am
View
if u dont mind plz so i can tell u some of detail .......
in database i have one table with the name of Items. 2nd table with the name of Suppliers . but both having many to many relationship. so there is a third table with the name of ItemsSuppliers ( contains just the pk of both tables)...
Now i have a Form to display all the particulars of items.. for the Suppliers i have two listBox ( leftListBox and rightListBox) leftListBox contain all the suppliers exist in database and there is a button to select from it and display it in the rightListBox and ( these should be the suppliers for that particular item and should also be saved with that item )......
Now when i want to retrive an item to display on a Form.. so i want that the supplier of this item should be display in rightListBox while the remaining Suppliers which are not the suppliers of that item should be display in the leftListBox.... ( i.e leftListbox contains all the suppliers but not those which are in the rightListBox)......
For this purpose i get all the suppliers from supplier table and want to remove all the suppliers of that particular item. which has been currently selected.....
the above code until i had tried.... do not remove the supplier of a particular item from the Supplier List..
it showes every time all ( 4 Suppliers inculing the item suppliers too) in the leftList box...
plz i m very Newer to .net plz i havent idea... just learning these techneques
thanx
Muhammad Tufail 1979
29-Jun-11 2:00am
View
i have 4 Suppliers in database ( tabel name is Suppliers) and
it.suppliers ( mean item.suppliers) this list contains 2 suppliers at the moment... i mean to say that ( every item has its own suppliers)....
now i want that to exclude these 2 suppliers from the suppliers List and the remaining suppliers should display in the listbox with the name of leftListBox.
Muhammad Tufail 1979
29-Jun-11 1:28am
View
i had tried all the following code but not got the right solution..
remainingSuppliers = from sp in suppliers where !it.Suppliers.Contains (sp.ID ) select sp;
var list = from sp in suppliers where !it.Suppliers.Contains(sp) select sp;
var list = (from sp in suppliers where !it.Suppliers.Contains(sp) select sp).ToList();
remainingSuppliers = suppliers.Except(it.Suppliers).ToList ();
foreach (Supplier ss in remainingSuppliers)
{
leftListBox.Items.Add(ss.Name);
}
Muhammad Tufail 1979
29-Jun-11 1:27am
View
i had tried all the following code but not got the right solution..
remainingSuppliers = from sp in suppliers where !it.Suppliers.Contains (sp.ID ) select sp;
var list = from sp in suppliers where !it.Suppliers.Contains(sp) select sp;
var list = (from sp in suppliers where !it.Suppliers.Contains(sp) select sp).ToList();
remainingSuppliers = suppliers.Except(it.Suppliers).ToList ();
foreach (Supplier ss in remainingSuppliers)
{
leftListBox.Items.Add(ss.Name);
}
Muhammad Tufail 1979
29-Jun-11 1:27am
View
i had tried all the following code but not got the right solution..
remainingSuppliers = from sp in suppliers where !it.Suppliers.Contains (sp.ID ) select sp;
var list = from sp in suppliers where !it.Suppliers.Contains(sp) select sp;
var list = (from sp in suppliers where !it.Suppliers.Contains(sp) select sp).ToList();
remainingSuppliers = suppliers.Except(it.Suppliers).ToList ();
foreach (Supplier ss in remainingSuppliers)
{
leftListBox.Items.Add(ss.Name);
}
Muhammad Tufail 1979
28-Jun-11 13:57pm
View
i have 2 quries one to bring all the suppliers in the firstList and the seconde query bring all the items with (suppliersList ... and this is my seconed list)
now i want to separate the values of second list from the first and remaing to show in a listbox.....
Muhammad Tufail 1979
28-Jun-11 13:53pm
View
Now it does not give any error .... but it does not remove all those items which i want to remove from the firstlist......
first list conatain all those items which are in second list......
sorry still i didnt got the solution...
Muhammad Tufail 1979
28-Jun-11 13:52pm
View
Now it does not give any error .... but it does not remove all those items which i want to remove from the firstlist......
first list conatain all those items which are in second list......
sorry still i didnt got the solution...
Muhammad Tufail 1979
28-Jun-11 11:57am
View
Sorry Sir.... it doesnot working ..
it gives a problem that....... Contains method determine wether the value exists or not and return a boolean value...
i dont undersand but its not working plzzzzz.....
Muhammad Tufail 1979
26-Jun-11 0:26am
View
Thanx very much.... i have got the idea through (safeFileName) ... Now its work properly.....
But if i want to store this picture in a local folder ( i mean to say that in that folder where the project is currently running )...
then what i should do ????
should i use SaveFileDialogBox ?????
Muhammad Tufail 1979
27-May-11 8:43am
View
no sorry i dont know about injection...
Muhammad Tufail 1979
27-May-11 3:43am
View
Actully i m working on a project having ManageItem Form which cotains List of Items with the name of items. the ManageItem form conatains a button with name LookItemButton. at the click event of this button i have an object of another form (i.e ItemLookUpForm) that form cotains a datagrid view which shows all the item with other information.
now i want that when i double Click on DataGridView so the selected item should returnback to ManagItemForm and ItemLookUp Form should be closed or hide...
Muhammad Tufail 1979
27-May-11 3:37am
View
yes i m calling that form by showDialog method..
i had tried by event handler, delegate , using constructor.... etc ..
but when the called form is going to be closed so thus the item thats i want in return from that form becomes Null....
and i m not able to grip that item in the owner form....
Show More