Click here to Skip to main content
15,892,298 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to refuse changes of controls in a form ? Pin
Pete O'Hanlon1-Aug-12 0:39
mvePete O'Hanlon1-Aug-12 0:39 
GeneralRe: How to refuse changes of controls in a form ? Pin
taibc1-Aug-12 0:42
taibc1-Aug-12 0:42 
AnswerRe: How to refuse changes of controls in a form ? Pin
Ed Hill _5_1-Aug-12 0:47
Ed Hill _5_1-Aug-12 0:47 
GeneralRe: How to refuse changes of controls in a form ? Pin
taibc1-Aug-12 0:50
taibc1-Aug-12 0:50 
GeneralRe: How to refuse changes of controls in a form ? Pin
Pete O'Hanlon1-Aug-12 0:54
mvePete O'Hanlon1-Aug-12 0:54 
AnswerRe: How to refuse changes of controls in a form ? Pin
Fred 341-Aug-12 4:28
Fred 341-Aug-12 4:28 
QuestionHow can convert a lit<> to a DataTable? Pin
devenv.exe31-Jul-12 22:49
professionaldevenv.exe31-Jul-12 22:49 
AnswerRe: How can convert a lit to a DataTable? Pin
Wayne Gaylard31-Jul-12 23:11
professionalWayne Gaylard31-Jul-12 23:11 
AnswerRe: How can convert a lit to a DataTable? Pin
Richard MacCutchan31-Jul-12 23:59
mveRichard MacCutchan31-Jul-12 23:59 
AnswerRe: How can convert a lit to a DataTable? Pin
devenv.exe1-Aug-12 2:56
professionaldevenv.exe1-Aug-12 2:56 
AnswerRe: How can convert a lit to a DataTable? Pin
Ramesh Muthiah3-Aug-12 1:21
Ramesh Muthiah3-Aug-12 1:21 
Questioncode doesn`t work in win xp but works win 7 Pin
Member 932688731-Jul-12 20:53
Member 932688731-Jul-12 20:53 
AnswerRe: code doesn`t work in win xp but works win 7 Pin
OriginalGriff31-Jul-12 22:25
mveOriginalGriff31-Jul-12 22:25 
GeneralRe: code doesn`t work in win xp but works win 7 Pin
Member 932688731-Jul-12 23:29
Member 932688731-Jul-12 23:29 
GeneralRe: code doesn`t work in win xp but works win 7 Pin
Pete O'Hanlon31-Jul-12 23:47
mvePete O'Hanlon31-Jul-12 23:47 
GeneralRe: code doesn`t work in win xp but works win 7 Pin
Member 93268871-Aug-12 0:08
Member 93268871-Aug-12 0:08 
GeneralRe: code doesn`t work in win xp but works win 7 Pin
Pete O'Hanlon1-Aug-12 0:33
mvePete O'Hanlon1-Aug-12 0:33 
GeneralRe: code doesn`t work in win xp but works win 7 Pin
Member 93268871-Aug-12 0:59
Member 93268871-Aug-12 0:59 
Thanks for the help but still nothing. It maybe something with the entering the data into the datagrideview:
C#
//reading from the xml
 private void ReadFromXml()
        {
            List<Printer> PrinterList = new List<Printer>();
            TextReader textReader = new StreamReader("xml\\PrinterDetailsLi.xml");
            XmlSerializer deserializer = new XmlSerializer(typeof(List<Printer>));
            PrinterList = (List<Printer>)deserializer.Deserialize(textReader);
            textReader.Close();

            Ping pingSender = new Ping();
            IPAddress address = IPAddress.Loopback;

            for (int i = 0; i < PrinterList.Count; i++)
            {
                PrinterList PList = new PrinterList();
                //add an xml row to data table
                IPAddress ip = IPAddress.Parse(PrinterList[i].PrinterIP);
                PingReply reply = pingSender.Send(ip,5);
                if (reply.Status == IPStatus.Success)
                {
                    DataRow row = m_table.NewRow();
                    SNMP snmp = new SNMP(PrinterList[i].PrinterIP);
                    string Res = snmp.connectSnmp();
                    row["PrinterConnect"] = "כן";
                    row["PrinterCounter"] = Res;
                    row["PrinterName"] = PrinterList[i].PrinterName;
                    row["PrinterIP"] = PrinterList[i].PrinterIP;
                    m_table.Rows.Add(row);
                    PList.PrintConnect = 1;
                    PList.PrintCounter = Res;
                    PList.PrintIP = PrinterList[i].PrinterIP;
                    PList.PrintName = PrinterList[i].PrinterName;
                    PList.date = DateTime.Today;
                    PrList.Add(PList);
                }
                else
                {
                    DataRow row = m_table.NewRow();
                    row["PrinterConnect"] = "לא";
                    row["PrinterCounter"] = "--";
                    row["PrinterName"] = PrinterList[i].PrinterName;
                    row["PrinterIP"] = PrinterList[i].PrinterIP;
                    row["PrinterPlace"] = PrinterList[i].PrinterPlace;
                    m_table.Rows.Add(row);
                    PList.PrintConnect = 0;
                    PList.PrintCounter = "--";
                    PList.PrintIP = PrinterList[i].PrinterIP;
                    PList.PrintName = PrinterList[i].PrinterName;
                    PList.date = DateTime.Today;
                    PrList.Add(PList);
                }
            }

            XmlSerializer serializer = new XmlSerializer(typeof(List<Printer>));
            TextWriter Pd = new StreamWriter(("xml\\PrinterDetailsLi.xml"));
            serializer.Serialize(Pd, PrinterList);
            Pd.Close();
        }


What else can make it work on win7 but not on win XP?
GeneralRe: code doesn`t work in win xp but works win 7 Pin
Pete O'Hanlon1-Aug-12 1:03
mvePete O'Hanlon1-Aug-12 1:03 
AnswerRe: code doesn`t work in win xp but works win 7 Pin
Member 93268871-Aug-12 1:19
Member 93268871-Aug-12 1:19 
GeneralRe: code doesn`t work in win xp but works win 7 Pin
Pete O'Hanlon1-Aug-12 1:54
mvePete O'Hanlon1-Aug-12 1:54 
AnswerRe: code doesn`t work in win xp but works win 7 Pin
Member 93268871-Aug-12 4:45
Member 93268871-Aug-12 4:45 
Questionconvert string to array Pin
Member 916988731-Jul-12 14:59
Member 916988731-Jul-12 14:59 
GeneralRe: convert string to array Pin
Peter_in_278031-Jul-12 15:53
professionalPeter_in_278031-Jul-12 15:53 
AnswerRe: convert string to array Pin
Abhinav S31-Jul-12 17:39
Abhinav S31-Jul-12 17:39 

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.