private void toolStripButtonOpenRealWatch_Click(object sender, EventArgs e)
        {
            if (realWatchState == RealWatchState.Close)
            {
                realWatchState = RealWatchState.Open;
                ImageOperate.UpdateButtonItemToToolStrip(toolStripControlConsole, 1, "MonitorOpen.bmp", "Open");

                if (!realTimeControllerList.ContainsKey(231))
                {
                    realTimeControllerList.Add(231, new RealTimeMonitor(this, "192.168.1.230"));
                    realTimeControllerList[231].openRealTimeMonitorPort();
                }
            }
            else if (realWatchState == RealWatchState.Open)
            {
                realWatchState = RealWatchState.Close;
                ImageOperate.UpdateButtonItemToToolStrip(toolStripControlConsole, 1, "MonitorPause.bmp", "Pause");

                if (realTimeControllerList.ContainsKey(231))
                {
                    realTimeControllerList[231].closeRealTimeMonitorPort();
                    realTimeControllerList.Remove(231);
                }
            }
        }
 private void toolStripButtonUpdateElectricMap_Click(object sender, EventArgs e)
 {
     if (modeValue == ModeValue.save)
     {
         modeValue = ModeValue.edit;
         foreach (ComponentDoorUnit doorUint in formPictureMovable.pictureBoxElectronicMap.Controls)
         {
             doorUint.EditMode();
         }
         ImageOperate.UpdateButtonItemToToolStrip(toolStripControlConsole, 0, "update.bmp", "Update");
     }
     else if (modeValue == ModeValue.edit)
     {
         modeValue = ModeValue.save;
         foreach (ComponentDoorUnit doorUint in formPictureMovable.pictureBoxElectronicMap.Controls)
         {
             doorUint.SaveMode();
             modelDoorUnitInfo.DoorUnitID      = int.Parse(doorUint.Name);
             modelDoorUnitInfo                 = bllDoorUnitInfo.GetModel(modelDoorUnitInfo.DoorUnitID);
             modelElectronicMap                = bllElectronicMap.GetModelList("ElectronicMapName = '" + formPictureMovable.pictureBoxElectronicMap.Name + "'")[0];
             modelDoorUnitInfo.PositionX       = doorUint.Location.X;
             modelDoorUnitInfo.PositionY       = doorUint.Location.Y;
             modelDoorUnitInfo.ElectronicMapID = modelElectronicMap.ElectronicMapID;
             bllDoorUnitInfo.Update(modelDoorUnitInfo);
         }
         ImageOperate.UpdateButtonItemToToolStrip(toolStripControlConsole, 0, "save.bmp", "Save");
     }
 }
        private void saveElectricMap()
        {
            modeValue = ModeValue.save;

            toolStripControlConsole.Items[0].Text = "Update";
            //toolStripControlConsole.Items[0].Image = Publiclass.getToolStrip("Update.BMP");
            ImageOperate.UpdateButtonItemToToolStrip(toolStripControlConsole, 0, "update.bmp", "Update");

            //toolStripStatusLabelElectronicMapMode.Text = ClassMessageBox.getStringFromRes("disTextMapMode1");


            List <KryptonAccessController.AccessDataBase.Model.ElectronicMap> listElectronicMap = bllElectronicMap.GetModelList("ElectronicMapName = '" + formPictureMovable.pictureBoxElectronicMap.Name + "'");
        }