コード例 #1
0
 public ChattingForm(string strID, HotelFront form)
 {
     InitializeComponent();
     mv_strID       = strID;
     mv_mainForm    = form;
     mv_isConnected = true;
     if (mv_strID == "SYSTEM_SERVER")
     {
         txtbx_input.Enabled = txtbx_input.Visible = false;
         btn_send.Enabled    = btn_send.Visible = false;
     }
     try
     {
         using (StreamWriter file = new StreamWriter(Application.StartupPath + $@"\chtlg_{mv_strID.Replace("\r","")}", true))
         {
             file.Write("");
         }
         using (StreamReader file = new StreamReader(Application.StartupPath + $@"\chtlg_{mv_strID.Replace("\r", "")}", true))
         {
             if (file.EndOfStream)
             {
                 return;
             }
             txt_chat_display.AppendText(file.ReadToEnd());
         }
     }
     catch (Exception except)
     {
         MessageBox.Show(except.Message, mv_strID);
     }
 }
コード例 #2
0
 public EditCustomer(HotelFront calledForm)
 {
     InitializeComponent();
     parentForm = calledForm;
     mutex      = new Mutex();
 }