UpgradeSelectionDlg : Cutom button with an action that is commented out, ver. 2.26.1555
This commit is contained in:
parent
18506390fa
commit
de0b84076f
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.26.1554.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1554.0")]
|
||||
[assembly: AssemblyVersion("2.26.1555.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1555.0")]
|
||||
|
||||
13
TBF/UI/Settings/UpgradeSelectionDlg.Designer.cs
generated
13
TBF/UI/Settings/UpgradeSelectionDlg.Designer.cs
generated
@ -48,6 +48,7 @@
|
||||
this.errorFlagsComponentsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.upgradeDb_225_226_Button = new System.Windows.Forms.Button();
|
||||
this.customButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// upgradeDb_215_216_Button
|
||||
@ -248,11 +249,22 @@
|
||||
this.upgradeDb_225_226_Button.UseVisualStyleBackColor = true;
|
||||
this.upgradeDb_225_226_Button.Click += new System.EventHandler(this.upgradeDb_225_226_Button_Click);
|
||||
//
|
||||
// customButton
|
||||
//
|
||||
this.customButton.Location = new System.Drawing.Point(216, 14);
|
||||
this.customButton.Name = "customButton";
|
||||
this.customButton.Size = new System.Drawing.Size(56, 37);
|
||||
this.customButton.TabIndex = 20;
|
||||
this.customButton.Text = "Custom";
|
||||
this.customButton.UseVisualStyleBackColor = true;
|
||||
this.customButton.Click += new System.EventHandler(this.customButton_Click);
|
||||
//
|
||||
// UpgradeSelectionDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 597);
|
||||
this.Controls.Add(this.customButton);
|
||||
this.Controls.Add(this.upgradeDb_225_226_Button);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.errorFlagsComponentsTextBox);
|
||||
@ -302,6 +314,7 @@
|
||||
private System.Windows.Forms.TextBox errorFlagsComponentsTextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button upgradeDb_225_226_Button;
|
||||
private System.Windows.Forms.Button customButton;
|
||||
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ using NHibernate;
|
||||
using Results;
|
||||
using Results.Entities;
|
||||
using TBF.Resources;
|
||||
using System.Text;
|
||||
|
||||
namespace TBF.UI.Settings
|
||||
{
|
||||
@ -1041,5 +1042,56 @@ namespace TBF.UI.Settings
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void customButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ActivityStart();
|
||||
|
||||
try
|
||||
{
|
||||
//ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
|
||||
//var proceduresToModify = session.QueryOver<Config.Entities.Procedure>()
|
||||
// .Where(x => (x.ProcedureState == Config.Entities.ProcedureState.Active))
|
||||
// .OrderBy(x => x.ItemNr).Asc
|
||||
// .List<Config.Entities.Procedure>();
|
||||
|
||||
//foreach (var proc in proceduresToModify)
|
||||
//{
|
||||
// if (!string.IsNullOrEmpty(proc.ResultsWriter) && proc.ResultsWriter.Contains("IperlLogger"))
|
||||
// {
|
||||
// Console.WriteLine("{0} ... {1}", proc.Name, proc.ResultsWriter);
|
||||
// string[] writers = proc.ResultsWriter.Split(new char[] { '~' });
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// for (int i = 0; i < writers.Length; i++)
|
||||
// {
|
||||
// if (writers[i].Contains("IperlLogger"))
|
||||
// {
|
||||
// sb.Append("IperlLogger");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sb.Append(writers[i]);
|
||||
// }
|
||||
|
||||
// if (i != writers.Length - 1) sb.Append("~");
|
||||
// }
|
||||
// proc.ResultsWriter = sb.ToString();
|
||||
|
||||
// session.SaveOrUpdate(proc);
|
||||
// }
|
||||
//}
|
||||
|
||||
//session.Flush();
|
||||
ActivityEnd();
|
||||
MessageBox.Show("Upgrade completed", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
ActivityEnd();
|
||||
MessageBox.Show(string.Format("Upgrade failed:\r\n{0}", exc.Message),
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user