private void newFontToolStripMenuItem_Click(object sender, EventArgs e) { workSpace = new WorkSpace(WorkPanel.Width, WorkPanel.Height); SYmbolList.Items.Clear(); ContourList.Items.Clear(); WorkPanel.Invalidate(); }
private void PDToENMark_Click(object sender, EventArgs e) { ResQs.Text = qs.Count.ToString(); ResCorrect.Text = qs.Select((PdToEn p) => p.Correct).Select((bool b) => Convert.ToInt32(b)).Aggregate((int l, int r) => l + r).ToString(); WorkPanel.Hide(); qs.ForEach((PdToEn p) => p.Reveal()); WorkPanel.Show(); }
private void SYmbolList_SelectedIndexChanged(object sender, EventArgs e) { workSpace.ChooseSymbol(SYmbolList.SelectedIndex); LoadContourList(SYmbolList.SelectedIndex); ContourList.ClearSelected(); workSpace.ChooseContour(-1); WorkPanel.Invalidate(); }
private void Reset_Click(object sender, EventArgs e) { qs = new List <PdToEn>(); ResQs.Text = ""; ResCorrect.Text = ""; WorkPanel.Hide(); WorkPanel.Controls.Clear(); WorkPanel.Show(); }
private void WorkPanel_MouseDown(object sender, MouseEventArgs e) { if (e.Button.HasFlag(MouseButtons.Left)) { last = e.Location; workSpace.PointIn(e.Location, factory, fact, con); } WorkPanel.Invalidate(); }
private void LastRadioButton_CheckedChanged(object sender, EventArgs e) { if (LastLineRadioButton.Checked) { fact = new LineFactory(); } if (LastBezierRadioButton.Checked) { fact = new BezieFactory(); } workSpace.CloseContour(fact); WorkPanel.Invalidate(); }
private void MainForm_MouseWheel(object sender, MouseEventArgs e) { if (e.Delta > 0) { con.RX += delta; con.RY += delta; con.RWidth -= delta * 2; con.RHeight -= delta * 2; } else { con.RX -= delta; con.RY -= delta; con.RWidth += delta * 2; con.RHeight += delta * 2; } WorkPanel.Invalidate(); }
private void calculateOffGameMoney() { //Need to calculate in function off all variables DateTime now = DateTime.Now; DateTime lastLog = DateTime.Parse(DataController.instance.userData.time); int diferenceSg = (now - lastLog).Seconds; int offLineMoney = 0; for (int i = 0; i < listWorkLine.Count; i++) { WorkPanel workPanel = listWorkLine[i].workPanel; if (workPanel.lineActiveFlag) { offLineMoney += Mathf.RoundToInt((diferenceSg / (workPanel.timeToDig * 2)) * workPanel.miners * workPanel.workerCapacities); } } Debug.Log("OFF Money " + offLineMoney); money += offLineMoney; }
private void WorkPanel_MouseMove(object sender, MouseEventArgs e) { if (e.Button.HasFlag(MouseButtons.Left) && !last.IsEmpty) { float dx = e.Location.X - last.X; float dy = e.Location.Y - last.Y; workSpace.UpdatePoint(dx, dy, con); WorkPanel.Invalidate(); last = e.Location; } if (e.Button.HasFlag(MouseButtons.Right) && !last.IsEmpty) { float dx = e.Location.X - last.X; float dy = e.Location.Y - last.Y; con.RX -= con.LR(dx); con.RY += con.LR(dy); WorkPanel.Invalidate(); last = e.Location; } last = e.Location; }
public Helper(WorkPanel workPanel) { WorkPanel = workPanel; WorkPanel.RightMenuShow.IsEnabled = false; WorkPanel.RightMenuHide.IsEnabled = false; WorkPanel.Left = (SystemParameters.PrimaryScreenWidth / 2) - (WorkPanel.Width / 2); WorkPanel.Top = (SystemParameters.PrimaryScreenHeight / 2) - (WorkPanel.Height / 2); AddHotKey(Key.E, workPanel.Exit); AddHotKey(Key.T, workPanel.Trapeze); AddHotKey(Key.O, workPanel.OpenFile); AddHotKey(Key.R, workPanel.Rectangle); AddHotKey(Key.A, workPanel.AddFigure); AddHotKey(Key.S, workPanel.SaveToFile); AddHotKey(Key.D, workPanel.ClearCanvas); AddHotKey(Key.OemPlus, workPanel.ZoomIncrease, ModifierKeys.None); AddHotKey(Key.OemMinus, workPanel.ZoomDecrease, ModifierKeys.None); AddHotKey(Key.T, workPanel.SetTrapezePoints, ModifierKeys.Control | ModifierKeys.Shift); AddHotKey(Key.R, workPanel.SetRectanglePoints, ModifierKeys.Control | ModifierKeys.Shift); }
private void AllSymbolCheckBox_CheckedChanged(object sender, EventArgs e) { workSpace.CheckAllSymbol(AllSymbolCheckBox.Checked); WorkPanel.Invalidate(); }
private void CoordTextBox_CheckedChanged(object sender, EventArgs e) { workSpace.CheckCoord(CoordTextBox.Checked); WorkPanel.Invalidate(); }
private void WorkingBitmapChanged_Event() { WorkPanel.Image = engine.WorkingBitmap; WorkPanel.Refresh(); }
private void StableBitmapChanged_Event() { WorkPanel.Image = engine.StableBitmap; WorkPanel.Refresh(); }
private void AddCurveButton_Click(object sender, EventArgs e) { //workSpace.AddCurve(); WorkPanel.Invalidate(); }
private void ContourList_SelectedIndexChanged(object sender, EventArgs e) { workSpace.ChooseContour(ContourList.SelectedIndex); WorkPanel.Invalidate(); }
public void Update(WorkPanel window) => WorkPanel = window;
private void WidthNumericUpDown_ValueChanged(object sender, EventArgs e) { workSpace.ChangeWidth((int)WidthNumericUpDown.Value); WorkPanel.Invalidate(); }
private void CloseContourButton_Click(object sender, EventArgs e) { workSpace.CloseContour(fact); WorkPanel.Invalidate(); }
/// <summary> /// 设置当前显示的工作面板Panel /// </summary> private void SetCurrentWorkPanel(WorkPanel workPanel) { // 设置所有的WorkPanel不可见 foreach (Control control in this.Controls) { if (control is WorkPanelBase) { control.Visible = false; } } // 设置需要显示的WorkPanel switch (workPanel) { case WorkPanel.MyHome: this.myHomeWorkPanel.Visible = true; break; case WorkPanel.Practice: this.practiceWorkPanel.Visible = true; break; case WorkPanel.ExamSimulation: this.examSimulationWorkPanel.Visible = true; break; case WorkPanel.VipPapers: this.vipPapersWorkPanel.Visible = true; break; case WorkPanel.PreviousPapers: this.previousPapersWorkPanel.Visible = true; break; case WorkPanel.MyWrong: this.myWrongWorkPanel.Visible = true; break; case WorkPanel.MyFavorite: this.myFavoriteWorkPanel.Visible = true; break; case WorkPanel.MoreTools: this.moreToolsWorkPanel.Visible = true; break; default: break; } }
private void DeleteButton_Click(object sender, EventArgs e) { workSpace.DeletePoints(factory, fact); WorkPanel.Invalidate(); }