private void OKButton_Click(object sender, EventArgs e)
 {
     if (NI != null)
     {
         ACS.SendPCStatus(NI, ALEmanCafeServer.MessageStatus.sendmessage, false, 0, false, null, richTextBox1.Text);
     }
     else
     {
         foreach (NetworkItems NI2 in NetworkItems.ALLNetworks.Values)
         {
             if (string.IsNullOrEmpty(NI2.IP) == false)
             {
                 ACS.SendPCStatus(NI2, ALEmanCafeServer.MessageStatus.sendmessage, false, 0, false, null, richTextBox1.Text);
             }
         }
     }
     CancelCloseButton.PerformClick();
 }
        private void OKButton_Click(object sender, EventArgs e)
        {
            double HP = Program.HourPrice;
            double MC = Program.MinimumCost;

            try
            {
                HP = Convert.ToDouble(this.HourPrice.Text);
                MC = Convert.ToDouble(this.MinimumCost.Text);
            }
            catch { }

            Program.HourPrice               = HP;
            Program.MinimumCost             = MC;
            Program.MyUserName              = this.UserTextBox.Text;
            Program.MyPassword              = this.PassTextBox.Text;
            Program.Askpasswordonstartup    = this.Askpasswordonstartup.Checked;
            Program.EnableUSBPluginWarning  = this.EnableUSBPluginWarning.Checked;
            Program.EnableUSBPlugoutWarning = this.EnableUSBPlugoutWarning.Checked;
            MyDatabase.Save();
            CancelCloseButton.PerformClick();
        }