Beispiel #1
0
 private void bBorrar_Click(object sender, EventArgs e)
 {
     C4.Clear();
     txi.Clear();
     th.Clear();
     tRdA.Clear();
 }
Beispiel #2
0
        protected void Populate()
        {
            using (var session = this.Database.CreateSession())
            {
                var population = new TestPopulation(session);

                this.c1A = population.C1A;
                this.c1B = population.C1B;
                this.c1C = population.C1C;
                this.c1D = population.C1D;

                this.c2A = population.C2A;
                this.c2B = population.C2B;
                this.c2C = population.C2C;
                this.c2D = population.C2D;

                this.c3A = population.C3A;
                this.c3B = population.C3B;
                this.c3C = population.C3C;
                this.c3D = population.C3D;

                this.c4A = population.C4A;
                this.c4B = population.C4B;
                this.c4C = population.C4C;
                this.c4D = population.C4D;

                session.Commit();
            }
        }
Beispiel #3
0
    public static void TestGenInterface_GenType()
    {
        IGen <int>    iGenC4Int    = new C4 <int>();
        IGen <object> iGenC4Object = new C4 <object>();
        IGen <string> iGenC4String = new C4 <string>();

        // TEST6: test non generic virtual method
        if (iGenC4Int.method1() != 7 || iGenC4Object.method1() != 7 || iGenC4String.method1() != 7)
        {
            Console.WriteLine("Failed at TestGenInterface_GenType: non generic method");
            pass = false;
        }


        // TEST7: test generic virtual method
        if (iGenC4Int.method2 <int>() != 8 || iGenC4Int.method2 <object>() != 8 || iGenC4Int.method2 <string>() != 8 ||
            iGenC4Int.method2 <A <int> >() != 8 || iGenC4Int.method2 <S <string> >() != 8

            || iGenC4Object.method2 <int>() != 8 || iGenC4Object.method2 <object>() != 8 || iGenC4Object.method2 <string>() != 8 ||
            iGenC4Object.method2 <A <int> >() != 8 || iGenC4Object.method2 <S <string> >() != 8

            || iGenC4String.method2 <int>() != 8 || iGenC4String.method2 <object>() != 8 || iGenC4String.method2 <string>() != 8 ||
            iGenC4String.method2 <A <int> >() != 8 || iGenC4String.method2 <S <string> >() != 8
            )
        {
            Console.WriteLine("Failed at TestGenInterface_GenType: generic method");
            pass = false;
        }
    }
Beispiel #4
0
    public void setRespFalse()
    {
        A1.SetActive(false);
        A2.SetActive(false);
        A3.SetActive(false);
        A4.SetActive(false);
        A5.SetActive(false);
        A6.SetActive(false);
        A7.SetActive(false);

        B1.SetActive(false);
        B2.SetActive(false);
        B3.SetActive(false);
        B4.SetActive(false);
        B5.SetActive(false);
        B6.SetActive(false);
        B7.SetActive(false);

        C1.SetActive(false);
        C2.SetActive(false);
        C3.SetActive(false);
        C4.SetActive(false);
        C5.SetActive(false);
        C6.SetActive(false);
        C7.SetActive(false);
    }
    public static void TestGenInterface_GenType()
    {
        IGen <int>    iGenC4Int    = new C4 <int>();
        IGen <object> iGenC4Object = new C4 <object>();
        IGen <string> iGenC4String = new C4 <string>();

        // TEST6: test non generic virtual method

        Eval((iGenC4Int.method1().ToString()).Equals("7"));
        Eval((iGenC4Object.method1().ToString()).Equals("7"));
        Eval((iGenC4String.method1().ToString()).Equals("7"));



        // TEST7: test generic virtual method

        Eval((iGenC4Int.method2 <int>().ToString()).Equals("8"));
        Eval((iGenC4Int.method2 <object>().ToString()).Equals("8"));
        Eval((iGenC4Int.method2 <string>().ToString()).Equals("8"));
        Eval((iGenC4Int.method2 <A <int> >().ToString()).Equals("8"));
        Eval((iGenC4Int.method2 <S <string> >().ToString()).Equals("8"));

        Eval((iGenC4String.method2 <int>().ToString()).Equals("8"));
        Eval((iGenC4String.method2 <object>().ToString()).Equals("8"));
        Eval((iGenC4String.method2 <string>().ToString()).Equals("8"));
        Eval((iGenC4String.method2 <A <int> >().ToString()).Equals("8"));
        Eval((iGenC4String.method2 <S <string> >().ToString()).Equals("8"));

        Eval((iGenC4Object.method2 <int>().ToString()).Equals("8"));
        Eval((iGenC4Object.method2 <object>().ToString()).Equals("8"));
        Eval((iGenC4Object.method2 <string>().ToString()).Equals("8"));
        Eval((iGenC4Object.method2 <A <int> >().ToString()).Equals("8"));
        Eval((iGenC4Object.method2 <S <string> >().ToString()).Equals("8"));
    }
