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"); } }
public void SaveMode() { if (mode == ModeValue.edit) { mode = ModeValue.save; this.MouseMove -= AccessPointMouseMove; this.MouseDown -= AccessPointMouseDown; this.MouseUp -= AccessPointMouseUp; LoadContextMenuStripSaveMode(); } }
public void EditMode() { if (mode == ModeValue.save) { mode = ModeValue.edit; this.MouseMove += AccessPointMouseMove; this.MouseDown += AccessPointMouseDown; this.MouseUp += AccessPointMouseUp; LoadContextMenuStripEditMode(); } }
/// <summary> /// /// </summary> /// <param name="modeValue"></param> /// <returns></returns> public static HeatTransferMode Parse(ModeValue modeValue) { HeatTransferMode r = null; foreach (HeatTransferMode item in a) { if (modeValue == item.ModeValue) { r = item; } } return r; }
/// <summary> /// /// </summary> /// <param name="modeValue"></param> /// <returns></returns> static public HeatTransferMode Parse(ModeValue modeValue) { HeatTransferMode r = null; foreach (HeatTransferMode item in a) { if (modeValue == item.ModeValue) { r = item; } } return(r); }
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 + "'"); }
public void SetValue(ModeValue mode) { if (mode == ModeValue.min) { Console.WriteLine("set value min"); } else if (mode == ModeValue.medium) { Console.WriteLine("set value medium"); } if (mode == ModeValue.max) { Console.WriteLine("set value max"); } }
/// <summary> /// /// </summary> /// <param name="value"></param> /// <returns></returns> static public HeatTransferMode Parse(int value) { ModeValue mv = (ModeValue)value; return(Parse(mv)); }
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 + "'"); }