Skip to content

Commit

Permalink
revert to revision 298
Browse files Browse the repository at this point in the history
  • Loading branch information
cestradac committed Jun 5, 2008
1 parent d28d97c commit 53e3af8
Show file tree
Hide file tree
Showing 32 changed files with 1,190 additions and 10,303 deletions.
4 changes: 2 additions & 2 deletions code/PTM.Addin.Charts/Properties/AssemblyInfo.cs
Expand Up @@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.4.1")]
[assembly: AssemblyFileVersion("1.4.1")]
[assembly: AssemblyVersion("1.4.0")]
[assembly: AssemblyFileVersion("1.4.0")]
2 changes: 1 addition & 1 deletion code/PTM.Addin.WeekView/AssemblyInfo.cs
Expand Up @@ -26,7 +26,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.4.1")]
[assembly: AssemblyVersion("1.4.0")]

//
// In order to sign your assembly you must specify a key to use. Refer to the
Expand Down
4 changes: 2 additions & 2 deletions code/PTM/Addin/AddinTabPage.cs
Expand Up @@ -85,7 +85,7 @@ public string Status
}


public delegate void StatusChangedDelegate(object sender, StatusChangedEventArgs e);
public delegate void StatusChangedDelegate(StatusChangedEventArgs e);

public event StatusChangedDelegate StatusChanged;

Expand All @@ -94,7 +94,7 @@ protected void OnStatusChanged()
if (this.StatusChanged != null)
{
StatusChangedDelegate del = new StatusChangedDelegate(StatusChanged);
this.Invoke(del, new object[] {this, new StatusChangedEventArgs(status) });
this.Invoke(del, new object[] { new StatusChangedEventArgs(status) });
}
// StatusChanged(new StatusChangedEventArgs(status));
//Application.DoEvents();
Expand Down
2 changes: 1 addition & 1 deletion code/PTM/AssemblyInfo.cs
Expand Up @@ -25,7 +25,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.4.1")]
[assembly: AssemblyVersion("1.4.0")]

//
// In order to sign your assembly you must specify a key to use. Refer to the
Expand Down
6 changes: 1 addition & 5 deletions code/PTM/Framework/ApplicationsLog.cs
Expand Up @@ -337,11 +337,7 @@ private static void JoinLoggingThread()
{
if (loggingThread != null && loggingThread.IsAlive)
{
try
{
loggingThread.Join(100);
}
catch(ThreadStateException){} //catch exception
loggingThread.Join(100);
} //if-else
} //JoinLoggingThread

Expand Down
2 changes: 1 addition & 1 deletion code/PTM/Framework/Helpers/ConfigurationHelper.cs
Expand Up @@ -91,7 +91,7 @@ public static void SaveConfiguration(Configuration configuration)

public static string GetVersionString()
{
return "v. 1.4 RC2";
return "v. 1.4 RC1";
} //GetVersionString

public static string GetInternalVersionString()
Expand Down
23 changes: 0 additions & 23 deletions code/PTM/Framework/Helpers/DBUpdaterHelper.cs
Expand Up @@ -46,8 +46,6 @@ public static void UpdateDataBase()
if (UpdateFromV098ToV099(oldVersion))
continue;
if (UpdateFromV099ToV0910(oldVersion))
continue;
if (UpdateFromV_0_9_10_ToV_1_0_0(oldVersion))
continue;
findNextUpdate = false;
RegisterAddins();
Expand All @@ -73,27 +71,6 @@ private static void RegisterAddins()
}
}

private static bool UpdateFromV_0_9_10_ToV_1_0_0(Configuration oldVersion)
{
if (string.Compare(oldVersion.Value.ToString().Trim(), "0.9.10") == 0)
{
try
{
DbHelper.AddColumn("Tasks", "Hidden", "Bit");
DbHelper.AddColumn("Tasks", "Priority", "Integer");
DbHelper.AddColumn("Tasks", "Notes", "VarChar(255)");
ConfigurationHelper.SaveConfiguration(new Configuration(ConfigurationKey.DataBaseVersion, "1.0.0"));
return true;
}
catch (OleDbException ex)
{
Logger.WriteException(ex);
return false;
}
}
return false;
}