Beispiel #6
0
        private void HandleLoaded(object sender, RoutedEventArgs e)
        {
            const double step   = Math.PI * 2 / 10.0;
            const double offset = Math.PI;

            C0.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 0.0 * step) * 50.0);
            C0.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 0.0 * step) * 50.0);

            C1.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 1.0 * step) * 50.0);
            C1.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 1.0 * step) * 50.0);

            C2.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 2.0 * step) * 50.0);
            C2.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 2.0 * step) * 50.0);

            C3.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 3.0 * step) * 50.0);
            C3.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 3.0 * step) * 50.0);

            C4.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 4.0 * step) * 50.0);
            C4.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 4.0 * step) * 50.0);

            C5.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 5.0 * step) * 50.0);
            C5.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 5.0 * step) * 50.0);

            C6.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 6.0 * step) * 50.0);
            C6.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 6.0 * step) * 50.0);

            C7.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 7.0 * step) * 50.0);
            C7.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 7.0 * step) * 50.0);

            C8.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 8.0 * step) * 50.0);
            C8.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 8.0 * step) * 50.0);
        }
        static int T2_LazyMap()
        {
            int sum = 0;

            for (int i = 0; i < repeats; i++)
            {
                foreach (var d in _testDataToSwitchOn)
                {
                    sum += _typeSwitchDispatch.GetIndex(d) switch
                    {
                        0 when d is C12 x => 12,
                        1 when d is C11 x => 11,
                        2 when d is C10 x => 10,
                        3 when d is C9 x => 9,
                        4 when d is C8 x => 8,
                        5 when d is C7 x => 7,
                        6 when d is C6 x => 6,
                        7 when d is C5 x => 5,
                        8 when d is C4 x => 4,
                        9 when d is C3 x => 3,
                        10 when d is C2 x => 2,
                        11 when d is C1 x => 1,
                        -1 => - 1,
                        _ => throw null,
                    };
                }
            }

            return(sum);
        }
Beispiel #8
0
        private static int SetTextureImage(byte[] Data, int Index, BinaryReader Reader = null)
        {
            int TextureFormat = (Data[Index + 1] & 0xE0) >> 5;
            int BitsPerPixel  = (Data[Index + 1] & 0x18) >> 3;
            int Width         = (((Data[Index + 2] << 8) | Data[Index + 3]) & 0x3FF) + 1;
            int Height        = (((BitConverter.ToInt32(Data, 0).Reverse() >> 10) & 0xFF) + 1) * 4;
            int ImageAddress  = (Data[Index + 4] << 24) | (Data[Index + 5] << 16) | (Data[Index + 6] << 8) | Data[Index + 7];

            Debug.WriteLine(string.Format("Set Texture | Address: {0} | Texture Format: {1} | Bits Per Pixel: {2} | Width: {3} | Height: {4}",
                                          ImageAddress.ToString("X8"), TextureFormat, BitsPerPixel, Width, Height));

            if (Reader != null && (ImageAddress & 0x80000000) != 0)
            {
                Reader.BaseStream.Seek(ImageAddress & ~0x80000000, SeekOrigin.Begin);
                int[]  PixelData = C4.DecodeC4(Reader.ReadBytes((Width * Height) / 2), Palette.ToArray(), Width, Height);
                byte[] ImgData   = new byte[PixelData.Length * 4];
                Buffer.BlockCopy(PixelData, 0, ImgData, 0, ImgData.Length);
                BitmapSource Img = Util.ToImage(ImgData, Width, Height);
                MainWindowReference.Texture = Img;
                using (var FStream = new FileStream(ImageOutputDirectory + "\\Image_" + ImageAddress.ToString("X8") + ".png", FileMode.Create))
                {
                    var Encoder = new PngBitmapEncoder();
                    Encoder.Frames.Add(BitmapFrame.Create(Img));
                    Encoder.Save(FStream);
                }
            }

            return(8);
        }
