|
From: <ze...@us...> - 2007-05-06 15:09:48
|
Revision: 381
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=381&view=rev
Author: zebons
Date: 2007-05-06 08:08:52 -0700 (Sun, 06 May 2007)
Log Message:
-----------
Possible to add a password for protecting configuration
Modified Paths:
--------------
trunk/plugins/MyFilms/CatalogConverter.cs
trunk/plugins/MyFilms/MesFilms.cs
trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs
trunk/plugins/MyFilms/MesFilmsSetup.cs
Added Paths:
-----------
trunk/plugins/MyFilms/CryptageTexte.cs
Modified: trunk/plugins/MyFilms/CatalogConverter.cs
===================================================================
--- trunk/plugins/MyFilms/CatalogConverter.cs 2007-05-06 12:25:27 UTC (rev 380)
+++ trunk/plugins/MyFilms/CatalogConverter.cs 2007-05-06 15:08:52 UTC (rev 381)
@@ -65,7 +65,14 @@
destXml.WriteStartElement("Movie");
XmlNode nodeID = nodeDVD.SelectSingleNode("ID");
XmlNode nodeMediaType = nodeDVD.SelectSingleNode("MediaTypes/DVD");
- XmlNode nodeNumber = nodeDVD.SelectSingleNode("CollectionNumber");
+ XmlNode nodeNumber = null;
+ try
+ {
+ nodeNumber = nodeDVD.SelectSingleNode("CollectionNumber");
+ }
+ catch
+ {
+ }
XmlNode nodeTitle = nodeDVD.SelectSingleNode("Title");
XmlNode nodeOTitle = nodeDVD.SelectSingleNode("OriginalTitle");
XmlNode nodeNotes = nodeDVD.SelectSingleNode("Notes");
@@ -184,10 +191,10 @@
else
Rating = "0.0";
}
- if (nodeNumber != null && nodeNumber.InnerText != null)
+ if (nodeNumber != null && nodeNumber.InnerText != null && nodeNumber.InnerText.Length > 1)
WriteAntAtribute(destXml,"CollectionNumber",nodeNumber.InnerText);
else
- WriteAntAtribute(destXml, "CollectionNumber", nodeNumber.InnerText);
+ WriteAntAtribute(destXml, "CollectionNumber", "9999");
if (nodeOTitle != null && nodeOTitle.InnerText.Length > 0)
WriteAntAtribute(destXml, "Title", nodeOTitle.InnerText);
else
Added: trunk/plugins/MyFilms/CryptageTexte.cs
===================================================================
--- trunk/plugins/MyFilms/CryptageTexte.cs (rev 0)
+++ trunk/plugins/MyFilms/CryptageTexte.cs 2007-05-06 15:08:52 UTC (rev 381)
@@ -0,0 +1,99 @@
+using System;
+using System.Data;
+using System.IO;
+using System.Text;
+using System.Security.Cryptography;
+
+
+namespace MesFilms
+{
+ public class Crypto
+ {
+ byte[] Clef = {0xAD, 0x24, 0xFE, 0x58, 0xC5, 0x81, 0x37, 0xB4, 0xF9, 0x97, 0x23, 0xD2, 0x13, 0x86, 0xBB, 0xA7};
+ byte[] Vect = {0x81, 0xFD, 0xC3, 0xBB, 0x0A, 0xE6, 0xFE, 0xB8, 0xD9, 0xC0, 0x0C, 0x92, 0x73, 0xD4, 0x1A, 0xF2};
+
+ RijndaelManaged rj = new RijndaelManaged();
+
+ public Crypto()
+ {
+ // Constructeur : Code ex\xE9cut\xE9 \xE0 chaque cr\xE9ation d'un objet CryptageTexte.Crypto() : aucun !
+ // Ce constructeur est n\xE9cessaire, m\xEAme "vide".
+ }
+
+
+ // ************************ CRYPTER(Textebrut)*******************************
+ /// <summary>
+ /// Fonction de cryptage : elle necessite en argument une cha\xEEne de caract\xE8res,
+ /// et renvoie une cha\xEEne de caract\xE8res crypt\xE9e (cipher-text).
+ /// </summary>
+ /// <param name="string TexteBrut"></param>
+ /// <returns name="string CypherTexte"></returns>
+ // ***************************************************************************
+
+ public string Crypter(string TexteBrut)
+ {
+ if (TexteBrut.Length == 0)
+ return "";
+ MemoryStream CypherTexteMem = new MemoryStream();
+
+ CryptoStream CStream = new CryptoStream(CypherTexteMem,
+ rj.CreateEncryptor(Clef, Vect), CryptoStreamMode.Write);
+
+ byte[] TextebrutByte = new UnicodeEncoding().GetBytes(TexteBrut);
+
+ CStream.Write(TextebrutByte, 0, TextebrutByte.Length);
+ CStream.Close();
+
+ byte[] CypherTexteByte = CypherTexteMem.ToArray();
+
+ CypherTexteMem.Close();
+ string CypherTexte = new UnicodeEncoding().GetString(CypherTexteByte);
+
+ return CypherTexte;
+ }
+
+
+ // ************************ DECRYPTER(Textebrut)*****************************
+ /// <summary>
+ /// Fonction de d\xE9cryptage : elle necessite en argument une cha\xEEne de
+ /// caract\xE8res crypt\xE9s (cipher-text) et renvoie une cha\xEEne de caract\xE8res.
+ /// </summary>
+ /// <param name="string CypherTexte"></param>
+ /// <returns name="string Textebrut"></returns>
+ // ***************************************************************************
+
+ public string Decrypter(string CypherTexte)
+ {
+ if (CypherTexte.Length == 0)
+ return "";
+ MemoryStream CypherTexteMem = new MemoryStream(new UnicodeEncoding().GetBytes(CypherTexte));
+
+ CryptoStream CStream = new CryptoStream(CypherTexteMem, rj.CreateDecryptor(Clef, Vect),CryptoStreamMode.Read);
+
+ MemoryStream TextebrutMem = new MemoryStream();
+
+ do
+ {
+ byte[] buf = new byte[100];
+
+ int BytesLus = CStream.Read(buf,0,100);
+
+ if (0 == BytesLus)
+ break;
+
+ TextebrutMem.Write(buf,0,BytesLus);
+
+ }while(true);
+
+ CStream.Close();
+ CypherTexteMem.Close();
+
+ byte[] TextebrutByte = TextebrutMem.ToArray();
+
+ TextebrutMem.Close();
+
+ string Textebrut = new UnicodeEncoding().GetString(TextebrutByte);
+ return Textebrut;
+ }
+ }
+}
Modified: trunk/plugins/MyFilms/MesFilms.cs
===================================================================
--- trunk/plugins/MyFilms/MesFilms.cs 2007-05-06 12:25:27 UTC (rev 380)
+++ trunk/plugins/MyFilms/MesFilms.cs 2007-05-06 15:08:52 UTC (rev 381)
@@ -279,7 +279,6 @@
{
int dControl = messageType.TargetControlId;
int iControl = messageType.SenderControlId;
-
switch (messageType.Message)
{
case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
@@ -304,32 +303,37 @@
}
else
{
- CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Default_Config", "");
NbConfig = xmlreader.GetValueAsInt("MyFilms", "NbConfig", 0);
- if ((CurrentConfig == "") && (NbConfig == 0))
+ if (NbConfig == 0)
{
- StrFileXml = "";
- Fin_Charge_Init(false);
+ GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
+ dlgOk.SetHeading(3);//my videos
+ dlgOk.SetLine(1, "No Configuration defined");
+ dlgOk.SetLine(2, "Please enter setup first");
+ dlgOk.DoModal(GetID);
+ GUIWindowManager.ShowPreviousWindow();
}
+ bool boolchoice = true;
+ CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Default_Config", "");
+ if (CurrentConfig == "")
+ CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Current_Config", "");
+ if (CurrentConfig == "")
+ {
+ boolchoice = false;
+ CurrentConfig = Choice_Config(); // "" => user esc's dialog on plugin startup so exit plugin unchanged
+ }
+ CurrentConfig = Control_Access_Config(CurrentConfig);
+ if ((CurrentConfig == "") && (NbConfig > 1) && (boolchoice)) //error password ? so if many config => choice config menu
+ CurrentConfig = Choice_Config();
+ if (CurrentConfig == "") //continuing here with CurrentConfig = "" will cause exception in GuiWindowManager.cs so exit plugin
+ GUIWindowManager.ShowPreviousWindow();
else
{
- if (CurrentConfig == "")
- CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Current_Config", "");
- if (CurrentConfig == "")
- {
- CurrentConfig = Choice_Config(); // "" => user esc's dialog on plugin startup so exit plugin unchanged
- }
-
- if (CurrentConfig == "") //continuing here with CurrentConfig = "" will cause exception in GuiWindowManager.cs so exit plugin
- {
+ if (CurrentConfig.Length == 0)
GUIWindowManager.ShowPreviousWindow();
- }
- else
- {
- Load_Config(CurrentConfig, true);
- Fin_Charge_Init(false);
- }
- }
+ Load_Config(CurrentConfig, true);
+ Fin_Charge_Init(false);
+ }
}
}
return true;
@@ -338,6 +342,8 @@
if (CurrentConfig != "") save_config_values();
mydivx.Clear();
mydivx.Dispose();
+ facadeView.Clear();
+ facadeView.FreeResources();
return true; // fall through to call base class?
case GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS_CHANGED:
@@ -983,53 +989,54 @@
//--------------------------------------------------------------------------------------------
private void Selection_type_Video()
{
+
ArrayList choice_view = new ArrayList();
- GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
- if (dlg == null) return;
- dlg.Reset();
- dlg.SetHeading(924); // menu
- dlg.Add(GUILocalizeStrings.Get(342));//videos
- dlg.Add(GUILocalizeStrings.Get(345));//year
- dlg.Add(GUILocalizeStrings.Get(135));//genre
- dlg.Add(GUILocalizeStrings.Get(200026));//pays
+ GUIDialogMenu dlg1 = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
+ if (dlg1 == null) return;
+ dlg1.Reset();
+ dlg1.SetHeading(924); // menu
+ dlg1.Add(GUILocalizeStrings.Get(342));//videos
+ dlg1.Add(GUILocalizeStrings.Get(345));//year
+ dlg1.Add(GUILocalizeStrings.Get(135));//genre
+ dlg1.Add(GUILocalizeStrings.Get(200026));//pays
choice_view.Add("All");
choice_view.Add("Year");
choice_view.Add("Category");
choice_view.Add("Country");
if (!(StrStorage.Length == 0) && !(StrStorage == "(none)"))
{
- dlg.Add(GUILocalizeStrings.Get(154) + " " + GUILocalizeStrings.Get(1951));//storage
+ dlg1.Add(GUILocalizeStrings.Get(154) + " " + GUILocalizeStrings.Get(1951));//storage
choice_view.Add("Storage");
}
if (!(StrViewItem1 == null) && !(StrViewItem1 == "(none)"))
{
choice_view.Add("View1");
if ((StrViewText1 == null) || (StrViewText1.Length == 0))
- dlg.Add(StrViewItem1); // specific user View1
+ dlg1.Add(StrViewItem1); // specific user View1
else
- dlg.Add(StrViewText1); // specific Text for View1
+ dlg1.Add(StrViewText1); // specific Text for View1
}
if (!(StrViewItem2 == null) && !(StrViewItem2 == "(none)"))
{
choice_view.Add("View2");
if ((StrViewText2 == null) || (StrViewText2.Length == 0))
- dlg.Add(StrViewItem2); // specific user View2
+ dlg1.Add(StrViewItem2); // specific user View2
else
- dlg.Add(StrViewText2); // specific Text for View2
+ dlg1.Add(StrViewText2); // specific Text for View2
}
if (NbConfig > 1)
{
- dlg.Add(GUILocalizeStrings.Get(6029) + " " + GUILocalizeStrings.Get(6022)); // Change Config
+ dlg1.Add(GUILocalizeStrings.Get(6029) + " " + GUILocalizeStrings.Get(6022)); // Change Config
choice_view.Add("Config");
}
+ dlg1.DoModal(GetID);
- dlg.DoModal(GetID);
- if (dlg.SelectedLabel == -1)
+ if (dlg1.SelectedLabel == -1)
{
return;
}
- Change_view(choice_view[dlg.SelectedLabel].ToString());
+ Change_view(choice_view[dlg1.SelectedLabel].ToString());
return;
}
@@ -1239,8 +1246,6 @@
//--------------------------------------------------------------------------------------------
private string Choice_Config()
{
- string newConfig = "";
-
GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
if (dlg == null)
{
@@ -1263,11 +1268,38 @@
StrFileXml = "";
return "";
}
+ if (dlg.SelectedLabelText.Length > 0)
+ return dlg.SelectedLabelText;
+ return "";
+ }
+ //--------------------------------------------------------------------------------------------
+ // Control Acces to asked configuration
+ //--------------------------------------------------------------------------------------------
+ private string Control_Access_Config(string configname)
+ {
+ if (configname.Length == 0)
+ return "";
+ string Dwp;
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml"))
{
- newConfig = xmlreader.GetValueAsString("MyFilms", "ConfigName" + dlg.SelectedLabel, "");
+ Dwp = xmlreader.GetValueAsString(configname, "Dwp", "");
}
- return newConfig;
+
+ if (Dwp.Length == 0)
+ return configname;
+ VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);
+ if (null == keyboard) return "";
+ keyboard.Reset();
+ keyboard.Text = "";
+ keyboard.Password = true;
+ keyboard.DoModal(GetID);
+ if ((keyboard.IsConfirmed) && (keyboard.Text.Length > 0))
+ {
+ Crypto crypto = new Crypto();
+ if (crypto.Decrypter(Dwp) == keyboard.Text)
+ return configname;
+ }
+ return "";
}
//--------------------------------------------------------------------------------------------
// Initial Windows load. If LoadDfltSlct = true => load default select if any
@@ -1279,6 +1311,16 @@
boolselect = false;
if (!ControlFichierDonn\xE9es())
{
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml"))
+ {
+ if (CurrentConfig == xmlreader.GetValueAsString("MyFilms", "Current_Config", ""))
+ {
+ using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MyFilms.xml"))
+ {
+ xmlwriter.SetValue("MyFilms", "Current_Config", "");
+ }
+ }
+ }
base.OnPreviousWindow();
return; // need to return here as xml file doesn't exist so no point trying to load it
}
@@ -1335,7 +1377,6 @@
}
else
{
- MessageBox.Show(StrViewDfltItem);
if (StrViewDfltText.Length == 0)
{
if (StrViewDfltItem == StrViewItem1)
@@ -1489,6 +1530,8 @@
if (choice_view == "Config")
{
string newConfig = Choice_Config();
+ newConfig = Control_Access_Config(newConfig);
+
if (newConfig != "" && newConfig != CurrentConfig) // if user escapes dialog or bad value leave system unchanged
{
//Change "Config":
Modified: trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs
===================================================================
--- trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-05-06 12:25:27 UTC (rev 380)
+++ trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-05-06 15:08:52 UTC (rev 381)
@@ -165,6 +165,10 @@
this.View_Dflt_Text = new System.Windows.Forms.TextBox();
this.ButDelet = new System.Windows.Forms.Button();
this.Config_Dflt = new System.Windows.Forms.CheckBox();
+ this.Dwp = new System.Windows.Forms.TextBox();
+ this.Rpt_Dwp = new System.Windows.Forms.TextBox();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -705,19 +709,19 @@
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(69, 13);
this.label10.TabIndex = 34;
- this.label10.Text = "Version 4.2.0";
+ this.label10.Text = "Version 4.2.2";
//
// textBox1
//
- this.textBox1.Location = new System.Drawing.Point(707, 12);
+ this.textBox1.Location = new System.Drawing.Point(715, 12);
this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(108, 20);
- this.textBox1.TabIndex = 3;
+ this.textBox1.Size = new System.Drawing.Size(98, 20);
+ this.textBox1.TabIndex = 5;
//
// label11
//
this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(578, 15);
+ this.label11.Location = new System.Drawing.Point(586, 15);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(123, 13);
this.label11.TabIndex = 36;
@@ -726,9 +730,9 @@
// Config_Name
//
this.Config_Name.FormattingEnabled = true;
- this.Config_Name.Location = new System.Drawing.Point(138, 15);
+ this.Config_Name.Location = new System.Drawing.Point(126, 15);
this.Config_Name.Name = "Config_Name";
- this.Config_Name.Size = new System.Drawing.Size(180, 21);
+ this.Config_Name.Size = new System.Drawing.Size(163, 21);
this.Config_Name.Sorted = true;
this.Config_Name.TabIndex = 1;
this.Config_Name.Leave += new System.EventHandler(this.Config_Name_SelectedIndexChanged);
@@ -737,7 +741,7 @@
// label12
//
this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(32, 19);
+ this.label12.Location = new System.Drawing.Point(20, 19);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(100, 13);
this.label12.TabIndex = 38;
@@ -875,7 +879,7 @@
// Config_Dflt
//
this.Config_Dflt.AutoSize = true;
- this.Config_Dflt.Location = new System.Drawing.Point(333, 18);
+ this.Config_Dflt.Location = new System.Drawing.Point(126, 39);
this.Config_Dflt.Name = "Config_Dflt";
this.Config_Dflt.Size = new System.Drawing.Size(125, 17);
this.Config_Dflt.TabIndex = 2;
@@ -883,11 +887,50 @@
this.Config_Dflt.UseVisualStyleBackColor = true;
this.Config_Dflt.Enter += new System.EventHandler(this.Config_Name_Control);
//
+ // Dwp
+ //
+ this.Dwp.Location = new System.Drawing.Point(372, 15);
+ this.Dwp.Name = "Dwp";
+ this.Dwp.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.Dwp.Size = new System.Drawing.Size(107, 20);
+ this.Dwp.TabIndex = 3;
+ this.Dwp.UseSystemPasswordChar = true;
+ //
+ // Rpt_Dwp
+ //
+ this.Rpt_Dwp.Location = new System.Drawing.Point(372, 37);
+ this.Rpt_Dwp.Name = "Rpt_Dwp";
+ this.Rpt_Dwp.Size = new System.Drawing.Size(107, 20);
+ this.Rpt_Dwp.TabIndex = 4;
+ this.Rpt_Dwp.UseSystemPasswordChar = true;
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(313, 19);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(53, 13);
+ this.label15.TabIndex = 44;
+ this.label15.Text = "Password";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Location = new System.Drawing.Point(275, 40);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(91, 13);
+ this.label16.TabIndex = 45;
+ this.label16.Text = "Repeat Password";
+ //
// MesFilmsSetup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(839, 541);
+ this.Controls.Add(this.label16);
+ this.Controls.Add(this.label15);
+ this.Controls.Add(this.Rpt_Dwp);
+ this.Controls.Add(this.Dwp);
this.Controls.Add(this.Config_Dflt);
this.Controls.Add(this.groupBox7);
this.Controls.Add(this.label12);
@@ -990,6 +1033,10 @@
private ComboBox CatalogType;
private Label label14;
private ComboBox LayOut;
+ private TextBox Dwp;
+ private TextBox Rpt_Dwp;
+ private Label label15;
+ private Label label16;
}
}
\ No newline at end of file
Modified: trunk/plugins/MyFilms/MesFilmsSetup.cs
===================================================================
--- trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-05-06 12:25:27 UTC (rev 380)
+++ trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-05-06 15:08:52 UTC (rev 381)
@@ -9,6 +9,7 @@
using MediaPortal.GUI.Library;
+
namespace MesFilms
{
public partial class MesFilmsSetup : Form
@@ -22,6 +23,7 @@
private int MesFilms_nb_config = 0;
private string StrDfltSelect = "";
private AntMovieCatalog mydivx = new AntMovieCatalog();
+ private Crypto crypto = new Crypto();
public MesFilmsSetup()
{
@@ -240,6 +242,15 @@
AntUpdText2.Focus();
return;
}
+ if (Dwp.Text.Length > 0)
+ if (Dwp.Text != Rpt_Dwp.Text)
+ {
+ System.Windows.Forms.MessageBox.Show("The two Passwords must be identical !", "Configuration", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+ Dwp.Clear();
+ Rpt_Dwp.Focus();
+ Dwp.Focus();
+ return;
+ }
StrDfltSelect = "";
string wAntFilterSign;
if (AntFilterSign1.Text == "#")
@@ -332,7 +343,7 @@
MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "TitleDelim", TitleDelim.Text);
MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "LayOut", WLayOut);
MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "StrDfltSelect", StrDfltSelect);
-
+ MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "Dwp", crypto.Crypter(Dwp.Text));
string w_Config_Name = Config_Name.Text;
Config_Name.Items.Remove(Config_Name.Text);
Config_Name.Items.Add(w_Config_Name);
@@ -404,6 +415,8 @@
AntItem2.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "AntItem2", "");
AntItem3.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "AntItem3", "");
TitleDelim.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "TitleDelim", "\\");
+ Dwp.Text = crypto.Decrypter(MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "Dwp", ""));
+ Rpt_Dwp.Text = Dwp.Text;
View_Dflt_Item.Items.Remove(View_Dflt_Item.Text);
View_Dflt_Item.Items.Add(View_Dflt_Item.Text);
View_Dflt_Item.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "ViewDfltItem", "");
@@ -474,6 +487,8 @@
LayOut.ResetText();
View_Dflt_Item.ResetText();
View_Dflt_Text.ResetText();
+ Dwp.ResetText();
+ Rpt_Dwp.ResetText();
}
private void AntViewItem1_SelectedIndexChanged(object sender, EventArgs e)
@@ -540,8 +555,11 @@
MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "IndexItem");
MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "TitleDelim");
MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "LayOut");
+ MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "Dwp");
if ((Config_Name.Text) == MyFilms_xmlreader.GetValueAsString("MyFilms", "Default_Config", ""))
MyFilms_xmlwriter.RemoveEntry("MyFilms", "Default_Config");
+ if ((Config_Name.Text) == MyFilms_xmlreader.GetValueAsString("MyFilms", "Current_Config", ""))
+ MyFilms_xmlwriter.RemoveEntry("MyFilms", "Current_Config");
Config_Name.Items.Remove(Config_Name.Text);
Refresh_Items(true);
Config_Name.ResetText();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|