private static bool UpdateFromV099ToV0910(Configuration oldVersion)
{
if (string.Compare(oldVersion.Value.ToString().Trim(), "0.9.9") == 0)
Expand Down
28 changes: 2 additions & 26 deletions code/PTM/Framework/Infos/Task.cs
Expand Up @@ -11,15 +11,12 @@ public class Task : IComparable
{
private int id;
private int parentId;
private string description = String.Empty;
private string description;
private int iconId;
private bool isActive;
private int estimation;
private bool hidden;
private int priority;
private string notes = String.Empty;

public int Id
public int Id
{
get { return id; }
set { id = value; }
Expand Down Expand Up @@ -55,24 +52,6 @@ public int Estimation
set { estimation = value; }
}

public bool Hidden
{
get { return hidden; }
set { hidden = value; }
}

public int Priority
{
get { return priority; }
set { priority = value; }
}

public string Notes
{
get { return notes; }
set { notes = value; }
}

public Task Clone()
{
Task task = new Task();
Expand All @@ -82,9 +61,6 @@ public Task Clone()
task.iconId = this.iconId;
task.isActive = this.isActive;
task.estimation = this.estimation;
task.hidden = this.hidden;
task.priority = this.priority;
task.notes = this.notes;
return task;
}

Expand Down
34 changes: 9 additions & 25 deletions code/PTM/Framework/Tasks.cs
Expand Up @@ -140,17 +140,15 @@ public static void UpdateTask(Task task)
}

DbHelper.ExecuteNonQuery(
"UPDATE Tasks SET Description = ?, IconId = ?, IsActive = ?, ParentId = ?, Estimation = ?, Hidden = ?, Priority = ?, Notes = ? WHERE (Id = ?)"
, new string[]{"Description", "IconId", "IsActive", "ParentId", "Estimation", "Hidden", "Priority", "Notes", "Id"},
new object[]{task.Description, task.IconId, task.IsActive, task.ParentId,task.Estimation, task.Hidden, task.Priority, task.Notes, task.Id});
"UPDATE Tasks SET Description = ?, IconId = ?, IsActive = ?, ParentId = ?, Estimation = ? WHERE (Id = ?)"
, new string[]{"Description", "IconId", "IsActive", "ParentId", "Estimation", "Id"},
new object[]{task.Description, task.IconId, task.IsActive, task.ParentId,task.Estimation, task.Id});

for(int i = 0;i <tasks.Count;i++)
{
if(((Task)tasks[i]).Id == task.Id)
{
tasks[i] = task;
if (currentTask != null && currentTask.Id == task.Id)
currentTask = task;
tasks[i] = task;
break;
}
}
Expand Down Expand Up @@ -314,21 +312,6 @@ private static void LoadAllTasks()
else
task.Estimation = (int) row["Estimation"];

if (row["Hidden"] == DBNull.Value)
task.Hidden = false;
else
task.Hidden = (bool)row["Hidden"];

if (row["Priority"] == DBNull.Value)
task.Priority = 0;
else
task.Priority = (int)row["Priority"];

if (row["Notes"] == DBNull.Value)
task.Notes = String.Empty;
else
task.Notes = (string)row["Notes"];

tasks.Add(task);
}
if (tasks.Count == 0)
Expand Down Expand Up @@ -400,11 +383,12 @@ private static void AddIdleTask()
private static void InsertTask(ref Task task)
{
task.Id = DbHelper.ExecuteInsert(
"INSERT INTO Tasks(Description, IconId, IsActive, ParentId, Hidden, Priority, Notes) VALUES (?, ?, ?, ?, ?, ?, ?)",
new string[] { "Description", "IconId", "IsActive", "ParentId", "Hidden", "Priority", "Notes" },
new object[] {task.Description, task.IconId, task.IsActive, task.ParentId, task.Hidden, task.Priority, task.Notes});
"INSERT INTO Tasks(Description, IconId, IsActive, ParentId) VALUES (?, ?, ?, ?)",
new string[] {"Description", "IconId", "IsActive", "ParentId"},
new object[] {task.Description, task.IconId, task.IsActive, task.ParentId});
}