Beispiel #9
0
 private void A1_Tick(object sender, EventArgs e)
 {
     PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5M^7ain ^5M^7enu\n\n^2-->^5Host Menu\nClient 1 Menu\nReset Menu\nAccount Menu\nTeleport Menu\nVision Menu\nCredit Menu\n\n\n^3Client 0 : ^2" + textBox1.Text + "\n^3Client 1 : ^2" + textBox2.Text + "^5");
     if (Key_IsDown((uint)0) == "X")
     {
         HostMenuMain.Stop();
         B1.Start();
     }
     if (Key_IsDown((uint)0) == "R1")
     {
         HostMenuMain.Stop();
         Client1.Start();
     }
     if (Key_IsDown((uint)0) == "R3 + L3")
     {
         HostMenuMain.Stop();
         B1.Stop();
         B2.Stop();
         B3.Stop();
         B4.Stop();
         B5.Stop();
         Client1.Stop();
         C1.Stop();
         C2.Stop();
         C3.Stop();
         C4.Stop();
         ResetMenu.Stop();
         D1.Stop();
         D2.Stop();
         D3.Stop();
         D4.Stop();
         D5.Stop();
         AccountMenu.Stop();
         E1.Stop();
         E2.Stop();
         E3.Stop();
         E4.Stop();
         E5.Stop();
         TeleportMenu.Stop();
         F1.Stop();
         F2.Stop();
         F3.Stop();
         F4.Stop();
         VisionMenu.Stop();
         G1.Stop();
         G2.Stop();
         G3.Stop();
         G4.Stop();
         G5.Stop();
         G6.Stop();
         OtherMenu.Stop();
         H1.Stop();
         PS3.Extension.WriteString(0x004eb39c, "^5Menu ^1Closed");
         simpleButton2.Enabled           = true;
         toolStripStatusLabel2.Text      = "Not Started !";
         toolStripStatusLabel2.ForeColor = Color.Red;
         simpleButton3.Enabled           = false;
     }
 }
