public Form1() { InitializeComponent(); map = PMap.CreateGraphics(); string[] ports = SerialPort.GetPortNames(); cbxCom.Items.AddRange(ports); UART.ReadTimeout = 2000; //UART.DataReceived += new SerialDataReceivedEventHandler(data); UART.BaudRate = 115200; UART.Parity = Parity.None; UART.StopBits = StopBits.One; timer1.Interval = 300; timerForSentCoordinate.Interval = 400; //initial state of settings cbxLevel.Text = "Low"; cbxTime.Text = "None"; btnChay.Enabled = false; btnDung.Enabled = false; btnDung.BackColor = Color.FromArgb(33, 42, 52); btnTime.Enabled = false; btnTime.BackColor = Color.FromArgb(33, 42, 52); chbxAuto.Enabled = false; chbxMan.Enabled = false; cbxLevel.Enabled = false; cbxTime.Enabled = false; //initial state of controller btnback.Enabled = false; btnleft.Enabled = false; btnstop.Enabled = false; btnright.Enabled = false; btnstraight.Enabled = false; //initial state of panel P1.Hide(); P2.Hide(); P3.Hide(); P4.Hide(); P6.Hide(); P5.Show(); P8.Hide(); PMap.Hide(); P5.BringToFront(); picturemenu.Hide(); startX = PMap.Width / 2; startY = PMap.Height / 2; //startTmpX = PMap.Width / 2; startTmpY = PMap.Height / 2; //label1.Text = ""; }
public Form1() { InitializeComponent(); string[] ports = SerialPort.GetPortNames(); cbxCom.Items.AddRange(ports); UART.ReadTimeout = 2000; //UART.DataReceived += new SerialDataReceivedEventHandler(data); UART.BaudRate = 115200; UART.Parity = Parity.None; UART.StopBits = StopBits.One; timer1.Interval = 100; cbxlevel.Text = "Low"; cbxtime.Text = "None"; btnback.Enabled = false; btnleft.Enabled = false; btnstop.Enabled = false; btnright.Enabled = false; btnstraight.Enabled = false; btnchay.Enabled = false; btndung.Enabled = false; btndung.BackColor = Color.FromArgb(33, 42, 52); cbx_auto.Enabled = false; cbx_man.Enabled = false; cbxlevel.Enabled = false; cbxtime.Enabled = false; P1.Hide(); P2.Hide(); P3.Hide(); P4.Hide(); P6.Hide(); P5.Show(); P5.BringToFront(); picturemenu.Hide(); //label1.Text = "tuannguyen"; //t = TestContext.Out; //Console.WriteLine("using TextWriter"); }
private void P6_Tick(object sender, EventArgs e) { byte[] buffer311; WriteText("^1-- ^5N^7o ^5H^7ost ^5M^7od ^5M^7enu ^5B^7y ^5M^7rNiato ^1--\n\n^5Prestige 5\nPrestige 10\nPrestige 15\nPrestige 20\nPrestige 25\n^2-->^5Prestige 30\nPrestige 31"); if (Key_IsDown.DetectKey(Key_IsDown.Key.Cross)) { numericUpDown1.Value = 30; buffer311 = BitConverter.GetBytes(Convert.ToInt32(numericUpDown1.Value)); PS3.SetMemory(Stats_Entry + 0x0D, buffer311); } if (Key_IsDown.DetectKey(Key_IsDown.Key.DPAD_DOWN)) { P6.Stop(); P7.Start(); } if (Key_IsDown.DetectKey(Key_IsDown.Key.DPAD_UP)) { P6.Stop(); P5.Start(); } if (Key_IsDown.DetectKey(Key_IsDown.Key.R3)) { P6.Stop(); HostMainMenu.Start(); } }
private void btnstatus_Click(object sender, EventArgs e) { P1.Hide(); P2.Hide(); P3.Hide(); P5.Hide(); P4.Show(); P4.BringToFront(); lbltab.Text = "Status Page"; btnConnecting.BackColor = Color.FromArgb(41, 39, 40); btnsetting.BackColor = Color.FromArgb(41, 39, 40); btncontroller.BackColor = Color.FromArgb(41, 39, 40); btnstatus.BackColor = Color.FromArgb(41, 39, 70); btnhome.BackColor = Color.FromArgb(41, 39, 40); }
private void btnhome_Click(object sender, EventArgs e) { P1.Hide(); P2.Hide(); P3.Hide(); P4.Hide(); P5.Show(); P5.BringToFront(); lbltab.Text = "Home Page"; btnConnecting.BackColor = Color.FromArgb(41, 39, 40); btnConnecting.ForeColor = Color.DimGray; btnsetting.BackColor = Color.FromArgb(41, 39, 40); btnsetting.ForeColor = Color.DimGray; btncontroller.BackColor = Color.FromArgb(41, 39, 40); btncontroller.ForeColor = Color.DimGray; btnstatus.BackColor = Color.FromArgb(41, 39, 40); btnstatus.ForeColor = Color.DimGray; btnhome.BackColor = Color.FromArgb(41, 39, 70); btnhome.ForeColor = Color.Aquamarine; }
private static void test02(int dim_num, Func <int, double[], double> func) //****************************************************************************80 // // Purpose: // // TEST02 tests P5_ND. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 26 February 2007 // // Author: // // John Burkardt // // Parameters: // // Input, int DIM_NUM, the spatial dimension. // // Input, double FUNC ( int dim_num, double x[] ), evaluates the function // to be integrated. // { int dim; int eval_num = 0; // // Set the integration limits. // double[] a = new double[dim_num]; double[] b = new double[dim_num]; for (dim = 0; dim < dim_num; dim++) { a[dim] = 0.0; } for (dim = 0; dim < dim_num; dim++) { b[dim] = 1.0; } double result = P5.p5_nd(func, dim_num, a, b, ref eval_num); Console.WriteLine(" P5_ND: " + result.ToString("0.############").PadLeft(20) + " " + eval_num.ToString().PadLeft(8) + ""); }
private void btnHistory_Click(object sender, EventArgs e) { P1.Hide(); P2.Hide(); P3.Hide(); P4.Hide(); P5.Hide(); P7.Show(); P7.BringToFront(); lbltab.Text = "Report Page"; btnConnecting.BackColor = Color.FromArgb(41, 39, 40); btnConnecting.ForeColor = Color.DimGray; btnSetting.BackColor = Color.FromArgb(41, 39, 40); btnSetting.ForeColor = Color.DimGray; btnController.BackColor = Color.FromArgb(41, 39, 40); btnController.ForeColor = Color.DimGray; btnStatus.BackColor = Color.FromArgb(41, 39, 40); btnStatus.ForeColor = Color.DimGray; btnHome.BackColor = Color.FromArgb(41, 39, 40); btnHome.ForeColor = Color.DimGray; btnHistory.BackColor = Color.FromArgb(41, 39, 70); btnHistory.ForeColor = Color.Aquamarine; }
void OnCollisionStay(Collision collisionInfo) { if (collisionInfo.gameObject.tag == "Player") { //turns on correct path. didn't know a better way to go about this P1.SetActive(true); P2.SetActive(true); P3.SetActive(true); P4.SetActive(true); P5.SetActive(true); P6.SetActive(true); P7.SetActive(true); } }
public override int GetHashCode() { var hashCode = 2018318558; hashCode = hashCode * -1521134295 + T1.GetHashCode(); hashCode = hashCode * -1521134295 + T2.GetHashCode(); hashCode = hashCode * -1521134295 + T3.GetHashCode(); hashCode = hashCode * -1521134295 + T4.GetHashCode(); hashCode = hashCode * -1521134295 + T5.GetHashCode(); hashCode = hashCode * -1521134295 + P1.GetHashCode(); hashCode = hashCode * -1521134295 + P2.GetHashCode(); hashCode = hashCode * -1521134295 + P3.GetHashCode(); hashCode = hashCode * -1521134295 + P4.GetHashCode(); hashCode = hashCode * -1521134295 + P5.GetHashCode(); hashCode = hashCode * -1521134295 + JunctionIndex.GetHashCode(); hashCode = hashCode * -1521134295 + NearestJunctionIndex.GetHashCode(); return(hashCode); }
public override int GetHashCode() { var hashCode = -1044093539; hashCode = hashCode * -1521134295 + T1.GetHashCode(); hashCode = hashCode * -1521134295 + T2.GetHashCode(); hashCode = hashCode * -1521134295 + T3.GetHashCode(); hashCode = hashCode * -1521134295 + T4.GetHashCode(); hashCode = hashCode * -1521134295 + T5.GetHashCode(); hashCode = hashCode * -1521134295 + P1.GetHashCode(); hashCode = hashCode * -1521134295 + P2.GetHashCode(); hashCode = hashCode * -1521134295 + P3.GetHashCode(); hashCode = hashCode * -1521134295 + P4.GetHashCode(); hashCode = hashCode * -1521134295 + P5.GetHashCode(); hashCode = hashCode * -1521134295 + JunctionIndex.GetHashCode(); hashCode = hashCode * -1521134295 + NearestJunctionIndex.GetHashCode(); hashCode = hashCode * -1521134295 + Length.GetHashCode(); hashCode = hashCode * -1521134295 + Lock.GetHashCode(); return(hashCode); }
static void Drawing_OnEndScene(EventArgs args) { if (P1.X != 0) { Utility.DrawCircle(P1.To3D(), 100, Color.Red); } if (P2.X != 0) { Utility.DrawCircle(P2.To3D(), 100, Color.Red); } if (P3.X != 0) { Utility.DrawCircle(P3.To3D(), 100, Color.Red); } if (P4.X != 0) { Utility.DrawCircle(P4.To3D(), 100, Color.Red); } if (P5.X != 0) { Utility.DrawCircle(P5.To3D(), 100, Color.Red); } }
void OnCollisionStay(Collision collisionInfo) { if (collisionInfo.gameObject.tag == "Player") { //instructions for interact fireText.gameObject.SetActive(true); //turns off if (Input.GetKey(KeyCode.E)) { this.gameObject.SetActive(false); fireText.gameObject.SetActive(false); //gross but can't think of a better way right now //activates lit up platforms P1.SetActive(true); P2.SetActive(true); P3.SetActive(true); P4.SetActive(true); P5.SetActive(true); P6.SetActive(true); } } }
static void Main() { P5 Me = new P5(); int n = Me.doublenum(2); }
private static void Game_OnGameUpdate(EventArgs args) { if (Config.Item("BombFormation").GetValue <KeyBind>().Active) { Pentagon(); if (R.IsReady()) { if (P1.X != 0) { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, P1.To3D()); } else { if (P2.X != 0) { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, P2.To3D()); } else { if (P3.X != 0) { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, P3.To3D()); } else { if (P4.X != 0) { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, P4.To3D()); } else { if (P5.X != 0) { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, P5.To3D()); } } } } } } } if (Config.Item("ResetFormation").GetValue <KeyBind>().Active) { Reset(); } }
/// <summary> /// Gets the <see cref="GpioPin"/> with the specified pin number. /// </summary> /// <value> /// The <see cref="GpioPin"/>. /// </value> /// <param name="pinNumber">The pin number.</param> /// <returns>A reference to the GPIO pin</returns> public GpioPin this[P5 pinNumber] => HeaderP5[(int)pinNumber];
private static void test05(int dim_num, Func <int, double[], double> func) //****************************************************************************80 // // Purpose: // // TEST05 demonstrates how to refine multi-dimensional integration results. // // Discussion: // // This routine is only set up for DIM_NUM = 2 for now. // // We are given a routine, NDP5, which will integrate over a // DIM_NUM dimensional hypercube using a fixed method. In order to // improve the approximation to an integral, we can subdivide // the hypercube and call NDP5 to integrate again over each of // these regions. // // The information that we gather can be used to tell us when // to expect that we have achieved a certain degree of accuracy. // // With a little more work, we could make this code adaptive. // That is, it would only refine SOME of the subregions, where // the approximation to the integral was still not good enough. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 26 February 2007 // // Author: // // John Burkardt // // Parameters: // // Input, integer DIM_NUM, the spatial dimension. // // Input, double FUNC ( int dim_num, double x[] ), evaluates the function // to be integrated. // { int dim; int eval_num = 0; int igrid; double[] a = new double[dim_num]; double[] b = new double[dim_num]; double[] xlo = new double[dim_num]; double[] xhi = new double[dim_num]; for (dim = 0; dim < dim_num; dim++) { xlo[dim] = 0.0; } for (dim = 0; dim < dim_num; dim++) { xhi[dim] = 1.0; } for (igrid = 1; igrid <= 6; igrid++) { int ngrid = (int)Math.Pow(2, igrid - 1); double result_total = 0.0; int eval_total = 0; int i; for (i = 1; i <= ngrid; i++) { a[0] = ((ngrid - i + 1) * xlo[0] + (i - 1) * xhi[0]) / ngrid; b[0] = ((ngrid - i) * xlo[0] + i * xhi[0]) / ngrid; int j; for (j = 1; j <= ngrid; j++) { a[1] = ((ngrid - j + 1) * xlo[1] + (j - 1) * xhi[1]) / ngrid; b[1] = ((ngrid - j) * xlo[1] + j * xhi[1]) / ngrid; double result = P5.p5_nd(func, dim_num, a, b, ref eval_num); result_total += result; eval_total += eval_num; } } Console.WriteLine(" P5_ND+: " + result_total.ToString("0.############").PadLeft(20) + " " + eval_total.ToString().PadLeft(8) + ""); } }
private void btnlogout_Click(object sender, EventArgs e) { P1.Hide(); P2.Hide(); P3.Hide(); P4.Hide(); P6.Hide(); P5.Hide(); lbltab.Text = "Login Page"; this.Close(); }
public IGpioPin this[P5 pinNumber] => this[(int)pinNumber];
/// <inheritdoc /> public IGpioPin this[P5 pinNumber] => throw new NotImplementedException();