private static void ValidateTaskData(ref Task task)
{
if (task.Description == null)
Expand Down
7 changes: 3 additions & 4 deletions code/PTM/MainForm.cs
Expand Up @@ -454,16 +454,15 @@ private void menuItem6_Click(object sender, EventArgs e)

private void menuItem7_Click(object sender, EventArgs e)
{
TasksExplorerForm taskHForm = new TasksExplorerForm();
TasksHierarchyForm taskHForm = new TasksHierarchyForm();
taskHForm.ShowDialog(this);
}

#endregion

private void tabPage_StatusChanged(object sender, AddinTabPage.StatusChangedEventArgs e)
private void tabPage_StatusChanged(AddinTabPage.StatusChangedEventArgs e)
{
if(((AddinTabPage)sender).Visible)
this.statusBar.Text = e.Status;
this.statusBar.Text = e.Status;
}
} //MainForm
} //end of namespace
35 changes: 9 additions & 26 deletions code/PTM/PTM.csproj
Expand Up @@ -81,7 +81,6 @@
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Design" />
<Reference Include="System.Drawing">
<Name>System.Drawing</Name>
</Reference>
Expand Down Expand Up @@ -163,11 +162,6 @@
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="View\API\APIsComctl32.cs">
<SubType>Code</SubType>
</Compile>
Expand Down Expand Up @@ -195,12 +189,6 @@
<Compile Include="View\Controls\IndicatorControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="View\Controls\ObjectListViewComponents\ListViewPrinter.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="View\Controls\ObjectListViewComponents\ObjectListView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="View\Controls\StatisticsControl.cs">
<SubType>UserControl</SubType>
</Compile>
Expand Down Expand Up @@ -261,13 +249,13 @@
<Compile Include="View\Forms\SplashForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Forms\TaskSelectForm.cs">
<Compile Include="View\Forms\TaskLogForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Forms\TaskPropertiesForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Forms\TasksExplorerForm.cs">
<Compile Include="View\Forms\TasksHierarchyForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Forms\UpdateForm.cs">
Expand Down Expand Up @@ -295,11 +283,6 @@
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="View\Controls\Icons.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
Expand All @@ -315,7 +298,6 @@
</EmbeddedResource>
<EmbeddedResource Include="View\Controls\SummaryControl.resx">
<DependentUpon>SummaryControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="View\Controls\TasksLogControl.resx">
<DependentUpon>TasksLogControl.cs</DependentUpon>
Expand Down Expand Up @@ -348,21 +330,22 @@
<EmbeddedResource Include="View\Forms\SplashForm.resx">
<DependentUpon>SplashForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Forms\TaskSelectForm.resx">
<DependentUpon>TaskSelectForm.cs</DependentUpon>
<SubType>Designer</SubType>
<EmbeddedResource Include="View\Forms\TaskLogForm.resx">
<DependentUpon>TaskLogForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Forms\TaskPropertiesForm.resx">
<DependentUpon>TaskPropertiesForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Forms\TasksExplorerForm.resx">
<DependentUpon>TasksExplorerForm.cs</DependentUpon>
<SubType>Designer</SubType>
<EmbeddedResource Include="View\Forms\TasksHierarchyForm.resx">
<DependentUpon>TasksHierarchyForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Forms\UpdateForm.resx">
<DependentUpon>UpdateForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
Expand Down
63 changes: 0 additions & 63 deletions code/PTM/Properties/Resources.Designer.cs

This file was deleted.

0 comments on commit 53e3af8

Please sign in to comment.