Beispiel #10
0
 public C5(byte f0, char f1, C4 f2, char f3, int f4)
 {
     F0 = f0;
     F1 = f1;
     F2 = f2;
     F3 = f3;
     F4 = f4;
 }
        static int T1_TypeSwitch()
        {
            int sum = 0;

            for (int i = 0; i < repeats; i++)
            {
                foreach (var d in _testDataToSwitchOn)
                {
                    sum += d switch
                    {
                        //C40 _ => 40,
                        //C39 _ => 39,
                        //C38 _ => 38,
                        //C37 _ => 37,
                        //C36 _ => 36,
                        //C35 _ => 35,
                        //C34 _ => 34,
                        //C33 _ => 33,
                        //C32 _ => 32,
                        //C31 _ => 31,
                        //C30 _ => 30,
                        //C29 _ => 29,
                        //C28 _ => 28,
                        //C27 _ => 27,
                        //C26 _ => 26,
                        //C25 _ => 25,
                        //C24 _ => 24,
                        //C23 _ => 23,
                        //C22 _ => 22,
                        //C21 _ => 21,
                        //C20 _ => 20,
                        //C19 _ => 19,
                        //C18 _ => 18,
                        //C17 _ => 17,
                        //C16 _ => 16,
                        //C15 _ => 15,
                        //C14 _ => 14,
                        //C13 _ => 13,
                        C12 _ => 12,
                        C11 _ => 11,
                        C10 x => 10,
                        C9 x => 9,
                        C8 x => 8,
                        C7 x => 7,
                        C6 x => 6,
                        C5 x => 5,
                        C4 x => 4,
                        C3 x => 3,
                        C2 x => 2,
                        C1 x => 1,
                             _ => - 1
                    };
                }
            }

            return(sum);
        }
    void Start()
    {
        Profiler.BeginSample("A");
        var a = new A6();

        Profiler.EndSample();

        Profiler.BeginSample("B");
        B b = new B();

        Profiler.EndSample();

        Profiler.BeginSample("S1");
        S1 s1 = new S1();

        Profiler.EndSample();

        Profiler.BeginSample("Empty");
        Empty e0 = new Empty();

        Profiler.EndSample();

        Profiler.BeginSample("C1");
        C1 c1 = new C1();

        Profiler.EndSample();

        Profiler.BeginSample("C2");
        C2 c2 = new C2();

        Profiler.EndSample();

        Profiler.BeginSample("C3");
        C3 c3 = new C3();

        Profiler.EndSample();

        Profiler.BeginSample("C4");
        C4 c4 = new C4();

        Profiler.EndSample();

        Profiler.BeginSample("C5");
        C5 c5 = new C5();

        Profiler.EndSample();

        Profiler.BeginSample("C6");
        C6 c6 = new C6();

        Profiler.EndSample();

        Profiler.BeginSample("C7");
        C7 c7 = new C7();

        Profiler.EndSample();
    }
Beispiel #13
0
 public void reset()
 {
     C1.reset();
     C2.reset();
     C3.reset();
     C4.reset();
     C5.reset();
     count = 2;
     Random rnd = new Random();
 }
Beispiel #14
0
        public void TestOrderMultipleRunAfter()
        {
            var a = new A4();
            var b = new B4();
            var c = new C4();
            var s = new IBuildStep[] { b, a, c };

            var sorted = Builder.SortSteps(s);

            Assert.That(sorted, Is.EqualTo(new IBuildStep[] { a, b, c }));
        }
 public TextureEntry(int textureOffset, int width, int height, byte[] textureData, ref ushort[] paletteData, ref uint[] rgba8Palette, int index)
 {
     TextureOffset = textureOffset;
     Width         = width;
     Height        = height;
     Palette       = paletteData;
     Rgba8Palette  = rgba8Palette;
     RawData       = textureData;
     Argb8Data     = C4.DecodeC4(textureData, Palette, width, height, GCNToolKit.ColorFormat.RGB5A3);
     Texture       = Utility.CreateBitmap(Argb8Data, width, height);
     EntryIndex    = index;
 }
Beispiel #16
0
        public ActionResult <Employee> GetEmployeeByEmail(string email)
        {
            var emailAddress       = fs(C4.createEmailAddress(email));
            var requestIfGoodEmail = emailAddress
                                     .Map(email =>
                                          fs(C4.getEmployeeFromDatabase(_db, email))
                                          .Map(e => (ActionResult <Employee>)Ok(e))
                                          .IfNone(() => NotFound()))
                                     .IfNone(() =>
                                             BadRequest("Invalid email address"));

            return(requestIfGoodEmail);
        }
        public void TestCylicFreeVersionWithDI()
        {
            IUnityContainer container = new UnityContainer();

            container.RegisterType <WhatC4Needs, C3ToPackageBAdapter>();
            C4 c4 = container.Resolve <C4>();

            C3ToPackageBAdapter adapter = (C3ToPackageBAdapter)c4.WhatINeed;

            Assert.AreEqual(0, adapter.Called);

            c4.DoC4();
            Assert.AreEqual(1, adapter.Called);
        }
Beispiel #18
0
        public static void TestI3()
        {
            I3 i;

            var a = new C4();

            i = a;
            Assert.AreEqual("C4", a.Foo());
            Assert.AreEqual("C4", i.Foo());

            var b = new C5();

            i = b;
            Assert.AreEqual("C4", b.Foo());
            Assert.AreEqual("C5", i.Foo());
        }
