/[H7]/trunk/H7 Server/H7 ServerDlg.cpp
ViewVC logotype

Diff of /trunk/H7 Server/H7 ServerDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 70 by hedin, Tue Feb 6 16:44:32 2007 UTC revision 71 by hedin, Mon Feb 12 09:59:36 2007 UTC
# Line 165  BOOL CH7ServerDlg::OnInitDialog() Line 165  BOOL CH7ServerDlg::OnInitDialog()
165                  return false;                  return false;
166          }          }
167          m_Restart.EnableWindow(false);          m_Restart.EnableWindow(false);
168          m_Stop.EnableWindow(false);          m_Stop.EnableWindow(false)
         m_First = true;  
169  /**********************************************************************/  /**********************************************************************/
170          return TRUE;  // return TRUE  unless you set the focus to a control          return TRUE;  // return TRUE  unless you set the focus to a control
171  }  }
# Line 258  int CH7ServerDlg::StartTcp(void) Line 257  int CH7ServerDlg::StartTcp(void)
257          CString Status = "TCP Port: ";          CString Status = "TCP Port: ";
258          UpdateStatus(Status, Port);          UpdateStatus(Status, Port);
259    
 //      CString tmp;  
 //      tmp.Format("%d", Port);  
 //      m_Port.SetWindowText(tmp);  
   
260          return 0;          return 0;
261  }  }
262    
# Line 380  CString CH7ServerDlg::OnOff(int value) Line 375  CString CH7ServerDlg::OnOff(int value)
375    
376  void CH7ServerDlg::UpdateStatus(CString name, short value)  void CH7ServerDlg::UpdateStatus(CString name, short value)
377  {  {
378    // Updater Status Vinduet.
379          CString Format,StatusWindow;          CString Format,StatusWindow;
380          Format.Format( "%d", value );          Format.Format( "%d", value );
381          m_Status.GetWindowText(StatusWindow);          m_Status.GetWindowText(StatusWindow);
# Line 391  void CH7ServerDlg::UpdateStatus(CString Line 387  void CH7ServerDlg::UpdateStatus(CString
387    
388  void CH7ServerDlg::OnBnClickedStop()  void CH7ServerDlg::OnBnClickedStop()
389  {  {
390  // Close TCP and Sreial connections  // Close TCP and Serial connections
391          TcpServer.Close();          TcpServer.Close();
392          H7Serial.close();          H7Serial.close();
393          // Close server app.          // Close server app.
# Line 400  void CH7ServerDlg::OnBnClickedStop() Line 396  void CH7ServerDlg::OnBnClickedStop()
396    
397  void CH7ServerDlg::OnCancel()  void CH7ServerDlg::OnCancel()
398  {  {
399          TcpServer.Close();  // Lukker TCP og Serial corbindelserne, inden Serveren luller.
400          H7Serial.close();          OnBnClickedStop();
401          // Close server app.  //      CDialog::OnCancel();
           
         CDialog::OnCancel();  
402  }  }
403    
404    

Legend:
Removed from v.70  
changed lines
  Added in v.71

  ViewVC Help
Powered by ViewVC 1.1.20