checking in latest
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<ProjectGuid>{1F135F26-23F8-4EA6-B000-9D22FBE1B273}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Report_Runner</RootNamespace>
|
||||
<RootNamespace>Advantage_Final</RootNamespace>
|
||||
<AssemblyName>Report Runner</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
@@ -30,6 +30,10 @@
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
|
||||
@@ -30,7 +30,6 @@ namespace Advantage_Final
|
||||
public string line;
|
||||
public string PracticeFolder;
|
||||
public string oldPath;
|
||||
|
||||
|
||||
public Form1()
|
||||
|
||||
@@ -69,33 +68,6 @@ namespace Advantage_Final
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void exitToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void setPathsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
FilePaths frmFilePaths = new FilePaths();
|
||||
frmFilePaths.ShowDialog();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void InitializeDataComponents()
|
||||
{
|
||||
@@ -113,244 +85,237 @@ namespace Advantage_Final
|
||||
|
||||
}
|
||||
|
||||
#region Click event handlers
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < mPracticeList.Items.Count; i++)
|
||||
/// <summary>
|
||||
/// Select All
|
||||
/// </summary>
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < mPracticeList.Items.Count; i++)
|
||||
|
||||
mPracticeList.SetItemChecked(i, true);
|
||||
}
|
||||
mPracticeList.SetItemChecked(i, true);
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// <summary>
|
||||
/// Copy Reports
|
||||
/// </summary>
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
list.Clear();
|
||||
list.Clear();
|
||||
|
||||
foreach (string item in mPracticeList.CheckedItems)
|
||||
{
|
||||
string value = item;
|
||||
int i = item.IndexOf('{') + 1;
|
||||
string d = Path.Combine(value.Substring(i) + "\\ureports");
|
||||
list.Add(d);
|
||||
foreach (string item in mPracticeList.CheckedItems)
|
||||
{
|
||||
string value = item;
|
||||
int i = item.IndexOf('{') + 1;
|
||||
string d = Path.Combine(value.Substring(i) + "\\ureports");
|
||||
list.Add(d);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
{
|
||||
|
||||
if ((string)Dicks.GetValue("ReportFolder") == null)
|
||||
{
|
||||
reportFileDialog1.InitialDirectory = @"C:\";
|
||||
}
|
||||
else
|
||||
{
|
||||
reportFileDialog1.InitialDirectory = ((string)Dicks.GetValue("ReportFolder"));
|
||||
}
|
||||
if ((string)Dicks.GetValue("ReportFolder") == null)
|
||||
{
|
||||
reportFileDialog1.InitialDirectory = @"C:\";
|
||||
}
|
||||
else
|
||||
{
|
||||
reportFileDialog1.InitialDirectory = ((string)Dicks.GetValue("ReportFolder"));
|
||||
}
|
||||
|
||||
DialogResult result = reportFileDialog1.ShowDialog();
|
||||
Class1.ReportName = System.IO.Path.GetFileNameWithoutExtension(reportFileDialog1.FileName);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
foreach (String file in reportFileDialog1.FileNames)
|
||||
{
|
||||
foreach (string item in list)
|
||||
{
|
||||
try
|
||||
{
|
||||
DialogResult result = reportFileDialog1.ShowDialog();
|
||||
Class1.ReportName = System.IO.Path.GetFileNameWithoutExtension(reportFileDialog1.FileName);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
foreach (String file in reportFileDialog1.FileNames)
|
||||
{
|
||||
foreach (string item in list)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string otherFile = Path.Combine(item, Path.GetFileName(file));
|
||||
File.Copy(file, otherFile, true);
|
||||
}
|
||||
catch (UnauthorizedAccessException )
|
||||
{
|
||||
MessageBox.Show("Fix your fucking permissions");
|
||||
}
|
||||
string otherFile = Path.Combine(item, Path.GetFileName(file));
|
||||
File.Copy(file, otherFile, true);
|
||||
}
|
||||
catch (UnauthorizedAccessException )
|
||||
{
|
||||
MessageBox.Show("Fix your fucking permissions");
|
||||
}
|
||||
|
||||
catch (IOException)
|
||||
{
|
||||
MessageBox.Show("This shit doesn't exist" + item);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
MessageBox.Show("This shit doesn't exist" + item);
|
||||
}
|
||||
|
||||
catch (Exception)
|
||||
{
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// <summary>
|
||||
/// Run Report
|
||||
/// </summary>
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
list.Clear();
|
||||
list.Clear();
|
||||
|
||||
foreach (string item in mPracticeList.CheckedItems)
|
||||
{
|
||||
string value = item;
|
||||
int i = item.IndexOf('{') + 1;
|
||||
string d = Path.Combine(value.Substring(i) + "\\mwddf.add");
|
||||
list.Add(d);
|
||||
foreach (string item in mPracticeList.CheckedItems)
|
||||
{
|
||||
string value = item;
|
||||
int i = item.IndexOf('{') + 1;
|
||||
string d = Path.Combine(value.Substring(i) + "\\mwddf.add");
|
||||
list.Add(d);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
{
|
||||
|
||||
if ((string)Dicks.GetValue("ReportFolder") == null)
|
||||
{
|
||||
reportFileDialog1.InitialDirectory = @"C:\";
|
||||
}
|
||||
else
|
||||
{
|
||||
reportFileDialog1.InitialDirectory = ((string)Dicks.GetValue("ReportFolder"));
|
||||
}
|
||||
if ((string)Dicks.GetValue("ReportFolder") == null)
|
||||
{
|
||||
reportFileDialog1.InitialDirectory = @"C:\";
|
||||
}
|
||||
else
|
||||
{
|
||||
reportFileDialog1.InitialDirectory = ((string)Dicks.GetValue("ReportFolder"));
|
||||
}
|
||||
|
||||
DialogResult result = reportFileDialog1.ShowDialog();
|
||||
DialogResult result = reportFileDialog1.ShowDialog();
|
||||
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
|
||||
using (StreamReader sr = new StreamReader(reportFileDialog1.FileName))
|
||||
{
|
||||
using (StreamReader sr = new StreamReader(reportFileDialog1.FileName))
|
||||
{
|
||||
|
||||
line = sr.ReadToEnd();
|
||||
line = sr.ReadToEnd();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string item in list)
|
||||
{
|
||||
foreach (string item in list)
|
||||
{
|
||||
|
||||
{
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
oldPath = item.Replace("\\mwddf.add", "");
|
||||
int i1 = oldPath.LastIndexOf('\\');
|
||||
string newPracticeName = oldPath.Substring(i1);
|
||||
AdsConnection conn = new AdsConnection();
|
||||
conn.ConnectionString = "Data Source=" + item +
|
||||
oldPath = item.Replace("\\mwddf.add", "");
|
||||
int i1 = oldPath.LastIndexOf('\\');
|
||||
string newPracticeName = oldPath.Substring(i1);
|
||||
AdsConnection conn = new AdsConnection();
|
||||
conn.ConnectionString = "Data Source=" + item +
|
||||
";User ID=user;Password=password;" +
|
||||
"ServerType=REMOTE|LOCAL;TrimTrailingSpaces=True";
|
||||
AdsDataAdapter da = new AdsDataAdapter(line, conn);
|
||||
DataSet ds = new DataSet();
|
||||
da.SelectCommand.CommandTimeout = 0;
|
||||
da.Fill(ds, "Dick");
|
||||
DataTable dt = ds.Tables[0];
|
||||
string filepath = (string)Dicks.GetValue("ReportOutput", "");
|
||||
da.Dispose();
|
||||
AdsDataAdapter da = new AdsDataAdapter(line, conn);
|
||||
DataSet ds = new DataSet();
|
||||
da.SelectCommand.CommandTimeout = 0;
|
||||
da.Fill(ds, "Dick");
|
||||
DataTable dt = ds.Tables[0];
|
||||
string filepath = (string)Dicks.GetValue("ReportOutput", "");
|
||||
da.Dispose();
|
||||
|
||||
|
||||
conn.Open();
|
||||
AdsDataReader reader;
|
||||
AdsCommand PracticeName = conn.CreateCommand();
|
||||
PracticeName.CommandText = "SELECT [Practice Name] FROM [MWPRA]";
|
||||
conn.Open();
|
||||
AdsDataReader reader;
|
||||
AdsCommand PracticeName = conn.CreateCommand();
|
||||
PracticeName.CommandText = "SELECT [Practice Name] FROM [MWPRA]";
|
||||
|
||||
|
||||
reader = PracticeName.ExecuteReader();
|
||||
reader = PracticeName.ExecuteReader();
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
|
||||
PracticeFolder = reader.GetString(0);
|
||||
PracticeFolder = reader.GetString(0);
|
||||
|
||||
|
||||
|
||||
}
|
||||
dt.Columns.Add("Practice", typeof(string));
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
dr["Practice"] = PracticeFolder;
|
||||
}
|
||||
conn.Close();
|
||||
AdsConnection.FlushConnectionPool();
|
||||
}
|
||||
dt.Columns.Add("Practice", typeof(string));
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
dr["Practice"] = PracticeFolder;
|
||||
}
|
||||
conn.Close();
|
||||
AdsConnection.FlushConnectionPool();
|
||||
|
||||
string ReportExportPath1 = (Path.Combine((string)Dicks.GetValue("ReportOutput", "")));
|
||||
//string ReportExportPath1 = (Path.Combine((string)Dicks.GetValue("ReportOutput", "") + newPracticeName));
|
||||
string ReportExportPath = ReportExportPath1.TrimEnd('\\');
|
||||
bool exists = System.IO.Directory.Exists(ReportExportPath);
|
||||
string ReportExportPath1 = (Path.Combine((string)Dicks.GetValue("ReportOutput", "")));
|
||||
//string ReportExportPath1 = (Path.Combine((string)Dicks.GetValue("ReportOutput", "") + newPracticeName));
|
||||
string ReportExportPath = ReportExportPath1.TrimEnd('\\');
|
||||
bool exists = System.IO.Directory.Exists(ReportExportPath);
|
||||
|
||||
if (!exists)
|
||||
System.IO.Directory.CreateDirectory(ReportExportPath);
|
||||
if (!exists)
|
||||
System.IO.Directory.CreateDirectory(ReportExportPath);
|
||||
|
||||
// String rFilePath = (ReportExportPath + "\\" + Path.GetFileNameWithoutExtension(reportFileDialog1.FileName) + ".xlsx");
|
||||
String rFilePath = (ReportExportPath + "\\" + "Test" + ".xlsx");
|
||||
// String rFilePath = (ReportExportPath + "\\" + Path.GetFileNameWithoutExtension(reportFileDialog1.FileName) + ".xlsx");
|
||||
String rFilePath = (ReportExportPath + "\\" + "Test" + ".xlsx");
|
||||
|
||||
dt.ExportToExcel(rFilePath);
|
||||
dt.Dispose();
|
||||
ds.Dispose();
|
||||
conn.Close();
|
||||
dt.ExportToExcel(rFilePath);
|
||||
dt.Dispose();
|
||||
ds.Dispose();
|
||||
conn.Close();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
|
||||
string LogPath = ((Path.Combine((string)Dicks.GetValue("ReportOutput", "") + "\\" + "log.txt")));
|
||||
bool fileExists = File.Exists(LogPath);
|
||||
using (StreamWriter sw = File.AppendText(LogPath))
|
||||
{
|
||||
sw.WriteLine("");
|
||||
sw.WriteLine(ex);
|
||||
sw.WriteLine("");
|
||||
sw.WriteLine(oldPath);
|
||||
string LogPath = ((Path.Combine((string)Dicks.GetValue("ReportOutput", "") + "\\" + "log.txt")));
|
||||
bool fileExists = File.Exists(LogPath);
|
||||
using (StreamWriter sw = File.AppendText(LogPath))
|
||||
{
|
||||
sw.WriteLine("");
|
||||
sw.WriteLine(ex);
|
||||
sw.WriteLine("");
|
||||
sw.WriteLine(oldPath);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
MessageBox.Show("All Done");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void mPracticeList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void mPracticeList_SelectedIndexChanged_1(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void openFileDialog1_FileOk_1(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
MessageBox.Show("All Done");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove Selected
|
||||
/// </summary>
|
||||
private void btnClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (int i in mPracticeList.CheckedIndices)
|
||||
{
|
||||
mPracticeList.SetItemCheckState(i,CheckState.Unchecked);
|
||||
mPracticeList.SetItemCheckState(i,CheckState.Unchecked);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Run Script
|
||||
/// </summary>
|
||||
private void btnScript_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -391,8 +356,8 @@ namespace Advantage_Final
|
||||
|
||||
{
|
||||
string connString = "Data Source=" + item +
|
||||
";User ID=user;Password=password;" +
|
||||
"ServerType=REMOTE|LOCAL;TrimTrailingSpaces=True";
|
||||
";User ID=user;Password=password;" +
|
||||
"ServerType=REMOTE|LOCAL;TrimTrailingSpaces=True";
|
||||
|
||||
AdsCommand justQuery = new AdsCommand();
|
||||
justQuery.Connection = new AdsConnection(connString);
|
||||
@@ -413,6 +378,9 @@ namespace Advantage_Final
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ClearforRM
|
||||
/// </summary>
|
||||
private void button3_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
string RMPath = ((string)RMRoot.GetValue("Root Data Path"));
|
||||
@@ -420,7 +388,7 @@ namespace Advantage_Final
|
||||
connection = new AdsConnection();
|
||||
connection.ConnectionString = "Data Source=" + RMPath + "\\CMDBLIST.ADD" +
|
||||
";User ID=user;Password=password" +
|
||||
";ServerType=REMOTE|LOCAL;TrimTrailingSpaces=True";
|
||||
";ServerType=REMOTE|LOCAL;TrimTrailingSpaces=True";
|
||||
AdsDataReader reader;
|
||||
AdsCommand cmd;
|
||||
cmd = connection.CreateCommand();
|
||||
@@ -439,6 +407,9 @@ namespace Advantage_Final
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UpdateRM
|
||||
/// </summary>
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
{
|
||||
list.Clear();
|
||||
@@ -478,8 +449,8 @@ namespace Advantage_Final
|
||||
{
|
||||
{
|
||||
string connString = "Data Source=" + item +
|
||||
";User ID=user;Password=password;" +
|
||||
"ServerType=REMOTE|LOCAL;TrimTrailingSpaces=True";
|
||||
";User ID=user;Password=password;" +
|
||||
"ServerType=REMOTE|LOCAL;TrimTrailingSpaces=True";
|
||||
|
||||
AdsCommand justQuery = new AdsCommand();
|
||||
justQuery.Connection = new AdsConnection(connString);
|
||||
@@ -514,18 +485,60 @@ namespace Advantage_Final
|
||||
|
||||
}
|
||||
|
||||
private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
#endregion
|
||||
|
||||
#region ToolStrip Menu
|
||||
|
||||
private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Options frmOptions = new Options();
|
||||
frmOptions.ShowDialog();
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void setPathsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
FilePaths frmFilePaths = new FilePaths();
|
||||
frmFilePaths.ShowDialog();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region JUNK
|
||||
|
||||
private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void openFileDialog1_FileOk_1(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void mPracticeList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void mPracticeList_SelectedIndexChanged_1(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
135
Report Runner/Advantage Final/Options.Designer.cs
generated
135
Report Runner/Advantage Final/Options.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace Report_Runner
|
||||
namespace Advantage_Final
|
||||
{
|
||||
partial class Options
|
||||
{
|
||||
@@ -28,100 +28,75 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.checkSeparate = new System.Windows.Forms.CheckBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
|
||||
this.lblReportPath = new System.Windows.Forms.Label();
|
||||
this.btnExit = new System.Windows.Forms.Button();
|
||||
this.lblReportOutput = new System.Windows.Forms.Label();
|
||||
this.reportFolder = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.reportOutput = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkedListBox2 = new System.Windows.Forms.CheckedListBox();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// checkSeparate
|
||||
// lblReportPath
|
||||
//
|
||||
this.checkSeparate.AutoSize = true;
|
||||
this.checkSeparate.Location = new System.Drawing.Point(18, 23);
|
||||
this.checkSeparate.Name = "checkSeparate";
|
||||
this.checkSeparate.Size = new System.Drawing.Size(128, 17);
|
||||
this.checkSeparate.TabIndex = 0;
|
||||
this.checkSeparate.Text = "Separate Report Files";
|
||||
this.checkSeparate.UseVisualStyleBackColor = true;
|
||||
this.lblReportPath.AutoSize = true;
|
||||
this.lblReportPath.Location = new System.Drawing.Point(12, 38);
|
||||
this.lblReportPath.Name = "lblReportPath";
|
||||
this.lblReportPath.Size = new System.Drawing.Size(64, 13);
|
||||
this.lblReportPath.TabIndex = 0;
|
||||
this.lblReportPath.Text = "Report Path";
|
||||
//
|
||||
// label1
|
||||
// btnExit
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(15, 64);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(97, 24);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "File Name";
|
||||
this.btnExit.Location = new System.Drawing.Point(683, 383);
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(114, 30);
|
||||
this.btnExit.TabIndex = 1;
|
||||
this.btnExit.Text = "Exit";
|
||||
this.btnExit.UseVisualStyleBackColor = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// checkedListBox1
|
||||
// lblReportOutput
|
||||
//
|
||||
this.checkedListBox1.FormattingEnabled = true;
|
||||
this.checkedListBox1.Items.AddRange(new object[] {
|
||||
"Practice Name",
|
||||
"Report Name"});
|
||||
this.checkedListBox1.Location = new System.Drawing.Point(15, 91);
|
||||
this.checkedListBox1.Name = "checkedListBox1";
|
||||
this.checkedListBox1.Size = new System.Drawing.Size(97, 34);
|
||||
this.checkedListBox1.TabIndex = 3;
|
||||
this.lblReportOutput.AutoSize = true;
|
||||
this.lblReportOutput.Location = new System.Drawing.Point(12, 80);
|
||||
this.lblReportOutput.Name = "lblReportOutput";
|
||||
this.lblReportOutput.Size = new System.Drawing.Size(74, 13);
|
||||
this.lblReportOutput.TabIndex = 2;
|
||||
this.lblReportOutput.Text = "Report Output";
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(166, 91);
|
||||
this.checkBox1.Location = new System.Drawing.Point(384, 66);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(97, 17);
|
||||
this.checkBox1.TabIndex = 4;
|
||||
this.checkBox1.Text = "MonthDayYear";
|
||||
this.checkBox1.Size = new System.Drawing.Size(109, 17);
|
||||
this.checkBox1.TabIndex = 3;
|
||||
this.checkBox1.Text = "Separate Reports";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label2
|
||||
// checkBox2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(133, 105);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(13, 13);
|
||||
this.label2.TabIndex = 5;
|
||||
this.label2.Text = "+";
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(368, 146);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(158, 17);
|
||||
this.checkBox2.TabIndex = 4;
|
||||
this.checkBox2.Text = "Add Mm-DD-YY to file name";
|
||||
this.checkBox2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(15, 139);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(67, 13);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "Folder Name";
|
||||
//
|
||||
// checkedListBox2
|
||||
//
|
||||
this.checkedListBox2.FormattingEnabled = true;
|
||||
this.checkedListBox2.Items.AddRange(new object[] {
|
||||
"Use Report Folder",
|
||||
"Practice Name",
|
||||
"Report Name"});
|
||||
this.checkedListBox2.Location = new System.Drawing.Point(15, 155);
|
||||
this.checkedListBox2.Name = "checkedListBox2";
|
||||
this.checkedListBox2.Size = new System.Drawing.Size(120, 49);
|
||||
this.checkedListBox2.TabIndex = 7;
|
||||
//
|
||||
// Form2
|
||||
// Options
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(371, 261);
|
||||
this.Controls.Add(this.checkedListBox2);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.ClientSize = new System.Drawing.Size(846, 434);
|
||||
this.Controls.Add(this.checkBox2);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.checkedListBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.checkSeparate);
|
||||
this.Name = "Form2";
|
||||
this.Text = "Options";
|
||||
this.Controls.Add(this.lblReportOutput);
|
||||
this.Controls.Add(this.btnExit);
|
||||
this.Controls.Add(this.lblReportPath);
|
||||
this.Name = "Options";
|
||||
this.Text = "Form2";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -129,12 +104,12 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.CheckBox checkSeparate;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.CheckedListBox checkedListBox1;
|
||||
private System.Windows.Forms.Label lblReportPath;
|
||||
private System.Windows.Forms.Button btnExit;
|
||||
private System.Windows.Forms.Label lblReportOutput;
|
||||
private System.Windows.Forms.FolderBrowserDialog reportFolder;
|
||||
private System.Windows.Forms.FolderBrowserDialog reportOutput;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckedListBox checkedListBox2;
|
||||
private System.Windows.Forms.CheckBox checkBox2;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@@ -6,14 +7,96 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
namespace Report_Runner
|
||||
namespace Advantage_Final
|
||||
{
|
||||
public partial class Options : Form
|
||||
{
|
||||
public Options()
|
||||
{
|
||||
InitializeComponent();
|
||||
//textReportOutput.Text = (string)Dicks.GetValue("ReportOutput", "");
|
||||
//textBox1.Text = (string)Dicks.GetValue("ReportFolder", "");
|
||||
|
||||
}
|
||||
|
||||
public RegistryKey Dicks = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\PanaceanTech\\ReportRunner", true);
|
||||
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
//
|
||||
// This event handler was created by double-clicking the window in the designer.
|
||||
// It runs on the program's startup routine.
|
||||
//
|
||||
//DialogResult result = reportFolder.ShowDialog();
|
||||
//if (result == DialogResult.OK)
|
||||
//{
|
||||
// Dicks.SetValue("ReportFolder", reportFolder.SelectedPath);
|
||||
// textBox1.Text = (string)Dicks.GetValue("ReportFolder");
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
}
|
||||
|
||||
private void textBox1_Leave(object sender, EventArgs e)
|
||||
{
|
||||
//if (System.IO.Directory.Exists(textBox1.Text))
|
||||
//{
|
||||
// Dicks.SetValue("ReportFolder", textBox1.Text.TrimEnd('\\'));
|
||||
// textBox1.Text = (string)Dicks.GetValue("ReportFolder");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("Enter a valid path. Quit trying to break shit");
|
||||
// textBox1.Text = "";
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
private void btnOutPath_Click(object sender, EventArgs e)
|
||||
{
|
||||
//DialogResult result = reportOutput.ShowDialog();
|
||||
//if (result == DialogResult.OK)
|
||||
//{
|
||||
// Dicks.SetValue("ReportOutput", reportOutput.SelectedPath);
|
||||
// textReportOutput.Text = (string)Dicks.GetValue("ReportOutput");
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
private void textReportOutput_Leave(object sender, EventArgs e)
|
||||
{
|
||||
//if (System.IO.Directory.Exists(textReportOutput.Text))
|
||||
//{
|
||||
// Dicks.SetValue("ReportOutput", textReportOutput.Text.TrimEnd('\\'));
|
||||
// textReportOutput.Text = (string)Dicks.GetValue("ReportOutput");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("Enter a valid path. Quit trying to break shit");
|
||||
// textBox1.Text = "";
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
private void textReportOutput_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,4 +117,10 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="reportFolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="reportOutput.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>137, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,14 +1,14 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Report_Runner.Properties {
|
||||
namespace Advantage_Final.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Report_Runner.Properties {
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Report_Runner.Properties.Resources", typeof(Resources).Assembly);
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Advantage_Final.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Report_Runner.Properties {
|
||||
namespace Advantage_Final.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
Reference in New Issue
Block a user