예제 #1
0
        /// <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 });
        }
예제 #2
0
        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 });
        }
예제 #3
0
 public void Load(DNSApiHandle dnsapi)
 {
     LDNS1A.Show();
 }
예제 #4
0
 public void Load(DNSApiHandle dnsapi)
 {
     DNI.dnsapi = dnsapi;
     DNI.Show();
 }
예제 #5
0
        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();
        }