Beispiel #19
0
 private void simpleButton3_Click(object sender, EventArgs e)
 {
     MainMenu.Stop();
     HostMenuMain.Stop();
     B1.Stop();
     B2.Stop();
     B3.Stop();
     B4.Stop();
     B5.Stop();
     Client1.Stop();
     C1.Stop();
     C2.Stop();
     C3.Stop();
     C4.Stop();
     ResetMenu.Stop();
     D1.Stop();
     D2.Stop();
     D3.Stop();
     D4.Stop();
     D5.Stop();
     AccountMenu.Stop();
     E1.Stop();
     E2.Stop();
     E3.Stop();
     E4.Stop();
     E5.Stop();
     TeleportMenu.Stop();
     F1.Stop();
     F2.Stop();
     F3.Stop();
     F4.Stop();
     VisionMenu.Stop();
     G1.Stop();
     G2.Stop();
     G3.Stop();
     G4.Stop();
     G5.Stop();
     G6.Stop();
     OtherMenu.Stop();
     H1.Stop();
     PS3.Extension.WriteString(0x004eb39c, "^5Menu ^1Closed");
     toolStripStatusLabel2.Text      = "Not Started !";
     toolStripStatusLabel2.ForeColor = Color.Red;
     simpleButton2.Enabled           = true;
     simpleButton3.Enabled           = false;
 }
Beispiel #20
0
        public void T03_CyclicSelfReferences()
        {
            using (var ms = new MemoryStream())
            {
                var s = new SlimSerializer();

                var dIn = new C4();
                dIn.FC4 = dIn;

                s.Serialize(ms, dIn);
                ms.Seek(0, SeekOrigin.Begin);

                var dOut = (C4)s.Deserialize(ms);

                Assert.IsTrue(object.ReferenceEquals(dOut, dOut.FC4));
                Assert.IsTrue(object.ReferenceEquals(dOut.FC4, dOut.FC4.FC4));
            }
        }
Beispiel #21
0
        static void Main(string[] args)
        {
            C1 c1 = new C1();
            C2 c2 = new C2();
            C3 c3 = new C3();

            // Constructor injection
            C4 ExampleClass1 = new C4(c1, c2, c3);

            ExampleClass1.DoStuff();

            // Method injection
            C5 ExampleClass2 = new C5();

            ExampleClass2.DoStuff(c1, c2, c3);

            Console.ReadKey();
        }
        public void PublishingInsideHandlerDoesNotThrow()
        {
            var target = new C4();

            target.EventAggregator = this.ea;
            this.ea.Subscribe(target);

            // Add this as a dummy - it has to be a dead reference, which triggers modification of the
            // 'handlers' collection
            var dummyTarget = new C1();

            this.ea.Subscribe(dummyTarget);
            dummyTarget = null;
            GC.Collect();

            Assert.DoesNotThrow(() => this.ea.Publish(new M1()));

            GC.KeepAlive(target);
        }
        protected void Populate()
        {
            var population = new TestPopulation(this.Session);

            this.c1_0 = population.C1A;
            this.c1_1 = population.C1B;
            this.c1_2 = population.C1C;
            this.c1_3 = population.C1D;
            this.c2_0 = population.C2A;
            this.c2_1 = population.C2B;
            this.c2_2 = population.C2C;
            this.c2_3 = population.C2D;
            this.c3_0 = population.C3A;
            this.c3_1 = population.C3B;
            this.c3_2 = population.C3C;
            this.c3_3 = population.C3D;
            this.c4_0 = population.C4A;
            this.c4_1 = population.C4B;
            this.c4_2 = population.C4C;
            this.c4_3 = population.C4D;
        }
