Example #1
0
 private void Add_Click(object sender, EventArgs e)
 {
     TtextBox2.Show();
     TtextBox3.Show();
     TtextBox4.Show();
     TtextBox5.Show();
     TtextBox2.Focus();
     Add1.Show();
 }
 private void Add2_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.ShiftKey | (e.KeyCode == Keys.Back && Add2.Text == ""))
     {
         Add1.Focus();
     }
     else if (e.KeyCode == Keys.Decimal && Add2.Text.Length >= 1)
     {
         Add3.Focus();
     }
 }
Example #3
0
 /// <summary>
 /// Ajoute une Music à la playlist User (si connecté) tout en instanciant si nécessaire
 /// </summary>
 /// <param name="sender"> Object envoyeur </param>
 /// <param name="e"> Évènement déclenché par la vue </param>
 private void AddToPlaylist(object sender, RoutedEventArgs e)
 {
     if (!ReferenceEquals(PlayerFront.MyPlayer.CurrentUser, null))
     {
         if (PlayerFront.MyPlayer.CurrentUser.Favorite.PlaylistProperty.Count(x => x.Equals(PlayerFront.MyPlayer.CurrentlyPlaying)) == 0)
         {
             PlayerFront.MyPlayer.CurrentUser.Favorite.PlaylistProperty.Add(PlayerFront.MyPlayer.CurrentlyPlaying);
             Add1.GetBindingExpression(TextBlock.TextProperty).UpdateTarget();
             Add1.GetBindingExpression(VisibilityProperty).UpdateTarget();
         }
     }
 }
        static void Main(string[] args)
        {
            var obj1 = new Operation(Method);
            var obj2 = new Operation(Method);
            var obj3 = new Operation(Method);

            Console.WriteLine(obj1(2, 7));
            Console.WriteLine(obj2(3, 7));
            Console.WriteLine(obj3(4, 7));

            Add1 += USA;
            Add1 += India;
            Add1 += England;
            Add1.Invoke();


            var func = StringJoinExpr.Compile();

            var result = func("Smith", "Jones");

            var ee = new Father("Hosien");

            ee.Create();


            var ff = new Child("Amin");

            ff.Create();


            IWriteLine line = new WriteLine();

            line.WriteLine();
            Console.WriteLine(line.Tree("OH"));


            int?nullableString = null;

            Console.WriteLine((int?)null);


            Index i1 = 3;   // number 3 from beginning
            Index i2 = ^ 4; // number 4 from end

            int[] a = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
            Console.WriteLine($"{a[i1]}, {a[i2]}"); // "3, 6"
            var slice = a[i1..i2];
 private void TxtIPAddress_Load(object sender, EventArgs e)
 {
     Add1.Focus();
 }