Page MenuHomeDevCentral

No OneTemporary

This document is not UTF8. It was detected as ISO-8859-1 (Latin 1) and converted to UTF8 for display.
diff --git a/Sycorax Control Center/InternalAutoUpdate.cs b/Sycorax Control Center/InternalAutoUpdate.cs
index c45208c..8678d4f 100644
--- a/Sycorax Control Center/InternalAutoUpdate.cs
+++ b/Sycorax Control Center/InternalAutoUpdate.cs
@@ -1,74 +1,77 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;
namespace Sycorax.ControlCenter {
public class InternalAutoUpdate {
public InternalAutoUpdate () {
if (Program.databaseUpdate == null) Program.databaseUpdate = new DatabaseUpdate(Program.options.ConnectionString);
}
/// <summary>
/// Démarrage de la surveillance
/// </summary>
private void StartSurveillance () {
//Lancement d'une surveillance pour chaque dossier repris dans l'option FoldersToWatch
watchers = new SurveillanceDossiers[Program.options.FoldersToWatch.Length];
for (int i = 0 ; i < Program.options.FoldersToWatch.Length ; i++) {
watchers[i] = new SurveillanceDossiers(Program.options.FoldersToWatch[i], Program.databaseUpdate);
watchers[i].Error += new EventHandler<ExceptionEventArgs>(surveillanceDossiers_Error);
}
+ enabled = true;
}
/// <summary>
/// Handles the Error event of the surveillanceDossiers control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:Sycorax.AutoUpdate.ExceptionEventArgs"/> instance containing the event data.</param>
void surveillanceDossiers_Error (object sender, ExceptionEventArgs e) {
//Log de l'erreur dans l'event viewer
EventLog.WriteEntry(e.RaisedException.Source, e.RaisedException.Message, EventLogEntryType.Error);
//Si le mode debug est actif, on affiche également le stacktrace dans une boîte de dialogue
if (Program.options.DebugMode) {
MessageBox.Show(e.RaisedException.StackTrace, e.RaisedException.Message, MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
/// <summary>
/// Stops the surveillance.
/// </summary>
private void StopSurveillance () {
+ if (watchers == null || watchers.Length == 0) return;
foreach (SurveillanceDossiers watcher in watchers) {
watcher.Dispose();
}
+ enabled = false;
}
private bool enabled;
/// <summary>
/// Gets or sets if internal auto update is enabled.
/// </summary>
public bool Enabled {
get {
return enabled;
}
set {
if (enabled == value) {
//Nothing to do
- } else if (enabled == true) {
+ } else if (value == true) {
//Ok, let's enable
StartSurveillance();
} else {
//Ok, let's disable
StopSurveillance();
}
}
}
/// <summary>
/// Surveillances
/// </summary>
private SurveillanceDossiers[] watchers;
}
}
diff --git a/Sycorax Control Center/MainForm.Designer.cs b/Sycorax Control Center/MainForm.Designer.cs
index e15973b..e03f572 100644
--- a/Sycorax Control Center/MainForm.Designer.cs
+++ b/Sycorax Control Center/MainForm.Designer.cs
@@ -1,895 +1,889 @@
/*
* (c) Sébastien Santoro aka Dereckson, 2006, tous droits réservés
*
* Date: 14/07/2006
* Time: 16:46
*
*/
namespace Sycorax.ControlCenter {
partial class MainForm : System.Windows.Forms.Form {
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose (bool disposing) {
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent () {
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
- this.tabPageDebug = new System.Windows.Forms.TabPage();
- this.textBoxException = new System.Windows.Forms.TextBox();
- this.tabPageConfig = new System.Windows.Forms.TabPage();
- this.splitContainer1 = new System.Windows.Forms.SplitContainer();
- this.listBoxOptions = new System.Windows.Forms.ListBox();
- this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
- this.buttonRAZOptions = new System.Windows.Forms.Button();
- this.buttonEnregistrerOptions = new System.Windows.Forms.Button();
- this.tableLayoutPanelConfigDirectories = new System.Windows.Forms.TableLayoutPanel();
- this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
- this.textBoxFolderToAdd = new System.Windows.Forms.TextBox();
- this.buttonBrowse = new System.Windows.Forms.Button();
- this.buttonAddFolder = new System.Windows.Forms.Button();
- this.labelDirectoriesToIndex = new System.Windows.Forms.Label();
- this.buttonDeleteSelectedFolders = new System.Windows.Forms.Button();
- this.checkedListBoxFolders = new System.Windows.Forms.CheckedListBox();
- this.panelConfigDatabase = new System.Windows.Forms.Panel();
- this.tableLayoutPanelConfigDB = new System.Windows.Forms.TableLayoutPanel();
- this.groupBoxConfigDB = new System.Windows.Forms.GroupBox();
- this.labelMySQLDatabase = new System.Windows.Forms.Label();
- this.textBoxMySQLDatabase = new System.Windows.Forms.TextBox();
- this.labelMySQLPort = new System.Windows.Forms.Label();
- this.textBoxMySQLPort = new System.Windows.Forms.TextBox();
- this.labelMySQLPassword = new System.Windows.Forms.Label();
- this.textBoxMySQLPassword = new System.Windows.Forms.TextBox();
- this.textBoxMySQLLogin = new System.Windows.Forms.TextBox();
- this.textBoxMySQLHost = new System.Windows.Forms.TextBox();
- this.labelMySQLLogin = new System.Windows.Forms.Label();
- this.labelMySQLHost = new System.Windows.Forms.Label();
- this.buttonApplyMySQLParameters = new System.Windows.Forms.Button();
- this.groupBoxConnectionString = new System.Windows.Forms.GroupBox();
- this.buttonProbeConnect = new System.Windows.Forms.Button();
- this.textBoxConnectionString = new System.Windows.Forms.TextBox();
- this.pictureBoxPoweredByMySql = new System.Windows.Forms.PictureBox();
- this.tabPageRebuildIndex = new System.Windows.Forms.TabPage();
- this.buttonStartRebuildIndex = new System.Windows.Forms.Button();
- this.progressBarRebuild = new System.Windows.Forms.ProgressBar();
- this.label2 = new System.Windows.Forms.Label();
- this.tabPageAutoUpdate = new System.Windows.Forms.TabPage();
- this.panelServiceController = new System.Windows.Forms.Panel();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.label4 = new System.Windows.Forms.Label();
- this.labelInternalAutoUpdateStatus = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.linkInternalAutoUpdateUp = new System.Windows.Forms.LinkLabel();
- this.linkInternalAutoUpdateDown = new System.Windows.Forms.LinkLabel();
- this.textBoxLog = new System.Windows.Forms.TextBox();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.labelAutoUpdateException = new System.Windows.Forms.Label();
- this.labelAutoUpdateHelp1 = new System.Windows.Forms.Label();
- this.linkLabelServicePlayStop = new System.Windows.Forms.LinkLabel();
- this.labelStatutAutoUpdateServiceResult = new System.Windows.Forms.Label();
- this.labelAutoUpdateHelp2 = new System.Windows.Forms.Label();
- this.labelStatutAutoUpdateService = new System.Windows.Forms.Label();
- this.linkLabelServicePauseContinue = new System.Windows.Forms.LinkLabel();
- this.tabControlMain = new System.Windows.Forms.TabControl();
- this.labelNotYetDefinedPanel = new System.Windows.Forms.Label();
- this.panelConfigMainOptions = new System.Windows.Forms.Panel();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.checkBoxDebugMode = new System.Windows.Forms.CheckBox();
- this.checkBoxDeleteTunesIfOrphans = new System.Windows.Forms.CheckBox();
- this.tabPageDebug.SuspendLayout();
- this.tabPageConfig.SuspendLayout();
- this.splitContainer1.Panel1.SuspendLayout();
- this.splitContainer1.SuspendLayout();
- this.flowLayoutPanel1.SuspendLayout();
- this.tableLayoutPanelConfigDirectories.SuspendLayout();
- this.flowLayoutPanel2.SuspendLayout();
- this.panelConfigDatabase.SuspendLayout();
- this.tableLayoutPanelConfigDB.SuspendLayout();
- this.groupBoxConfigDB.SuspendLayout();
- this.groupBoxConnectionString.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPoweredByMySql)).BeginInit();
- this.tabPageRebuildIndex.SuspendLayout();
- this.tabPageAutoUpdate.SuspendLayout();
- this.panelServiceController.SuspendLayout();
- this.groupBox3.SuspendLayout();
- this.groupBox2.SuspendLayout();
- this.tabControlMain.SuspendLayout();
- this.panelConfigMainOptions.SuspendLayout();
- this.groupBox1.SuspendLayout();
- this.SuspendLayout();
- //
- // tabPageDebug
- //
- this.tabPageDebug.Controls.Add(this.textBoxException);
- this.tabPageDebug.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tabPageDebug.Location = new System.Drawing.Point(4, 22);
- this.tabPageDebug.Name = "tabPageDebug";
- this.tabPageDebug.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageDebug.Size = new System.Drawing.Size(521, 274);
- this.tabPageDebug.TabIndex = 2;
- this.tabPageDebug.Text = "Debug";
- this.tabPageDebug.UseVisualStyleBackColor = true;
- //
- // textBoxException
- //
- this.textBoxException.Dock = System.Windows.Forms.DockStyle.Fill;
- this.textBoxException.Location = new System.Drawing.Point(3, 3);
- this.textBoxException.Multiline = true;
- this.textBoxException.Name = "textBoxException";
- this.textBoxException.Size = new System.Drawing.Size(515, 268);
- this.textBoxException.TabIndex = 0;
- //
- // tabPageConfig
- //
- this.tabPageConfig.Controls.Add(this.splitContainer1);
- this.tabPageConfig.Location = new System.Drawing.Point(4, 22);
- this.tabPageConfig.Name = "tabPageConfig";
- this.tabPageConfig.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageConfig.Size = new System.Drawing.Size(577, 543);
- this.tabPageConfig.TabIndex = 4;
- this.tabPageConfig.Text = "Configuration";
- this.tabPageConfig.UseVisualStyleBackColor = true;
- this.tabPageConfig.Enter += new System.EventHandler(this.tabPageConfig_Enter);
- //
- // splitContainer1
- //
- this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.splitContainer1.Location = new System.Drawing.Point(3, 3);
- this.splitContainer1.Name = "splitContainer1";
- //
- // splitContainer1.Panel1
- //
- this.splitContainer1.Panel1.Controls.Add(this.listBoxOptions);
- this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1);
- this.splitContainer1.Size = new System.Drawing.Size(571, 537);
- this.splitContainer1.SplitterDistance = 183;
- this.splitContainer1.TabIndex = 0;
- //
- // listBoxOptions
- //
- this.listBoxOptions.BackColor = System.Drawing.Color.GreenYellow;
- this.listBoxOptions.Cursor = System.Windows.Forms.Cursors.Default;
- this.listBoxOptions.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listBoxOptions.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.listBoxOptions.ForeColor = System.Drawing.Color.SeaGreen;
- this.listBoxOptions.FormattingEnabled = true;
- this.listBoxOptions.ItemHeight = 20;
- this.listBoxOptions.Items.AddRange(new object[] {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
+ this.tabPageDebug = new System.Windows.Forms.TabPage();
+ this.textBoxException = new System.Windows.Forms.TextBox();
+ this.tabPageConfig = new System.Windows.Forms.TabPage();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.listBoxOptions = new System.Windows.Forms.ListBox();
+ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
+ this.buttonRAZOptions = new System.Windows.Forms.Button();
+ this.buttonEnregistrerOptions = new System.Windows.Forms.Button();
+ this.tableLayoutPanelConfigDirectories = new System.Windows.Forms.TableLayoutPanel();
+ this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
+ this.textBoxFolderToAdd = new System.Windows.Forms.TextBox();
+ this.buttonBrowse = new System.Windows.Forms.Button();
+ this.buttonAddFolder = new System.Windows.Forms.Button();
+ this.labelDirectoriesToIndex = new System.Windows.Forms.Label();
+ this.buttonDeleteSelectedFolders = new System.Windows.Forms.Button();
+ this.checkedListBoxFolders = new System.Windows.Forms.CheckedListBox();
+ this.panelConfigDatabase = new System.Windows.Forms.Panel();
+ this.tableLayoutPanelConfigDB = new System.Windows.Forms.TableLayoutPanel();
+ this.groupBoxConfigDB = new System.Windows.Forms.GroupBox();
+ this.labelMySQLDatabase = new System.Windows.Forms.Label();
+ this.textBoxMySQLDatabase = new System.Windows.Forms.TextBox();
+ this.labelMySQLPort = new System.Windows.Forms.Label();
+ this.textBoxMySQLPort = new System.Windows.Forms.TextBox();
+ this.labelMySQLPassword = new System.Windows.Forms.Label();
+ this.textBoxMySQLPassword = new System.Windows.Forms.TextBox();
+ this.textBoxMySQLLogin = new System.Windows.Forms.TextBox();
+ this.textBoxMySQLHost = new System.Windows.Forms.TextBox();
+ this.labelMySQLLogin = new System.Windows.Forms.Label();
+ this.labelMySQLHost = new System.Windows.Forms.Label();
+ this.buttonApplyMySQLParameters = new System.Windows.Forms.Button();
+ this.groupBoxConnectionString = new System.Windows.Forms.GroupBox();
+ this.buttonProbeConnect = new System.Windows.Forms.Button();
+ this.textBoxConnectionString = new System.Windows.Forms.TextBox();
+ this.pictureBoxPoweredByMySql = new System.Windows.Forms.PictureBox();
+ this.tabPageRebuildIndex = new System.Windows.Forms.TabPage();
+ this.buttonStartRebuildIndex = new System.Windows.Forms.Button();
+ this.progressBarRebuild = new System.Windows.Forms.ProgressBar();
+ this.label2 = new System.Windows.Forms.Label();
+ this.tabPageAutoUpdate = new System.Windows.Forms.TabPage();
+ this.panelServiceController = new System.Windows.Forms.Panel();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.labelInternalAutoUpdateStatus = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.linkInternalAutoUpdateUp = new System.Windows.Forms.LinkLabel();
+ this.textBoxLog = new System.Windows.Forms.TextBox();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.labelAutoUpdateException = new System.Windows.Forms.Label();
+ this.labelAutoUpdateHelp1 = new System.Windows.Forms.Label();
+ this.linkLabelServicePlayStop = new System.Windows.Forms.LinkLabel();
+ this.labelStatutAutoUpdateServiceResult = new System.Windows.Forms.Label();
+ this.labelAutoUpdateHelp2 = new System.Windows.Forms.Label();
+ this.labelStatutAutoUpdateService = new System.Windows.Forms.Label();
+ this.linkLabelServicePauseContinue = new System.Windows.Forms.LinkLabel();
+ this.tabControlMain = new System.Windows.Forms.TabControl();
+ this.labelNotYetDefinedPanel = new System.Windows.Forms.Label();
+ this.panelConfigMainOptions = new System.Windows.Forms.Panel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.checkBoxDebugMode = new System.Windows.Forms.CheckBox();
+ this.checkBoxDeleteTunesIfOrphans = new System.Windows.Forms.CheckBox();
+ this.tabPageDebug.SuspendLayout();
+ this.tabPageConfig.SuspendLayout();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ this.flowLayoutPanel1.SuspendLayout();
+ this.tableLayoutPanelConfigDirectories.SuspendLayout();
+ this.flowLayoutPanel2.SuspendLayout();
+ this.panelConfigDatabase.SuspendLayout();
+ this.tableLayoutPanelConfigDB.SuspendLayout();
+ this.groupBoxConfigDB.SuspendLayout();
+ this.groupBoxConnectionString.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPoweredByMySql)).BeginInit();
+ this.tabPageRebuildIndex.SuspendLayout();
+ this.tabPageAutoUpdate.SuspendLayout();
+ this.panelServiceController.SuspendLayout();
+ this.groupBox3.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.tabControlMain.SuspendLayout();
+ this.panelConfigMainOptions.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tabPageDebug
+ //
+ this.tabPageDebug.Controls.Add(this.textBoxException);
+ this.tabPageDebug.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tabPageDebug.Location = new System.Drawing.Point(4, 22);
+ this.tabPageDebug.Name = "tabPageDebug";
+ this.tabPageDebug.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageDebug.Size = new System.Drawing.Size(521, 274);
+ this.tabPageDebug.TabIndex = 2;
+ this.tabPageDebug.Text = "Debug";
+ this.tabPageDebug.UseVisualStyleBackColor = true;
+ //
+ // textBoxException
+ //
+ this.textBoxException.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBoxException.Location = new System.Drawing.Point(3, 3);
+ this.textBoxException.Multiline = true;
+ this.textBoxException.Name = "textBoxException";
+ this.textBoxException.Size = new System.Drawing.Size(515, 268);
+ this.textBoxException.TabIndex = 0;
+ //
+ // tabPageConfig
+ //
+ this.tabPageConfig.Controls.Add(this.splitContainer1);
+ this.tabPageConfig.Location = new System.Drawing.Point(4, 22);
+ this.tabPageConfig.Name = "tabPageConfig";
+ this.tabPageConfig.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageConfig.Size = new System.Drawing.Size(577, 543);
+ this.tabPageConfig.TabIndex = 4;
+ this.tabPageConfig.Text = "Configuration";
+ this.tabPageConfig.UseVisualStyleBackColor = true;
+ this.tabPageConfig.Enter += new System.EventHandler(this.tabPageConfig_Enter);
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer1.Location = new System.Drawing.Point(3, 3);
+ this.splitContainer1.Name = "splitContainer1";
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.listBoxOptions);
+ this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this.tableLayoutPanelConfigDirectories);
+ this.splitContainer1.Size = new System.Drawing.Size(571, 537);
+ this.splitContainer1.SplitterDistance = 196;
+ this.splitContainer1.TabIndex = 0;
+ //
+ // listBoxOptions
+ //
+ this.listBoxOptions.BackColor = System.Drawing.Color.GreenYellow;
+ this.listBoxOptions.Cursor = System.Windows.Forms.Cursors.Default;
+ this.listBoxOptions.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBoxOptions.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.listBoxOptions.ForeColor = System.Drawing.Color.SeaGreen;
+ this.listBoxOptions.FormattingEnabled = true;
+ this.listBoxOptions.ItemHeight = 20;
+ this.listBoxOptions.Items.AddRange(new object[] {
"Options générales",
"Extensions",
"Dossiers",
"Tags ID3",
"Base de données",
"Requêtes SQL"});
- this.listBoxOptions.Location = new System.Drawing.Point(0, 0);
- this.listBoxOptions.Name = "listBoxOptions";
- this.listBoxOptions.Size = new System.Drawing.Size(183, 464);
- this.listBoxOptions.TabIndex = 2;
- this.listBoxOptions.SelectedIndexChanged += new System.EventHandler(this.listBoxOptions_SelectedIndexChanged);
- //
- // flowLayoutPanel1
- //
- this.flowLayoutPanel1.Controls.Add(this.buttonRAZOptions);
- this.flowLayoutPanel1.Controls.Add(this.buttonEnregistrerOptions);
- this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 474);
- this.flowLayoutPanel1.Name = "flowLayoutPanel1";
- this.flowLayoutPanel1.Size = new System.Drawing.Size(183, 63);
- this.flowLayoutPanel1.TabIndex = 0;
- //
- // buttonRAZOptions
- //
- this.buttonRAZOptions.BackColor = System.Drawing.Color.GreenYellow;
- this.buttonRAZOptions.ForeColor = System.Drawing.Color.SeaGreen;
- this.buttonRAZOptions.Location = new System.Drawing.Point(3, 3);
- this.buttonRAZOptions.Name = "buttonRAZOptions";
- this.buttonRAZOptions.Size = new System.Drawing.Size(165, 23);
- this.buttonRAZOptions.TabIndex = 4;
- this.buttonRAZOptions.Text = "Restaurer les options par défaut";
- this.buttonRAZOptions.UseVisualStyleBackColor = false;
- //
- // buttonEnregistrerOptions
- //
- this.buttonEnregistrerOptions.BackColor = System.Drawing.Color.GreenYellow;
- this.buttonEnregistrerOptions.Enabled = false;
- this.buttonEnregistrerOptions.ForeColor = System.Drawing.Color.SeaGreen;
- this.buttonEnregistrerOptions.Location = new System.Drawing.Point(3, 32);
- this.buttonEnregistrerOptions.Name = "buttonEnregistrerOptions";
- this.buttonEnregistrerOptions.Size = new System.Drawing.Size(165, 23);
- this.buttonEnregistrerOptions.TabIndex = 3;
- this.buttonEnregistrerOptions.Text = "Enregistrer les préférences";
- this.buttonEnregistrerOptions.UseVisualStyleBackColor = false;
- //
- // tableLayoutPanelConfigDirectories
- //
- this.tableLayoutPanelConfigDirectories.BackColor = System.Drawing.Color.White;
- this.tableLayoutPanelConfigDirectories.ColumnCount = 1;
- this.tableLayoutPanelConfigDirectories.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanelConfigDirectories.Controls.Add(this.flowLayoutPanel2, 0, 1);
- this.tableLayoutPanelConfigDirectories.Controls.Add(this.labelDirectoriesToIndex, 0, 0);
- this.tableLayoutPanelConfigDirectories.Controls.Add(this.buttonDeleteSelectedFolders, 0, 3);
- this.tableLayoutPanelConfigDirectories.Controls.Add(this.checkedListBoxFolders, 0, 2);
- this.tableLayoutPanelConfigDirectories.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanelConfigDirectories.ForeColor = System.Drawing.Color.SteelBlue;
- this.tableLayoutPanelConfigDirectories.Location = new System.Drawing.Point(0, 0);
- this.tableLayoutPanelConfigDirectories.Name = "tableLayoutPanelConfigDirectories";
- this.tableLayoutPanelConfigDirectories.RowCount = 5;
- this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
- this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 44F));
- this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 206F));
- this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
- this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanelConfigDirectories.Size = new System.Drawing.Size(401, 775);
- this.tableLayoutPanelConfigDirectories.TabIndex = 0;
- //
- // flowLayoutPanel2
- //
- this.flowLayoutPanel2.Controls.Add(this.textBoxFolderToAdd);
- this.flowLayoutPanel2.Controls.Add(this.buttonBrowse);
- this.flowLayoutPanel2.Controls.Add(this.buttonAddFolder);
- this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 23);
- this.flowLayoutPanel2.Name = "flowLayoutPanel2";
- this.flowLayoutPanel2.Size = new System.Drawing.Size(395, 38);
- this.flowLayoutPanel2.TabIndex = 0;
- //
- // textBoxFolderToAdd
- //
- this.textBoxFolderToAdd.Anchor = System.Windows.Forms.AnchorStyles.None;
- this.textBoxFolderToAdd.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
- this.textBoxFolderToAdd.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystemDirectories;
- this.textBoxFolderToAdd.Location = new System.Drawing.Point(3, 4);
- this.textBoxFolderToAdd.Name = "textBoxFolderToAdd";
- this.textBoxFolderToAdd.Size = new System.Drawing.Size(278, 20);
- this.textBoxFolderToAdd.TabIndex = 3;
- this.textBoxFolderToAdd.TextChanged += new System.EventHandler(this.textBoxFolderToAdd_TextChanged);
- //
- // buttonBrowse
- //
- this.buttonBrowse.Anchor = System.Windows.Forms.AnchorStyles.None;
- this.buttonBrowse.Location = new System.Drawing.Point(287, 3);
- this.buttonBrowse.Name = "buttonBrowse";
- this.buttonBrowse.Size = new System.Drawing.Size(74, 22);
- this.buttonBrowse.TabIndex = 3;
- this.buttonBrowse.Text = "Parcourir ...";
- this.buttonBrowse.UseVisualStyleBackColor = true;
- this.buttonBrowse.Click += new System.EventHandler(this.buttonBrowse_Click);
- //
- // buttonAddFolder
- //
- this.buttonAddFolder.Image = ((System.Drawing.Image)(resources.GetObject("buttonAddFolder.Image")));
- this.buttonAddFolder.Location = new System.Drawing.Point(367, 3);
- this.buttonAddFolder.Name = "buttonAddFolder";
- this.buttonAddFolder.Size = new System.Drawing.Size(23, 23);
- this.buttonAddFolder.TabIndex = 5;
- this.buttonAddFolder.UseVisualStyleBackColor = true;
- this.buttonAddFolder.Click += new System.EventHandler(this.buttonAddFolder_Click);
- //
- // labelDirectoriesToIndex
- //
- this.labelDirectoriesToIndex.AutoSize = true;
- this.labelDirectoriesToIndex.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelDirectoriesToIndex.Location = new System.Drawing.Point(3, 0);
- this.labelDirectoriesToIndex.Name = "labelDirectoriesToIndex";
- this.labelDirectoriesToIndex.Size = new System.Drawing.Size(119, 13);
- this.labelDirectoriesToIndex.TabIndex = 2;
- this.labelDirectoriesToIndex.Text = "Dossiers à indexer :";
- //
- // buttonDeleteSelectedFolders
- //
- this.buttonDeleteSelectedFolders.Dock = System.Windows.Forms.DockStyle.Fill;
- this.buttonDeleteSelectedFolders.Enabled = false;
- this.buttonDeleteSelectedFolders.Location = new System.Drawing.Point(3, 273);
- this.buttonDeleteSelectedFolders.Name = "buttonDeleteSelectedFolders";
- this.buttonDeleteSelectedFolders.Size = new System.Drawing.Size(395, 19);
- this.buttonDeleteSelectedFolders.TabIndex = 4;
- this.buttonDeleteSelectedFolders.Text = "Supprimer les dossiers sélectionnés";
- this.buttonDeleteSelectedFolders.UseVisualStyleBackColor = true;
- this.buttonDeleteSelectedFolders.Click += new System.EventHandler(this.buttonDeleteSelectedFolders_Click);
- //
- // checkedListBoxFolders
- //
- this.checkedListBoxFolders.Dock = System.Windows.Forms.DockStyle.Fill;
- this.checkedListBoxFolders.FormattingEnabled = true;
- this.checkedListBoxFolders.Location = new System.Drawing.Point(3, 67);
- this.checkedListBoxFolders.Name = "checkedListBoxFolders";
- this.checkedListBoxFolders.Size = new System.Drawing.Size(395, 200);
- this.checkedListBoxFolders.TabIndex = 6;
- this.checkedListBoxFolders.SelectedIndexChanged += new System.EventHandler(this.checkedListBoxFolders_SelectedIndexChanged);
- //
- // panelConfigDatabase
- //
- this.panelConfigDatabase.Controls.Add(this.tableLayoutPanelConfigDB);
- this.panelConfigDatabase.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panelConfigDatabase.Location = new System.Drawing.Point(0, 0);
- this.panelConfigDatabase.Name = "panelConfigDatabase";
- this.panelConfigDatabase.Size = new System.Drawing.Size(405, 775);
- this.panelConfigDatabase.TabIndex = 0;
- //
- // tableLayoutPanelConfigDB
- //
- this.tableLayoutPanelConfigDB.BackColor = System.Drawing.Color.White;
- this.tableLayoutPanelConfigDB.ColumnCount = 1;
- this.tableLayoutPanelConfigDB.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanelConfigDB.Controls.Add(this.groupBoxConfigDB, 0, 1);
- this.tableLayoutPanelConfigDB.Controls.Add(this.groupBoxConnectionString, 0, 2);
- this.tableLayoutPanelConfigDB.Controls.Add(this.pictureBoxPoweredByMySql, 0, 0);
- this.tableLayoutPanelConfigDB.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanelConfigDB.ForeColor = System.Drawing.Color.SteelBlue;
- this.tableLayoutPanelConfigDB.Location = new System.Drawing.Point(0, 0);
- this.tableLayoutPanelConfigDB.Name = "tableLayoutPanelConfigDB";
- this.tableLayoutPanelConfigDB.RowCount = 4;
- this.tableLayoutPanelConfigDB.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
- this.tableLayoutPanelConfigDB.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 200F));
- this.tableLayoutPanelConfigDB.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F));
- this.tableLayoutPanelConfigDB.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanelConfigDB.Size = new System.Drawing.Size(405, 775);
- this.tableLayoutPanelConfigDB.TabIndex = 3;
- //
- // groupBoxConfigDB
- //
- this.groupBoxConfigDB.Controls.Add(this.labelMySQLDatabase);
- this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLDatabase);
- this.groupBoxConfigDB.Controls.Add(this.labelMySQLPort);
- this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLPort);
- this.groupBoxConfigDB.Controls.Add(this.labelMySQLPassword);
- this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLPassword);
- this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLLogin);
- this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLHost);
- this.groupBoxConfigDB.Controls.Add(this.labelMySQLLogin);
- this.groupBoxConfigDB.Controls.Add(this.labelMySQLHost);
- this.groupBoxConfigDB.Controls.Add(this.buttonApplyMySQLParameters);
- this.groupBoxConfigDB.Dock = System.Windows.Forms.DockStyle.Fill;
- this.groupBoxConfigDB.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.groupBoxConfigDB.Location = new System.Drawing.Point(3, 73);
- this.groupBoxConfigDB.Name = "groupBoxConfigDB";
- this.groupBoxConfigDB.Size = new System.Drawing.Size(399, 194);
- this.groupBoxConfigDB.TabIndex = 2;
- this.groupBoxConfigDB.TabStop = false;
- this.groupBoxConfigDB.Text = "Nouveaux paramètres de connexion";
- //
- // labelMySQLDatabase
- //
- this.labelMySQLDatabase.AutoSize = true;
- this.labelMySQLDatabase.Location = new System.Drawing.Point(15, 133);
- this.labelMySQLDatabase.Name = "labelMySQLDatabase";
- this.labelMySQLDatabase.Size = new System.Drawing.Size(59, 13);
- this.labelMySQLDatabase.TabIndex = 12;
- this.labelMySQLDatabase.Text = "Database :";
- //
- // textBoxMySQLDatabase
- //
- this.textBoxMySQLDatabase.Location = new System.Drawing.Point(81, 130);
- this.textBoxMySQLDatabase.Name = "textBoxMySQLDatabase";
- this.textBoxMySQLDatabase.Size = new System.Drawing.Size(190, 20);
- this.textBoxMySQLDatabase.TabIndex = 8;
- //
- // labelMySQLPort
- //
- this.labelMySQLPort.AutoSize = true;
- this.labelMySQLPort.Location = new System.Drawing.Point(15, 55);
- this.labelMySQLPort.Name = "labelMySQLPort";
- this.labelMySQLPort.Size = new System.Drawing.Size(32, 13);
- this.labelMySQLPort.TabIndex = 10;
- this.labelMySQLPort.Text = "Port :";
- //
- // textBoxMySQLPort
- //
- this.textBoxMySQLPort.Location = new System.Drawing.Point(81, 52);
- this.textBoxMySQLPort.Name = "textBoxMySQLPort";
- this.textBoxMySQLPort.Size = new System.Drawing.Size(190, 20);
- this.textBoxMySQLPort.TabIndex = 5;
- //
- // labelMySQLPassword
- //
- this.labelMySQLPassword.AutoSize = true;
- this.labelMySQLPassword.Location = new System.Drawing.Point(15, 107);
- this.labelMySQLPassword.Name = "labelMySQLPassword";
- this.labelMySQLPassword.Size = new System.Drawing.Size(59, 13);
- this.labelMySQLPassword.TabIndex = 8;
- this.labelMySQLPassword.Text = "Password :";
- //
- // textBoxMySQLPassword
- //
- this.textBoxMySQLPassword.Location = new System.Drawing.Point(81, 104);
- this.textBoxMySQLPassword.Name = "textBoxMySQLPassword";
- this.textBoxMySQLPassword.Size = new System.Drawing.Size(190, 20);
- this.textBoxMySQLPassword.TabIndex = 7;
- //
- // textBoxMySQLLogin
- //
- this.textBoxMySQLLogin.Location = new System.Drawing.Point(81, 78);
- this.textBoxMySQLLogin.Name = "textBoxMySQLLogin";
- this.textBoxMySQLLogin.Size = new System.Drawing.Size(190, 20);
- this.textBoxMySQLLogin.TabIndex = 6;
- //
- // textBoxMySQLHost
- //
- this.textBoxMySQLHost.Location = new System.Drawing.Point(81, 26);
- this.textBoxMySQLHost.Name = "textBoxMySQLHost";
- this.textBoxMySQLHost.Size = new System.Drawing.Size(190, 20);
- this.textBoxMySQLHost.TabIndex = 4;
- //
- // labelMySQLLogin
- //
- this.labelMySQLLogin.AutoSize = true;
- this.labelMySQLLogin.Location = new System.Drawing.Point(15, 81);
- this.labelMySQLLogin.Name = "labelMySQLLogin";
- this.labelMySQLLogin.Size = new System.Drawing.Size(39, 13);
- this.labelMySQLLogin.TabIndex = 2;
- this.labelMySQLLogin.Text = "Login :";
- //
- // labelMySQLHost
- //
- this.labelMySQLHost.AutoSize = true;
- this.labelMySQLHost.Location = new System.Drawing.Point(15, 29);
- this.labelMySQLHost.Name = "labelMySQLHost";
- this.labelMySQLHost.Size = new System.Drawing.Size(50, 13);
- this.labelMySQLHost.TabIndex = 1;
- this.labelMySQLHost.Text = "Serveur :";
- //
- // buttonApplyMySQLParameters
- //
- this.buttonApplyMySQLParameters.BackColor = System.Drawing.Color.White;
- this.buttonApplyMySQLParameters.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.buttonApplyMySQLParameters.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.buttonApplyMySQLParameters.ForeColor = System.Drawing.Color.SteelBlue;
- this.buttonApplyMySQLParameters.Location = new System.Drawing.Point(3, 168);
- this.buttonApplyMySQLParameters.Name = "buttonApplyMySQLParameters";
- this.buttonApplyMySQLParameters.Size = new System.Drawing.Size(393, 23);
- this.buttonApplyMySQLParameters.TabIndex = 9;
- this.buttonApplyMySQLParameters.Text = "Prendre en compte ces nouveaux paramètres";
- this.buttonApplyMySQLParameters.UseVisualStyleBackColor = false;
- this.buttonApplyMySQLParameters.Click += new System.EventHandler(this.buttonApplyMySQLParameters_Click);
- //
- // groupBoxConnectionString
- //
- this.groupBoxConnectionString.Controls.Add(this.buttonProbeConnect);
- this.groupBoxConnectionString.Controls.Add(this.textBoxConnectionString);
- this.groupBoxConnectionString.Dock = System.Windows.Forms.DockStyle.Fill;
- this.groupBoxConnectionString.Location = new System.Drawing.Point(3, 273);
- this.groupBoxConnectionString.Name = "groupBoxConnectionString";
- this.groupBoxConnectionString.Size = new System.Drawing.Size(399, 74);
- this.groupBoxConnectionString.TabIndex = 3;
- this.groupBoxConnectionString.TabStop = false;
- this.groupBoxConnectionString.Text = "ConnectionString";
- //
- // buttonProbeConnect
- //
- this.buttonProbeConnect.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.buttonProbeConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.buttonProbeConnect.Location = new System.Drawing.Point(3, 48);
- this.buttonProbeConnect.Name = "buttonProbeConnect";
- this.buttonProbeConnect.Size = new System.Drawing.Size(393, 23);
- this.buttonProbeConnect.TabIndex = 11;
- this.buttonProbeConnect.Text = "Tester la connexion";
- this.buttonProbeConnect.UseVisualStyleBackColor = true;
- this.buttonProbeConnect.Click += new System.EventHandler(this.buttonProbeConnect_Click);
- //
- // textBoxConnectionString
- //
- this.textBoxConnectionString.Dock = System.Windows.Forms.DockStyle.Fill;
- this.textBoxConnectionString.Location = new System.Drawing.Point(3, 16);
- this.textBoxConnectionString.Multiline = true;
- this.textBoxConnectionString.Name = "textBoxConnectionString";
- this.textBoxConnectionString.Size = new System.Drawing.Size(393, 55);
- this.textBoxConnectionString.TabIndex = 10;
- this.textBoxConnectionString.TextChanged += new System.EventHandler(this.textBoxConnectionString_TextChanged);
- //
- // pictureBoxPoweredByMySql
- //
- this.pictureBoxPoweredByMySql.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.pictureBoxPoweredByMySql.Image = global::Sycorax.ControlCenter.Properties.Resources.poweredByMysql125x64;
- this.pictureBoxPoweredByMySql.Location = new System.Drawing.Point(277, 3);
- this.pictureBoxPoweredByMySql.Name = "pictureBoxPoweredByMySql";
- this.pictureBoxPoweredByMySql.Size = new System.Drawing.Size(125, 64);
- this.pictureBoxPoweredByMySql.TabIndex = 4;
- this.pictureBoxPoweredByMySql.TabStop = false;
- //
- // tabPageRebuildIndex
- //
- this.tabPageRebuildIndex.Controls.Add(this.buttonStartRebuildIndex);
- this.tabPageRebuildIndex.Controls.Add(this.progressBarRebuild);
- this.tabPageRebuildIndex.Controls.Add(this.label2);
- this.tabPageRebuildIndex.Location = new System.Drawing.Point(4, 22);
- this.tabPageRebuildIndex.Name = "tabPageRebuildIndex";
- this.tabPageRebuildIndex.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageRebuildIndex.Size = new System.Drawing.Size(577, 543);
- this.tabPageRebuildIndex.TabIndex = 3;
- this.tabPageRebuildIndex.Text = "Regénérer l\'index";
- this.tabPageRebuildIndex.UseVisualStyleBackColor = true;
- //
- // buttonStartRebuildIndex
- //
- this.buttonStartRebuildIndex.Location = new System.Drawing.Point(11, 101);
- this.buttonStartRebuildIndex.Name = "buttonStartRebuildIndex";
- this.buttonStartRebuildIndex.Size = new System.Drawing.Size(75, 26);
- this.buttonStartRebuildIndex.TabIndex = 3;
- this.buttonStartRebuildIndex.Text = "Démarrer";
- this.buttonStartRebuildIndex.UseVisualStyleBackColor = true;
- this.buttonStartRebuildIndex.Click += new System.EventHandler(this.buttonStartRebuildIndex_Click);
- //
- // progressBarRebuild
- //
- this.progressBarRebuild.BackColor = System.Drawing.Color.White;
- this.progressBarRebuild.ForeColor = System.Drawing.Color.LawnGreen;
- this.progressBarRebuild.Location = new System.Drawing.Point(92, 101);
- this.progressBarRebuild.Name = "progressBarRebuild";
- this.progressBarRebuild.Size = new System.Drawing.Size(475, 26);
- this.progressBarRebuild.TabIndex = 2;
- this.progressBarRebuild.Visible = false;
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(8, 12);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(559, 78);
- this.label2.TabIndex = 1;
- this.label2.Text = resources.GetString("label2.Text");
- //
- // tabPageAutoUpdate
- //
- this.tabPageAutoUpdate.Controls.Add(this.panelServiceController);
- this.tabPageAutoUpdate.Location = new System.Drawing.Point(4, 22);
- this.tabPageAutoUpdate.Name = "tabPageAutoUpdate";
- this.tabPageAutoUpdate.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageAutoUpdate.Size = new System.Drawing.Size(577, 543);
- this.tabPageAutoUpdate.TabIndex = 1;
- this.tabPageAutoUpdate.Text = "Auto Update";
- this.tabPageAutoUpdate.UseVisualStyleBackColor = true;
- this.tabPageAutoUpdate.Enter += new System.EventHandler(this.tabPageAutoUpdate_Enter);
- //
- // panelServiceController
- //
- this.panelServiceController.Controls.Add(this.groupBox3);
- this.panelServiceController.Controls.Add(this.groupBox2);
- this.panelServiceController.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panelServiceController.Location = new System.Drawing.Point(3, 3);
- this.panelServiceController.Name = "panelServiceController";
- this.panelServiceController.Size = new System.Drawing.Size(571, 537);
- this.panelServiceController.TabIndex = 13;
- //
- // groupBox3
- //
- this.groupBox3.Controls.Add(this.label4);
- this.groupBox3.Controls.Add(this.labelInternalAutoUpdateStatus);
- this.groupBox3.Controls.Add(this.label3);
- this.groupBox3.Controls.Add(this.linkInternalAutoUpdateUp);
- this.groupBox3.Controls.Add(this.linkInternalAutoUpdateDown);
- this.groupBox3.Controls.Add(this.textBoxLog);
- this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
- this.groupBox3.Location = new System.Drawing.Point(0, 89);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(571, 448);
- this.groupBox3.TabIndex = 12;
- this.groupBox3.TabStop = false;
- this.groupBox3.Text = "Bypass service (DEBUG)";
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(9, 20);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(303, 26);
- this.label4.TabIndex = 10;
- this.label4.Text = "En lieu et place du service, vous pouvez lancer l\'auto update\r\ndirectement depuis" +
- " Sycorax Conrol Center à des fins de debug.";
- //
- // labelInternalAutoUpdateStatus
- //
- this.labelInternalAutoUpdateStatus.AutoSize = true;
- this.labelInternalAutoUpdateStatus.Location = new System.Drawing.Point(376, 12);
- this.labelInternalAutoUpdateStatus.Name = "labelInternalAutoUpdateStatus";
- this.labelInternalAutoUpdateStatus.Size = new System.Drawing.Size(19, 13);
- this.labelInternalAutoUpdateStatus.TabIndex = 9;
- this.labelInternalAutoUpdateStatus.Text = "off";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label3.Location = new System.Drawing.Point(342, 12);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(38, 13);
- this.label3.TabIndex = 8;
- this.label3.Text = "Etat :";
- //
- // linkInternalAutoUpdateUp
- //
- this.linkInternalAutoUpdateUp.AutoSize = true;
- this.linkInternalAutoUpdateUp.Location = new System.Drawing.Point(376, 31);
- this.linkInternalAutoUpdateUp.Name = "linkInternalAutoUpdateUp";
- this.linkInternalAutoUpdateUp.Size = new System.Drawing.Size(50, 13);
- this.linkInternalAutoUpdateUp.TabIndex = 6;
- this.linkInternalAutoUpdateUp.TabStop = true;
- this.linkInternalAutoUpdateUp.Text = "Démarrer";
- this.linkInternalAutoUpdateUp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkInternalAutoUpdateUp_LinkClicked);
- //
- // linkInternalAutoUpdateDown
- //
- this.linkInternalAutoUpdateDown.AutoSize = true;
- this.linkInternalAutoUpdateDown.Location = new System.Drawing.Point(376, 49);
- this.linkInternalAutoUpdateDown.Name = "linkInternalAutoUpdateDown";
- this.linkInternalAutoUpdateDown.Size = new System.Drawing.Size(37, 13);
- this.linkInternalAutoUpdateDown.TabIndex = 7;
- this.linkInternalAutoUpdateDown.TabStop = true;
- this.linkInternalAutoUpdateDown.Text = "Pause";
- //
- // textBoxLog
- //
- this.textBoxLog.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.textBoxLog.Location = new System.Drawing.Point(3, 70);
- this.textBoxLog.Multiline = true;
- this.textBoxLog.Name = "textBoxLog";
- this.textBoxLog.Size = new System.Drawing.Size(565, 375);
- this.textBoxLog.TabIndex = 0;
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.labelAutoUpdateException);
- this.groupBox2.Controls.Add(this.labelAutoUpdateHelp1);
- this.groupBox2.Controls.Add(this.linkLabelServicePlayStop);
- this.groupBox2.Controls.Add(this.labelStatutAutoUpdateServiceResult);
- this.groupBox2.Controls.Add(this.labelAutoUpdateHelp2);
- this.groupBox2.Controls.Add(this.labelStatutAutoUpdateService);
- this.groupBox2.Controls.Add(this.linkLabelServicePauseContinue);
- this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
- this.groupBox2.Location = new System.Drawing.Point(0, 0);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(571, 89);
- this.groupBox2.TabIndex = 11;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "Service";
- //
- // labelAutoUpdateException
- //
- this.labelAutoUpdateException.AutoSize = true;
- this.labelAutoUpdateException.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelAutoUpdateException.ForeColor = System.Drawing.Color.Maroon;
- this.labelAutoUpdateException.Location = new System.Drawing.Point(6, 42);
- this.labelAutoUpdateException.Name = "labelAutoUpdateException";
- this.labelAutoUpdateException.Size = new System.Drawing.Size(0, 13);
- this.labelAutoUpdateException.TabIndex = 11;
- //
- // labelAutoUpdateHelp1
- //
- this.labelAutoUpdateHelp1.AutoSize = true;
- this.labelAutoUpdateHelp1.Location = new System.Drawing.Point(6, 16);
- this.labelAutoUpdateHelp1.Name = "labelAutoUpdateHelp1";
- this.labelAutoUpdateHelp1.Size = new System.Drawing.Size(321, 13);
- this.labelAutoUpdateHelp1.TabIndex = 8;
- this.labelAutoUpdateHelp1.Text = "Sycorax Auto Update est un service indexant en continu vos MP3.";
- //
- // linkLabelServicePlayStop
- //
- this.linkLabelServicePlayStop.AutoSize = true;
- this.linkLabelServicePlayStop.Location = new System.Drawing.Point(376, 34);
- this.linkLabelServicePlayStop.Name = "linkLabelServicePlayStop";
- this.linkLabelServicePlayStop.Size = new System.Drawing.Size(50, 13);
- this.linkLabelServicePlayStop.TabIndex = 4;
- this.linkLabelServicePlayStop.TabStop = true;
- this.linkLabelServicePlayStop.Text = "Démarrer";
- this.linkLabelServicePlayStop.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelServicePlayStop_LinkClicked);
- //
- // labelStatutAutoUpdateServiceResult
- //
- this.labelStatutAutoUpdateServiceResult.AutoSize = true;
- this.labelStatutAutoUpdateServiceResult.Location = new System.Drawing.Point(376, 16);
- this.labelStatutAutoUpdateServiceResult.Name = "labelStatutAutoUpdateServiceResult";
- this.labelStatutAutoUpdateServiceResult.Size = new System.Drawing.Size(45, 13);
- this.labelStatutAutoUpdateServiceResult.TabIndex = 3;
- this.labelStatutAutoUpdateServiceResult.Text = "inconnu";
- //
- // labelAutoUpdateHelp2
- //
- this.labelAutoUpdateHelp2.AutoSize = true;
- this.labelAutoUpdateHelp2.Location = new System.Drawing.Point(6, 34);
- this.labelAutoUpdateHelp2.Name = "labelAutoUpdateHelp2";
- this.labelAutoUpdateHelp2.Size = new System.Drawing.Size(280, 13);
- this.labelAutoUpdateHelp2.TabIndex = 1;
- this.labelAutoUpdateHelp2.Text = "Votre base de données est ainsi constamment mise à jour.";
- //
- // labelStatutAutoUpdateService
- //
- this.labelStatutAutoUpdateService.AutoSize = true;
- this.labelStatutAutoUpdateService.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labelStatutAutoUpdateService.Location = new System.Drawing.Point(342, 16);
- this.labelStatutAutoUpdateService.Name = "labelStatutAutoUpdateService";
- this.labelStatutAutoUpdateService.Size = new System.Drawing.Size(38, 13);
- this.labelStatutAutoUpdateService.TabIndex = 2;
- this.labelStatutAutoUpdateService.Text = "Etat :";
- //
- // linkLabelServicePauseContinue
- //
- this.linkLabelServicePauseContinue.AutoSize = true;
- this.linkLabelServicePauseContinue.Location = new System.Drawing.Point(376, 52);
- this.linkLabelServicePauseContinue.Name = "linkLabelServicePauseContinue";
- this.linkLabelServicePauseContinue.Size = new System.Drawing.Size(37, 13);
- this.linkLabelServicePauseContinue.TabIndex = 5;
- this.linkLabelServicePauseContinue.TabStop = true;
- this.linkLabelServicePauseContinue.Text = "Pause";
- this.linkLabelServicePauseContinue.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelServicePause_LinkClicked);
- //
- // tabControlMain
- //
- this.tabControlMain.Controls.Add(this.tabPageAutoUpdate);
- this.tabControlMain.Controls.Add(this.tabPageRebuildIndex);
- this.tabControlMain.Controls.Add(this.tabPageConfig);
- this.tabControlMain.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tabControlMain.Location = new System.Drawing.Point(0, 0);
- this.tabControlMain.Name = "tabControlMain";
- this.tabControlMain.SelectedIndex = 0;
- this.tabControlMain.Size = new System.Drawing.Size(585, 569);
- this.tabControlMain.TabIndex = 0;
- //
- // labelNotYetDefinedPanel
- //
- this.labelNotYetDefinedPanel.AutoSize = true;
- this.labelNotYetDefinedPanel.Location = new System.Drawing.Point(16, 21);
- this.labelNotYetDefinedPanel.Name = "labelNotYetDefinedPanel";
- this.labelNotYetDefinedPanel.Size = new System.Drawing.Size(177, 13);
- this.labelNotYetDefinedPanel.TabIndex = 0;
- this.labelNotYetDefinedPanel.Text = "Ce panneau n\'est pas encore défini.";
- //
- // panelConfigMainOptions
- //
- this.panelConfigMainOptions.Controls.Add(this.groupBox1);
- this.panelConfigMainOptions.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panelConfigMainOptions.Location = new System.Drawing.Point(0, 0);
- this.panelConfigMainOptions.Name = "panelConfigMainOptions";
- this.panelConfigMainOptions.Size = new System.Drawing.Size(405, 775);
- this.panelConfigMainOptions.TabIndex = 0;
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.checkBoxDebugMode);
- this.groupBox1.Controls.Add(this.checkBoxDeleteTunesIfOrphans);
- this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
- this.groupBox1.Location = new System.Drawing.Point(0, 0);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(405, 78);
- this.groupBox1.TabIndex = 0;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Options générales";
- //
- // checkBoxDebugMode
- //
- this.checkBoxDebugMode.AutoSize = true;
- this.checkBoxDebugMode.Location = new System.Drawing.Point(16, 46);
- this.checkBoxDebugMode.Name = "checkBoxDebugMode";
- this.checkBoxDebugMode.Size = new System.Drawing.Size(282, 17);
- this.checkBoxDebugMode.TabIndex = 9;
- this.checkBoxDebugMode.Text = "Activer les fonctionnalités du mode debug de Sycorax.";
- this.checkBoxDebugMode.UseVisualStyleBackColor = true;
- //
- // checkBoxDeleteTunesIfOrphans
- //
- this.checkBoxDeleteTunesIfOrphans.AutoSize = true;
- this.checkBoxDeleteTunesIfOrphans.Location = new System.Drawing.Point(16, 24);
- this.checkBoxDeleteTunesIfOrphans.Name = "checkBoxDeleteTunesIfOrphans";
- this.checkBoxDeleteTunesIfOrphans.Size = new System.Drawing.Size(339, 17);
- this.checkBoxDeleteTunesIfOrphans.TabIndex = 8;
- this.checkBoxDeleteTunesIfOrphans.Text = "Supprimer les morceaux de la base de données s\'ils sont orphelins.";
- this.checkBoxDeleteTunesIfOrphans.UseVisualStyleBackColor = true;
- //
- // MainForm
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(585, 569);
- this.Controls.Add(this.tabControlMain);
- this.Name = "MainForm";
- this.Text = "Sycorax Control Center";
- this.tabPageDebug.ResumeLayout(false);
- this.tabPageDebug.PerformLayout();
- this.tabPageConfig.ResumeLayout(false);
- this.splitContainer1.Panel1.ResumeLayout(false);
- this.splitContainer1.ResumeLayout(false);
- this.flowLayoutPanel1.ResumeLayout(false);
- this.tableLayoutPanelConfigDirectories.ResumeLayout(false);
- this.tableLayoutPanelConfigDirectories.PerformLayout();
- this.flowLayoutPanel2.ResumeLayout(false);
- this.flowLayoutPanel2.PerformLayout();
- this.panelConfigDatabase.ResumeLayout(false);
- this.tableLayoutPanelConfigDB.ResumeLayout(false);
- this.groupBoxConfigDB.ResumeLayout(false);
- this.groupBoxConfigDB.PerformLayout();
- this.groupBoxConnectionString.ResumeLayout(false);
- this.groupBoxConnectionString.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPoweredByMySql)).EndInit();
- this.tabPageRebuildIndex.ResumeLayout(false);
- this.tabPageRebuildIndex.PerformLayout();
- this.tabPageAutoUpdate.ResumeLayout(false);
- this.panelServiceController.ResumeLayout(false);
- this.groupBox3.ResumeLayout(false);
- this.groupBox3.PerformLayout();
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
- this.tabControlMain.ResumeLayout(false);
- this.panelConfigMainOptions.ResumeLayout(false);
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
- this.ResumeLayout(false);
+ this.listBoxOptions.Location = new System.Drawing.Point(0, 0);
+ this.listBoxOptions.Name = "listBoxOptions";
+ this.listBoxOptions.Size = new System.Drawing.Size(196, 464);
+ this.listBoxOptions.TabIndex = 2;
+ this.listBoxOptions.SelectedIndexChanged += new System.EventHandler(this.listBoxOptions_SelectedIndexChanged);
+ //
+ // flowLayoutPanel1
+ //
+ this.flowLayoutPanel1.Controls.Add(this.buttonRAZOptions);
+ this.flowLayoutPanel1.Controls.Add(this.buttonEnregistrerOptions);
+ this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 474);
+ this.flowLayoutPanel1.Name = "flowLayoutPanel1";
+ this.flowLayoutPanel1.Size = new System.Drawing.Size(196, 63);
+ this.flowLayoutPanel1.TabIndex = 0;
+ //
+ // buttonRAZOptions
+ //
+ this.buttonRAZOptions.BackColor = System.Drawing.Color.GreenYellow;
+ this.buttonRAZOptions.ForeColor = System.Drawing.Color.SeaGreen;
+ this.buttonRAZOptions.Location = new System.Drawing.Point(3, 3);
+ this.buttonRAZOptions.Name = "buttonRAZOptions";
+ this.buttonRAZOptions.Size = new System.Drawing.Size(165, 23);
+ this.buttonRAZOptions.TabIndex = 4;
+ this.buttonRAZOptions.Text = "Restaurer les options par défaut";
+ this.buttonRAZOptions.UseVisualStyleBackColor = false;
+ //
+ // buttonEnregistrerOptions
+ //
+ this.buttonEnregistrerOptions.BackColor = System.Drawing.Color.GreenYellow;
+ this.buttonEnregistrerOptions.Enabled = false;
+ this.buttonEnregistrerOptions.ForeColor = System.Drawing.Color.SeaGreen;
+ this.buttonEnregistrerOptions.Location = new System.Drawing.Point(3, 32);
+ this.buttonEnregistrerOptions.Name = "buttonEnregistrerOptions";
+ this.buttonEnregistrerOptions.Size = new System.Drawing.Size(165, 23);
+ this.buttonEnregistrerOptions.TabIndex = 3;
+ this.buttonEnregistrerOptions.Text = "Enregistrer les préférences";
+ this.buttonEnregistrerOptions.UseVisualStyleBackColor = false;
+ //
+ // tableLayoutPanelConfigDirectories
+ //
+ this.tableLayoutPanelConfigDirectories.BackColor = System.Drawing.Color.White;
+ this.tableLayoutPanelConfigDirectories.ColumnCount = 1;
+ this.tableLayoutPanelConfigDirectories.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanelConfigDirectories.Controls.Add(this.flowLayoutPanel2, 0, 1);
+ this.tableLayoutPanelConfigDirectories.Controls.Add(this.labelDirectoriesToIndex, 0, 0);
+ this.tableLayoutPanelConfigDirectories.Controls.Add(this.buttonDeleteSelectedFolders, 0, 3);
+ this.tableLayoutPanelConfigDirectories.Controls.Add(this.checkedListBoxFolders, 0, 2);
+ this.tableLayoutPanelConfigDirectories.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanelConfigDirectories.ForeColor = System.Drawing.Color.SteelBlue;
+ this.tableLayoutPanelConfigDirectories.Location = new System.Drawing.Point(0, 0);
+ this.tableLayoutPanelConfigDirectories.Name = "tableLayoutPanelConfigDirectories";
+ this.tableLayoutPanelConfigDirectories.RowCount = 5;
+ this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
+ this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 207F));
+ this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
+ this.tableLayoutPanelConfigDirectories.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanelConfigDirectories.Size = new System.Drawing.Size(371, 537);
+ this.tableLayoutPanelConfigDirectories.TabIndex = 0;
+ //
+ // flowLayoutPanel2
+ //
+ this.flowLayoutPanel2.Controls.Add(this.textBoxFolderToAdd);
+ this.flowLayoutPanel2.Controls.Add(this.buttonBrowse);
+ this.flowLayoutPanel2.Controls.Add(this.buttonAddFolder);
+ this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 23);
+ this.flowLayoutPanel2.Name = "flowLayoutPanel2";
+ this.flowLayoutPanel2.Size = new System.Drawing.Size(365, 37);
+ this.flowLayoutPanel2.TabIndex = 0;
+ //
+ // textBoxFolderToAdd
+ //
+ this.textBoxFolderToAdd.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.textBoxFolderToAdd.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
+ this.textBoxFolderToAdd.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystemDirectories;
+ this.textBoxFolderToAdd.Location = new System.Drawing.Point(3, 4);
+ this.textBoxFolderToAdd.Name = "textBoxFolderToAdd";
+ this.textBoxFolderToAdd.Size = new System.Drawing.Size(246, 20);
+ this.textBoxFolderToAdd.TabIndex = 3;
+ this.textBoxFolderToAdd.TextChanged += new System.EventHandler(this.textBoxFolderToAdd_TextChanged);
+ //
+ // buttonBrowse
+ //
+ this.buttonBrowse.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.buttonBrowse.Location = new System.Drawing.Point(255, 3);
+ this.buttonBrowse.Name = "buttonBrowse";
+ this.buttonBrowse.Size = new System.Drawing.Size(74, 22);
+ this.buttonBrowse.TabIndex = 3;
+ this.buttonBrowse.Text = "Parcourir ...";
+ this.buttonBrowse.UseVisualStyleBackColor = true;
+ this.buttonBrowse.Click += new System.EventHandler(this.buttonBrowse_Click);
+ //
+ // buttonAddFolder
+ //
+ this.buttonAddFolder.Enabled = false;
+ this.buttonAddFolder.Image = ((System.Drawing.Image)(resources.GetObject("buttonAddFolder.Image")));
+ this.buttonAddFolder.Location = new System.Drawing.Point(335, 3);
+ this.buttonAddFolder.Name = "buttonAddFolder";
+ this.buttonAddFolder.Size = new System.Drawing.Size(23, 23);
+ this.buttonAddFolder.TabIndex = 5;
+ this.buttonAddFolder.UseVisualStyleBackColor = true;
+ this.buttonAddFolder.Click += new System.EventHandler(this.buttonAddFolder_Click);
+ //
+ // labelDirectoriesToIndex
+ //
+ this.labelDirectoriesToIndex.AutoSize = true;
+ this.labelDirectoriesToIndex.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelDirectoriesToIndex.Location = new System.Drawing.Point(3, 0);
+ this.labelDirectoriesToIndex.Name = "labelDirectoriesToIndex";
+ this.labelDirectoriesToIndex.Size = new System.Drawing.Size(119, 13);
+ this.labelDirectoriesToIndex.TabIndex = 2;
+ this.labelDirectoriesToIndex.Text = "Dossiers à indexer :";
+ //
+ // buttonDeleteSelectedFolders
+ //
+ this.buttonDeleteSelectedFolders.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.buttonDeleteSelectedFolders.Enabled = false;
+ this.buttonDeleteSelectedFolders.Location = new System.Drawing.Point(3, 273);
+ this.buttonDeleteSelectedFolders.Name = "buttonDeleteSelectedFolders";
+ this.buttonDeleteSelectedFolders.Size = new System.Drawing.Size(365, 19);
+ this.buttonDeleteSelectedFolders.TabIndex = 4;
+ this.buttonDeleteSelectedFolders.Text = "Supprimer les dossiers sélectionnés";
+ this.buttonDeleteSelectedFolders.UseVisualStyleBackColor = true;
+ this.buttonDeleteSelectedFolders.Click += new System.EventHandler(this.buttonDeleteSelectedFolders_Click);
+ //
+ // checkedListBoxFolders
+ //
+ this.checkedListBoxFolders.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.checkedListBoxFolders.FormattingEnabled = true;
+ this.checkedListBoxFolders.Location = new System.Drawing.Point(3, 66);
+ this.checkedListBoxFolders.Name = "checkedListBoxFolders";
+ this.checkedListBoxFolders.Size = new System.Drawing.Size(365, 199);
+ this.checkedListBoxFolders.TabIndex = 6;
+ this.checkedListBoxFolders.SelectedIndexChanged += new System.EventHandler(this.checkedListBoxFolders_SelectedIndexChanged);
+ //
+ // panelConfigDatabase
+ //
+ this.panelConfigDatabase.Controls.Add(this.tableLayoutPanelConfigDB);
+ this.panelConfigDatabase.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelConfigDatabase.Location = new System.Drawing.Point(0, 0);
+ this.panelConfigDatabase.Name = "panelConfigDatabase";
+ this.panelConfigDatabase.Size = new System.Drawing.Size(405, 775);
+ this.panelConfigDatabase.TabIndex = 0;
+ //
+ // tableLayoutPanelConfigDB
+ //
+ this.tableLayoutPanelConfigDB.BackColor = System.Drawing.Color.White;
+ this.tableLayoutPanelConfigDB.ColumnCount = 1;
+ this.tableLayoutPanelConfigDB.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanelConfigDB.Controls.Add(this.groupBoxConfigDB, 0, 1);
+ this.tableLayoutPanelConfigDB.Controls.Add(this.groupBoxConnectionString, 0, 2);
+ this.tableLayoutPanelConfigDB.Controls.Add(this.pictureBoxPoweredByMySql, 0, 0);
+ this.tableLayoutPanelConfigDB.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanelConfigDB.ForeColor = System.Drawing.Color.SteelBlue;
+ this.tableLayoutPanelConfigDB.Location = new System.Drawing.Point(0, 0);
+ this.tableLayoutPanelConfigDB.Name = "tableLayoutPanelConfigDB";
+ this.tableLayoutPanelConfigDB.RowCount = 4;
+ this.tableLayoutPanelConfigDB.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
+ this.tableLayoutPanelConfigDB.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 200F));
+ this.tableLayoutPanelConfigDB.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F));
+ this.tableLayoutPanelConfigDB.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanelConfigDB.Size = new System.Drawing.Size(405, 775);
+ this.tableLayoutPanelConfigDB.TabIndex = 3;
+ //
+ // groupBoxConfigDB
+ //
+ this.groupBoxConfigDB.Controls.Add(this.labelMySQLDatabase);
+ this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLDatabase);
+ this.groupBoxConfigDB.Controls.Add(this.labelMySQLPort);
+ this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLPort);
+ this.groupBoxConfigDB.Controls.Add(this.labelMySQLPassword);
+ this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLPassword);
+ this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLLogin);
+ this.groupBoxConfigDB.Controls.Add(this.textBoxMySQLHost);
+ this.groupBoxConfigDB.Controls.Add(this.labelMySQLLogin);
+ this.groupBoxConfigDB.Controls.Add(this.labelMySQLHost);
+ this.groupBoxConfigDB.Controls.Add(this.buttonApplyMySQLParameters);
+ this.groupBoxConfigDB.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBoxConfigDB.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.groupBoxConfigDB.Location = new System.Drawing.Point(3, 73);
+ this.groupBoxConfigDB.Name = "groupBoxConfigDB";
+ this.groupBoxConfigDB.Size = new System.Drawing.Size(399, 194);
+ this.groupBoxConfigDB.TabIndex = 2;
+ this.groupBoxConfigDB.TabStop = false;
+ this.groupBoxConfigDB.Text = "Nouveaux paramètres de connexion";
+ //
+ // labelMySQLDatabase
+ //
+ this.labelMySQLDatabase.AutoSize = true;
+ this.labelMySQLDatabase.Location = new System.Drawing.Point(15, 133);
+ this.labelMySQLDatabase.Name = "labelMySQLDatabase";
+ this.labelMySQLDatabase.Size = new System.Drawing.Size(59, 13);
+ this.labelMySQLDatabase.TabIndex = 12;
+ this.labelMySQLDatabase.Text = "Database :";
+ //
+ // textBoxMySQLDatabase
+ //
+ this.textBoxMySQLDatabase.Location = new System.Drawing.Point(81, 130);
+ this.textBoxMySQLDatabase.Name = "textBoxMySQLDatabase";
+ this.textBoxMySQLDatabase.Size = new System.Drawing.Size(190, 20);
+ this.textBoxMySQLDatabase.TabIndex = 8;
+ //
+ // labelMySQLPort
+ //
+ this.labelMySQLPort.AutoSize = true;
+ this.labelMySQLPort.Location = new System.Drawing.Point(15, 55);
+ this.labelMySQLPort.Name = "labelMySQLPort";
+ this.labelMySQLPort.Size = new System.Drawing.Size(32, 13);
+ this.labelMySQLPort.TabIndex = 10;
+ this.labelMySQLPort.Text = "Port :";
+ //
+ // textBoxMySQLPort
+ //
+ this.textBoxMySQLPort.Location = new System.Drawing.Point(81, 52);
+ this.textBoxMySQLPort.Name = "textBoxMySQLPort";
+ this.textBoxMySQLPort.Size = new System.Drawing.Size(190, 20);
+ this.textBoxMySQLPort.TabIndex = 5;
+ //
+ // labelMySQLPassword
+ //
+ this.labelMySQLPassword.AutoSize = true;
+ this.labelMySQLPassword.Location = new System.Drawing.Point(15, 107);
+ this.labelMySQLPassword.Name = "labelMySQLPassword";
+ this.labelMySQLPassword.Size = new System.Drawing.Size(59, 13);
+ this.labelMySQLPassword.TabIndex = 8;
+ this.labelMySQLPassword.Text = "Password :";
+ //
+ // textBoxMySQLPassword
+ //
+ this.textBoxMySQLPassword.Location = new System.Drawing.Point(81, 104);
+ this.textBoxMySQLPassword.Name = "textBoxMySQLPassword";
+ this.textBoxMySQLPassword.Size = new System.Drawing.Size(190, 20);
+ this.textBoxMySQLPassword.TabIndex = 7;
+ //
+ // textBoxMySQLLogin
+ //
+ this.textBoxMySQLLogin.Location = new System.Drawing.Point(81, 78);
+ this.textBoxMySQLLogin.Name = "textBoxMySQLLogin";
+ this.textBoxMySQLLogin.Size = new System.Drawing.Size(190, 20);
+ this.textBoxMySQLLogin.TabIndex = 6;
+ //
+ // textBoxMySQLHost
+ //
+ this.textBoxMySQLHost.Location = new System.Drawing.Point(81, 26);
+ this.textBoxMySQLHost.Name = "textBoxMySQLHost";
+ this.textBoxMySQLHost.Size = new System.Drawing.Size(190, 20);
+ this.textBoxMySQLHost.TabIndex = 4;
+ //
+ // labelMySQLLogin
+ //
+ this.labelMySQLLogin.AutoSize = true;
+ this.labelMySQLLogin.Location = new System.Drawing.Point(15, 81);
+ this.labelMySQLLogin.Name = "labelMySQLLogin";
+ this.labelMySQLLogin.Size = new System.Drawing.Size(39, 13);
+ this.labelMySQLLogin.TabIndex = 2;
+ this.labelMySQLLogin.Text = "Login :";
+ //
+ // labelMySQLHost
+ //
+ this.labelMySQLHost.AutoSize = true;
+ this.labelMySQLHost.Location = new System.Drawing.Point(15, 29);
+ this.labelMySQLHost.Name = "labelMySQLHost";
+ this.labelMySQLHost.Size = new System.Drawing.Size(50, 13);
+ this.labelMySQLHost.TabIndex = 1;
+ this.labelMySQLHost.Text = "Serveur :";
+ //
+ // buttonApplyMySQLParameters
+ //
+ this.buttonApplyMySQLParameters.BackColor = System.Drawing.Color.White;
+ this.buttonApplyMySQLParameters.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.buttonApplyMySQLParameters.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.buttonApplyMySQLParameters.ForeColor = System.Drawing.Color.SteelBlue;
+ this.buttonApplyMySQLParameters.Location = new System.Drawing.Point(3, 168);
+ this.buttonApplyMySQLParameters.Name = "buttonApplyMySQLParameters";
+ this.buttonApplyMySQLParameters.Size = new System.Drawing.Size(393, 23);
+ this.buttonApplyMySQLParameters.TabIndex = 9;
+ this.buttonApplyMySQLParameters.Text = "Prendre en compte ces nouveaux paramètres";
+ this.buttonApplyMySQLParameters.UseVisualStyleBackColor = false;
+ this.buttonApplyMySQLParameters.Click += new System.EventHandler(this.buttonApplyMySQLParameters_Click);
+ //
+ // groupBoxConnectionString
+ //
+ this.groupBoxConnectionString.Controls.Add(this.buttonProbeConnect);
+ this.groupBoxConnectionString.Controls.Add(this.textBoxConnectionString);
+ this.groupBoxConnectionString.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBoxConnectionString.Location = new System.Drawing.Point(3, 273);
+ this.groupBoxConnectionString.Name = "groupBoxConnectionString";
+ this.groupBoxConnectionString.Size = new System.Drawing.Size(399, 74);
+ this.groupBoxConnectionString.TabIndex = 3;
+ this.groupBoxConnectionString.TabStop = false;
+ this.groupBoxConnectionString.Text = "ConnectionString";
+ //
+ // buttonProbeConnect
+ //
+ this.buttonProbeConnect.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.buttonProbeConnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.buttonProbeConnect.Location = new System.Drawing.Point(3, 48);
+ this.buttonProbeConnect.Name = "buttonProbeConnect";
+ this.buttonProbeConnect.Size = new System.Drawing.Size(393, 23);
+ this.buttonProbeConnect.TabIndex = 11;
+ this.buttonProbeConnect.Text = "Tester la connexion";
+ this.buttonProbeConnect.UseVisualStyleBackColor = true;
+ this.buttonProbeConnect.Click += new System.EventHandler(this.buttonProbeConnect_Click);
+ //
+ // textBoxConnectionString
+ //
+ this.textBoxConnectionString.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBoxConnectionString.Location = new System.Drawing.Point(3, 16);
+ this.textBoxConnectionString.Multiline = true;
+ this.textBoxConnectionString.Name = "textBoxConnectionString";
+ this.textBoxConnectionString.Size = new System.Drawing.Size(393, 55);
+ this.textBoxConnectionString.TabIndex = 10;
+ this.textBoxConnectionString.TextChanged += new System.EventHandler(this.textBoxConnectionString_TextChanged);
+ //
+ // pictureBoxPoweredByMySql
+ //
+ this.pictureBoxPoweredByMySql.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.pictureBoxPoweredByMySql.Image = global::Sycorax.ControlCenter.Properties.Resources.poweredByMysql125x64;
+ this.pictureBoxPoweredByMySql.Location = new System.Drawing.Point(277, 3);
+ this.pictureBoxPoweredByMySql.Name = "pictureBoxPoweredByMySql";
+ this.pictureBoxPoweredByMySql.Size = new System.Drawing.Size(125, 64);
+ this.pictureBoxPoweredByMySql.TabIndex = 4;
+ this.pictureBoxPoweredByMySql.TabStop = false;
+ //
+ // tabPageRebuildIndex
+ //
+ this.tabPageRebuildIndex.Controls.Add(this.buttonStartRebuildIndex);
+ this.tabPageRebuildIndex.Controls.Add(this.progressBarRebuild);
+ this.tabPageRebuildIndex.Controls.Add(this.label2);
+ this.tabPageRebuildIndex.Location = new System.Drawing.Point(4, 22);
+ this.tabPageRebuildIndex.Name = "tabPageRebuildIndex";
+ this.tabPageRebuildIndex.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageRebuildIndex.Size = new System.Drawing.Size(577, 543);
+ this.tabPageRebuildIndex.TabIndex = 3;
+ this.tabPageRebuildIndex.Text = "Regénérer l\'index";
+ this.tabPageRebuildIndex.UseVisualStyleBackColor = true;
+ //
+ // buttonStartRebuildIndex
+ //
+ this.buttonStartRebuildIndex.Location = new System.Drawing.Point(11, 101);
+ this.buttonStartRebuildIndex.Name = "buttonStartRebuildIndex";
+ this.buttonStartRebuildIndex.Size = new System.Drawing.Size(75, 26);
+ this.buttonStartRebuildIndex.TabIndex = 3;
+ this.buttonStartRebuildIndex.Text = "Démarrer";
+ this.buttonStartRebuildIndex.UseVisualStyleBackColor = true;
+ this.buttonStartRebuildIndex.Click += new System.EventHandler(this.buttonStartRebuildIndex_Click);
+ //
+ // progressBarRebuild
+ //
+ this.progressBarRebuild.BackColor = System.Drawing.Color.White;
+ this.progressBarRebuild.ForeColor = System.Drawing.Color.LawnGreen;
+ this.progressBarRebuild.Location = new System.Drawing.Point(92, 101);
+ this.progressBarRebuild.Name = "progressBarRebuild";
+ this.progressBarRebuild.Size = new System.Drawing.Size(475, 26);
+ this.progressBarRebuild.TabIndex = 2;
+ this.progressBarRebuild.Visible = false;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(8, 12);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(559, 78);
+ this.label2.TabIndex = 1;
+ this.label2.Text = resources.GetString("label2.Text");
+ //
+ // tabPageAutoUpdate
+ //
+ this.tabPageAutoUpdate.Controls.Add(this.panelServiceController);
+ this.tabPageAutoUpdate.Location = new System.Drawing.Point(4, 22);
+ this.tabPageAutoUpdate.Name = "tabPageAutoUpdate";
+ this.tabPageAutoUpdate.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageAutoUpdate.Size = new System.Drawing.Size(577, 543);
+ this.tabPageAutoUpdate.TabIndex = 1;
+ this.tabPageAutoUpdate.Text = "Auto Update";
+ this.tabPageAutoUpdate.UseVisualStyleBackColor = true;
+ this.tabPageAutoUpdate.Enter += new System.EventHandler(this.tabPageAutoUpdate_Enter);
+ //
+ // panelServiceController
+ //
+ this.panelServiceController.Controls.Add(this.groupBox3);
+ this.panelServiceController.Controls.Add(this.groupBox2);
+ this.panelServiceController.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelServiceController.Location = new System.Drawing.Point(3, 3);
+ this.panelServiceController.Name = "panelServiceController";
+ this.panelServiceController.Size = new System.Drawing.Size(571, 537);
+ this.panelServiceController.TabIndex = 13;
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.label4);
+ this.groupBox3.Controls.Add(this.labelInternalAutoUpdateStatus);
+ this.groupBox3.Controls.Add(this.label3);
+ this.groupBox3.Controls.Add(this.linkInternalAutoUpdateUp);
+ this.groupBox3.Controls.Add(this.textBoxLog);
+ this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox3.Location = new System.Drawing.Point(0, 89);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(571, 448);
+ this.groupBox3.TabIndex = 12;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Bypass service (DEBUG)";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(9, 20);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(303, 26);
+ this.label4.TabIndex = 10;
+ this.label4.Text = "En lieu et place du service, vous pouvez lancer l\'auto update\r\ndirectement depuis" +
+ " Sycorax Conrol Center à des fins de debug.";
+ //
+ // labelInternalAutoUpdateStatus
+ //
+ this.labelInternalAutoUpdateStatus.AutoSize = true;
+ this.labelInternalAutoUpdateStatus.Location = new System.Drawing.Point(376, 12);
+ this.labelInternalAutoUpdateStatus.Name = "labelInternalAutoUpdateStatus";
+ this.labelInternalAutoUpdateStatus.Size = new System.Drawing.Size(21, 13);
+ this.labelInternalAutoUpdateStatus.TabIndex = 9;
+ this.labelInternalAutoUpdateStatus.Text = "Off";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.Location = new System.Drawing.Point(342, 12);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(38, 13);
+ this.label3.TabIndex = 8;
+ this.label3.Text = "Etat :";
+ //
+ // linkInternalAutoUpdateUp
+ //
+ this.linkInternalAutoUpdateUp.AutoSize = true;
+ this.linkInternalAutoUpdateUp.Location = new System.Drawing.Point(376, 31);
+ this.linkInternalAutoUpdateUp.Name = "linkInternalAutoUpdateUp";
+ this.linkInternalAutoUpdateUp.Size = new System.Drawing.Size(50, 13);
+ this.linkInternalAutoUpdateUp.TabIndex = 6;
+ this.linkInternalAutoUpdateUp.TabStop = true;
+ this.linkInternalAutoUpdateUp.Text = "Démarrer";
+ this.linkInternalAutoUpdateUp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkInternalAutoUpdateUp_LinkClicked);
+ //
+ // textBoxLog
+ //
+ this.textBoxLog.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.textBoxLog.Location = new System.Drawing.Point(3, 70);
+ this.textBoxLog.Multiline = true;
+ this.textBoxLog.Name = "textBoxLog";
+ this.textBoxLog.Size = new System.Drawing.Size(565, 375);
+ this.textBoxLog.TabIndex = 0;
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.labelAutoUpdateException);
+ this.groupBox2.Controls.Add(this.labelAutoUpdateHelp1);
+ this.groupBox2.Controls.Add(this.linkLabelServicePlayStop);
+ this.groupBox2.Controls.Add(this.labelStatutAutoUpdateServiceResult);
+ this.groupBox2.Controls.Add(this.labelAutoUpdateHelp2);
+ this.groupBox2.Controls.Add(this.labelStatutAutoUpdateService);
+ this.groupBox2.Controls.Add(this.linkLabelServicePauseContinue);
+ this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupBox2.Location = new System.Drawing.Point(0, 0);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(571, 89);
+ this.groupBox2.TabIndex = 11;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Service";
+ //
+ // labelAutoUpdateException
+ //
+ this.labelAutoUpdateException.AutoSize = true;
+ this.labelAutoUpdateException.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelAutoUpdateException.ForeColor = System.Drawing.Color.Maroon;
+ this.labelAutoUpdateException.Location = new System.Drawing.Point(6, 55);
+ this.labelAutoUpdateException.Name = "labelAutoUpdateException";
+ this.labelAutoUpdateException.Size = new System.Drawing.Size(0, 13);
+ this.labelAutoUpdateException.TabIndex = 11;
+ //
+ // labelAutoUpdateHelp1
+ //
+ this.labelAutoUpdateHelp1.AutoSize = true;
+ this.labelAutoUpdateHelp1.Location = new System.Drawing.Point(6, 16);
+ this.labelAutoUpdateHelp1.Name = "labelAutoUpdateHelp1";
+ this.labelAutoUpdateHelp1.Size = new System.Drawing.Size(321, 13);
+ this.labelAutoUpdateHelp1.TabIndex = 8;
+ this.labelAutoUpdateHelp1.Text = "Sycorax Auto Update est un service indexant en continu vos MP3.";
+ //
+ // linkLabelServicePlayStop
+ //
+ this.linkLabelServicePlayStop.AutoSize = true;
+ this.linkLabelServicePlayStop.Location = new System.Drawing.Point(376, 34);
+ this.linkLabelServicePlayStop.Name = "linkLabelServicePlayStop";
+ this.linkLabelServicePlayStop.Size = new System.Drawing.Size(50, 13);
+ this.linkLabelServicePlayStop.TabIndex = 4;
+ this.linkLabelServicePlayStop.TabStop = true;
+ this.linkLabelServicePlayStop.Text = "Démarrer";
+ this.linkLabelServicePlayStop.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelServicePlayStop_LinkClicked);
+ //
+ // labelStatutAutoUpdateServiceResult
+ //
+ this.labelStatutAutoUpdateServiceResult.AutoSize = true;
+ this.labelStatutAutoUpdateServiceResult.Location = new System.Drawing.Point(376, 16);
+ this.labelStatutAutoUpdateServiceResult.Name = "labelStatutAutoUpdateServiceResult";
+ this.labelStatutAutoUpdateServiceResult.Size = new System.Drawing.Size(45, 13);
+ this.labelStatutAutoUpdateServiceResult.TabIndex = 3;
+ this.labelStatutAutoUpdateServiceResult.Text = "inconnu";
+ //
+ // labelAutoUpdateHelp2
+ //
+ this.labelAutoUpdateHelp2.AutoSize = true;
+ this.labelAutoUpdateHelp2.Location = new System.Drawing.Point(6, 34);
+ this.labelAutoUpdateHelp2.Name = "labelAutoUpdateHelp2";
+ this.labelAutoUpdateHelp2.Size = new System.Drawing.Size(280, 13);
+ this.labelAutoUpdateHelp2.TabIndex = 1;
+ this.labelAutoUpdateHelp2.Text = "Votre base de données est ainsi constamment mise à jour.";
+ //
+ // labelStatutAutoUpdateService
+ //
+ this.labelStatutAutoUpdateService.AutoSize = true;
+ this.labelStatutAutoUpdateService.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelStatutAutoUpdateService.Location = new System.Drawing.Point(342, 16);
+ this.labelStatutAutoUpdateService.Name = "labelStatutAutoUpdateService";
+ this.labelStatutAutoUpdateService.Size = new System.Drawing.Size(38, 13);
+ this.labelStatutAutoUpdateService.TabIndex = 2;
+ this.labelStatutAutoUpdateService.Text = "Etat :";
+ //
+ // linkLabelServicePauseContinue
+ //
+ this.linkLabelServicePauseContinue.AutoSize = true;
+ this.linkLabelServicePauseContinue.Location = new System.Drawing.Point(376, 52);
+ this.linkLabelServicePauseContinue.Name = "linkLabelServicePauseContinue";
+ this.linkLabelServicePauseContinue.Size = new System.Drawing.Size(37, 13);
+ this.linkLabelServicePauseContinue.TabIndex = 5;
+ this.linkLabelServicePauseContinue.TabStop = true;
+ this.linkLabelServicePauseContinue.Text = "Pause";
+ this.linkLabelServicePauseContinue.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelServicePause_LinkClicked);
+ //
+ // tabControlMain
+ //
+ this.tabControlMain.Controls.Add(this.tabPageAutoUpdate);
+ this.tabControlMain.Controls.Add(this.tabPageRebuildIndex);
+ this.tabControlMain.Controls.Add(this.tabPageConfig);
+ this.tabControlMain.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tabControlMain.Location = new System.Drawing.Point(0, 0);
+ this.tabControlMain.Name = "tabControlMain";
+ this.tabControlMain.SelectedIndex = 0;
+ this.tabControlMain.Size = new System.Drawing.Size(585, 569);
+ this.tabControlMain.TabIndex = 0;
+ //
+ // labelNotYetDefinedPanel
+ //
+ this.labelNotYetDefinedPanel.AutoSize = true;
+ this.labelNotYetDefinedPanel.Location = new System.Drawing.Point(16, 21);
+ this.labelNotYetDefinedPanel.Name = "labelNotYetDefinedPanel";
+ this.labelNotYetDefinedPanel.Size = new System.Drawing.Size(177, 13);
+ this.labelNotYetDefinedPanel.TabIndex = 0;
+ this.labelNotYetDefinedPanel.Text = "Ce panneau n\'est pas encore défini.";
+ //
+ // panelConfigMainOptions
+ //
+ this.panelConfigMainOptions.Controls.Add(this.groupBox1);
+ this.panelConfigMainOptions.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelConfigMainOptions.Location = new System.Drawing.Point(0, 0);
+ this.panelConfigMainOptions.Name = "panelConfigMainOptions";
+ this.panelConfigMainOptions.Size = new System.Drawing.Size(405, 775);
+ this.panelConfigMainOptions.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.checkBoxDebugMode);
+ this.groupBox1.Controls.Add(this.checkBoxDeleteTunesIfOrphans);
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
+ this.groupBox1.Location = new System.Drawing.Point(0, 0);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(405, 78);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Options générales";
+ //
+ // checkBoxDebugMode
+ //
+ this.checkBoxDebugMode.AutoSize = true;
+ this.checkBoxDebugMode.Location = new System.Drawing.Point(16, 46);
+ this.checkBoxDebugMode.Name = "checkBoxDebugMode";
+ this.checkBoxDebugMode.Size = new System.Drawing.Size(282, 17);
+ this.checkBoxDebugMode.TabIndex = 9;
+ this.checkBoxDebugMode.Text = "Activer les fonctionnalités du mode debug de Sycorax.";
+ this.checkBoxDebugMode.UseVisualStyleBackColor = true;
+ //
+ // checkBoxDeleteTunesIfOrphans
+ //
+ this.checkBoxDeleteTunesIfOrphans.AutoSize = true;
+ this.checkBoxDeleteTunesIfOrphans.Location = new System.Drawing.Point(16, 24);
+ this.checkBoxDeleteTunesIfOrphans.Name = "checkBoxDeleteTunesIfOrphans";
+ this.checkBoxDeleteTunesIfOrphans.Size = new System.Drawing.Size(339, 17);
+ this.checkBoxDeleteTunesIfOrphans.TabIndex = 8;
+ this.checkBoxDeleteTunesIfOrphans.Text = "Supprimer les morceaux de la base de données s\'ils sont orphelins.";
+ this.checkBoxDeleteTunesIfOrphans.UseVisualStyleBackColor = true;
+ //
+ // MainForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(585, 569);
+ this.Controls.Add(this.tabControlMain);
+ this.Name = "MainForm";
+ this.Text = "Sycorax Control Center";
+ this.tabPageDebug.ResumeLayout(false);
+ this.tabPageDebug.PerformLayout();
+ this.tabPageConfig.ResumeLayout(false);
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ this.splitContainer1.Panel2.ResumeLayout(false);
+ this.splitContainer1.ResumeLayout(false);
+ this.flowLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanelConfigDirectories.ResumeLayout(false);
+ this.tableLayoutPanelConfigDirectories.PerformLayout();
+ this.flowLayoutPanel2.ResumeLayout(false);
+ this.flowLayoutPanel2.PerformLayout();
+ this.panelConfigDatabase.ResumeLayout(false);
+ this.tableLayoutPanelConfigDB.ResumeLayout(false);
+ this.groupBoxConfigDB.ResumeLayout(false);
+ this.groupBoxConfigDB.PerformLayout();
+ this.groupBoxConnectionString.ResumeLayout(false);
+ this.groupBoxConnectionString.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPoweredByMySql)).EndInit();
+ this.tabPageRebuildIndex.ResumeLayout(false);
+ this.tabPageRebuildIndex.PerformLayout();
+ this.tabPageAutoUpdate.ResumeLayout(false);
+ this.panelServiceController.ResumeLayout(false);
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ this.tabControlMain.ResumeLayout(false);
+ this.panelConfigMainOptions.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
}
private System.Windows.Forms.TabPage tabPageDebug;
private System.Windows.Forms.TextBox textBoxException;
private System.Windows.Forms.TabPage tabPageConfig;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Button buttonRAZOptions;
private System.Windows.Forms.Button buttonEnregistrerOptions;
private System.Windows.Forms.Panel panelConfigDatabase;
private System.Windows.Forms.TabPage tabPageRebuildIndex;
private System.Windows.Forms.Button buttonStartRebuildIndex;
private System.Windows.Forms.ProgressBar progressBarRebuild;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TabPage tabPageAutoUpdate;
private System.Windows.Forms.TabControl tabControlMain;
private System.Windows.Forms.ListBox listBoxOptions;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelConfigDB;
private System.Windows.Forms.GroupBox groupBoxConfigDB;
private System.Windows.Forms.Button buttonApplyMySQLParameters;
private System.Windows.Forms.GroupBox groupBoxConnectionString;
private System.Windows.Forms.TextBox textBoxConnectionString;
private System.Windows.Forms.Label labelMySQLPassword;
private System.Windows.Forms.TextBox textBoxMySQLPassword;
private System.Windows.Forms.TextBox textBoxMySQLLogin;
private System.Windows.Forms.TextBox textBoxMySQLHost;
private System.Windows.Forms.Label labelMySQLLogin;
private System.Windows.Forms.Label labelMySQLHost;
private System.Windows.Forms.Label labelMySQLPort;
private System.Windows.Forms.TextBox textBoxMySQLPort;
private System.Windows.Forms.Label labelMySQLDatabase;
private System.Windows.Forms.TextBox textBoxMySQLDatabase;
private System.Windows.Forms.PictureBox pictureBoxPoweredByMySql;
private System.Windows.Forms.Button buttonProbeConnect;
private System.Windows.Forms.Label labelNotYetDefinedPanel;
private System.Windows.Forms.Panel panelConfigMainOptions;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox checkBoxDebugMode;
private System.Windows.Forms.CheckBox checkBoxDeleteTunesIfOrphans;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelConfigDirectories;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.TextBox textBoxFolderToAdd;
private System.Windows.Forms.Button buttonBrowse;
private System.Windows.Forms.Label labelDirectoriesToIndex;
private System.Windows.Forms.Button buttonAddFolder;
private System.Windows.Forms.Button buttonDeleteSelectedFolders;
private System.Windows.Forms.CheckedListBox checkedListBoxFolders;
private System.Windows.Forms.Panel panelServiceController;
private System.Windows.Forms.Label labelAutoUpdateHelp1;
private System.Windows.Forms.Label labelAutoUpdateHelp2;
private System.Windows.Forms.LinkLabel linkLabelServicePauseContinue;
private System.Windows.Forms.Label labelStatutAutoUpdateService;
private System.Windows.Forms.Label labelStatutAutoUpdateServiceResult;
private System.Windows.Forms.LinkLabel linkLabelServicePlayStop;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label labelAutoUpdateException;
private System.Windows.Forms.GroupBox groupBox3;
- private System.Windows.Forms.LinkLabel linkInternalAutoUpdateUp;
- private System.Windows.Forms.LinkLabel linkInternalAutoUpdateDown;
+ private System.Windows.Forms.LinkLabel linkInternalAutoUpdateUp;
private System.Windows.Forms.TextBox textBoxLog;
private System.Windows.Forms.Label labelInternalAutoUpdateStatus;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
}
}
\ No newline at end of file
diff --git a/Sycorax Control Center/MainForm.cs b/Sycorax Control Center/MainForm.cs
index 150850e..9a0904c 100644
--- a/Sycorax Control Center/MainForm.cs
+++ b/Sycorax Control Center/MainForm.cs
@@ -1,756 +1,759 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.ServiceProcess;
using System.Text;
using System.IO;
namespace Sycorax.ControlCenter {
/// <summary>
/// Application Main form
/// </summary>
public partial class MainForm {
public MainForm () {
InitializeComponent();
//Autoupdate :: we need to initialize our ServiceController
sc = new ServiceController("SycoraxAutoUpdate");
//Config tab :: initializes the controls, reading options
RefreshOptionsArea();
}
/// <summary>
/// SycoraxAutoUpdate Service Controller
/// </summary>
private ServiceController sc;
/// <summary>
/// Indique si les options ont été modifiées
/// </summary>
private bool optionsHasBeenModified;
/// <summary>
/// Indique si les options ont été modifiées
/// </summary>
public bool OptionsHasBeenModified {
get {
return optionsHasBeenModified;
}
set {
//Si les options ont été modifiées, alors le bouton enregistrer est activé.
buttonEnregistrerOptions.Enabled = optionsHasBeenModified = value;
}
}
/// <summary>
/// Handles the Enter event of the tabPageAutoUpdate control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void tabPageAutoUpdate_Enter (object sender, EventArgs e) {
//Mise à jour de la zone du haut, càd du contrôleur de service
ProbeService();
}
/// <summary>
/// Vérifie l'état du service
/// </summary>
private void ProbeService () {
try {
switch (sc.Status) {
//Affichage de l'état dans labelStatutAutoUpdateServiceResult
//Les tags que nous définissons correspondent aux opérations
//attendues pour ces liens.
case ServiceControllerStatus.ContinuePending:
labelStatutAutoUpdateServiceResult.Text = "Reprise en cours";
linkLabelServicePauseContinue.Tag = "Pause";
linkLabelServicePlayStop.Tag = "Stop";
break;
case ServiceControllerStatus.Paused:
labelStatutAutoUpdateServiceResult.Text = "Pause";
linkLabelServicePauseContinue.Tag = "Continue";
linkLabelServicePlayStop.Tag = "Stop";
break;
case ServiceControllerStatus.PausePending:
labelStatutAutoUpdateServiceResult.Text = "Pause en cours";
linkLabelServicePauseContinue.Tag = "Continue";
linkLabelServicePlayStop.Tag = "Stop";
break;
case ServiceControllerStatus.Running:
labelStatutAutoUpdateServiceResult.Text = "Actif";
linkLabelServicePauseContinue.Tag = "Pause";
linkLabelServicePlayStop.Tag = "Stop";
break;
case ServiceControllerStatus.StartPending:
labelStatutAutoUpdateServiceResult.Text = "Lancement en cours";
linkLabelServicePauseContinue.Tag = "Pause";
linkLabelServicePlayStop.Tag = "Stop";
break;
case ServiceControllerStatus.Stopped:
labelStatutAutoUpdateServiceResult.Text = "Arrêté";
linkLabelServicePauseContinue.Tag = "";
linkLabelServicePlayStop.Tag = "Start";
break;
case ServiceControllerStatus.StopPending:
labelStatutAutoUpdateServiceResult.Text = "Arrêt en cours";
linkLabelServicePauseContinue.Tag = "";
linkLabelServicePlayStop.Tag = "Start";
break;
}
labelStatutAutoUpdateServiceResult.ForeColor = (sc.Status == ServiceControllerStatus.Running) ? Color.DarkGreen : SystemColors.ControlText;
//Mise à jour du texte des liens
UpdateServiceLinks();
} catch (Exception e) {
if (Program.options.DebugMode) {
PrintException(e);
}
labelAutoUpdateException.Text = e.Message;
//En cas d'erreur sur le service, les liens ne servent pas à grand chose
linkLabelServicePlayStop.Hide();
linkLabelServicePauseContinue.Hide();
}
}
/// <summary>
/// Updates the service links.
/// </summary>
private void UpdateServiceLinks () {
//Lien Start/Stop
//TODO : Lang
//Mise à jour du nom du lien
linkLabelServicePlayStop.Text = linkLabelServicePlayStop.Tag.ToString();
//Lien Pause/Continue
if (linkLabelServicePauseContinue.Tag.ToString() == "") {
//Pas de tag (le service étant à l'arrêt ou en cours d'arrêt), le lien disparaît.
linkLabelServicePauseContinue.Hide();
} else {
//On réaffiche éventuellement le tag
linkLabelServicePauseContinue.Show();
//TODO : Lang
//Mise à jour du nom du lien
linkLabelServicePauseContinue.Text = linkLabelServicePauseContinue.Tag.ToString();
}
}
/// <summary>
/// Prints an exception.
/// </summary>
/// <param name="e">The exception.</param>
private void PrintException (Exception e) {
//Affichage de l'exception dans textBoxException
StringBuilder sb = new StringBuilder();
sb.AppendLine(e.Message);
sb.AppendLine();
sb.AppendLine();
sb.AppendLine(e.StackTrace);
textBoxException.Text = sb.ToString();
//Si le tab n'était pas encore présent, affichons-le
if (!tabControlMain.Controls.Contains(tabPageDebug)) {
//On ajoute l'onglet debug à droite
this.tabControlMain.Controls.Add(tabPageDebug);
//On zappe dessus
//Attention : si l'on zappe systématiquement sur ce tab
//dés qu'une exception survient, il ne sera pas possible
//de voir correctement les autres onglets si l'exception
//se reproduit dés qu'on entre dans un de ceux-ci comme
//c'est par ex. le cas si le service n'est pas installé.
tabControlMain.SelectedTab = tabPageDebug;
}
}
/// <summary>
/// Handles the LinkClicked event of the linkLabelServicePlayStop control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
private void linkLabelServicePlayStop_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e) {
try {
LinkLabel linkLabel = (LinkLabel)sender;
if (linkLabel.Tag.ToString() == "Play") {
//Démarrage du service
sc.Start();
} else {
//Arrêt du service
sc.Stop();
}
} catch (Exception ex) {
if (Program.options.DebugMode) {
PrintException(ex);
}
labelAutoUpdateException.Text = ex.Message;
return;
}
ProbeService();
}
/// <summary>
/// Handles the LinkClicked event of the linkLabelServicePause control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
private void linkLabelServicePause_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e) {
LinkLabel linkLabel = (LinkLabel)sender;
//Pas de tag ? il ne se passe rien (n'est pas sensé arrivé grâce à UpdateServiceLinks)
if (linkLabel.Tag.ToString() == "") return;
try {
//Lisons le tag du lien pour déterminer le comportement à adopter (pause ou continue)
if (linkLabel.Tag.ToString() == "Pause") {
//Démarrage du service
sc.Pause();
} else {
//Arrêt du service
sc.Continue();
}
} catch (Exception ex) {
if (Program.options.DebugMode) {
PrintException(ex);
}
labelAutoUpdateException.Text = ex.Message;
return;
}
ProbeService();
}
/// <summary>
/// Handles the CheckedChanged event of the checkBoxDeleteTunesIfOrphans control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void checkBoxDeleteTunesIfOrphans_CheckedChanged (object sender, EventArgs e) {
CheckBox checkBox = (CheckBox)sender;
Program.options.DeleteTunesIfOrphans = checkBox.Checked;
OptionsHasBeenModified = true;
}
/// <summary>
/// Handles the CheckedChanged event of the checkBoxDebugMode control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void checkBoxDebugMode_CheckedChanged (object sender, EventArgs e) {
CheckBox checkBox = (CheckBox)sender;
Program.options.DebugMode = checkBox.Checked;
OptionsHasBeenModified = true;
}
/// <summary>
/// Handles the Click event of the buttonEnregistrerOptions control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void buttonEnregistrerOptions_Click (object sender, EventArgs e) {
SaveOptions();
}
/// <summary>
/// Saves the options.
/// </summary>
private void SaveOptions () {
try {
Program.options.Save(MainOptions.DefaultOptionsFile);
OptionsHasBeenModified = false;
} catch (Exception ex) {
if (Program.options.DebugMode) PrintException(ex);
if (MessageBox.Show(ex.Message, "Impossible de sauvegader les options.", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Retry) {
//Ok, let's retry
SaveOptions();
}
}
}
private void checkedListBoxFolders_SelectedIndexChanged (object sender, EventArgs e) {
CheckedListBox checkedListBox = (CheckedListBox)sender;
//Activons le bouton suppression si au moins une case est sélectionnée
buttonDeleteSelectedFolders.Enabled = (checkedListBox.CheckedItems.Count > 0);
}
private void textBoxFolderToAdd_TextChanged (object sender, EventArgs e) {
TextBox textBox = (TextBox)sender;
//Activons le bouton suppression si il y a du texte que c'est un dossier existant
buttonAddFolder.Enabled = Directory.Exists(textBox.Text) || textBox.Text == "---";
}
private void buttonAddFolder_Click (object sender, EventArgs e) {
if (textBoxFolderToAdd.Text == "---") {
checkedListBoxFolders.Items.Clear();
Program.options.FoldersToWatch = new string[] { };
textBoxFolderToAdd.Clear();
} else {
- AddFolder(textBoxFolderToAdd.Text);
+ if (!Directory.Exists(textBoxFolderToAdd.Text)) {
+ DialogResult result = MessageBox.Show("Le dossier " + textBoxFolderToAdd.Text + " n'existe pas, voulez-vous vraiment l'ajouter, au risque de compromettre le bon fonctionnement de l'indexation ?", "Dossier non existant", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
+ if (result != DialogResult.Yes) return;
+ }
+ AddFolder(textBoxFolderToAdd.Text);
}
}
private void AddFolder (string path) {
//Ajout dans la liste
checkedListBoxFolders.Items.Add(path, CheckState.Unchecked);
//On efface le texte de la textBox
textBoxFolderToAdd.Clear();
//On l'ajoute dans les options
Program.options.AddFolder(path);
}
private void buttonBrowse_Click (object sender, EventArgs e) {
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.Description = "Sélectionnez le dossier à surveiller";
if (Directory.Exists(textBoxFolderToAdd.Text)) {
dialog.SelectedPath = textBoxFolderToAdd.Text;
}
dialog.ShowNewFolderButton = true;
if (dialog.ShowDialog() == DialogResult.OK) {
textBoxFolderToAdd.Text = dialog.SelectedPath;
}
}
private void buttonDeleteSelectedFolders_Click (object sender, EventArgs e) {
/*
* Instinctivement, le code suivant peut s'imposer :
*
* foreach (object o in checkedListBoxFolders.SelectedItems) {
* DelFolder(o.ToString());
* }
*
* Autrement dit :
*
* foreach (object o in checkedListBoxFolders.SelectedItems) {
* checkedListBoxFolders.Items.Remove(path);
* //...
* }
*
* Le souci est que nous modifions la liste des items de checkedListBoxFolders
* au fur et à mesure que nous parcourons la boucle foreach, ce qui provoquera
* une exception InvalidOperationOperation tout à fait justifiée.
*
* La solution est assez simple, il suffit de copier les items sélectionnées
* dans un tableau temporaire et de parcourir non pas notre liste d'items sé-
* lectionnés mais ce tableau où nous venons de les copier.
*/
//Copions les items sélectionnés dans un tableau
object[] itemsToDel = new object[checkedListBoxFolders.SelectedItems.Count];
checkedListBoxFolders.SelectedItems.CopyTo(itemsToDel, 0);
//Supprimons-les
foreach (object o in itemsToDel) {
DelFolder(o.ToString());
}
}
/// <summary>
/// Deletes the folder.
/// </summary>
/// <param name="path">The folder path.</param>
private void DelFolder (string path) {
//Ajout dans la liste
checkedListBoxFolders.Items.Remove(path);
//On le supprime dans les options
Program.options.DelFolder(path);
}
/// <summary>
/// Handles the Click event of the buttonRAZOptions control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void buttonRAZOptions_Click (object sender, EventArgs e) {
if (MessageBox.Show(
"Êtes-vous sûr de vouloir restaurer les préférences par défaut.\n\nSi vous répondez oui, votre liste de dossiers à surveiller sera perdue.",
"Remise à zéro des préférences",
MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes
) {
//Ok, let's RAZ
Program.options.SetDefaults();
//Enregistrons directement
Program.options.Save();
//Hop on met à jour l'interface
RefreshOptionsArea();
}
}
#region Auto Update :: Manual auto update
/// <summary>
/// Handles the LinkClicked event of the linkInternalAutoUpdateUp control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
private void linkInternalAutoUpdateUp_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e) {
try {
if (labelInternalAutoUpdateStatus.Text == "Off") {
//Start our internal auto update
- if (Program.internalAutoUpdate = null) {
+ if (Program.internalAutoUpdate == null) {
Program.internalAutoUpdate = new InternalAutoUpdate();
}
Program.internalAutoUpdate.Enabled = true;
} else {
//Stop our interal auto update
Program.internalAutoUpdate.Enabled = false;
}
- ProbeService();
+ RefreshInternalAutoUpdateLinks();
} catch (Exception ex) {
if (Program.options.DebugMode) {
PrintException(ex);
}
return;
}
}
public void RefreshInternalAutoUpdateLinks () {
- if (Program.internalAutoUpdate = null || !Program.internalAutoUpdate.Enabled) {
+ if (Program.internalAutoUpdate == null || !Program.internalAutoUpdate.Enabled) {
//internal AutoUpdate off
labelInternalAutoUpdateStatus.Text = "Off";
+ linkInternalAutoUpdateUp.Text = "Démarrer";
} else {
//internal AutoUpdate on
labelInternalAutoUpdateStatus.Text = "On";
+ linkInternalAutoUpdateUp.Text = "Arrêter";
}
- labelStatutAutoUpdateServiceResult.Text = "Pause en cours";
- linkLabelServicePauseContinue.Tag = "Continue";
- linkLabelServicePlayStop.Tag = "Stop";
}
#endregion
#region Page Rebuild index
/// <summary>
/// Handles the Click event of the buttonStartRebuildIndex control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void buttonStartRebuildIndex_Click (object sender, EventArgs e) {
//If we don't have any folder watched, alert the user he's going to destroy index
if (Program.options.FoldersToWatch.Length == 0) {
DialogResult result = MessageBox.Show(
"Vous vous apprêtez à détruire l'intégralité de votre index.\n\nVous n'avez défini aucun dossier en vue d'une réindexation.\n\nConfirmez-vous cette ordre de totale destruction de l'index ?",
"Confirmation avant auto-destruction",
MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2
);
if (result == DialogResult.No) {
//No ? We cancel
return;
}
}
//Rebuild index
try {
RebuildIndex();
} catch (Exception ex) {
MessageBox.Show(
String.Format(
"L'index n'a pu être correctement regénéré.\n\nException : {0}\n\n{1}Nous vous invitons à signaler ce bug sur http://bugzilla.espace-win.org/",
ex.Message,
Program.options.DebugMode ? ex.StackTrace + "\n\n" : ""
),
"Erreur durant l'indexation", MessageBoxButtons.OK, MessageBoxIcon.Stop
);
}
}
/// <summary>
/// Rebuilds the index.
/// </summary>
private void RebuildIndex () {
//Start
buttonStartRebuildIndex.Enabled = false;
progressBarRebuild.Visible = true;
List<string> FilesToIndex = new List<string>();
//Let's go
foreach (string folder in Program.options.FoldersToWatch) {
//get the audio file contained in each folder to watch
FilesToIndex.AddRange(GetAudioFiles(folder, true));
}
//Now, we've to index all those file
if (Program.databaseUpdate == null) Program.databaseUpdate = new DatabaseUpdate(Program.options.ConnectionString);
Program.databaseUpdate.TruncateIndex();
for (int i = 0 ; i < FilesToIndex.Count ; i++) {
//Add file to index
Program.databaseUpdate.AddFile(FilesToIndex[i]);
//Update progress bar
progressBarRebuild.Value = (i + 1) * 100 / FilesToIndex.Count;
}
//End
buttonStartRebuildIndex.Enabled = true;
progressBarRebuild.Visible = false;
}
/// <summary>
/// Gets the audio files contained in specified folders.
/// </summary>
/// <param name="folder">The folder.</param>
/// <param name="recursive">if set to <c>true</c> get also audio files in subfolders.</param>
/// <returns>List of audio files</returns>
private List<string> GetAudioFiles (string folder, bool recursive) {
List<string> files = new List<string>();
foreach (string file in Directory.GetFiles(folder)) {
if (Program.options.isExtensionWatched(Path.GetExtension(file))) {
files.Add(file);
}
}
if (recursive) {
foreach (string subfolder in Directory.GetDirectories(folder)) {
files.AddRange(GetAudioFiles(subfolder, true));
}
}
return files;
}
#endregion
#region Page Config
/// <summary>
/// Handles the Enter event of the tabPageConfig control.
/// Set available options page and fill controls from our options
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void tabPageConfig_Enter (object sender, EventArgs e) {
listBoxOptions.Items.Clear();
listBoxOptions.Items.AddRange(new object[] {
GetPageOption(AvailablePageOption.General),
GetPageOption(AvailablePageOption.Directories),
GetPageOption(AvailablePageOption.Extensions),
GetPageOption(AvailablePageOption.ID3),
GetPageOption(AvailablePageOption.Database),
GetPageOption(AvailablePageOption.Queries),
});
}
/// <summary>
/// Met à jour la zone des options du tab AutoUpdate
/// </summary>
private void RefreshOptionsArea () {
//Page General
checkBoxDebugMode.Checked = Program.options.DebugMode;
checkBoxDeleteTunesIfOrphans.Checked = Program.options.DeleteTunesIfOrphans;
//Page Database
textBoxConnectionString.Text = Program.options.ConnectionString;
//Page Directories
checkedListBoxFolders.Items.AddRange(Program.options.FoldersToWatch);
//Page Extensions
//Page ID3
//Page Queries
}
/// <summary>
/// Handles the SelectedIndexChanged event of the listBoxOptions control.
/// Show the correct control in right area
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void listBoxOptions_SelectedIndexChanged (object sender, EventArgs e) {
ListBox listBox = (ListBox)sender;
//Clear current option control
splitContainer1.Panel2.Controls.Clear();
//Set the new control
PageOption pageOption = (PageOption)listBox.SelectedItem;
splitContainer1.Panel2.Controls.Add(pageOption.ControlToShow);
}
/// <summary>
/// Option page description
/// </summary>
private class PageOption {
/// <summary>
/// Initializes a new instance of the <see cref="T:PageOption"/> class.
/// </summary>
/// <param name="title">The title.</param>
/// <param name="controlToShow">The control to show.</param>
public PageOption (string title, Control controlToShow) {
Title = title;
ControlToShow = controlToShow;
}
/// <summary>
/// Initializes a new instance of the <see cref="T:PageOption"/> class.
/// </summary>
public PageOption () {
}
/// <summary>
/// Title of the option page
/// </summary>
public string Title;
/// <summary>
/// Control to show in the right area
/// </summary>
public Control ControlToShow;
/// <summary>
/// Returns the title of the option page.
/// </summary>
/// <returns>
/// A <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
/// </returns>
public override string ToString () {
return Title;
}
}
/// <summary>
/// Options page
/// </summary>
private enum AvailablePageOption {
/// <summary>
/// Main options - Options générales
/// </summary>
General,
/// <summary>
/// Extensions
/// </summary>
Extensions,
/// <summary>
/// Directories to watch - Répertoires à surveiller
/// </summary>
Directories,
/// <summary>
/// ID3v1/ID3v2 tags
/// </summary>
ID3,
/// <summary>
/// Database (MySQL config)
/// </summary>
Database,
/// <summary>
/// SQL Queries - Requêtes SQL
/// </summary>
Queries
}
/// <summary>
/// Gets the page option informations.
/// </summary>
/// <param name="aPageOption">An available page option.</param>
/// <exception cref="T:System.ArgumentException">Throw if aPageOption is not defined</exception>
/// <returns>Instance of PageOption with correct title and control to show</returns>
private PageOption GetPageOption (AvailablePageOption aPageOption) {
PageOption pageOption = new PageOption();
#region switch définissant pageOption.Title et pageOption.ControlToShow
switch (aPageOption) {
case AvailablePageOption.Database:
pageOption.Title = "Serveur MySQL";
pageOption.ControlToShow = panelConfigDatabase;
break;
case AvailablePageOption.Directories:
pageOption.Title = "Dossiers à surveiller";
pageOption.ControlToShow = tableLayoutPanelConfigDirectories;
break;
case AvailablePageOption.Extensions:
pageOption.Title = "Extensions audio/vidéo";
pageOption.ControlToShow = labelNotYetDefinedPanel;
break;
case AvailablePageOption.General:
pageOption.Title = "Options générales";
pageOption.ControlToShow = panelConfigMainOptions;
break;
case AvailablePageOption.ID3:
pageOption.Title = "Tags ID3";
pageOption.ControlToShow = labelNotYetDefinedPanel;
break;
case AvailablePageOption.Queries:
pageOption.Title = "Requêtes SQL";
pageOption.ControlToShow = labelNotYetDefinedPanel;
break;
default:
throw new ArgumentException("This option page must be defined in MainForm.GetPageOption(aPageOption) method.");
}
#endregion
return pageOption;
}
#endregion
#region Page Config :: Paramètres MySQL
/// <summary>
/// Handles the Click event of the buttonApplyMySQLParameters control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void buttonApplyMySQLParameters_Click (object sender, EventArgs e) {
#region StringBuilder ConnectionString
StringBuilder sb = new StringBuilder();
//Host
if (textBoxMySQLHost.Text.Length == 0) {
textBoxMySQLHost.Text = "localhost";
}
sb.Append("Server=");
sb.Append(textBoxMySQLHost.Text);
//Port
if (textBoxMySQLPort.Text.Length > 0) {
//TODO : check if parameter name Port is correct
sb.Append(";Port=");
sb.Append(textBoxMySQLPort.Text);
}
//Login
if (textBoxMySQLLogin.Text.Length == 0) {
textBoxMySQLLogin.Text = "root";
}
sb.Append(";Uid=");
sb.Append(textBoxMySQLLogin.Text);
//Pass
if (textBoxMySQLPassword.Text.Length > 0) {
sb.Append(";Pwd=");
sb.Append(textBoxMySQLPassword.Text);
}
//Database
sb.Append(";Database=");
sb.Append(textBoxMySQLDatabase.Text);
#endregion
//Ok, our string is built, let's apply it
textBoxConnectionString.Text = Program.options.ConnectionString = sb.ToString();
//If database is omitted, user must append the string. Let's notice him
if (textBoxMySQLDatabase.Text.Length == 0) {
MessageBox.Show(
"La chaîne de connexion se termine actuellement par DataBase=\n\nAjoutez le nom de la base de données contenant l'index.",
"ConnectionString incomplète",
MessageBoxButtons.OK,
MessageBoxIcon.Warning
);
}
}
/// <summary>
/// Handles the TextChanged event of the textBoxConnectionString control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void textBoxConnectionString_TextChanged (object sender, EventArgs e) {
TextBox textBox = (TextBox)sender;
Program.options.ConnectionString = textBox.Text;
OptionsHasBeenModified = true;
}
/// <summary>
/// Handles the Click event of the buttonProbeConnect control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
private void buttonProbeConnect_Click (object sender, EventArgs e) {
ProbeMySqlConnectionForm frm = new ProbeMySqlConnectionForm(Program.options.ConnectionString);
frm.ShowDialog();
}
#endregion
}
}
\ No newline at end of file
diff --git a/Sycorax Control Center/Sycorax Control Center.csproj b/Sycorax Control Center/Sycorax Control Center.csproj
index 54e230b..c0ea8a0 100644
--- a/Sycorax Control Center/Sycorax Control Center.csproj
+++ b/Sycorax Control Center/Sycorax Control Center.csproj
@@ -1,105 +1,101 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<RootNamespace>Sycorax.ControlCenter</RootNamespace>
<AssemblyName>Sycorax Control Center</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A310DE6D-EC52-43A3-A217-76515C041508}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
- <Reference Include="ColorListBox, Version=1.0.2389.4760, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>.\ColorListBox.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AboutBox1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AboutBox1.Designer.cs">
<DependentUpon>AboutBox1.cs</DependentUpon>
</Compile>
<Compile Include="InternalAutoUpdate.cs" />
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="ProbeMySqlConnectionForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ProbeMySqlConnectionForm.Designer.cs">
<DependentUpon>ProbeMySqlConnectionForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AboutBox1.resx">
<SubType>Designer</SubType>
<DependentUpon>AboutBox1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<SubType>Designer</SubType>
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ProbeMySqlConnectionForm.resx">
<SubType>Designer</SubType>
<DependentUpon>ProbeMySqlConnectionForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Sycorax Auto Update\Sycorax Auto Update.csproj">
<Project>{63F94995-792D-44F7-86BB-E3C4DE4DA109}</Project>
<Name>Sycorax Auto Update</Name>
</ProjectReference>
<ProjectReference Include="..\Sycorax Library\Sycorax Library.csproj">
<Project>{F44648CC-244D-4FE8-A8B4-6629209EFBE6}</Project>
<Name>Sycorax Library</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="UI\powered-by-mysql-125x64.png" />
</ItemGroup>
<ItemGroup>
<None Include="UI\add.gif" />
</ItemGroup>
<ItemGroup>
<Content Include="UI\Icon1.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>
\ No newline at end of file
diff --git a/Sycorax Library/DatabaseUpdate.cs b/Sycorax Library/DatabaseUpdate.cs
index 758155d..f6672a1 100644
--- a/Sycorax Library/DatabaseUpdate.cs
+++ b/Sycorax Library/DatabaseUpdate.cs
@@ -1,315 +1,341 @@
/*
* (c) Sébastien Santoro aka Dereckson, 2006, tous droits réservés
*
* Date: 13/07/2006
* Time: 20:09
*
*/
using System;
using ID3COM;
using System.IO;
using MySql.Data.MySqlClient;
using System.Text.RegularExpressions;
namespace Sycorax {
/// <summary>
/// Mise à jour de la base de données
/// </summary>
public class DatabaseUpdate : IDisposable {
public DatabaseUpdate (string connectionString) {
//TODO : initalisation connexion MySQL à partir des préférences
conn = new MySqlConnection(connectionString);
conn.Open();
}
MySqlConnection conn;
-
+
/// <summary>
/// Parses the file properties.
/// </summary>
/// <param name="file">The file to analyze.</param>
/// <returns>Instance of TuneToIndex containing file properties</returns>
public TuneToIndex ParseProperties (string fileName) {
TuneToIndex tune = new TuneToIndex();
tune.Path = Path.GetFullPath(fileName);
-
+
//This is temporary code for Megalo, a sample of logic to parse filename
//In release version, of course, we should read global and local preferences to know how to read filename
string nom = Path.GetFileNameWithoutExtension(fileName);
//Recherche de ()
Match match = Regex.Match(fileName, @"\(.*\)");
if (match.Success) {
//On prend l'intérieur des () en commentaire
tune.Comment = match.Value.Substring(1, match.Length - 2);
//Et on l'efface du nom
nom = nom.Replace(match.Value, "").Trim();
}
//Le nom contient-il un tiret ?
if (nom.Contains("-")) {
string[] morceau = nom.Split(new char[1] { '-' }, 2, StringSplitOptions.RemoveEmptyEntries);
if (morceau.Length == 1) {
//Euh le tiret n'était précédé ou suivi de rien :/
tune.Title = morceau[0];
} else {
//Et voici le cas normal :)
tune.By = morceau[0];
tune.Title = morceau[1];
}
} else {
//Titre
tune.Title = nom;
}
return tune;
}
/// <summary>
/// Revérifie les propriétés d'un fichier (tags idv3, durée) qui vient d'être modifié
/// </summary>
/// <param name="file">fichier modifié</param>
public void RecheckProperties (string file) {
//ID3ComTagClass Tag = id3lib.GetTag(file);
Log(String.Format("File updated: {0}", file));
}
/// <summary>
/// Ajoute un nouveau fichier
/// </summary>
/// <param name="file">fichier à ajouter</param>
public void AddFile (string file) {
+ //We ignore directories
+ if (Directory.Exists(file)) return;
+
TuneToIndex tune = ParseProperties(file);
string sql; MySqlCommand cmd;
int TuneID;
-
//1 - add tune if needed and get its ID
if (IsTuneExists(tune)) {
TuneID = GetTuneID(tune);
} else {
sql = String.Format(
@"INSERT INTO Tunes (tune_by, tune_title, tune_comment)
VALUES ('{0}', '{1}', '{2}')",
SqlEscape(tune.By),
SqlEscape(tune.Title),
SqlEscape(tune.Comment)
);
cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
cmd.Dispose();
TuneID = LastInsertID();
-
+
Log(String.Format("Tune added: {0} [#{1}]", tune, TuneID));
}
//2 - add file
sql = String.Format(
"INSERT INTO Files (file_path, tune_id) VALUES ('{0}', '{1}')",
SqlEscape(tune.Path),
TuneID
);
Log(String.Format("File added: {0}", file));
cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
cmd.Dispose();
}
/// <summary>
/// Determines whether the specified tune exists.
/// </summary>
/// <param name="tune">The tune.</param>
/// <returns>
/// <c>true</c> if [is tune exists] [the specified tune]; otherwise, <c>false</c>.
/// </returns>
private bool IsTuneExists (TuneToIndex tune) {
string sql = String.Format(
@"SELECT count(*) FROM Tunes
WHERE tune_by = '{0}' AND tune_title = '{1}' AND tune_comment = '{2}'",
SqlEscape(tune.By),
SqlEscape(tune.Title),
SqlEscape(tune.Comment)
);
MySqlCommand cmd = new MySqlCommand(sql, conn);
cmd = new MySqlCommand(sql, conn);
MySqlDataReader reader = cmd.ExecuteReader();
reader.Read();
int count = reader.GetInt32(0);
reader.Close();
cmd.Dispose();
//Si count(*) = 1, nous renvoyons true, sinon false
return (count > 0);
}
/// <summary>
/// Gets the tune ID.
/// </summary>
/// <param name="tune">The tune to find.</param>
/// <returns>The tune ID</returns>
private int GetTuneID (TuneToIndex tune) {
string sql = String.Format(
@"SELECT tune_id FROM Tunes
WHERE tune_by = '{0}' AND tune_title = '{1}' AND tune_comment = '{2}'",
SqlEscape(tune.By),
SqlEscape(tune.Title),
SqlEscape(tune.Comment)
);
MySqlCommand cmd = new MySqlCommand(sql, conn);
MySqlDataReader reader = cmd.ExecuteReader();
reader.Read();
int id = reader.GetInt32(0);
reader.Close();
cmd.Dispose();
return id;
}
/// <summary>
/// Supprime un fichier
/// </summary>
/// <param name="file">fichier à supprimer</param>
/// <param name="deleteTuneIfOrphan">supprime également le morceau si celui-ci est orphelin</param>
public void DelFile (string file, bool deleteTuneIfOrphan) {
int TuneID = -1;
string sql; MySqlCommand cmd;
string filepath = SqlEscape(Path.GetFullPath(file));
if (deleteTuneIfOrphan) {
//Before delete the record, we've to get TuneID
sql = String.Format(
"SELECT tune_id FROM Files WHERE file_path LIKE '{0}'",
filepath
);
cmd = new MySqlCommand(sql, conn);
MySqlDataReader reader = cmd.ExecuteReader();
reader.Read();
TuneID = reader.GetInt32(0);
reader.Close();
cmd.Dispose();
}
//Delete file
sql = String.Format(
"DELETE FROM Files WHERE file_path LIKE '{0}'",
filepath
);
cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
Log(String.Format("File deleted: {0}", file));
if (deleteTuneIfOrphan) {
//Is this tune really orphan ?
sql = "SELECT count(*) FROM Files WHERE tune_id = " + TuneID;
cmd = new MySqlCommand(sql, conn);
MySqlDataReader reader = cmd.ExecuteReader();
reader.Read();
int howMany = reader.GetInt32(0);
reader.Close();
cmd.Dispose();
-
+
if (howMany == 0) {
//Yes, so we can really delete it :
sql = "DELETE FROM Tunes WHERE tune_id = " + TuneID;
cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
Log(String.Format("Orphan tune #{0} has been deleted", TuneID));
}
}
}
/// <summary>
/// Met à jour le path d'un fichier déplacé ou renommé
/// </summary>
/// <param name="oldPath">ancien path</param>
/// <param name="newPath">nouveau path</param>
public void MoveFile (string oldPath, string newPath) {
- //Edit path
- string sql = String.Format(
- "UPDATE Files SET file_path = {0} WHERE file_path LIKE '{1}'",
- SqlEscape(Path.GetFullPath(newPath)),
- SqlEscape(Path.GetFullPath(oldPath))
- );
+ string logEntry, sql;
+
+ if (!Directory.Exists(newPath)) {
+ //A file ? Easy, just one row to update :)
+ sql = String.Format(
+ "UPDATE Files SET file_path = '{0}' WHERE file_path LIKE '{1}'",
+ SqlEscape(Path.GetFullPath(newPath)),
+ SqlEscape(Path.GetFullPath(oldPath))
+ );
+ logEntry = String.Format("File moved: {0} -> {1}", oldPath, newPath);
+ } else {
+ /*
+ * Arg ... we've a massive update to do :p
+ * We've to rename d:\oldpath\tune.mp3 into d:\newpath\tune.mp3
+ * - WHERE file_path LIKE '{1}%' selects all files beginning with {1} ie newPath
+ * - new file_path begins with newPath and ends with the filename
+ * = CONCAT(newPath, filename)
+ * = CONCAT('{0}', filename)
+ * = CONCAT('{0}', end of '{1}')
+ * the end of '{1}' is the substring from the character following oldPath
+ * = CONCAT('{0}', SUBSTRING(file_path FROM the character following oldPath)
+ * = CONCAT('{0}', SUBSTRING(file_path FROM LENGTH('{0}') + 1)
+ */
+ sql = String.Format(
+ "UPDATE Files SET file_path = CONCAT('{0}', SUBSTRING(file_path FROM LENGTH('{0}') + 1)) WHERE file_path LIKE '{1}%'",
+ SqlEscape(Path.GetFullPath(newPath)),
+ SqlEscape(Path.GetFullPath(oldPath))
+ );
+ logEntry = String.Format("Directory updated: {0} -> {1}", oldPath, newPath);
+ }
+
MySqlCommand cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
- Log(String.Format("File moved: {0} -> {1}", oldPath, newPath));
+ Log(logEntry);
+
}
#region MySQL functions
/// <summary>
/// Escape a string, sql way.
/// </summary>
/// <param name="toEscape">The string to escape.</param>
/// <returns>The escaped string</returns>
private static string SqlEscape (string toEscape) {
return toEscape.Replace(@"\", @"\\").Replace(@"'", @"\'");
}
/// <summary>
/// Get the last insert ID.
/// </summary>
/// <returns>last insert ID</returns>
private int LastInsertID () {
string sql = "SELECT LAST_INSERT_ID()";
MySqlCommand cmd = new MySqlCommand(sql, conn);
MySqlDataReader reader = cmd.ExecuteReader();
reader.Read();
int returnValue = reader.GetInt32(0);
reader.Close();
cmd.Dispose();
return returnValue;
}
#endregion
#region IDisposable Members
public void Dispose () {
conn.Close();
conn.Dispose();
}
#endregion
/// <summary>
/// Truncates the index tables (Files and Tunes).
/// </summary>
public void TruncateIndex () {
//Truntace files table
string sql = "TRUNCATE Files";
MySqlCommand cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
Log("Tables Files has been truncated.");
//Truntace tunes table
sql = "TRUNCATE Tunes";
cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
Log("Tables Tunes has been truncated.");
}
+ #region Properties
private bool printConsoleOutput;
/// <summary>
- /// Gets or sets a value indicating whether database update has to be logged in console.
+ /// Gets or sets a value indicating whether database update had to be logged in console.
/// </summary>
/// <value><c>true</c> if we've to produce console output ; otherwise, <c>false</c>.</value>
public bool PrintConsoleOutput {
- get {
- return printConsoleOutput;
- }
- set {
- printConsoleOutput = value;
- }
+ get { return printConsoleOutput; }
+ set { printConsoleOutput = value; }
}
+ #endregion
/// <summary>
/// Logs a message
/// </summary>
/// <param name="message">message to log</param>
public void Log (string message) {
string time = DateTime.Now.ToLongTimeString();
if (printConsoleOutput) {
Console.WriteLine("[{0}] {1}", time, message);
}
}
}
-}
+}
\ No newline at end of file
diff --git a/Sycorax Library/SurveillanceDossiers.cs b/Sycorax Library/SurveillanceDossiers.cs
index 4895eb5..40f826e 100644
--- a/Sycorax Library/SurveillanceDossiers.cs
+++ b/Sycorax Library/SurveillanceDossiers.cs
@@ -1,48 +1,49 @@
/*
* (c) Sébastien Santoro aka Dereckson, 2006, tous droits réservés
*
* Date: 13/07/2006
* Time: 19:58
*
*/
using System;
using System.IO;
namespace Sycorax {
/// <summary>
/// Description of Surveillance.
/// </summary>
public class SurveillanceDossiers : IDisposable {
/// <summary>
/// Initialise une nouvelle surveillance de dossiers
/// </summary>
/// <param name="path">dossier à surveiller</param>
/// <param name="databaseUpdate">Database update component.</param>
public SurveillanceDossiers (string path, DatabaseUpdate databaseUpdate) {
watcher = new FileSystemWatcher(path);
watcher.EnableRaisingEvents = true;
+ //watcher.Filter
watcher.Changed += delegate(object sender, FileSystemEventArgs e) { databaseUpdate.RecheckProperties(e.FullPath); };
watcher.Created += delegate(object sender, FileSystemEventArgs e) { databaseUpdate.AddFile(e.FullPath); };
watcher.Deleted += delegate(object sender, FileSystemEventArgs e) { databaseUpdate.DelFile(e.FullPath, false); };
watcher.Error += delegate(object sender, ErrorEventArgs e) {Error(this, new ExceptionEventArgs(e.GetException())); };
watcher.Renamed += delegate(object sender, RenamedEventArgs e) { databaseUpdate.MoveFile(e.OldFullPath, e.FullPath); };
}
private FileSystemWatcher watcher;
/// <summary>
/// Occurs when the internal buffer overflows.
/// </summary>
public event EventHandler<ExceptionEventArgs> Error;
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose () {
watcher.Dispose();
}
}
}
\ No newline at end of file
diff --git a/Sycorax Library/Sycorax Library.csproj b/Sycorax Library/Sycorax Library.csproj
index 40d648a..099963d 100644
--- a/Sycorax Library/Sycorax Library.csproj
+++ b/Sycorax Library/Sycorax Library.csproj
@@ -1,53 +1,59 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>Sycorax</RootNamespace>
<AssemblyName>Sycorax Library</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F44648CC-244D-4FE8-A8B4-6629209EFBE6}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Interop.ID3COM, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>.\Interop.ID3COM.dll</HintPath>
- </Reference>
<Reference Include="MySql.Data, Version=5.0.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="MessageEventArgs.cs" />
<Compile Include="ExceptionEventArgs.cs" />
<Compile Include="DatabaseUpdate.cs" />
<Compile Include="id3lib.cs" />
<Compile Include="ProbeMySqlConnection.cs" />
<Compile Include="SurveillanceDossiers.cs" />
<Compile Include="TuneToIndex.cs" />
<Compile Include="Options\MainOptions.cs" />
</ItemGroup>
+ <ItemGroup>
+ <COMReference Include="ID3COM">
+ <Guid>{AEBA98B0-C36C-11D3-841B-0008C782A257}</Guid>
+ <VersionMajor>1</VersionMajor>
+ <VersionMinor>0</VersionMinor>
+ <Lcid>0</Lcid>
+ <WrapperTool>tlbimp</WrapperTool>
+ <Isolated>False</Isolated>
+ </COMReference>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 1, 17:51 (12 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3121660
Default Alt Text
(150 KB)

Event Timeline