Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
SrShadowy committed Apr 29, 2020
1 parent a28897a commit 7f38b38
Show file tree
Hide file tree
Showing 10 changed files with 374 additions and 193 deletions.
12 changes: 12 additions & 0 deletions LauncherDesktop/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="LauncherDesktop.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<userSettings>
<LauncherDesktop.Properties.Settings>
<setting name="autoIni" serializeAs="String">
<value>False</value>
</setting>
</LauncherDesktop.Properties.Settings>
</userSettings>
</configuration>
273 changes: 147 additions & 126 deletions LauncherDesktop/Form1.Designer.cs

Large diffs are not rendered by default.

128 changes: 113 additions & 15 deletions LauncherDesktop/Form1.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using Microsoft.Win32;
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LauncherDesktop
Expand All @@ -24,6 +21,8 @@ public Form1()
string result = string.Empty;
bool change = false;
string myFile = Application.StartupPath + "\\lista.txt";
string Ver = "20.04.29";
string TitleProgram = string.Empty;
public class IconExtractor
{
[DllImport("shell32.dll", EntryPoint = "ExtractIconEx")]
Expand Down Expand Up @@ -177,27 +176,62 @@ void loadFile()
listitens.Items.Add(result, 0);
listitens.Items[listitens.Items.Count - 1].Group = listitens.Groups[1];
}

}

}
}
void changueItens()
{
this.Text = this.Text+ "*";
this.Text = TitleProgram + "*";
change = true;
}
void questionHide()
{
var ButtonsResult = MessageBox.Show("Deseja Esconder?", "Hide me", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
var ButtonsResult = MessageBox.Show("Deseja Esconder?", "Hide me", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (ButtonsResult == DialogResult.Yes)
{
this.Hide();
notifyIcon1.Visible = true;
}
}
bool verChange()
{
WebRequest request = WebRequest.Create("https://github.com/SrShadowy/AppLauncher/tags");
WebResponse response = request.GetResponse();


using (Stream dataStream = response.GetResponseStream())
{
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
string[] splitResponse = responseFromServer.Split('<');
string version;

foreach (string lines in splitResponse)
{
if (lines.Contains(@"a href=""/SrShadowy/AppLauncher/releases/tag/"))
{
version = lines.Replace(@"a href=""/SrShadowy/AppLauncher/releases/tag/v", "");
version = version.Remove(8);
if (string.Compare(version, Ver) != 0)
{
return true;


}
break;

}

}


}
return false;

}


private void listItens_DragDrop(object sender, DragEventArgs e)
{
Expand Down Expand Up @@ -347,19 +381,27 @@ private void limparListaToolStripMenuItem_Click(object sender, EventArgs e)

private void Form1_Load(object sender, EventArgs e)
{
TitleProgram = this.Text + " v" + Ver;
this.Text = TitleProgram;
loadFile();
inicializarComOOSToolStripMenuItem.Checked = Properties.Settings.Default.autoIni;

}

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.Save();
if (change)
{
var ButtonResult = MessageBox.Show("Existe alteração, deseja salvar?", "Alteração",
var ButtonResult = MessageBox.Show("Existe alteração, deseja salvar?", "Alteração",
MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
if (ButtonResult == DialogResult.Yes)
SaveList();

}

}


private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
Expand All @@ -378,19 +420,17 @@ private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
{
Show();
}

}

private void Form1_VisibleChanged(object sender, EventArgs e)
{
if(Visible == true)
if (Visible == true)
{ notifyIcon1.Visible = false; }
}

private void sobreToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Criado por Sr.Shadowy @2016 @2020 APP LAUNCHER Insparo e construido graças ao Smoll_iCe");
}
{ }

private void abrirListaToolStripMenuItem_Click(object sender, EventArgs e)
{
Expand All @@ -401,5 +441,63 @@ private void salvarListaToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveList();
}

private void inicializarComOOSToolStripMenuItem_Click(object sender, EventArgs e)
{
if (inicializarComOOSToolStripMenuItem.Checked)
{
try
{
using (RegistryKey key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true))
{
key.SetValue("LauncherApps", "\"" + Application.ExecutablePath + "\"");
Properties.Settings.Default.autoIni = true;

}
}
catch
{
MessageBox.Show("Não foi possivel adicionar tente novamente executando como administrador", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

}
else
{
try
{
using (RegistryKey key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true))
{
key.DeleteValue("LauncherApps", false);
}
}
catch
{
throw;
}
}
}

private void sobreToolStripMenuItem_Click_1(object sender, EventArgs e)
{
MessageBox.Show("\tCriado por Sr.Shadowy @2016 @2020" + Environment.NewLine +
"\t\tVer " + Ver + Environment.NewLine + "APP LAUNCHER inspirado e construido graças ao Smoll_iCe", "Sobre...");

}

private void verificarUpdateToolStripMenuItem_Click(object sender, EventArgs e)
{
if (verChange())
{
var butonsResult = MessageBox.Show("Existe uma nova versão deseja baixar?", "Nova versão disponivel", MessageBoxButtons.YesNo);
if (butonsResult == DialogResult.Yes)
{
Process.Start("https://github.com/SrShadowy/AppLauncher/releases");
}
}
else
{
MessageBox.Show("Não foi possivel ou você está usando a versão atual.", "versão");
}
}
}
}
40 changes: 20 additions & 20 deletions LauncherDesktop/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -687,26 +687,26 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADC
BQAAAk1TRnQBSQFMAwEBAAEIAQABCAEAARkBAAEZAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABZAMA
ARkDAAEBAQABIAUAARABJyIAAzEBXgMaAdkDAQH9AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA
Af4DNAGF/wBdAAMvAVgDBgH2AzMBbgMhATMDIAEwAyABMAMgATADIAEwAyABMAMgATADIAEwAzIBmwMA
Af4DLwFZ/wBZAAMeAdIDNAF3JAADNAGEAw0B7QMHAfUDIQEz/wBRAAMDAQQDAQH8AyEBMiQAAzQBhAMu
AawDMwGPAxUB4gMSARj/AE0AAwQBBgMAAf8DHQErJAADNAGEAy4BrAMCAQMDKQG6AyUBxAMFAQf/AEkA
AwQBBgMAAf8DHQErJAADNAGEAy4BrAQAAw8BFQMUAeMDMQGc/wBJAAMEAQYDAAH/Ax0BKyQAAzQBfgMr
AbQIAAMlATsDAwH6AzMBbv8ARQADBAEGAwAB/wMdASskAAMlAToDBgH3AzQBgQM0AXUDNAF1AyEBzAMC
AfsDKQFD/wBBAAMEAQYDAAH/Ax0BKygAAzABWwMqAbYDKQG6AykBugMpAboDJAHGAw4B7AMCAQP/AD0A
AwQBBgMAAf8DHQErLAADLwFZAyQBOQgAAx0BKwMAAf8DBAEG/wA9AAMEAQYDAAH/Ax0BKywAAyABzQMz
AY8IAAMdASsDAAH/AwQBBv8APQADBAEGAwAB/wMdASssAAMtAVADGQ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8DBAEG/wA9AAMEAQYDAAH/
Ax4BKzwAAx4BKwMAAf8DBAEG/wA9AAMDAQQDAgH8AyIBMjwAAyMBNAMEAfsDAgED/wBBAAMyAdIDQAF3
PAADRAGaAzwBv/8ARQADNQFYAwwB9gM9AW4DIwEzAyEBMAMhATADIQEwAyEBMAMhATADIQEwAyEBMAMh
ATADIQEwAyEBMAMhATADKwFCA0MBqAMTAfADIAEv/wBJAAM3AV4DLAHZAwIB/QMAAf8DAAH/AwAB/wMA
Af8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AxIB8gNCAa0DHAEo/wA9AAFCAU0BPgcAAT4DAAEo
AwABZAMAARkDAAEBAQABAQUAAZABARYAA/8BAAHwAQAB/wGADAAB4AEAAX8BgAwAAecB/AE/AYAMAAHH
AfwBHwGADAABxwH8AQ8BgAwAAccB/AGPAYAMAAHHAfwBxwGADAABxwH8AQMBgAwAAccB/gEBAYAMAAHH
Af8BMQGADAABxwH/ATEBgAwAAccB/wExAYAMAAHHAf8BMQGADAABxwH/AREBgAwAAccB/AGBAYAMAAHH
Expand Down
30 changes: 30 additions & 0 deletions LauncherDesktop/LauncherDesktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -35,6 +50,9 @@
<PropertyGroup>
<ApplicationIcon>icon_Uqd_icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject>LauncherDesktop.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -85,5 +103,17 @@
<ItemGroup>
<Content Include="icon_Uqd_icon.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 e x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
13 changes: 13 additions & 0 deletions LauncherDesktop/LauncherDesktop.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>pt-BR</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>
3 changes: 0 additions & 3 deletions LauncherDesktop/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LauncherDesktop
Expand Down
11 changes: 5 additions & 6 deletions LauncherDesktop/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// As informações gerais sobre um assembly são controladas por
// conjunto de atributos. Altere estes valores de atributo para modificar as informações
// associadas a um assembly.
[assembly: AssemblyTitle("LauncherDesktop")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("Shadowy")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("SrShadowy")]
[assembly: AssemblyProduct("LauncherDesktop")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyCopyright("SrShadowy Copyright © 2016 a 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +31,5 @@
// É possível especificar todos os valores ou usar como padrão os Números de Build e da Revisão
// usando o "*" como mostrado abaixo:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("20.04.28.9")]
[assembly: AssemblyFileVersion("20.04.29.5")]
Loading

0 comments on commit 7f38b38

Please sign in to comment.