using BiskLog_Point_Of_Sale.Company_Setup; using BiskLog_Point_Of_Sale.Multiple_Login; using BiskLog_Point_Of_Sale.Properties; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Net.NetworkInformation; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace BiskLog_Point_Of_Sale { public partial class Splashscreen : Form { public static string macAddress, ppd; public Splashscreen() { InitializeComponent(); macAddress = GetMACAddress2(); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); } private void Timer1_Tick(object sender, EventArgs e) { loader.Width = loader.Width + 10; if (pictureBox1.Location.X <= 699) { pictureBox1.Location = new Point(pictureBox1.Location.X + 15,10); } else { pictureBox1.Visible = false; if (main.Width <= 330 && main.Height <= 320) { main.Visible = true; main.Width = main.Width + 10; main.Height = main.Height + 10; } else { if (label2.Location.Y > 300) label2.Location = new Point(label2.Location.X, label2.Location.Y - 20); } } if ((loader.Width) >= 716) { timer1.Stop(); this.Hide(); CreateProfile(); } } public string GetMACAddress2() { NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces(); String sMacAddress = string.Empty; foreach (NetworkInterface adapter in nics) { if (sMacAddress == String.Empty) { //IPInterfaceProperties properties = adapter.GetIPProperties(); sMacAddress = adapter.GetPhysicalAddress().ToString(); } } return sMacAddress; } public void CreateProfile() { if (Settings.Default.Configured) { MainLogin main = new MainLogin(); main.BringToFront(); main.ShowDialog(); this.Dispose(); } else { FirstPage main = new FirstPage(); main.BringToFront(); main.ShowDialog(); this.Dispose(); } } private void Splashscreen_Load(object sender, EventArgs e) { timer1.Start(); //string EclientMAC1 = "84A93EB3708E"; //string EclientMAC2 = "D89C67787937"; //string EclientMAC3 = "D89C67787938"; //string thisComputerMAC = GetMACAddress2(); //if (EclientMAC1 == thisComputerMAC || EclientMAC2 == thisComputerMAC || EclientMAC3 == thisComputerMAC) //{ // if (String.IsNullOrEmpty(Settings.Default.BranchID)) // { // Settings.Default.Configured = false; // } // timer1.Start(); //} //else //{ // string title = "ACCESS DENIED"; // string message = "To run BISKILOG POS on this computer, you would have to purchase a copy of BISKILOG POS"; // NoAction noAction = new NoAction(title, message); // noAction.BringToFront(); // noAction.ShowDialog(); // this.Dispose(); //} } } }