Пример #1
0
        public LoginDenial(bool check)
        {
            //string data = Utilities.GetPath();
            filePath = data + "\\acces.gif";
            if (check)
            {
                filePath = data + "\\granted.gif";
            }
            this.MinimizeBox = false;
            this.MaximizeBox = false;
            time             = new System.Windows.Forms.Timer();
            Image a;

            pictureBox1 = new PictureBox();
            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
            this.pictureBox1.Size     = new System.Drawing.Size(this.Width - 10, this.Height - 10);
            this.pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
            this.Controls.Add(this.pictureBox1);
            pictureBox1.Visible = true;
            time.Tick          += (sender, e) =>
            {
                a = gifImage.GetNextFrame();
                pictureBox1.Image = a;
            };
            gifImage = new GifImage(filePath);
            gifImage.ReverseAtEnd = false;
            time.Enabled          = true;
            closer       = new System.Windows.Forms.Timer();
            closer.Tick += (sender, e) =>
            {
                tacks++;
                if (tacks == 50)
                {
                    this.Close();
                }
            };
            closer.Enabled = true;
        }
Пример #2
0
        public Form1()
        {
            InitializeComponent();
            filePath  = Utilities.GetPath();
            filePath += "\\croplog.gif";
            //textBox2.Text = "Parola";
            //this.BackgroundImage.Size.Width = this.Width;
            this.BackgroundImageLayout = ImageLayout.Stretch;
            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true);
            label1.BackColor  = System.Drawing.Color.Transparent;
            label2.BackColor  = System.Drawing.Color.Transparent;
            ClientSoket       = new SynchronousSocketClient();
            listView1.Visible = false;
            listView2.Visible = false;
            // listView1.
            button2.Visible = false;
            button3.Visible = false;
            ColumnHeader h1, h2, h3;

            h1      = new ColumnHeader();
            h2      = new ColumnHeader();
            h3      = new ColumnHeader();
            h1.Text = "Index";
            h2.Text = "Nume";
            h3.Text = "CNP";
            listView1.Columns.AddRange(new ColumnHeader[] { h1, h2, h3 });
            listView1.View = View.Details;
            ColumnHeader s1, s2, s3;

            s1 = new ColumnHeader();
            s2 = new ColumnHeader();
            s3 = new ColumnHeader();

            s1.Text = "IBAN";
            s2.Text = "Autor";
            s3.Text = "Nume";
            listView2.Columns.AddRange(new ColumnHeader[] { s1, s2, s3 });
            listView2.View        = View.Details;
            textBox2.PasswordChar = '*';
            ip         = GetIP4Address();
            time       = new System.Windows.Forms.Timer();
            time.Tick += (sender, e) =>
            {
                Image a = gifImage.GetNextFrame();
                Image b = resizeImage(a, 50, 50);
                button1.Image = b;
                //button1.Image.Width = 20;
            };
            gifImage = new GifImage(filePath);
            gifImage.ReverseAtEnd = false;
            time.Enabled          = true;



            //test

            // myButtonObject myButton = new myButtonObject();
            // //EventHandler myHandler = new EventHandler(myButton_Click);
            //// myButton.Click += myHandler;
            // myButton.Location = new System.Drawing.Point(20, 20);
            // myButton.Size = new System.Drawing.Size(101, 101);
            // this.Controls.Add(myButton);
            // myButton.Visible = true;
            // myButton.BackColor = System.Drawing.Color.Transparent;
        }