fixed more shit

This commit is contained in:
NicoAICP 2020-05-22 16:12:05 +02:00
parent 9ec440c7bb
commit 7c95435696
2 changed files with 33 additions and 6 deletions

View file

@ -23,10 +23,10 @@ namespace UWUVCI_AIO_WPF
Process[] pname = Process.GetProcessesByName("UWUVCI AIO");
if (pname.Length > 1)
{
t.Elapsed += KillProg;
t.Start();
Custom_Message cm = new Custom_Message("Another Instance Running", "You already got another instance of UWUVCI AIO running.\nThis instance of UWUVCI will terminate in 5 seconds.");
Custom_Message cm = new Custom_Message("Another Instance Running", "You already got another instance of UWUVCI AIO running.\nThis instance will terminate in 5 seconds.");
cm.ShowDialog();
KillProg(null, null);
}
@ -37,7 +37,8 @@ namespace UWUVCI_AIO_WPF
if (witdh < 1150 || height < 700)
{
t.Elapsed += KillProg;
t.Start(); Custom_Message cm = new Custom_Message("Resolution not supported", "Your screen resolution is not supported, please use a resolution of atleast 1152x864\nUWUVCI will terminate in 5 seconds.");
t.Start();
Custom_Message cm = new Custom_Message("Resolution not supported", "Your screen resolution is not supported, please use a resolution of atleast 1152x864\nThis instance will terminate in 5 seconds.");
cm.ShowDialog();
KillProg(null, null);
}

View file

@ -74,8 +74,16 @@ namespace UWUVCI_AIO_WPF.UI.Windows
{
dont.Visibility = Visibility.Visible;
}
if (title.ToLower().Contains("instance"))
{
}
}
public void CloseProgram(object sender, RoutedEventArgs e)
{
Environment.Exit(1);
}
public Custom_Message(string title, string message, string Path)
{
@ -225,12 +233,30 @@ namespace UWUVCI_AIO_WPF.UI.Windows
private void wind_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
try
{
if((FindResource("mvm") as MainViewModel).mw != null)
(FindResource("mvm") as MainViewModel).mw.Topmost = true;
}
catch (Exception s)
{
}
}
private void wind_Closed(object sender, EventArgs e)
{
try
{
if ((FindResource("mvm") as MainViewModel).mw != null)
(FindResource("mvm") as MainViewModel).mw.Topmost = false;
}
catch (Exception s)
{
}
}
}
}