• 03-10-2018, 21:44:45
    #1
    Üyeliği durduruldu
    http://prntscr.com/l1tl6h
    fotograftaki gibi nasıl yaparız.
    canlı videosu

    https://www.youtube.com/watch?v=1p81G7zGV_Y&t=0m7s


    saniye 6 dadır.
  • 03-10-2018, 22:21:19
    #2
    Merhaba,

    Örnek bir prototip;

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace ran
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                Timer tt = new Timer();
    
                tt.Interval = 150;
    
                tt.Tick += Tt_Tick;
    
                tt.Start();
    
            }
    
            private void Tt_Tick(object sender, EventArgs e)
            {
                Random ss = new Random();
    
                label1.Text = ss.Next(999999999).ToString() + ss.Next(9).ToString();
            }
        }
    }
    Teşekkürler.
  • 03-10-2018, 22:24:47
    #3
    using System;
    using System.Data;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Windows.Forms;
    
    namespace RandomKey
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            // 1 textbox 2 buton eklenmeli
    
            private delegate void txtYaz(string text);
            private bool durdur = false;
            private void _txtYaz(string text)
            {
                txtSifre.Text = text;
            }
            private void sifreUret()
            {
                while (!durdur)
                {
                    Thread.Sleep(100); // 100 milisaniye gecikme
                    txtSifre.Invoke(new txtYaz(_txtYaz), rndmUret(10));
                }
            }
    
            char[] krtrLst = Enumerable.Range(0, 10).Select(x => (char)('0' + x)).ToArray();
            Random rndm = new Random();
            private string rndmUret(int uzunluk)
            {          
                StringBuilder str = new StringBuilder();
                for (int i = 0; i < uzunluk; i++)
                {
                    str.Append(krtrLst[rndm.Next(0, krtrLst.Length)]);
                }
                return str.ToString();
            }
    
            private void btnBasla_Click(object sender, EventArgs e)
            {
                durdur = false;
                Thread t = new Thread(sifreUret);
                t.IsBackground = true;
                t.Start();
            }
    
            private void btnDur_Click(object sender, EventArgs e)
            {
                durdur = true;
            }
        }
    }
  • 03-10-2018, 22:58:24
    #4
    Üyeliği durduruldu
    pr1d3 adlı üyeden alıntı: mesajı görüntüle
    using System;
    using System.Data;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Windows.Forms;
    
    namespace RandomKey
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            // 1 textbox 2 buton eklenmeli
    
            private delegate void txtYaz(string text);
            private bool durdur = false;
            private void _txtYaz(string text)
            {
                txtSifre.Text = text;
            }
            private void sifreUret()
            {
                while (!durdur)
                {
                    Thread.Sleep(100); // 100 milisaniye gecikme
                    txtSifre.Invoke(new txtYaz(_txtYaz), rndmUret(10));
                }
            }
    
            char[] krtrLst = Enumerable.Range(0, 10).Select(x => (char)('0' + x)).ToArray();
            Random rndm = new Random();
            private string rndmUret(int uzunluk)
            {          
                StringBuilder str = new StringBuilder();
                for (int i = 0; i < uzunluk; i++)
                {
                    str.Append(krtrLst[rndm.Next(0, krtrLst.Length)]);
                }
                return str.ToString();
            }
    
            private void btnBasla_Click(object sender, EventArgs e)
            {
                durdur = false;
                Thread t = new Thread(sifreUret);
                t.IsBackground = true;
                t.Start();
            }
    
            private void btnDur_Click(object sender, EventArgs e)
            {
                durdur = true;
            }
        }
    }
    hocam şöyle misal atıyorum 1230254125 şifresi önceden belirlenmiş ancak animasyonda şifreyi çözermiş gibi görünmesi şeklinde gerekiyo yardımcı olabilirseniz sevinirim.
  • 04-10-2018, 03:30:50
    #5
    hocam animasyonda göstermen için dışardan bir animasyon eklemen gerek yok kod ile yazıcam dersen ;

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace Matrix
    {
    class Program
    {
    static void Main(string[] args)
    {
    Console.Title = "Matrix";
    Console.ForegroundColor = ConsoleColor.DarkGreen;
    Console.WindowLeft = Console.WindowTop = 0;
    Console.WindowHeight = Console.BufferHeight = Console.LargestWindowHeight;
    Console.WindowWidth = Console.BufferWidth = Console.LargestWindowWidth;
    Console.CursorVisible = false;
    int width, height;
    int[] y;
    int[] l;
    Initialize(out width, out height, out y, out l);
    int ms;
    while (true)
    {
    DateTime t1 = DateTime.Now;
    MatrixStep(width, height, y, l);
    ms = 10 - (int)((TimeSpan)(DateTime.Now - t1)).TotalMilliseconds;
    if (ms > 0)
    System.Threading.Thread.Sleep(ms);
    if (Console.KeyAvailable)
    if (Console.ReadKey().Key == ConsoleKey.F5)
    Initialize(out width, out height, out y, out l);
    }
    }

    static bool thistime = false;

    private static void MatrixStep(int width, int height, int[] y, int[] l)
    {
    int x;
    thistime = !thistime;
    for (x = 0; x < width; ++x)
    {
    if (x % 11 == 10)
    {
    if (!thistime)
    continue;
    Console.ForegroundColor = ConsoleColor.White;
    }
    else
    {
    Console.ForegroundColor = ConsoleColor.DarkGreen;
    Console.SetCursorPosition(x, inBoxY(y[x] - 2 - (l[x] / 40 * 2), height));
    Console.Write(R);
    Console.ForegroundColor = ConsoleColor.Green;
    }
    Console.SetCursorPosition(x, y[x]);
    Console.Write(R);
    y[x] = inBoxY(y[x] + 1, height);
    Console.SetCursorPosition(x, inBoxY(y[x] - l[x], height));
    Console.Write(' ');
    }
    }

    private static void Initialize(out int width, out int height, out int[] y, out int[] l)
    {
    int h1;
    int h2 = (h1 = (height = Console.WindowHeight) / 2) / 2;
    width = Console.WindowWidth - 1;
    y = new int[width];
    l = new int[width];
    int x;
    Console.Clear();
    for (x = 0; x < width; ++x)
    {
    y[x] = r.Next(height);
    l[x] = r.Next(h2 * ((x % 11 != 10) ? 2 : 1), h1 * ((x % 11 != 10) ? 2 : 1));
    }
    }

    static Random r = new Random();
    static char R
    {
    get
    {
    int t = r.Next(10);
    if (t <= 2)
    return (char)('0' + r.Next(10));
    else if (t <= 4)
    return (char)('a' + r.Next(27));
    else if (t <= 6)
    return (char)('A' + r.Next(27));
    else
    return (char)(r.Next(32, 255));
    }
    }

    public static int inBoxY(int n, int height)
    {
    n = n % height;
    if (n < 0)
    return n + height;
    else
    return n;
    }
    }
    }