From: <ze...@us...> - 2007-03-16 20:31:06
|
Revision: 192 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=192&view=rev Author: zebons Date: 2007-03-16 13:30:59 -0700 (Fri, 16 Mar 2007) Log Message: ----------- Avoid an exception if Name is empty in Control Panel : Name mandatory before saving project Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-16 20:07:38 UTC (rev 191) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-16 20:30:59 UTC (rev 192) @@ -77,6 +77,8 @@ this.label1 = new System.Windows.Forms.Label(); this.tabPage_Language = new System.Windows.Forms.TabPage(); this.tabPage_Proiect = new System.Windows.Forms.TabPage(); + this.proiectt_textBox6 = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.proiectt_textBox5 = new System.Windows.Forms.TextBox(); this.proiectt_textBox4 = new System.Windows.Forms.TextBox(); @@ -93,8 +95,6 @@ this.tabPage_Other = new System.Windows.Forms.TabPage(); this.othert_comboBox1 = new System.Windows.Forms.ComboBox(); this.label8 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); - this.proiectt_textBox6 = new System.Windows.Forms.TextBox(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.tabPage_Skin.SuspendLayout(); @@ -215,7 +215,7 @@ this.tagReadersToolStripMenuItem, this.externalPlayersToolStripMenuItem}); this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; - this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.windowPluginToolStripMenuItem.Text = "Plugin"; // // windowToolStripMenuItem @@ -260,7 +260,7 @@ this.mediaToolStripMenuItem, this.fullToolStripMenuItem}); this.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; - this.skinToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.skinToolStripMenuItem.Text = "Skin"; // // componentToolStripMenuItem @@ -288,14 +288,14 @@ // languageToolStripMenuItem // this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; - this.languageToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.languageToolStripMenuItem.Text = "Language"; this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); // // textToolStripMenuItem // this.textToolStripMenuItem.Name = "textToolStripMenuItem"; - this.textToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.textToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.textToolStripMenuItem.Text = "Text"; this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click); // @@ -303,20 +303,20 @@ // this.settingsToolStripMenuItem.Enabled = false; this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; - this.settingsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.settingsToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.settingsToolStripMenuItem.Text = "Settings"; // // textToolStripMenuItem1 // this.textToolStripMenuItem1.Name = "textToolStripMenuItem1"; - this.textToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); + this.textToolStripMenuItem1.Size = new System.Drawing.Size(132, 22); this.textToolStripMenuItem1.Text = "Thumbs"; this.textToolStripMenuItem1.Click += new System.EventHandler(this.textToolStripMenuItem1_Click); // // otherToolStripMenuItem // this.otherToolStripMenuItem.Name = "otherToolStripMenuItem"; - this.otherToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.otherToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.otherToolStripMenuItem.Text = "Other"; this.otherToolStripMenuItem.Click += new System.EventHandler(this.otherToolStripMenuItem_Click); // @@ -518,6 +518,23 @@ this.tabPage_Proiect.Text = "Proiect Properties"; this.tabPage_Proiect.UseVisualStyleBackColor = true; // + // proiectt_textBox6 + // + this.proiectt_textBox6.Location = new System.Drawing.Point(224, 85); + this.proiectt_textBox6.Name = "proiectt_textBox6"; + this.proiectt_textBox6.Size = new System.Drawing.Size(168, 20); + this.proiectt_textBox6.TabIndex = 11; + this.proiectt_textBox6.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(176, 92); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(42, 13); + this.label10.TabIndex = 10; + this.label10.Text = "Group :"; + // // label9 // this.label9.AutoSize = true; @@ -677,23 +694,6 @@ this.label8.TabIndex = 0; this.label8.Text = "Directory (relative) :"; // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(176, 92); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(42, 13); - this.label10.TabIndex = 10; - this.label10.Text = "Group :"; - // - // proiectt_textBox6 - // - this.proiectt_textBox6.Location = new System.Drawing.Point(224, 85); - this.proiectt_textBox6.Name = "proiectt_textBox6"; - this.proiectt_textBox6.Size = new System.Drawing.Size(168, 20); - this.proiectt_textBox6.TabIndex = 11; - this.proiectt_textBox6.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged); - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 20:07:38 UTC (rev 191) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 20:30:59 UTC (rev 192) @@ -41,6 +41,12 @@ private void sToolStripMenuItem_Click(object sender, EventArgs e) { + if (proiectt_textBox1.Text.Length == 0) + { + MessageBox.Show("Name is mandatory !","Stop"); + proiectt_textBox1.Focus(); + return; + } saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; if (Path.GetFileName(proiect_file_name) == "Untitled") { @@ -291,6 +297,12 @@ private void saveProiectAsToolStripMenuItem_Click(object sender, EventArgs e) { + if (proiectt_textBox1.Text.Length == 0) + { + MessageBox.Show("Name is mandatory !", "Stop"); + proiectt_textBox1.Focus(); + return; + } saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) { @@ -350,7 +362,6 @@ } } } - } private void bossview_SelectedIndexChanged(object sender, EventArgs e) @@ -456,7 +467,5 @@ { this.Close(); } - - } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-16 20:07:38 UTC (rev 191) +++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-16 20:30:59 UTC (rev 192) @@ -98,7 +98,7 @@ if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName) && ze.Name.Contains(@"\"+fl.SubType+@"\")) { - MessageBox.Show(ze.Name); +// MessageBox.Show(ze.Name); return true; } else return false; @@ -346,12 +346,11 @@ client.DownloadFile(url,fil ); return true; } - catch (Exception ex) + catch (Exception) { return false; } } - return false; } public void LoadFromFile(string fil) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |