Jump to content

Recommended Posts

Posted

My First Sh1T ;pp

bitmapb.png

 

;p

 


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;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.Runtime.InteropServices;
using System.Threading;

namespace iPad
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }

        // Arguments
        private string EventText;

        // Create Picture Boxe's
        PictureBox _BarPictures1 = new PictureBox();
        PictureBox _BarPictures2 = new PictureBox();
        PictureBox _BarPictures3 = new PictureBox();
        PictureBox _BarPictures4 = new PictureBox();
        PictureBox _BarPictures5 = new PictureBox();
        PictureBox _LoadPicture1 = new PictureBox();

        // UP Menu Infos
        Panel UPPanel = new Panel();
        Panel MainPanel = new Panel();
        Label DateInfo = new Label();
        
        // TimeInfo Class Object
        TimeInfos TIObject = new TimeInfos();

        private void FixBarMenu()
        {
            
            // Link Picture Box With Image's
            _BarPictures1.Image = Properties.Resources.android;
            _BarPictures2.Image = Properties.Resources.browser;
            _BarPictures3.Image = Properties.Resources.notes;
            _BarPictures4.Image = Properties.Resources.maps;
            _BarPictures5.Image = Properties.Resources.phone;

            // Mouse Handler's
            _BarPictures1.MouseHover += new EventHandler(MouseHoverEvent);
            DateInfo.MouseHover += new EventHandler(LabelsMouseHover);
            
            // Auto Size Image's
            _BarPictures1.SizeMode = PictureBoxSizeMode.AutoSize;
            _BarPictures2.SizeMode = PictureBoxSizeMode.AutoSize;
            _BarPictures3.SizeMode = PictureBoxSizeMode.AutoSize;
            _BarPictures4.SizeMode = PictureBoxSizeMode.AutoSize;
            _BarPictures5.SizeMode = PictureBoxSizeMode.AutoSize;

            // Dock Type For Picture's
            _BarPictures1.Dock = DockStyle.Left;
            _BarPictures2.Dock = DockStyle.Left;
            _BarPictures3.Dock = DockStyle.Left;
            _BarPictures4.Dock = DockStyle.Left;
            _BarPictures5.Dock = DockStyle.Left;

            // Options For Bar Menu.
            DownPanel.BackColor = Color.FromArgb(60, Color.CadetBlue);
            DownPanel.AutoSize = false;

            DownPanel.Controls.Add(_BarPictures1);
            DownPanel.Controls.Add(_BarPictures2);
            DownPanel.Controls.Add(_BarPictures3);
            DownPanel.Controls.Add(_BarPictures4);
            DownPanel.Controls.Add(_BarPictures5);
        }

        private void MouseHoverEvent(object sender, EventArgs e)
        {
            //ToDo...
        }

        private void SetEvent(string Text)
        {
            EventText = Text;
        }

        private string GetEvent()
        {
            return EventText;
        }
        private void LabelsMouseHover(object sender, EventArgs e)
        {
            SetEvent("Δεν υπάρχει κανένα γεγονός για σήμερα.");
            TimeTip.Show(TIObject.Day() + "-" + TIObject.Month() + "-" + TIObject.Year() + "\n" + GetEvent(), DateInfo);
        }

        private void Main_Load(object sender, EventArgs e)
        {
            FixBarMenu();
            AddControls();
            UPBarStyles();
            MainPanelStyle();

        }

        private void ShowLoad()
        {
            Load lo = new Load();
            lo.ShowDialog();
        }
        
        private void MainPanelStyle()
        {
            MainPanel.Dock = DockStyle.Fill;
            MainPanel.BackColor = Color.FromArgb(10, Color.Black);
        }

        private void AddControls()
        {
            UPPanel.Controls.Add(DateInfo);
            
            this.Controls.Add(MainPanel);
            this.Controls.Add(UPPanel);
        }

        private void DateTick_Tick(object sender, EventArgs e)
        {
            ShowDateInfo();
        }

        private void UPBarStyles()
        {

            UPPanel.BackColor = Color.FromArgb(60, Color.CadetBlue);
            UPPanel.Dock = DockStyle.Top;
            UPPanel.Size = new Size(this.Size.Width, 19);

            UPPanel.Font = new System.Drawing.Font("Tahoma", 9, FontStyle.Bold);
            UPPanel.ForeColor = Color.BlanchedAlmond;

            DateInfo.BackColor = Color.Transparent;
            DateInfo.AutoSize = true;
            DateInfo.Text = "Loading Informations...";
            DateInfo.Dock = DockStyle.Right;
        }
        
        private void ShowDateInfo() {
            TimeInfos Info = new TimeInfos();
            DateInfo.Text = Info.Hours() + ":" + Info.Minutes() + ":" + Info.Seconds() ;
        }

        private void TimeTip_Popup(object sender, PopupEventArgs e) {
            TimeTip.BackColor = Color.FromArgb(80, Color.Red);
        }

    }

    class TimeInfos
    {
        DateTime _Date = DateTime.Now;

        public int Day() {
            return (_Date.Day);
        }
        public int Month() {
            return (_Date.Month);
        }
        public int Year() {
            return (_Date.Year);
        }
        public int Hours() {
            return (_Date.Hour);
        }
        public int Minutes() {
            return (_Date.Minute);
        }
        public int Seconds() {
            return (_Date.Second);
        }
        public string DayMonthYear() {
            return (_Date.Day + "-" + _Date.Month + "-" + _Date.Year);
        }
        public string HourMinsSecs() {
            return (_Date.Hour + "-" + _Date.Minute + "-" + _Date.Second);
        }
    }
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock