Skip to content

Commit d2c48a1

Browse files
authored
Add files via upload
1 parent e8a27c4 commit d2c48a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6925
-0
lines changed

Sadcoy/App.config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
5+
</startup>
6+
</configuration>

Sadcoy/App.xaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="Sadcoy.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:Sadcoy"
5+
StartupUri="Loading.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>

Sadcoy/App.xaml.cs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace Sadcoy
10+
{
11+
/// <summary>
12+
/// Interaktionslogik für "App.xaml"
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}

Sadcoy/Loading.xaml

+867
Large diffs are not rendered by default.

Sadcoy/Loading.xaml.cs

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using Microsoft.SqlServer.Server;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
using System.Windows.Controls;
9+
using System.Windows.Data;
10+
using System.Windows.Documents;
11+
using System.Windows.Input;
12+
using System.Windows.Media;
13+
using System.Windows.Media.Imaging;
14+
using System.Windows.Shapes;
15+
16+
namespace Sadcoy
17+
{
18+
/// <summary>
19+
/// Interaktionslogik für Loading.xaml
20+
/// </summary>
21+
public partial class Loading : Window
22+
{
23+
public Loading()
24+
{
25+
InitializeComponent();
26+
}
27+
28+
private void RunSw_Click(object sender, RoutedEventArgs e)
29+
{
30+
MainWindow frm = new MainWindow();
31+
frm.Show();
32+
this.Hide();
33+
}
34+
}
35+
}

Sadcoy/MainWindow.xaml

+887
Large diffs are not rendered by default.

Sadcoy/MainWindow.xaml.cs

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Diagnostics;
4+
using System.IO;
5+
using System.Linq;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
using System.Windows;
9+
using System.Windows.Controls;
10+
using System.Windows.Data;
11+
using System.Windows.Documents;
12+
using System.Windows.Input;
13+
using System.Windows.Media;
14+
using System.Windows.Media.Imaging;
15+
using System.Windows.Navigation;
16+
using System.Windows.Shapes;
17+
18+
namespace Sadcoy
19+
{
20+
public partial class MainWindow : Window
21+
{
22+
public MainWindow()
23+
{
24+
InitializeComponent();
25+
}
26+
27+
private void RunSw_Click(object sender, RoutedEventArgs e)
28+
{
29+
Optimize.Optimizing();
30+
string TempPath = System.IO.Path.GetTempPath();
31+
var Dir = new DirectoryInfo(TempPath);
32+
33+
if (!Dir.Exists)
34+
{
35+
MessageBox.Show("Can't Find Temp Folder");
36+
return;
37+
}
38+
39+
foreach (DirectoryInfo dir in Dir.GetDirectories())
40+
{
41+
try
42+
{
43+
dir.Delete(true);
44+
}
45+
catch (Exception)
46+
{
47+
48+
}
49+
}
50+
51+
foreach (FileInfo filez in Dir.GetFiles())
52+
{
53+
try
54+
{
55+
filez.Delete();
56+
}
57+
catch (Exception)
58+
{
59+
60+
}
61+
}
62+
if (MessageBox.Show("You need to restart the computer to apply the effects, do you want to restart now?", "Sadcoy", MessageBoxButton.OKCancel, MessageBoxImage.Warning) == MessageBoxResult.OK)
63+
{
64+
Process.Start("shutdown.exe", "-r -t 00");
65+
}
66+
else
67+
{
68+
// nothing
69+
}
70+
}
71+
72+
private void Exit_Click(object sender, RoutedEventArgs e)
73+
=> Environment.Exit(0);
74+
75+
private void Border_MouseDown(object sender, MouseButtonEventArgs e)
76+
=> this.DragMove();
77+
78+
private void SupportMe_Click(object sender, RoutedEventArgs e)
79+
=> System.Diagnostics.Process.Start(new ProcessStartInfo
80+
{
81+
FileName = "https://github.com/Jisll/Sadcoy",
82+
UseShellExecute = true
83+
});
84+
85+
private void Button_Click(object sender, RoutedEventArgs e)
86+
{
87+
Optimize.ConvertToNormal();
88+
if (MessageBox.Show("You need to restart the computer to convert the effects, do you want to restart now?", "Sadcoy", MessageBoxButton.OKCancel, MessageBoxImage.Warning) == MessageBoxResult.OK)
89+
{
90+
Process.Start("shutdown.exe", "-r -t 00");
91+
}
92+
else
93+
{
94+
// nothing
95+
}
96+
}
97+
98+
private void nameofcomputer_Initialized(object sender, EventArgs e)
99+
=> nameofcomputer.Text = (System.Environment.MachineName);
100+
101+
private void services_Click(object sender, RoutedEventArgs e)
102+
{
103+
Services sv = new Services();
104+
sv.Show();
105+
}
106+
}
107+
}

0 commit comments

Comments
 (0)