public Form1() { InitializeComponent(); label5.Text = "Programm geladen"; comboBox1.Text = "--Bitte Auswählen--"; string Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); linkLabel1.Text = "Version: " + Version; //Information zur version string pfad = Directory.GetCurrentDirectory(); if (File.Exists(pfad + "\\beta.txt")) { MessageBox.Show("Dies ist eine \"OPEN BETA\" Version es kann zu Einschreikungen und Fehlern kommen. Bitte diese auf unsere WEB seite Melden Danke", "Versions Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { } //Prüfung für Programm Typ //Prüfung via Regestry RegistryKey regtyp = Registry.LocalMachine; RegistryKey DK = regtyp.OpenSubKey("Software\\Philipp Lindner Media & Network\\Bücherei 2.0 Online"); string progtyp = (string)DK.GetValue("typ"); //Prüfing via XML Config (porg_typ.bxm) XmlDocument serverconfigXML = new XmlDocument(); serverconfigXML.Load(pfad + "\\prog_typ.bxm"); XmlNode ptyp = serverconfigXML.SelectSingleNode("/buch2online/typ"); string pxml = ptyp.InnerText; if (progtyp == "on" || pxml == "on") { label7.Text = "Onlein Version"; } if (progtyp == "st" || pxml == "st") { label7.Text = "Stand a lone (offline) Version"; } if (progtyp == "po" || pxml == "po") { label7.Text = "Portable Version"; } if (progtyp == "st") { MessageBox.Show("Stand a lone System wird gestertet", "[Stand a lone] Aktivet", MessageBoxButtons.OK, MessageBoxIcon.Information); comboBox1.Items.Add(pfad + "/server/st.bsvr"); } if (progtyp == "po" || pxml == "po") { MessageBox.Show("Prtabele Version wird gestertet", "[Prtabel] Aktivet", MessageBoxButtons.OK, MessageBoxIcon.Information); comboBox1.Items.Add(pfad + "/server/portal.bsvr"); } if (progtyp == "on" || pxml == "on") { MessageBox.Show("keine eigenstandigkeit (Stand a lone System)!", "[Stand a lone] Deaktivirt", MessageBoxButtons.OK, MessageBoxIcon.Information); } if (progtyp == "" || pxml == "") { //Starte programzusatzeinstellung progtyp Veditor2 = new progtyp(label7.Text); Veditor2.Show(); } }
private void button4_Click(object sender, EventArgs e) { progtyp Veditor = new progtyp(label7.Text); Veditor.Show(); }