Beispiel #24
0
        public static void GenericTest()
        {
            var c4 = new C4 <C2>();

            Console.WriteLine("c4 is C4<C2> : {0}", c4 is C4 <C2>);//c4 is C4는 ㅅㅂ 안통하네
            Console.WriteLine("c4 is C4<I1> : {0}", c4 is C4 <I1>);
            Console.WriteLine("c4 is C4<C1> : {0}", c4 is C4 <C1>);
            Console.WriteLine("c4.GetType() == typeof(C4<>) : {0}", c4.GetType() == typeof(C4 <>));
            Console.WriteLine("c4 is C4.GetType().IsGenericType : {0}", c4.GetType().IsGenericType);
            Console.WriteLine("c4.GetType().GetGenericTypeDefinition()==typeof(C4<>) : {0}", c4.GetType().GetGenericTypeDefinition() == typeof(C4 <>));
            //Result : TFFFTT
            //C4<I1> c5 = (C4<I1>)c4; casting 불가
            //C4<C2> c6 = (c4<C2>)c4; casting 불가
            Console.WriteLine(c4.GetType().BaseType);
            Console.WriteLine(Convenience.IsGenericTypeOf(typeof(C4 <>), c4));
            Console.WriteLine(c4.GetType().GetGenericTypeDefinition());
            Console.WriteLine("{0}, {1}", c4.GetType().GetGenericArguments()[0], c4.GetType().GetGenericArguments().Length);
            Console.WriteLine(c4.GetType().GetGenericTypeDefinition() == typeof(C4 <C1>));
            Console.WriteLine(c4.GetType().GetGenericTypeDefinition() == typeof(C4 <C2>));
            Console.WriteLine(c4 is C4 <C2>);
            Console.WriteLine(c4.GetType() == typeof(C4 <C2>));
            Console.WriteLine(c4.GetType().GetGenericTypeDefinition() == typeof(C4 <>));
            Console.WriteLine(typeof(C4 <C1>));
            Console.WriteLine(typeof(C4 <C1>).GetGenericArguments()[0]);
            Console.WriteLine(typeof(C4 <>).GetGenericArguments().Length);
            Console.WriteLine(typeof(C4 <>).GetGenericArguments()[0]);
            Console.WriteLine(typeof(C4 <>) == typeof(C4 <>));
            Console.WriteLine(typeof(C4 <int>) == typeof(C4 <>));
            Console.WriteLine(Convenience.IsGenericTypeOf(typeof(C4 <>), c4));
            Console.WriteLine(Convenience.IsGenericTypeOf(typeof(C4 <C2>), c4));
            Console.WriteLine(Convenience.IsGenericTypeOf(typeof(C4 <C1>), c4));
            Console.WriteLine(Convenience.IsGenericTypeOf(typeof(C4 <C3>), c4));
            Console.WriteLine(Convenience.IsGenericTypeOf(typeof(C4 <I1>), c4));
            Console.WriteLine("--------------------");
            var c2 = new C2();

            Console.WriteLine(c2.GetType().GetInterfaces().Contains <Type>(typeof(I1)));
        }
 public override void Use(Player p, string message)
 {
     if (p != null)
     {
         if (p.level.physics >= 1 && p.level.physics < 5)
         {
             sbyte  numb = C4.NextCircuit(p.level);
             C4.C4s c4   = new C4.C4s(numb);
             p.level.C4list.Add(c4);
             p.c4circuitNumber = numb;
             Player.SendMessage(p, "Place any block for c4 and place a " + c.red + "red" + Server.DefaultColor + " block for the detonator!");
             p.Blockchange += new Player.BlockchangeEventHandler(Blockchange1);
             return;
         }
         else
         {
             Player.SendMessage(p, "To use c4, the physics level must be 1, 2, 3 or 4");
             return;
         }
     }
     Player.SendMessage(p, "This command can only be used in-game!");
     return;
 }
