/// <summary> /// Loads a DotNetShell app from a DLL file /// </summary> /// <param name="path">Path to DLL file</param> /// <param name="dnsapi">DotNetShell Api Handle</param> public static void LoadAppFromDLL(string path, DNSApiHandle dnsapi) { Assembly assembly = Assembly.LoadFrom(path); Type app = assembly.GetType("DotNetApp.App"); MethodInfo loadMethod = app.GetMethod("Load"); object appInstance = Activator.CreateInstance(app); loadMethod.Invoke(appInstance, new object[] { dnsapi }); }
public static void LoadAppFromDLL(string path, DNSApiHandle dnsapi, List<TaskBarItem> taskBarList, string taskBarText, string identifier) { Assembly assembly = Assembly.LoadFrom(path); Type app = assembly.GetType("DotNetApp.App"); taskBarList.Add(new TaskBarItem(taskBarText, app, identifier)); MethodInfo loadMethod = app.GetMethod("Load"); object appInstance = Activator.CreateInstance(app); loadMethod.Invoke(appInstance, new object[] { dnsapi }); }
public void Load(DNSApiHandle dnsapi) { LDNS1A.Show(); }
public void Load(DNSApiHandle dnsapi) { DNI.dnsapi = dnsapi; DNI.Show(); }
private void Form1_Load(object sender, EventArgs e) { usernameText.Text = Environment.UserName; //CenterControlInParent(welcomeDNS); SetWindowPos(Handle, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); //Create the API instance dnsapi = new DNSApiHandle(2.1); //Populate the list of apps LoadApps(); }