From: <du...@us...> - 2007-03-16 19:07:20
|
Revision: 190 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=190&view=rev Author: dukus Date: 2007-03-16 12:07:02 -0700 (Fri, 16 Mar 2007) Log Message: ----------- Added Zebons suggestion Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 15:59:02 UTC (rev 189) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 19:07:02 UTC (rev 190) @@ -107,26 +107,43 @@ } } } - private void addskin(int type) - { - // string fil; - openFileDialog1.Filter = "xml files|*.xml|png files|*.png|bmp files|*.bmp|All files|*.*"; - openFileDialog1.Multiselect = true; - if (openFileDialog1.ShowDialog(this) == DialogResult.OK) - { - foreach (string fil in openFileDialog1.FileNames) - switch (type) - { - case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, "BlueTwo", Path.GetFullPath(fil), "02010", ""); - break; - case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, "BlueTwo", Path.GetFullPath(fil), "02020", ""); - break; - default: - break; - } - } - } + private void addskin(int type) + { + // string fil; + string subtype; + openFileDialog1.Multiselect = true; + switch (type) + { + case 1: openFileDialog1.Filter = "xml files|*.xml|png files|*.png|bmp files|*.bmp|All files|*.*"; + break; + case 2: openFileDialog1.Filter = "png files|*.png|bmp files|*.bmp|xml files|*.xml|All files|*.*"; + break; + } + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + foreach (string fil in openFileDialog1.FileNames) + { + if (Path.GetFullPath(fil).IndexOf("Skin\\") == 0) + subtype = "BlueTwo"; + else + { + subtype =Path.GetFullPath(fil).Substring(Path.GetFullPath(fil).IndexOf("Skin\\") +5); + subtype =subtype.Substring(0,subtype.IndexOf("\\")); + } + switch (type) + { + case 1: addrow(Path.GetFileName(fil),MPinstalerStruct.SKIN_TYPE, subtype, Path.GetFullPath(fil), "02010", ""); + break; + case 2: addrow(Path.GetFileName(fil),MPinstalerStruct.SKIN_MEDIA_TYPE, subtype, Path.GetFullPath(fil), "02020",""); + break; + default: + break; + } + } + } + } + private void addother(string ty, string sty) { // string fil; Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-16 15:59:02 UTC (rev 189) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-16 19:07:02 UTC (rev 190) @@ -34,16 +34,21 @@ this.listView1 = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.button3 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button(); - this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.listView2 = new System.Windows.Forms.ListView(); + this.button5 = new System.Windows.Forms.Button(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); this.SuspendLayout(); // // button1 // - this.button1.Location = new System.Drawing.Point(15, 279); + this.button1.Location = new System.Drawing.Point(13, 279); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(65, 21); this.button1.TabIndex = 0; @@ -53,7 +58,7 @@ // // button2 // - this.button2.Location = new System.Drawing.Point(311, 279); + this.button2.Location = new System.Drawing.Point(309, 279); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 21); this.button2.TabIndex = 1; @@ -66,8 +71,9 @@ this.languageComboBox.FormattingEnabled = true; this.languageComboBox.Location = new System.Drawing.Point(216, 252); this.languageComboBox.Name = "languageComboBox"; - this.languageComboBox.Size = new System.Drawing.Size(170, 21); + this.languageComboBox.Size = new System.Drawing.Size(168, 21); this.languageComboBox.TabIndex = 2; + this.languageComboBox.SelectedIndexChanged += new System.EventHandler(this.languageComboBox_SelectedIndexChanged); // // listView1 // @@ -95,6 +101,11 @@ this.columnHeader2.Text = "Value"; this.columnHeader2.Width = 137; // + // columnHeader3 + // + this.columnHeader3.Text = "Language"; + this.columnHeader3.Width = 155; + // // textBox1 // this.textBox1.Location = new System.Drawing.Point(12, 253); @@ -111,7 +122,7 @@ // // button3 // - this.button3.Location = new System.Drawing.Point(107, 279); + this.button3.Location = new System.Drawing.Point(105, 279); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(75, 21); this.button3.TabIndex = 6; @@ -121,7 +132,7 @@ // // button4 // - this.button4.Location = new System.Drawing.Point(209, 279); + this.button4.Location = new System.Drawing.Point(207, 279); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 21); this.button4.TabIndex = 7; @@ -129,16 +140,53 @@ this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.button4_Click); // - // columnHeader3 + // comboBox1 // - this.columnHeader3.Text = "Language"; - this.columnHeader3.Width = 155; + this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(13, 306); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(371, 21); + this.comboBox1.TabIndex = 8; // + // listView2 + // + this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader4, + this.columnHeader5}); + this.listView2.Location = new System.Drawing.Point(434, 12); + this.listView2.Name = "listView2"; + this.listView2.Size = new System.Drawing.Size(227, 311); + this.listView2.TabIndex = 9; + this.listView2.UseCompatibleStateImageBehavior = false; + this.listView2.View = System.Windows.Forms.View.Details; + // + // button5 + // + this.button5.Location = new System.Drawing.Point(390, 156); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(38, 23); + this.button5.TabIndex = 10; + this.button5.Text = "<-"; + this.button5.UseVisualStyleBackColor = true; + // + // columnHeader4 + // + this.columnHeader4.Text = "Id"; + // + // columnHeader5 + // + this.columnHeader5.Text = "Value"; + this.columnHeader5.Width = 134; + // // Form2 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(396, 325); + this.ClientSize = new System.Drawing.Size(673, 335); + this.Controls.Add(this.button5); + this.Controls.Add(this.listView2); + this.Controls.Add(this.comboBox1); this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.textBox2); @@ -168,5 +216,10 @@ private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button4; private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ListView listView2; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ColumnHeader columnHeader5; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-16 15:59:02 UTC (rev 189) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-16 19:07:02 UTC (rev 190) @@ -16,11 +16,14 @@ { public string baseDir; public List<LanguageString> Language; - + public MPLanguageHelper deflang = new MPLanguageHelper(); + public MPLanguageHelper lang = new MPLanguageHelper(); string LanguageDirectory = Config.GetFolder(Config.Dir.Language); public Form2() { InitializeComponent(); + deflang.Load("English"); + lang.Load("English"); } private void LoadLanguages() { @@ -101,8 +104,24 @@ item1.SubItems.Add(lg.language); listView1.Items.AddRange(new ListViewItem[] { item1 }); } + comboBox1.Items.Clear(); + foreach (LanguageString lg in deflang.Language) + { + comboBox1.Items.Add(lg.dwCode+" - " + lg.mapSting); + } + load_lang(); } + void load_lang() + { + listView2.Items.Clear(); + foreach (LanguageString lg in lang.Language) + { + ListViewItem item1 = new ListViewItem(lg.dwCode, 0); + item1.SubItems.Add(lg.mapSting); + listView2.Items.AddRange(new ListViewItem[] { item1 }); + } + } private void button3_Click(object sender, EventArgs e) { Language.Clear(); @@ -116,5 +135,11 @@ { this.Close(); } + + private void languageComboBox_SelectedIndexChanged(object sender, EventArgs e) + { + lang.Load(languageComboBox.Text); + load_lang(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |