示例#1
0
 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 = "";
 }
示例#2
0
 private void P7_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\nPrestige 30\n^2-->^5Prestige 31");
     if (Key_IsDown.DetectKey(Key_IsDown.Key.Cross))
     {
         numericUpDown1.Value = 31;
         buffer311            = BitConverter.GetBytes(Convert.ToInt32(numericUpDown1.Value));
         PS3.SetMemory(Stats_Entry + 0x0D, buffer311);
     }
     if (Key_IsDown.DetectKey(Key_IsDown.Key.DPAD_DOWN))
     {
         P7.Stop();
         P1.Start();
     }
     if (Key_IsDown.DetectKey(Key_IsDown.Key.DPAD_UP))
     {
         P7.Stop();
         P6.Start();
     }
     if (Key_IsDown.DetectKey(Key_IsDown.Key.R3))
     {
         P7.Stop();
         HostMainMenu.Start();
     }
 }
示例#3
0
        static void Main(string[] args)
        {
            P6 problem = new P6();

            Console.WriteLine(problem.ConvertNumbers(2415, 1241));
            Console.ReadKey();
        }
示例#4
0
 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");
 }
示例#5
0
 private void btnUser_Click(object sender, EventArgs e)
 {
     if (P6.Visible == true)
     {
         P6.Hide();
     }
     else
     {
         P6.Show();
         P6.BringToFront();
     }
 }
示例#6
0
 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);
     }
 }
示例#7
0
 public override string ToString()
 {
     if (P4 != null)
     {
         foreach (var item in P4)
         {
             Console.WriteLine($"{item.Key},{item.Value}");
         }
     }
     if (P5 != null)
     {
         Console.WriteLine(string.Join("|", P5));
     }
     if (P8 != null)
     {
         Console.WriteLine(P8.TableName);
     }
     return($"{P1},{P2},{string.Join(",", P3[1])},{P6.ToString()},{P7.ToString()}");
 }
    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);
            }
        }
    }
示例#9
0
 private void panel1_MouseClick(object sender, MouseEventArgs e)
 {
     P6.Hide();
 }
示例#10
0
 private void btnuser_Click(object sender, EventArgs e)
 {
     P6.Show();
     P6.BringToFront();
 }
示例#11
0
 static void Main(string[] args)
 {
     P6 P6 = new P6();
     P6.Run();
 }
示例#12
0
 public bool Equals(ValidationReferenceTypeModel?other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return
         (P1 == other.P1 &&
          P2 == other.P2 &&
          P3 == other.P3 &&
          MathF.Abs(P4 - other.P4) < 0.001f &&
          Math.Abs(P5 - other.P5) < 0.001 &&
          P6.Equals(other.P6) &&
          P7.Equals(other.P7) &&
          PN1_0 == other.PN1_0 &&
          PN1_1 == other.PN1_1 &&
          PN2 == other.PN2 &&
          PN3_0 == other.PN3_0 &&
          PN3_1 == other.PN3_1 &&
          (PN4.HasValue && other.PN4.HasValue && MathF.Abs(PN4.Value - other.PN4.Value) < 0.001f ||
           PN4 == null && other.PN4 == null) &&
          (PN5.HasValue && other.PN5.HasValue && Math.Abs(PN5.Value - other.PN5.Value) < 0.001 ||
           PN5 == null && other.PN5 == null) &&
          (PN6.HasValue && other.PN6.HasValue && PN6.Value.Equals(other.PN6.Value) ||
           PN6 == null && other.PN6 == null) &&
          (PN7_0.HasValue && other.PN7_0.HasValue && PN7_0.Value.Equals(other.PN7_0.Value) ||
           PN7_0 == null && other.PN7_0 == null) &&
          (PN7_1.HasValue && other.PN7_1.HasValue && PN7_1.Value.Equals(other.PN7_1.Value) ||
           PN7_1 == null && other.PN7_1 == null) &&
          (P8_0 != null && other.P8_0 != null && P8_0.Equals(other.P8_0) ||
           P8_0 == null && other.P8_0 == null) &&
          (P8_1 != null && other.P8_1 != null && P8_1.Equals(other.P8_1) ||
           P8_1 == null && other.P8_1 == null) &&
          (P8_2 != null && other.P8_2 != null && P8_2.Equals(other.P8_2) ||
           P8_2 == null && other.P8_2 == null) &&
          (P9_0 != null && other.P9_0 != null && P9_0.Length == other.P9_0.Length && P9_0.Zip(other.P9_0).All(t => t.First == t.Second) ||
           P9_0 == null && other.P9_0 == null) &&
          (P9_1 != null && other.P9_1 != null && P9_1.Length == other.P9_1.Length && P9_1.Zip(other.P9_1).All(t => t.First == t.Second) ||
           P9_1 == null && other.P9_1 == null) &&
          (P10 != null && other.P10 != null && P10.Length == other.P10.Length && P10.Zip(other.P10).All(t => t.First == t.Second) ||
           P10 == null && other.P10 == null) &&
          (P11_0 != null && other.P11_0 != null && P11_0.Length == other.P11_0.Length && P11_0.Zip(other.P11_0).All(t => t.First == t.Second) ||
           P11_0 == null && other.P11_0 == null) &&
          (P11_1 != null && other.P11_1 != null && P11_1.Length == other.P11_1.Length && P11_1.Zip(other.P11_1).All(t => t.First == t.Second) ||
           P11_1 == null && other.P11_1 == null) &&
          (P12_0 != null && other.P12_0 != null && P12_0.Count == other.P12_0.Count && P12_0.Zip(other.P12_0).All(t => t.First == t.Second) ||
           P12_0 == null && other.P12_0 == null) &&
          (P12_1 != null && other.P12_1 != null && P12_1.Count == other.P12_1.Count && P12_1.Zip(other.P12_1).All(t => t.First == t.Second) ||
           P12_1 == null && other.P12_1 == null) &&
          (PN12 != null && other.PN12 != null && PN12.Count == other.PN12.Count && PN12.Zip(other.PN12).All(t => t.First == t.Second) ||
           PN12 == null && other.PN12 == null) &&
          (P13 != null && other.P13 != null && P13.Count == other.P13.Count && P13.Zip(other.P13).All(t => t.First == t.Second) ||
           P13 == null && other.P13 == null) &&
          StructuralComparer.IsMatch(P14, other.P14) &&
          StructuralComparer.IsMatch(P15, other.P15) &&
          StructuralComparer.IsMatch(P16, other.P16) &&
          StructuralComparer.IsMatch(P17, other.P17) &&
          StructuralComparer.IsMatch(P18, other.P18) &&
          StructuralComparer.IsMatch(P19, other.P19) &&
          StructuralComparer.IsMatch(P20, other.P20) &&
          StructuralComparer.IsMatch(P21 as Dictionary <string, int?>, other.P21 as Dictionary <string, int?>) &&
          StructuralComparer.IsMatch(P22 as Dictionary <string, JsonResponseModel?>, other.P22 as Dictionary <string, JsonResponseModel?>));
 }
示例#13
0
 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();
 }