public Form1() { InitializeComponent(); updater = new SharpUpdater(Assembly.GetExecutingAssembly(), this, new Uri("http://aceroleplay.xyz/launcher/version.xml")); updater.DoUpdate(); label5.Text = ProductVersion; }
private void Manager_Load(object sender, EventArgs e) { updater.DoUpdate(); month(); cn.Close(); GetEmployees(); leave_request(); days_available(); //timer interval t.Interval = 1000; //in milliseconds t.Tick += new EventHandler(this.t_Thick); //start timer when form loads t.Start(); //this will use t_Tick() method if (lblDays.Text == "0" || lblDays.Text == "0.25") { btnRequest.Enabled = false; } if (currentmonth != dbmonth) { cn.Open(); SqlCommand cm = cn.CreateCommand(); cm.CommandType = CommandType.Text; cm.CommandText = "UPDATE Account SET acc_leave = acc_leave + 1.25 Where acc_id = '" + Login.id + "'"; cm.ExecuteNonQuery(); cn.Close(); } GetLeaveUpdate(); }
//Initalize Main Window public LauncherWindow(string[] args) { InitializeComponent(); gameData = new GameData(); #region Init Functions.CreateFiles(); gameData.AddGame("Minecraft", "mcexe.dat"); gameData.AddGame("Rocket League", "steam://rungameid/252950", false, "Steam"); gameData.AddGame("CS:GO", "steam://rungameid/730", false, "Steam"); gameData.AddGame("League OF Legends", "lolexe.dat"); gameData.AddGame("Scrap Mechanic", "steam://rungameid/387990", false, "Steam"); gameData.AddGame("Unturned", "steam://rungameid/304930", false, "Steam"); gameData.AddGame("Factorio", "factorioexe.dat"); gameData.AddGame("Fortnite", "fortniteexe.dat"); #endregion // If launched with args (from sharp updater) say Updated to that version try { MessageBox.Show(string.Format("Updated to {0}", args[0]), "Multi-Game Launcher", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch { } //Sharp update check for updates updater = new SharpUpdater(this); updater.DoUpdate(); }
private void f_DBLogin_Load(object sender, EventArgs e) { new FLogo().ShowDialog(); // Обновления SharpUpdater updater = new SharpUpdater(Assembly.GetExecutingAssembly(), this, new Uri("https://raw.githubusercontent.com/AlexDives/ProfUpdater/master/version.xml")); updater.DoUpdate(); }
public Form1() { InitializeComponent(); this.flatLabel3.Text = "Versão: " + this.ApplicationAssembly.GetName().Version.ToString(); updater = new SharpUpdater(this); updater.DoUpdate(); }
private void TopManagement_Load(object sender, EventArgs e) { updater.DoUpdate(); GetManagers(); leave_request(); //timer interval t.Interval = 1000; //in milliseconds t.Tick += new EventHandler(this.t_Thick); //start timer when form loads t.Start(); //this will use t_Tick() method }
public frmWeCleared() { InitializeComponent(); // Classe d'enregistrement des parametres Settings = new SettingsClass(this); Settings.ReadMainSettings(); // Attribution du WoWPath WoWPath = MainSettings["WoWPath"]; if (IsWoWPathValid(WoWPath)) { lblPath.Text = WoWPath; } // Addons Parser class AddonsParser = new AddonsParser(this); // Zip Class ZipClass = new ZipClass(this); // Démarrer le timer général. tmrRefresh.Start(); tmrRefresh_Tick(this, EventArgs.Empty); // Notify Icon NIcon = new NotifyIcon { BalloonTipIcon = ToolTipIcon.Info, BalloonTipText = "Vous pouvez réouvrir We Cleared Client via le system tray.", BalloonTipTitle = "We Cleared minimisé.", Icon = Properties.Resources.Icon, Text = "Cliquez pour réouvrir We Cleared.", Visible = false }; NIcon.MouseClick += NIcon_Click; // Mises à jour de l'UI dataGridAddons.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True; dataGridAddons.RowTemplate.Height = 50; btnUpdate.BackColor = Settings.GetEnabled("AutoUpdate") ? Color.DarkGreen : Color.DarkRed; DefineTooltips(); // ISharpUpdatable UI lblUpdateClient.Text = ApplicationAssembly.GetName().Version.ToString(); Updater = new SharpUpdater(this); Updater.DoUpdate(); }
private void Employee_Load(object sender, EventArgs e) { updater.DoUpdate(); month(); cn.Close(); days_available(); GetLeaveUpdate(); //timer interval t.Interval = 1000; //in milliseconds t.Tick += new EventHandler(this.t_Thick); //start timer when form loads t.Start(); //this will use t_Tick() method }
private void btnCheckForUpdates_Click(object sender, EventArgs e) { updater.DoUpdate(); }
private void Form1_Load(object sender, EventArgs e) { updater.DoUpdate(); }
public Form1() { InitializeComponent(); updater = new SharpUpdater(this); updater.DoUpdate(); }
private void pegawaiToolStripMenuItem_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; updater.DoUpdate(false); if (TabExist("DataPegawai")) { tabMain.SelectTab("DataPegawai"); } else { TabPage tab = new TabPage("Data Pegawai"); tab.Name = "DataPegawai"; UcPegawai uc = new UcPegawai(); uc.Dock = DockStyle.Fill; tab.Controls.Add(uc); tabMain.TabPages.Add(tab); tabMain.SelectedTab = tab; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void but_newVersion_Click(object sender, EventArgs e) { SharpUpdater updater = new SharpUpdater(Assembly.GetExecutingAssembly(), this, new Uri("https://raw.githubusercontent.com/AlexDives/ProfUpdater/master/version.xml")); updater.DoUpdate(); }
public Form1() { InitializeComponent(); updater = new SharpUpdater(this); updater.DoUpdate(); // Start listening for packets outgauge.Connect("127.0.0.1", 30000); // Attach OutGauge packet event outgauge.PacketReceived += (sender, e) => { /* * Process p = Process.GetProcessesByName("lfs").FirstOrDefault(); * if (p != null) * { * IntPtr h = p.MainWindowHandle; * SetForegroundWindow(h); * SendKeys.SendWait("a"); * //System.Threading.Thread.Sleep(100); * } */ if (checkBox1.Checked) { //Devir label2.Text = Convert.ToInt32(e.RPM).ToString(); //Araç label10.Text = Convert.ToString(e.Car); //Hız label9.Text = Convert.ToInt32(e.Speed / 0.27777778).ToString(); //Benzin label11.Text = Convert.ToInt32(e.Fuel * 100).ToString(); //Vites if (e.Gear == 8) { label12.Text = "7"; } else if (e.Gear == 7) { label12.Text = "6"; } else if (e.Gear == 6) { label12.Text = "5"; } else if (e.Gear == 5) { label12.Text = "4"; } else if (e.Gear == 4) { label12.Text = "3"; } else if (e.Gear == 3) { label12.Text = "2"; } else if (e.Gear == 2) { label12.Text = "1"; } else if (e.Gear == 1) { label12.Text = "N"; } else if (e.Gear == 0) { label12.Text = "R"; } else { label12.Text = Convert.ToInt32(e.Gear).ToString(); } //Turbo label13.Text = Convert.ToInt32(e.Turbo * 100).ToString(); circularProgressBar4.Value = Convert.ToInt32(e.EngTemp); label19.Text = Convert.ToInt32(e.Packet.EngTemp / 0.27777778).ToString(); circularProgressBar5.Value = Convert.ToInt32(e.OilPressure); label20.Text = Convert.ToInt32(e.Packet.OilPressure / 0.27777778).ToString(); circularProgressBar6.Value = Convert.ToInt32(e.OilTemp); label21.Text = Convert.ToInt32(e.Packet.OilTemp / 0.27777778).ToString(); circularProgressBar1.Value = Convert.ToInt32(e.Throttle * 100); circularProgressBar2.Value = Convert.ToInt32(e.Brake * 100); circularProgressBar3.Value = Convert.ToInt32(e.Clutch * 100); //Görünüm 1 textBox1.Text = Convert.ToString(e.Display1); //Görünüm 2 textBox2.Text = Convert.ToString(e.Display2); } else { } }; }
private void checkForUpdateToolStripMenuItem_Click(object sender, EventArgs e) { updater.DoUpdate(); }
private void menuItem_updateCheck_Click(object sender, RoutedEventArgs e) { updater.DoUpdate(); }
private static void Receive(ConnectedObject client, LoginScreen parent) { int bytesRead = 0; while (true) { // Read message from the server try { bytesRead = client.Socket.Receive(client.Buffer, SocketFlags.None); } catch (SocketException) { Console.WriteLine("Server Closed"); client.Close(); Thread.CurrentThread.Abort(); } catch (Exception) { Thread.CurrentThread.Abort(); return; } // Check message if (bytesRead > 0) { // Build message as it comes in client.BuildIncomingMessage(bytesRead); // Check if we received the full message if (client.MessageReceived()) { // Print message to the console Console.WriteLine("Message Received"); Console.WriteLine(client.getIncommingMessage()); string response = client.getIncommingMessage().Replace("<END>", ""); if (int.Parse(response.Split(',')[0]) == 1) { parent.SetVisible(true); parent.SetText("This Key Got Banned !"); parent.SetColor(System.Drawing.Color.Red); } else if (int.Parse(response.Split(',')[0]) == 2) { parent.SetVisible(true); parent.SetText("Password Wrong !"); parent.SetColor(System.Drawing.Color.Red); } else if (int.Parse(response.Split(',')[0]) == 3) { parent.SetVisible(true); parent.SetText("Key Already Online !"); parent.SetColor(System.Drawing.Color.Yellow); } else if (int.Parse(response.Split(',')[0]) == 4) { parent.SetVisible(true); parent.SetText("Key Binded Click Login Again !"); parent.SetColor(System.Drawing.Color.Lime); } else if (int.Parse(response.Split(',')[0]) == 5) { parent.SetVisible(true); parent.SetText("Key Deleted Because Expired !"); parent.SetColor(System.Drawing.Color.Red); } else if (int.Parse(response.Split(',')[0]) == 6) { parent.SetVisible(true); parent.SetText("Your Key Expired !"); parent.SetColor(System.Drawing.Color.Red); } else if (int.Parse(response.Split(',')[0]) == 7) { parent.SetVisible(true); parent.SetText("You Can't Use On This PC !"); parent.SetColor(System.Drawing.Color.Red); } else if (int.Parse(response.Split(',')[0]) == 8) { parent.SetVisible(true); parent.SetText("You Have Been Banned !"); parent.SetColor(System.Drawing.Color.Red); } else if (int.Parse(response.Split(',')[0]) == 9) { string message1 = "VERSION OUTDATED , PLEASE CLICK OK TO UPDATE OR CANCEL TO SHUTDOWN !"; string title1 = "! BYPASS WARNING !"; MessageBoxButtons buttons1 = MessageBoxButtons.OKCancel; DialogResult result1 = MessageBox.Show(message1, title1, buttons1, MessageBoxIcon.Warning); if (result1 == DialogResult.OK) { updater.DoUpdate(); } else if (result1 == DialogResult.Cancel) { Application.Exit(); } } else if (int.Parse(response.Split(',')[0]) == 10) { parent.SetVisible(false); parent.SafeHide(); using (RegistryKey Key = Registry.CurrentUser.OpenSubKey(@"Techcom", true)) if (Key != null) { string val = (string)Key.GetValue("Name"); if (string.IsNullOrEmpty(val)) { Key.SetValue("Name", "" + response.Split(',')[1] + ""); Key.Close(); } else { Key.SetValue("Name", "" + response.Split(',')[1] + ""); Key.Close(); } } else { RegistryKey key; key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Techcom"); key.SetValue("Name", "" + response.Split(',')[1] + ""); key.Close(); } BypassScreen bypassdialog = new BypassScreen(); TimeSpan timeSpan = new TimeSpan(DateTime.ParseExact(response.Split(',')[2], "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture).Ticks); DateTime nistTime = DateTime.Now; TimeSpan timeSpan1 = new TimeSpan(nistTime.Ticks); int totalDays = (int)(timeSpan.TotalDays - timeSpan1.TotalDays); int totalHours = (int)(timeSpan.TotalHours - timeSpan1.TotalHours); int totalMinutes = (int)(timeSpan.TotalMinutes - timeSpan1.TotalMinutes); string str1 = ""; string str2 = ""; if (totalDays > 0) { str1 = string.Concat("Expire By Days : ", totalDays, " Days"); str2 = string.Concat("", totalDays, " Days"); } else if (totalHours > 0) { str1 = string.Concat("Expire By Hours: ", totalHours, " Hours"); str2 = string.Concat("", totalHours, " Hours"); } else if (totalMinutes > 0) { str1 = string.Concat("Expire By Minutes : ", totalMinutes, " Minutes"); str2 = string.Concat("", totalMinutes, " Minutes"); } bypassdialog.Show(); Control[] ctrls = bypassdialog.Controls.Find("username", false); if (ctrls.Length > 0) { Label lbl = (Label)ctrls[0]; lbl.Text += response.Split(',')[1]; } Control[] ctrls2 = bypassdialog.Controls.Find("keyindays", false); if (ctrls2.Length > 0) { Label lbl = (Label)ctrls2[0]; lbl.Text = str1; } Control[] ctrls3 = bypassdialog.Controls.Find("keyindate", false); if (ctrls3.Length > 0) { Label lbl = (Label)ctrls3[0]; lbl.Text = "Expire By Date : " + response.Split(',')[2] + ""; } bypassdialog.Text += str2; parent.SafeHide(); } // Reset message client.ClearIncomingMessage(); } } } }
private void button1_Click(object sender, EventArgs e) { updater.DoUpdate(); }
private void updateMI_Click(object sender, EventArgs e) { updater.DoUpdate(); }