private void PointOperMode_Click(object sender, EventArgs e) { ImgBtn imageButton = sender as ImgBtn; switch (imageButton.Name) { case "ibAddPoint": shapeOperManager.AppendShapePoint(); break; case "ibDelPoint": shapeOperManager.DeleteShapePoint(); break; case "ibMirror": shapeOperManager.MirrorShapePoint(0); break; case "ibMirror1": shapeOperManager.MirrorShapePoint(1); break; default: break; } picDrawBackGround.Image = shapeOperManager.GetShapeBitmap(); ShowNeedleInfo(); }
private void Direction_MouseUp(object sender, MouseEventArgs e) { ImgBtn imgBtn = sender as ImgBtn; imgBtn.btnClickUp(); if (timeClock != null) { if (timeClock.ShouldGetBitmapAgain) { picDrawBackGround.Image = shapeOperManager.GetShapeBitmap(); ShowNeedleInfo(); } timeClock.PressButtonEnable = false; } timMain.Enabled = false; }
private void Direction_MouseDown(object sender, MouseEventArgs e) { ImgBtn imgBtn = sender as ImgBtn; imgBtn.btnClickDown(); String directName = imgBtn.Name; directName = directName.Remove(0, 3); directionType = (DirectionType)Enum.Parse(typeof(DirectionType), directName, true); if (timeClock == null) { timeClock = new TimeClock(timMain.Interval, 1); } timeClock.PressButtonEnable = true; timMain.Enabled = true; shapeOperManager.MovePlus(directionType); ShowNeedleInfo(); picDrawBackGround.Image = shapeOperManager.GetShapeBitmap(); }
void showDetailsScene() { foreach (var ImgBtn in ImgList) { ImgBtn.SetActive(true); } OCRText.SetActive(true); WikiButton.SetActive(true); RecommendationOne.SetActive(true); RecommendationTwo.SetActive(true); RecommendationThree.SetActive(true); GameObject.Find("AddOcr").SetActive(true); GameObject.Find("AddPhoto").SetActive(true); GameObject.Find("Recommendations").SetActive(true); GameObject.Find("ExtraInfo").SetActive(true); ArtTitle.SetActive(false); ArtTitleLabel.SetActive(false); CreateArtButton.SetActive(false); }
private void ImgBtn_MouseDown(object sender, MouseEventArgs e) { ImgBtn imgBtn = sender as ImgBtn; imgBtn.btnClickDown(); }
public void ImgBtn_MouseUp(object sender, MouseEventArgs e) { ImgBtn imgBtn = sender as ImgBtn; imgBtn.btnClickUp(); }
private void InitWarnForm() { if (haveInitForm == false) { haveInitForm = true; if (warnPicBox == null) { warnPicBox = new PictureBox(); this.Controls.Add(warnPicBox); } if (ibWarnSure != null) { ibWarnSure.Visible = false; } if ((warnType != WarnType.CommunicationError) && (warnType != WarnType.ModifiedValueWarn)) { this.Size = new Size(316, 188); warnPicBox.Dock = DockStyle.Fill; warnPicBox.SizeMode = PictureBoxSizeMode.Normal; warnPicBox.Location = new Point(0, 0); warnTimer = new Timer(); warnTimer.Interval = 800; warnTimer.Tick += new EventHandler(WarnTime_Click); warnTimer.Enabled = false; } else { this.Size = new Size(316, 188); warnPicBox.Dock = DockStyle.Fill; warnPicBox.SizeMode = PictureBoxSizeMode.Normal; warnPicBox.Location = new Point(0, 0); if (ibWarnSure == null) { ibWarnSure = new ImgBtn(); ibWarnSure.SetMap(Properties.Resources.ButtonOK_OFF, Properties.Resources.ButtonOK_ON); ibWarnSure.Enabled = true; ibWarnSure.Location = new Point(110, 121); ibWarnSure.Size = new Size(97, 42); ibWarnSure.Click += new EventHandler(WarnSureButton_Click); ibWarnSure.MouseDown += new MouseEventHandler(ImgBtn_MouseDown); ibWarnSure.MouseUp += new MouseEventHandler(ImgBtn_MouseUp); this.Controls.Add(ibWarnSure); } ibWarnSure.BringToFront(); ibWarnSure.Visible = true; } Bitmap ErrMsg; ErrMsg = (Bitmap)Properties.Resources.ResourceManager.GetObject(warnType.ToString()); warnPicBox.Image = ErrMsg; switch (warnType) { case WarnType.ModifiedValueWarn: case WarnType.CommunicationError: break; case WarnType.ModeSwitchWarn: warnTimer.Enabled = false; break; default: warnTimer.Enabled = true; break; } } if (warnTimer != null) { warnTimer.Enabled = true; } }