Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
Questionhow to show ip address client to listview when client connected and shutdown,wakeup client using c# windows forms. Thanks Pin
Member 107057405-Apr-14 22:02
Member 107057405-Apr-14 22:02 
QuestionRe: how to show ip address client to listview when client connected and shutdown,wakeup client using c# windows forms. Thanks Pin
Richard MacCutchan6-Apr-14 1:40
mveRichard MacCutchan6-Apr-14 1:40 
QuestionRoles in c# Winforms Pin
meloukoud5-Apr-14 7:42
meloukoud5-Apr-14 7:42 
QuestionThe dates of the next week and the previous week days Pin
ismail204-Apr-14 21:28
ismail204-Apr-14 21:28 
AnswerRe: The dates of the next week and the previous week days Pin
OriginalGriff4-Apr-14 22:16
mveOriginalGriff4-Apr-14 22:16 
GeneralRe: The dates of the next week and the previous week days Pin
ismail204-Apr-14 23:29
ismail204-Apr-14 23:29 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff4-Apr-14 23:35
mveOriginalGriff4-Apr-14 23:35 
GeneralRe: The dates of the next week and the previous week days Pin
ismail204-Apr-14 23:48
ismail204-Apr-14 23:48 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 0:27
mveOriginalGriff5-Apr-14 0:27 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 0:55
ismail205-Apr-14 0:55 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 3:34
mveOriginalGriff5-Apr-14 3:34 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 4:27
ismail205-Apr-14 4:27 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 4:35
mveOriginalGriff5-Apr-14 4:35 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 4:43
ismail205-Apr-14 4:43 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 4:49
mveOriginalGriff5-Apr-14 4:49 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 4:52
ismail205-Apr-14 4:52 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 5:13
mveOriginalGriff5-Apr-14 5:13 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 5:27
ismail205-Apr-14 5:27 
area code next week dates this. now you need the area code of the previous week dates

DateTime strtdt = DateTime.ParseExact(mondaylbl.Text, "dd/MM/yyyy", null);

GregorianCalendar cal = new GregorianCalendar(GregorianCalendarTypes.Localized);
int week = cal.GetWeekOfYear(strtdt, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);

int year = strtdt.Year;

DayOfWeek day = DayOfWeek.Monday;
DateTime startOfYear = new DateTime(year, 1, 1);

int daysToFirstCorrectDay = (((int)day - (int)startOfYear.DayOfWeek) + 7) % 7;

DateTime FirstDay = startOfYear.AddDays(7 * (week - 1) + daysToFirstCorrectDay);
DateTime sonrakiikincigun = startOfYear.AddDays(7 * (week - 1) + daysToFirstCorrectDay).AddDays(1);
DateTime sonrakiucuncugun = startOfYear.AddDays(7 * (week - 1) + daysToFirstCorrectDay).AddDays(2);
DateTime sonrakidorduncugun = startOfYear.AddDays(7 * (week - 1) + daysToFirstCorrectDay).AddDays(3);
DateTime sonrakibesincigun = startOfYear.AddDays(7 * (week - 1) + daysToFirstCorrectDay).AddDays(4);
DateTime sonrakialtincigun = startOfYear.AddDays(7 * (week - 1) + daysToFirstCorrectDay).AddDays(5);
DateTime Endaday = startOfYear.AddDays(7 * (week - 1) + daysToFirstCorrectDay).AddDays(6);

mondaylbl.Text=FirstDay.ToString("dd/MM/yyyy");
tuesdaylbl.Text = sonrakiikincigun.ToString("dd/MM/yyyy");
wednesdaylbl.Text = sonrakiucuncugun.ToString("dd/MM/yyyy");
thursdaylbl.Text = sonrakidorduncugun.ToString("dd/MM/yyyy");
fridaylbl.Text = sonrakibesincigun.ToString("dd/MM/yyyy");
saturdaylbl.Text = sonrakialtincigun.ToString("dd/MM/yyyy");
sundaylbl.Text=Endaday.ToString("dd/MM/yyyy");
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 5:42
mveOriginalGriff5-Apr-14 5:42 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 5:47
ismail205-Apr-14 5:47 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 6:12
mveOriginalGriff5-Apr-14 6:12 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 6:12
ismail205-Apr-14 6:12 
QuestionAnonymous or static or lambda methods?? Pin
Sea_Sharp4-Apr-14 8:56
Sea_Sharp4-Apr-14 8:56 
AnswerRe: Anonymous or static or lambda methods?? Pin
Mycroft Holmes4-Apr-14 14:20
professionalMycroft Holmes4-Apr-14 14:20 
AnswerRe: Anonymous or static or lambda methods?? Pin
OriginalGriff4-Apr-14 20:55
mveOriginalGriff4-Apr-14 20:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.