Exemple #1
0
        private void writeComponents()
        {
            gView.Framework.system.UI.AssemblyExplorer explorer = new gView.Framework.system.UI.AssemblyExplorer();

            // Refresh Components
            string str = "";

            foreach (string assemblyname in lstComponents.Items)
            {
                str += explorer.Explore(assemblyname) + "\n";
            }

            string       filename = gView.Framework.system.SystemVariables.MyCommonApplicationData + @"/gViewGisOS_plugins.xml";
            StreamWriter sw       = new StreamWriter(filename);

            sw.WriteLine("<components>\n" + str + "</components>");
            sw.Close();

            RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\gViewGisOS", true);

            if (key != null)
            {
                key.SetValue("comp", filename);
                key.Close();
            }
        }
Exemple #2
0
        private void menuItem2_Click(object sender, System.EventArgs e)
        {
            if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
            {
                gView.Framework.system.UI.AssemblyExplorer explorer = new gView.Framework.system.UI.AssemblyExplorer();
                if (explorer.Explore(openFileDialog1.FileName) == "")
                {
                    MessageBox.Show("No Components found!");
                    return;
                }
                if (lstComponents.Items.IndexOf(openFileDialog1.FileName) == -1)
                {
                    addComponent(openFileDialog1.FileName);
                    lstComponents.Items.Add(openFileDialog1.FileName);
                }

                writeComponents();
                makeTree();
            }
        }