using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace FModel
{
static class DLLImport
{
///
/// used to check if internet is turned on or off
///
///
///
/// boolean about the internet
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState(out int description, int reservedValue);
public static bool IsInternetAvailable()
{
return InternetGetConnectedState(description: out _, reservedValue: 0);
}
///
/// used to set the theme on the TreeView
///
///
///
///
[DllImport("uxtheme.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
private static extern int SetWindowTheme(IntPtr hwnd, string pszSubAppName, string pszSubIdList);
public static void SetTreeViewTheme(IntPtr treeHandle)
{
SetWindowTheme(treeHandle, "explorer", null);
}
}
}