Beispiel #26
0
 public static void OnRecvDropBomb(int id)
 {
     PlayerControll.Player[id].bomb = false;
     C4.CreateBomb(new Vector3(C4.bombpos[0], C4.bombpos[1], C4.bombpos[2]), C4.bombangle, false);
     C4.bombdropped = true;
     C4.canpickup   = true;
     if (id == Client.ID)
     {
         C4.canpickup = false;
         PlayerControll.Player[Client.ID].bomb = false;
         BasePlayer.bomb      = false;
         C4.bombdropped       = true;
         BasePlayer.weapon[4] = null;
         if (BasePlayer.weapon[0] != null)
         {
             vp_FPInput.cs.Player.SetWeaponByName.Try(BasePlayer.weapon[0].data.selectName);
         }
         else if (BasePlayer.weapon[1] != null)
         {
             vp_FPInput.cs.Player.SetWeaponByName.Try(BasePlayer.weapon[1].data.selectName);
         }
     }
 }
        protected void Populate()
        {
            var population = new TestPopulation(this.Session);

            this.c1A = population.C1A;
            this.c1B = population.C1B;
            this.c1C = population.C1C;
            this.c1D = population.C1D;

            this.c2A = population.C2A;
            this.c2B = population.C2B;
            this.c2C = population.C2C;
            this.c2D = population.C2D;

            this.c3A = population.C3A;
            this.c3B = population.C3B;
            this.c3C = population.C3C;
            this.c3D = population.C3D;

            this.c4A = population.C4A;
            this.c4B = population.C4B;
            this.c4C = population.C4C;
            this.c4D = population.C4D;
        }
        /// <summary>
        /// Load Event
        /// </summary>
        /// <param name="sender">sender Parameter</param>
        /// <param name="e">Argument Parameter</param>
        private void HandleLoaded(object sender, RoutedEventArgs e)
        {
            const double Step   = Math.PI * 2 / 10.0;
            const double Offset = Math.PI;

            C0.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (0.0 * Step)) * 50.0));
            C0.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (0.0 * Step)) * 50.0));
            C1.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (1.0 * Step)) * 50.0));
            C1.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (1.0 * Step)) * 50.0));
            C2.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (2.0 * Step)) * 50.0));
            C2.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (2.0 * Step)) * 50.0));
            C3.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (3.0 * Step)) * 50.0));
            C3.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (3.0 * Step)) * 50.0));
            C4.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (4.0 * Step)) * 50.0));
            C4.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (4.0 * Step)) * 50.0));
            C5.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (5.0 * Step)) * 50.0));
            C5.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (5.0 * Step)) * 50.0));
            C6.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (6.0 * Step)) * 50.0));
            C6.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (6.0 * Step)) * 50.0));
            C7.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (7.0 * Step)) * 50.0));
            C7.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (7.0 * Step)) * 50.0));
            C8.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (8.0 * Step)) * 50.0));
            C8.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (8.0 * Step)) * 50.0));
        }
Beispiel #29
0
 private void C5_Tick(object sender, EventArgs e)
 {
     PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5C^7lient ^21 ^5M^7enu\n\nGod Mode\nMax Ammo\nAll Perks\nRapide Fire\n^2-->^5Lock Controller");
     if (Key_IsDown((uint)0) == "R1")
     {
         C5.Stop();
         C1.Start();
     }
     if (Key_IsDown((uint)0) == "X")
     {
         byte[] buffer = new byte[] { 0x01 };
         PS3.SetMemory(0x012323b7, buffer);
     }
     if (Key_IsDown((uint)0) == "R3")
     {
         C5.Stop();
         HostMenuMain.Start();
     }
     if (Key_IsDown((uint)0) == "L1")
     {
         C5.Stop();
         C4.Start();
     }
 }
Beispiel #30
0
 private static void Choose(int team)
 {
     HUD.PlayStop();
     C4.SendDropBomb();
     if (PlayerPrefs.GetInt("localplay") > 0)
     {
         BasePlayer.team = team;
         BasePlayer.DevSpawn();
     }
     else
     {
         BasePlayer.team = team;
         Client.cs.send_chooseteam(team);
         ChooseTeam.SetActive(false);
         vp_FPWeaponHandler.cs.m_CurrentWeaponID = 0;
         vp_FPInput.cs.Player.SetWeapon.TryStart <int>(0);
         if (ScoreBoard.gamemode == 1 || ScoreBoard.gamemode == 2 || ScoreBoard.gamemode == 3)
         {
             HUD.SetActive(true);
             SpecCam.SetActive(true);
             SpecCam.SetFPCam();
         }
     }
 }
 public C3(C4 c2) { }
 public C5(C1 c1, C2 c2 = null, C3 c3 = null, C4 c4 = null)
 {
 }