Commit for development environment setup

This commit is contained in:
2023-06-19 16:12:33 -04:00
parent be72063a3c
commit bbce2ad0a6
2209 changed files with 1171775 additions and 625 deletions

BIN
PROMS/xxxSync/7zip/7z.dll Normal file

Binary file not shown.

BIN
PROMS/xxxSync/7zip/7z64.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

37
PROMS/xxxSync/Sync.sln Normal file
View File

@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sync", "Sync\Sync.csproj", "{400F2DAC-E405-4C1B-A388-5120FCF59DF0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyncMany", "SyncMany\SyncMany.csproj", "{256A41AF-440F-42FE-A9B1-2CE36F1261A2}"
EndProject
Global
GlobalSection(SourceCodeControl) = preSolution
SccNumberOfProjects = 3
SccLocalPath0 = .
SccProjectUniqueName1 = Sync\\Sync.csproj
SccLocalPath1 = Sync
SccProjectUniqueName2 = SyncMany\\SyncMany.csproj
SccProjectName2 = \u0022$/PROMS/Sync/SyncMany\u0022,\u0020LEEAAAAA
SccLocalPath2 = SyncMany
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{400F2DAC-E405-4C1B-A388-5120FCF59DF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{400F2DAC-E405-4C1B-A388-5120FCF59DF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{400F2DAC-E405-4C1B-A388-5120FCF59DF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{400F2DAC-E405-4C1B-A388-5120FCF59DF0}.Release|Any CPU.Build.0 = Release|Any CPU
{256A41AF-440F-42FE-A9B1-2CE36F1261A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{256A41AF-440F-42FE-A9B1-2CE36F1261A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{256A41AF-440F-42FE-A9B1-2CE36F1261A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{256A41AF-440F-42FE-A9B1-2CE36F1261A2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

BIN
PROMS/xxxSync/Sync/7z.dll Normal file

Binary file not shown.

BIN
PROMS/xxxSync/Sync/7z64.dll Normal file

Binary file not shown.

View File

@@ -0,0 +1,141 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace Sync
{
class FileCompare
{
private FileInfo _Developement;
private FileInfo _SourceSafe;
private bool _ToProcess = false;
public bool ToProcess
{
get { return _ToProcess; }
set { _ToProcess = value; }
}
public string FileName
{
get { return _Developement.FullName; }
}
public Nullable<DateTime> DevModified
{
get
{
if (_Developement.Exists)
return _Developement.LastWriteTime;
return null;
}
}
public Nullable<DateTime> SSModified
{
get
{
if(_SourceSafe.Exists)
return _SourceSafe.LastWriteTime;
return null;
}
}
private bool _Different;
public bool Different
{
get { return _Different; }
}
public string SSFileName
{
get { return _SourceSafe.FullName; }
}
private bool _ReadOnly;
public bool ReadOnly
{
get { return _ReadOnly; }
}
private bool _Merge = false;
public bool Merge
{
get { return _Merge; }
set { _Merge = value; }
}
public FileCompare(FileInfo development, FileInfo sourceSafe)
{
_Developement = development;
_SourceSafe = sourceSafe;
_Different = DifferentContents(development, sourceSafe);
_ToProcess = _Different;
_ReadOnly = (development.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly;
}
public static bool DifferentContents(FileInfo development, FileInfo sourceSafe)
{
string strDev =ReadFile(development);
string strSS = ReadFile(sourceSafe);
return strDev != strSS;
}
private static string ReadFile(FileInfo fi)
{
if (fi.Exists == false) return "";
TextReader tr = fi.OpenText();
string retval = tr.ReadToEnd();
tr.Close();
return retval;
}
public void MoveToDevelopment()
{
if (_Developement.Exists)
{
_Developement.Attributes &= (_Developement.Attributes ^ FileAttributes.ReadOnly);// Turn-Off ReadOnly Attribute
_Developement.Attributes &= (_Developement.Attributes ^ FileAttributes.Hidden);// Turn-Off Hidden Attribute
}
BuildFolder(_Developement.Directory);
if(_SourceSafe.Exists)_SourceSafe.CopyTo(_Developement.FullName , true);
}
public void MoveDevToMailBox(string devFolder, string mailboxFolder)
{
if (ToProcess)
{
FileInfo fi1 = new FileInfo(_Developement.FullName.Replace(devFolder, mailboxFolder));
BuildFolder(fi1.Directory);
if (fi1.Exists) fi1.IsReadOnly = false;
if(_Developement.Exists)_Developement.CopyTo(fi1.FullName,true);
}
}
public void MoveMailBoxToDev(string devFolder, string mailboxFolder)
{
if (ToProcess)
{
FileInfo fi1 = new FileInfo(_Developement.FullName.Replace(devFolder, mailboxFolder));
BuildFolder(_Developement.Directory);
if (fi1.Exists) fi1.IsReadOnly = false;
if (_Developement.Exists) fi1.CopyTo(_Developement.FullName, true);
}
}
public void MoveSSToMailBox(string SSFolder, string mailboxFolder)
{
if (ToProcess)
{
FileInfo fi1 = new FileInfo(_SourceSafe.FullName.Replace(SSFolder, mailboxFolder));
BuildFolder(fi1.Directory);
if (fi1.Exists) fi1.IsReadOnly = false;
if (_SourceSafe.Exists) _SourceSafe.CopyTo(fi1.FullName, true);
}
}
public void MoveMailBoxToSS(string SSFolder, string mailboxFolder)
{
if (ToProcess)
{
FileInfo fi1 = new FileInfo(_SourceSafe.FullName.Replace(SSFolder, mailboxFolder));
BuildFolder(fi1.Directory);
if (fi1.Exists) fi1.IsReadOnly = false;
if (_SourceSafe.Exists) fi1.CopyTo(_SourceSafe.FullName, true);
}
}
private static void BuildFolder(DirectoryInfo directoryInfo)
{
if (!directoryInfo.Exists)
{
BuildFolder(directoryInfo.Parent);
directoryInfo.Create();
}
}
}
}

View File

@@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace Sync
{
class FileCompare
{
private FileInfo _Developement;
private FileInfo _SourceSafe;
private bool _ToProcess = false;
public bool ToProcess
{
get { return _ToProcess; }
set { _ToProcess = value; }
}
public string FileName
{
get { return _Developement.FullName; }
}
public Nullable<DateTime> DevModified
{
get
{
if (_Developement.Exists)
return _Developement.LastWriteTime;
return null;
}
}
public Nullable<DateTime> SSModified
{
get
{
if(_SourceSafe.Exists)
return _SourceSafe.LastWriteTime;
return null;
}
}
private bool _Different;
public bool Different
{
get { return _Different; }
}
public string SSFileName
{
get { return _SourceSafe.FullName; }
}
public FileCompare(FileInfo development, FileInfo sourceSafe)
{
_Developement = development;
_SourceSafe = sourceSafe;
_Different = DifferentContents(development, sourceSafe);
_ToProcess = _Different;
}
public static bool DifferentContents(FileInfo development, FileInfo sourceSafe)
{
string strDev =ReadFile(development);
string strSS = ReadFile(sourceSafe);
return strDev != strSS;
}
private static string ReadFile(FileInfo fi)
{
if (fi.Exists == false) return "";
TextReader tr = fi.OpenText();
string retval = tr.ReadToEnd();
tr.Close();
return retval;
}
public void MoveToDevelopment()
{
//if (_Developement.Attributes & FileAttributes.ReadOnly == FileAttributes.ReadOnly)
if (_Developement.Exists) _Developement.Attributes &= (_Developement.Attributes ^ FileAttributes.ReadOnly);
BuildFolder(_Developement.Directory);
if(_SourceSafe.Exists)_SourceSafe.CopyTo(_Developement.FullName , true);
}
public void MoveDevToMailBox(string devFolder, string mailboxFolder)
{
if (ToProcess)
{
FileInfo fi1 = new FileInfo(_Developement.FullName.Replace(devFolder, mailboxFolder));
BuildFolder(fi1.Directory);
if(_Developement.Exists)_Developement.CopyTo(fi1.FullName,true);
}
}
public void MoveMailBoxToDev(string devFolder, string mailboxFolder)
{
if (ToProcess)
{
FileInfo fi1 = new FileInfo(_Developement.FullName.Replace(devFolder, mailboxFolder));
BuildFolder(_Developement.Directory);
fi1.CopyTo(_Developement.FullName, true);
}
}
public void MoveSSToMailBox(string SSFolder, string mailboxFolder)
{
if (ToProcess)
{
FileInfo fi1 = new FileInfo(_SourceSafe.FullName.Replace(SSFolder, mailboxFolder));
BuildFolder(fi1.Directory);
if(_SourceSafe.Exists) _SourceSafe.CopyTo(fi1.FullName, true);
}
}
public void MoveMailBoxToSS(string SSFolder, string mailboxFolder)
{
if (ToProcess)
{
FileInfo fi1 = new FileInfo(_SourceSafe.FullName.Replace(SSFolder, mailboxFolder));
BuildFolder(fi1.Directory);
if(fi1.Exists)fi1.CopyTo(_SourceSafe.FullName, true);
}
}
private static void BuildFolder(DirectoryInfo directoryInfo)
{
if (!directoryInfo.Exists)
{
BuildFolder(directoryInfo.Parent);
directoryInfo.Create();
}
}
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace Sync
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmSync());
}
}
}

View File

@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Sync")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Volian Enterprises, Inc.")]
[assembly: AssemblyProduct("Sync")]
[assembly: AssemblyCopyright("Copyright © Volian Enterprises, Inc. 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5e74e740-f6c7-46e4-a77d-2353564108b6")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,133 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Sync.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Sync.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon iSync {
get {
object obj = ResourceManager.GetObject("iSync", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap iSync_128x128 {
get {
object obj = ResourceManager.GetObject("iSync_128x128", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon wi0124_16 {
get {
object obj = ResourceManager.GetObject("wi0124_16", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon wi0124_24 {
get {
object obj = ResourceManager.GetObject("wi0124_24", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon wi0124_32 {
get {
object obj = ResourceManager.GetObject("wi0124_32", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon wi0124_48 {
get {
object obj = ResourceManager.GetObject("wi0124_48", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon wi0124_64 {
get {
object obj = ResourceManager.GetObject("wi0124_64", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Sync.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[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())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string DevelopmentFolder {
get {
return ((string)(this["DevelopmentFolder"]));
}
set {
this["DevelopmentFolder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SourceSafeFolder {
get {
return ((string)(this["SourceSafeFolder"]));
}
set {
this["SourceSafeFolder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string MailBoxDevelopmentFolder {
get {
return ((string)(this["MailBoxDevelopmentFolder"]));
}
set {
this["MailBoxDevelopmentFolder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string MailBoxSourceSafeFolder {
get {
return ((string)(this["MailBoxSourceSafeFolder"]));
}
set {
this["MailBoxSourceSafeFolder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Drawing.Point Location {
get {
return ((global::System.Drawing.Point)(this["Location"]));
}
set {
this["Location"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Drawing.Size Size {
get {
return ((global::System.Drawing.Size)(this["Size"]));
}
set {
this["Size"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Collections.Specialized.StringCollection Widths {
get {
return ((global::System.Collections.Specialized.StringCollection)(this["Widths"]));
}
set {
this["Widths"] = value;
}
}
}
}

View File

@@ -0,0 +1,27 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Sync.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="DevelopmentFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SourceSafeFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="MailBoxDevelopmentFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="MailBoxSourceSafeFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Location" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Size" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Widths" Type="System.Collections.Specialized.StringCollection" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{400F2DAC-E405-4C1B-A388-5120FCF59DF0}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sync</RootNamespace>
<AssemblyName>Sync</AssemblyName>
<ApplicationIcon>Resources\iSync.ico</ApplicationIcon>
<SccProjectName>"%24/PROMS/Sync/Sync", KEEAAAAA</SccProjectName>
<SccLocalPath>.</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>MSSCCI:Microsoft Visual SourceSafe</SccProvider>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="SevenZipSharp, Version=0.64.3890.29348, Culture=neutral, PublicKeyToken=20de82c62b055c88, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FileCompare.cs" />
<Compile Include="frmSync.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSync.Designer.cs">
<DependentUpon>frmSync.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmSync.resx">
<SubType>Designer</SubType>
<DependentUpon>frmSync.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\wi0124-64.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\wi0124-16.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\wi0124-24.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\wi0124-32.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\wi0124-48.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\iSync-128x128.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\iSync.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="SevenZipSharp.dll" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sync", "Sync\Sync.csproj", "{400F2DAC-E405-4C1B-A388-5120FCF59DF0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyncMany", "SyncMany\SyncMany.csproj", "{256A41AF-440F-42FE-A9B1-2CE36F1261A2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{400F2DAC-E405-4C1B-A388-5120FCF59DF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{400F2DAC-E405-4C1B-A388-5120FCF59DF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{400F2DAC-E405-4C1B-A388-5120FCF59DF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{400F2DAC-E405-4C1B-A388-5120FCF59DF0}.Release|Any CPU.Build.0 = Release|Any CPU
{256A41AF-440F-42FE-A9B1-2CE36F1261A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{256A41AF-440F-42FE-A9B1-2CE36F1261A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{256A41AF-440F-42FE-A9B1-2CE36F1261A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{256A41AF-440F-42FE-A9B1-2CE36F1261A2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Sync.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<Sync.Properties.Settings>
<setting name="DevelopmentFolder" serializeAs="String">
<value />
</setting>
<setting name="SourceSafeFolder" serializeAs="String">
<value />
</setting>
<setting name="MailBoxDevelopmentFolder" serializeAs="String">
<value />
</setting>
<setting name="MailBoxSourceSafeFolder" serializeAs="String">
<value />
</setting>
</Sync.Properties.Settings>
</userSettings>
</configuration>

511
PROMS/xxxSync/Sync/frmSync.Designer.cs generated Normal file
View File

@@ -0,0 +1,511 @@
namespace Sync
{
partial class frmSync
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSync));
this.panel1 = new System.Windows.Forms.Panel();
this.btnBrwsSSMail = new System.Windows.Forms.Button();
this.tbSSMailBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btnBrwsMail = new System.Windows.Forms.Button();
this.tbMailBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.btnBrwsSS = new System.Windows.Forms.Button();
this.tbSourceSafe = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btnBrwsDev = new System.Windows.Forms.Button();
this.tbDevelopment = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.fbd = new System.Windows.Forms.FolderBrowserDialog();
this.dgv = new System.Windows.Forms.DataGridView();
this.cms = new System.Windows.Forms.ContextMenuStrip(this.components);
this.compareToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.compareSourceSafeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.compareMailboxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectNoneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mailboxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.buildToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.findToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.checkedOutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.differentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contentDifferentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sourceSafeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreUnchangedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreReadOnlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.listToClipboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.differentAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv)).BeginInit();
this.cms.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.btnBrwsSSMail);
this.panel1.Controls.Add(this.tbSSMailBox);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.btnBrwsMail);
this.panel1.Controls.Add(this.tbMailBox);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.btnBrwsSS);
this.panel1.Controls.Add(this.tbSourceSafe);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.btnBrwsDev);
this.panel1.Controls.Add(this.tbDevelopment);
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 24);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(759, 117);
this.panel1.TabIndex = 1;
//
// btnBrwsSSMail
//
this.btnBrwsSSMail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrwsSSMail.Location = new System.Drawing.Point(672, 86);
this.btnBrwsSSMail.Name = "btnBrwsSSMail";
this.btnBrwsSSMail.Size = new System.Drawing.Size(75, 23);
this.btnBrwsSSMail.TabIndex = 14;
this.btnBrwsSSMail.Text = "Browse...";
this.btnBrwsSSMail.UseVisualStyleBackColor = true;
this.btnBrwsSSMail.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tbSSMailBox
//
this.tbSSMailBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbSSMailBox.Location = new System.Drawing.Point(120, 88);
this.tbSSMailBox.Name = "tbSSMailBox";
this.tbSSMailBox.Size = new System.Drawing.Size(546, 20);
this.tbSSMailBox.TabIndex = 13;
this.tbSSMailBox.Text = "E:\\Mailbox\\SourceSafe\\Proms";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 91);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(92, 13);
this.label4.TabIndex = 12;
this.label4.Text = "SS Mailbox Folder";
//
// btnBrwsMail
//
this.btnBrwsMail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrwsMail.Location = new System.Drawing.Point(672, 60);
this.btnBrwsMail.Name = "btnBrwsMail";
this.btnBrwsMail.Size = new System.Drawing.Size(75, 23);
this.btnBrwsMail.TabIndex = 8;
this.btnBrwsMail.Text = "Browse...";
this.btnBrwsMail.UseVisualStyleBackColor = true;
this.btnBrwsMail.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tbMailBox
//
this.tbMailBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbMailBox.Location = new System.Drawing.Point(120, 62);
this.tbMailBox.Name = "tbMailBox";
this.tbMailBox.Size = new System.Drawing.Size(546, 20);
this.tbMailBox.TabIndex = 7;
this.tbMailBox.Text = "E:\\Mailbox\\Proms";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 65);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(75, 13);
this.label3.TabIndex = 6;
this.label3.Text = "Mailbox Folder";
//
// btnBrwsSS
//
this.btnBrwsSS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrwsSS.Location = new System.Drawing.Point(672, 34);
this.btnBrwsSS.Name = "btnBrwsSS";
this.btnBrwsSS.Size = new System.Drawing.Size(75, 23);
this.btnBrwsSS.TabIndex = 5;
this.btnBrwsSS.Text = "Browse...";
this.btnBrwsSS.UseVisualStyleBackColor = true;
this.btnBrwsSS.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tbSourceSafe
//
this.tbSourceSafe.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbSourceSafe.Location = new System.Drawing.Point(120, 36);
this.tbSourceSafe.Name = "tbSourceSafe";
this.tbSourceSafe.Size = new System.Drawing.Size(546, 20);
this.tbSourceSafe.TabIndex = 4;
this.tbSourceSafe.Text = "E:\\SourceSafe\\Proms";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 39);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(98, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Source Safe Folder";
//
// btnBrwsDev
//
this.btnBrwsDev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrwsDev.Location = new System.Drawing.Point(672, 8);
this.btnBrwsDev.Name = "btnBrwsDev";
this.btnBrwsDev.Size = new System.Drawing.Size(75, 23);
this.btnBrwsDev.TabIndex = 2;
this.btnBrwsDev.Text = "Browse...";
this.btnBrwsDev.UseVisualStyleBackColor = true;
this.btnBrwsDev.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tbDevelopment
//
this.tbDevelopment.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbDevelopment.Location = new System.Drawing.Point(120, 10);
this.tbDevelopment.Name = "tbDevelopment";
this.tbDevelopment.Size = new System.Drawing.Size(546, 20);
this.tbDevelopment.TabIndex = 1;
this.tbDevelopment.Text = "E:\\Proms";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(102, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Development Folder";
//
// dgv
//
this.dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgv.ContextMenuStrip = this.cms;
this.dgv.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgv.Location = new System.Drawing.Point(0, 141);
this.dgv.Name = "dgv";
this.dgv.Size = new System.Drawing.Size(759, 283);
this.dgv.TabIndex = 2;
this.dgv.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgv_ColumnWidthChanged);
this.dgv.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dgv_MouseDown);
//
// cms
//
this.cms.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.compareToolStripMenuItem,
this.compareSourceSafeToolStripMenuItem,
this.compareMailboxToolStripMenuItem,
this.restoreToolStripMenuItem});
this.cms.Name = "cms";
this.cms.Size = new System.Drawing.Size(188, 92);
//
// compareToolStripMenuItem
//
this.compareToolStripMenuItem.Name = "compareToolStripMenuItem";
this.compareToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.compareToolStripMenuItem.Text = "Compare";
this.compareToolStripMenuItem.Click += new System.EventHandler(this.compareToolStripMenuItem_Click);
//
// compareSourceSafeToolStripMenuItem
//
this.compareSourceSafeToolStripMenuItem.Name = "compareSourceSafeToolStripMenuItem";
this.compareSourceSafeToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.compareSourceSafeToolStripMenuItem.Text = "Compare Source Safe";
this.compareSourceSafeToolStripMenuItem.Click += new System.EventHandler(this.compareSourceSafeToolStripMenuItem_Click);
//
// compareMailboxToolStripMenuItem
//
this.compareMailboxToolStripMenuItem.Name = "compareMailboxToolStripMenuItem";
this.compareMailboxToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.compareMailboxToolStripMenuItem.Text = "Compare Mailbox";
this.compareMailboxToolStripMenuItem.Click += new System.EventHandler(this.compareMailboxToolStripMenuItem_Click);
//
// restoreToolStripMenuItem
//
this.restoreToolStripMenuItem.Name = "restoreToolStripMenuItem";
this.restoreToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.restoreToolStripMenuItem.Text = "Restore";
this.restoreToolStripMenuItem.Click += new System.EventHandler(this.restoreToolStripMenuItem_Click);
//
// statusStrip1
//
this.statusStrip1.Location = new System.Drawing.Point(0, 424);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(759, 22);
this.statusStrip1.TabIndex = 3;
this.statusStrip1.Text = "statusStrip1";
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.editToolStripMenuItem,
this.mailboxToolStripMenuItem,
this.findToolStripMenuItem,
this.sourceSafeToolStripMenuItem,
this.listToClipboardToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(759, 24);
this.menuStrip1.TabIndex = 4;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "&File";
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// editToolStripMenuItem
//
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.selectAllToolStripMenuItem,
this.selectNoneToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
this.editToolStripMenuItem.Text = "&Edit";
//
// selectAllToolStripMenuItem
//
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(137, 22);
this.selectAllToolStripMenuItem.Text = "Select All";
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
//
// selectNoneToolStripMenuItem
//
this.selectNoneToolStripMenuItem.Name = "selectNoneToolStripMenuItem";
this.selectNoneToolStripMenuItem.Size = new System.Drawing.Size(137, 22);
this.selectNoneToolStripMenuItem.Text = "Select None";
this.selectNoneToolStripMenuItem.Click += new System.EventHandler(this.selectNoneToolStripMenuItem_Click);
//
// mailboxToolStripMenuItem
//
this.mailboxToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clearToolStripMenuItem,
this.buildToolStripMenuItem});
this.mailboxToolStripMenuItem.Name = "mailboxToolStripMenuItem";
this.mailboxToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.mailboxToolStripMenuItem.Text = "Mailbox";
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.clearToolStripMenuItem.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
//
// buildToolStripMenuItem
//
this.buildToolStripMenuItem.Name = "buildToolStripMenuItem";
this.buildToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.buildToolStripMenuItem.Text = "Build";
this.buildToolStripMenuItem.Click += new System.EventHandler(this.buildToolStripMenuItem_Click);
//
// findToolStripMenuItem
//
this.findToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.checkedOutToolStripMenuItem,
this.differentToolStripMenuItem,
this.contentDifferentToolStripMenuItem,
this.differentAllToolStripMenuItem});
this.findToolStripMenuItem.Name = "findToolStripMenuItem";
this.findToolStripMenuItem.Size = new System.Drawing.Size(42, 20);
this.findToolStripMenuItem.Text = "Find";
//
// checkedOutToolStripMenuItem
//
this.checkedOutToolStripMenuItem.Name = "checkedOutToolStripMenuItem";
this.checkedOutToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.checkedOutToolStripMenuItem.Text = "Checked-Out";
this.checkedOutToolStripMenuItem.Click += new System.EventHandler(this.checkedOutToolStripMenuItem_Click);
//
// differentToolStripMenuItem
//
this.differentToolStripMenuItem.Name = "differentToolStripMenuItem";
this.differentToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.differentToolStripMenuItem.Text = "Different";
this.differentToolStripMenuItem.Click += new System.EventHandler(this.differentToolStripMenuItem_Click);
//
// contentDifferentToolStripMenuItem
//
this.contentDifferentToolStripMenuItem.Name = "contentDifferentToolStripMenuItem";
this.contentDifferentToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.contentDifferentToolStripMenuItem.Text = "Content Different";
this.contentDifferentToolStripMenuItem.Click += new System.EventHandler(this.contentDifferentToolStripMenuItem_Click);
//
// sourceSafeToolStripMenuItem
//
this.sourceSafeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.restoreUnchangedToolStripMenuItem,
this.restoreSelectedToolStripMenuItem,
this.restoreAllToolStripMenuItem,
this.restoreReadOnlyToolStripMenuItem});
this.sourceSafeToolStripMenuItem.Name = "sourceSafeToolStripMenuItem";
this.sourceSafeToolStripMenuItem.Size = new System.Drawing.Size(80, 20);
this.sourceSafeToolStripMenuItem.Text = "Source Safe";
//
// restoreUnchangedToolStripMenuItem
//
this.restoreUnchangedToolStripMenuItem.Name = "restoreUnchangedToolStripMenuItem";
this.restoreUnchangedToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
this.restoreUnchangedToolStripMenuItem.Text = "Restore Unchanged";
this.restoreUnchangedToolStripMenuItem.Click += new System.EventHandler(this.restoreUnchangedToolStripMenuItem_Click);
//
// restoreSelectedToolStripMenuItem
//
this.restoreSelectedToolStripMenuItem.Name = "restoreSelectedToolStripMenuItem";
this.restoreSelectedToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
this.restoreSelectedToolStripMenuItem.Text = "Restore Selected (To Process)";
this.restoreSelectedToolStripMenuItem.Click += new System.EventHandler(this.restoreSelectedToolStripMenuItem_Click);
//
// restoreAllToolStripMenuItem
//
this.restoreAllToolStripMenuItem.Name = "restoreAllToolStripMenuItem";
this.restoreAllToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
this.restoreAllToolStripMenuItem.Text = "Restore All";
this.restoreAllToolStripMenuItem.Click += new System.EventHandler(this.restoreAllToolStripMenuItem_Click);
//
// restoreReadOnlyToolStripMenuItem
//
this.restoreReadOnlyToolStripMenuItem.Name = "restoreReadOnlyToolStripMenuItem";
this.restoreReadOnlyToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
this.restoreReadOnlyToolStripMenuItem.Text = "Restore Read Only";
this.restoreReadOnlyToolStripMenuItem.Click += new System.EventHandler(this.restoreReadOnlyToolStripMenuItem_Click);
//
// listToClipboardToolStripMenuItem
//
this.listToClipboardToolStripMenuItem.Name = "listToClipboardToolStripMenuItem";
this.listToClipboardToolStripMenuItem.Size = new System.Drawing.Size(103, 20);
this.listToClipboardToolStripMenuItem.Text = "List toClipboard";
this.listToClipboardToolStripMenuItem.Click += new System.EventHandler(this.listToClipboardToolStripMenuItem_Click);
//
// differentAllToolStripMenuItem
//
this.differentAllToolStripMenuItem.Name = "differentAllToolStripMenuItem";
this.differentAllToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.differentAllToolStripMenuItem.Text = "DifferentAll";
this.differentAllToolStripMenuItem.Click += new System.EventHandler(this.differentAllToolStripMenuItem_Click);
//
// frmSync
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(759, 446);
this.Controls.Add(this.dgv);
this.Controls.Add(this.panel1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "frmSync";
this.Text = "Volian Sync";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSync_FormClosing);
this.Load += new System.EventHandler(this.frmSync_Load);
this.LocationChanged += new System.EventHandler(this.frmSync_LocationChanged);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv)).EndInit();
this.cms.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btnBrwsDev;
private System.Windows.Forms.TextBox tbDevelopment;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnBrwsMail;
private System.Windows.Forms.TextBox tbMailBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnBrwsSS;
private System.Windows.Forms.TextBox tbSourceSafe;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.FolderBrowserDialog fbd;
private System.Windows.Forms.DataGridView dgv;
private System.Windows.Forms.Button btnBrwsSSMail;
private System.Windows.Forms.TextBox tbSSMailBox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem mailboxToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem buildToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem findToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem checkedOutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem differentToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem sourceSafeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreUnchangedToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreSelectedToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreAllToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip cms;
private System.Windows.Forms.ToolStripMenuItem compareToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem contentDifferentToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreReadOnlyToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem listToClipboardToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem selectNoneToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem compareSourceSafeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem compareMailboxToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem differentAllToolStripMenuItem;
}
}

View File

@@ -0,0 +1,430 @@
namespace Sync
{
partial class frmSync
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSync));
this.panel1 = new System.Windows.Forms.Panel();
this.btnBrwsSSMail = new System.Windows.Forms.Button();
this.tbSSMailBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btnBrwsMail = new System.Windows.Forms.Button();
this.tbMailBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.btnBrwsSS = new System.Windows.Forms.Button();
this.tbSourceSafe = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btnBrwsDev = new System.Windows.Forms.Button();
this.tbDevelopment = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.fbd = new System.Windows.Forms.FolderBrowserDialog();
this.dgv = new System.Windows.Forms.DataGridView();
this.cms = new System.Windows.Forms.ContextMenuStrip(this.components);
this.compareToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mailboxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.buildToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.findToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.checkedOutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.differentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contentDifferentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sourceSafeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreUnchangedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv)).BeginInit();
this.cms.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.btnBrwsSSMail);
this.panel1.Controls.Add(this.tbSSMailBox);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.btnBrwsMail);
this.panel1.Controls.Add(this.tbMailBox);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.btnBrwsSS);
this.panel1.Controls.Add(this.tbSourceSafe);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.btnBrwsDev);
this.panel1.Controls.Add(this.tbDevelopment);
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 24);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(759, 117);
this.panel1.TabIndex = 1;
//
// btnBrwsSSMail
//
this.btnBrwsSSMail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrwsSSMail.Location = new System.Drawing.Point(672, 86);
this.btnBrwsSSMail.Name = "btnBrwsSSMail";
this.btnBrwsSSMail.Size = new System.Drawing.Size(75, 23);
this.btnBrwsSSMail.TabIndex = 14;
this.btnBrwsSSMail.Text = "Browse...";
this.btnBrwsSSMail.UseVisualStyleBackColor = true;
this.btnBrwsSSMail.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tbSSMailBox
//
this.tbSSMailBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbSSMailBox.Location = new System.Drawing.Point(120, 88);
this.tbSSMailBox.Name = "tbSSMailBox";
this.tbSSMailBox.Size = new System.Drawing.Size(546, 20);
this.tbSSMailBox.TabIndex = 13;
this.tbSSMailBox.Text = "E:\\Mailbox\\SourceSafe\\Proms";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 91);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(92, 13);
this.label4.TabIndex = 12;
this.label4.Text = "SS Mailbox Folder";
//
// btnBrwsMail
//
this.btnBrwsMail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrwsMail.Location = new System.Drawing.Point(672, 60);
this.btnBrwsMail.Name = "btnBrwsMail";
this.btnBrwsMail.Size = new System.Drawing.Size(75, 23);
this.btnBrwsMail.TabIndex = 8;
this.btnBrwsMail.Text = "Browse...";
this.btnBrwsMail.UseVisualStyleBackColor = true;
this.btnBrwsMail.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tbMailBox
//
this.tbMailBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbMailBox.Location = new System.Drawing.Point(120, 62);
this.tbMailBox.Name = "tbMailBox";
this.tbMailBox.Size = new System.Drawing.Size(546, 20);
this.tbMailBox.TabIndex = 7;
this.tbMailBox.Text = "E:\\Mailbox\\Proms";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 65);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(75, 13);
this.label3.TabIndex = 6;
this.label3.Text = "Mailbox Folder";
//
// btnBrwsSS
//
this.btnBrwsSS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrwsSS.Location = new System.Drawing.Point(672, 34);
this.btnBrwsSS.Name = "btnBrwsSS";
this.btnBrwsSS.Size = new System.Drawing.Size(75, 23);
this.btnBrwsSS.TabIndex = 5;
this.btnBrwsSS.Text = "Browse...";
this.btnBrwsSS.UseVisualStyleBackColor = true;
this.btnBrwsSS.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tbSourceSafe
//
this.tbSourceSafe.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbSourceSafe.Location = new System.Drawing.Point(120, 36);
this.tbSourceSafe.Name = "tbSourceSafe";
this.tbSourceSafe.Size = new System.Drawing.Size(546, 20);
this.tbSourceSafe.TabIndex = 4;
this.tbSourceSafe.Text = "E:\\SourceSafe\\Proms";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 39);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(98, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Source Safe Folder";
//
// btnBrwsDev
//
this.btnBrwsDev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrwsDev.Location = new System.Drawing.Point(672, 8);
this.btnBrwsDev.Name = "btnBrwsDev";
this.btnBrwsDev.Size = new System.Drawing.Size(75, 23);
this.btnBrwsDev.TabIndex = 2;
this.btnBrwsDev.Text = "Browse...";
this.btnBrwsDev.UseVisualStyleBackColor = true;
this.btnBrwsDev.Click += new System.EventHandler(this.btnBrowse_Click);
//
// tbDevelopment
//
this.tbDevelopment.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbDevelopment.Location = new System.Drawing.Point(120, 10);
this.tbDevelopment.Name = "tbDevelopment";
this.tbDevelopment.Size = new System.Drawing.Size(546, 20);
this.tbDevelopment.TabIndex = 1;
this.tbDevelopment.Text = "E:\\Proms";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(102, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Development Folder";
//
// dgv
//
this.dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgv.ContextMenuStrip = this.cms;
this.dgv.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgv.Location = new System.Drawing.Point(0, 141);
this.dgv.Name = "dgv";
this.dgv.Size = new System.Drawing.Size(759, 283);
this.dgv.TabIndex = 2;
this.dgv.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgv_ColumnWidthChanged);
//
// cms
//
this.cms.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.compareToolStripMenuItem,
this.restoreToolStripMenuItem});
this.cms.Name = "cms";
this.cms.Size = new System.Drawing.Size(124, 48);
//
// compareToolStripMenuItem
//
this.compareToolStripMenuItem.Name = "compareToolStripMenuItem";
this.compareToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.compareToolStripMenuItem.Text = "Compare";
this.compareToolStripMenuItem.Click += new System.EventHandler(this.compareToolStripMenuItem_Click);
//
// restoreToolStripMenuItem
//
this.restoreToolStripMenuItem.Name = "restoreToolStripMenuItem";
this.restoreToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.restoreToolStripMenuItem.Text = "Restore";
this.restoreToolStripMenuItem.Click += new System.EventHandler(this.restoreToolStripMenuItem_Click);
//
// statusStrip1
//
this.statusStrip1.Location = new System.Drawing.Point(0, 424);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(759, 22);
this.statusStrip1.TabIndex = 3;
this.statusStrip1.Text = "statusStrip1";
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.mailboxToolStripMenuItem,
this.findToolStripMenuItem,
this.sourceSafeToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(759, 24);
this.menuStrip1.TabIndex = 4;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "&File";
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// mailboxToolStripMenuItem
//
this.mailboxToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.clearToolStripMenuItem,
this.buildToolStripMenuItem});
this.mailboxToolStripMenuItem.Name = "mailboxToolStripMenuItem";
this.mailboxToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.mailboxToolStripMenuItem.Text = "Mailbox";
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
this.clearToolStripMenuItem.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
//
// buildToolStripMenuItem
//
this.buildToolStripMenuItem.Name = "buildToolStripMenuItem";
this.buildToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
this.buildToolStripMenuItem.Text = "Build";
this.buildToolStripMenuItem.Click += new System.EventHandler(this.buildToolStripMenuItem_Click);
//
// findToolStripMenuItem
//
this.findToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.checkedOutToolStripMenuItem,
this.differentToolStripMenuItem,
this.contentDifferentToolStripMenuItem});
this.findToolStripMenuItem.Name = "findToolStripMenuItem";
this.findToolStripMenuItem.Size = new System.Drawing.Size(42, 20);
this.findToolStripMenuItem.Text = "Find";
//
// checkedOutToolStripMenuItem
//
this.checkedOutToolStripMenuItem.Name = "checkedOutToolStripMenuItem";
this.checkedOutToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.checkedOutToolStripMenuItem.Text = "Checked-Out";
this.checkedOutToolStripMenuItem.Click += new System.EventHandler(this.checkedOutToolStripMenuItem_Click);
//
// differentToolStripMenuItem
//
this.differentToolStripMenuItem.Name = "differentToolStripMenuItem";
this.differentToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.differentToolStripMenuItem.Text = "Different";
this.differentToolStripMenuItem.Click += new System.EventHandler(this.differentToolStripMenuItem_Click);
//
// contentDifferentToolStripMenuItem
//
this.contentDifferentToolStripMenuItem.Name = "contentDifferentToolStripMenuItem";
this.contentDifferentToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.contentDifferentToolStripMenuItem.Text = "Content Different";
this.contentDifferentToolStripMenuItem.Click += new System.EventHandler(this.contentDifferentToolStripMenuItem_Click);
//
// sourceSafeToolStripMenuItem
//
this.sourceSafeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.restoreUnchangedToolStripMenuItem,
this.restoreSelectedToolStripMenuItem,
this.restoreAllToolStripMenuItem});
this.sourceSafeToolStripMenuItem.Name = "sourceSafeToolStripMenuItem";
this.sourceSafeToolStripMenuItem.Size = new System.Drawing.Size(80, 20);
this.sourceSafeToolStripMenuItem.Text = "Source Safe";
//
// restoreUnchangedToolStripMenuItem
//
this.restoreUnchangedToolStripMenuItem.Name = "restoreUnchangedToolStripMenuItem";
this.restoreUnchangedToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
this.restoreUnchangedToolStripMenuItem.Text = "Restore Unchanged";
this.restoreUnchangedToolStripMenuItem.Click += new System.EventHandler(this.restoreUnchangedToolStripMenuItem_Click);
//
// restoreSelectedToolStripMenuItem
//
this.restoreSelectedToolStripMenuItem.Name = "restoreSelectedToolStripMenuItem";
this.restoreSelectedToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
this.restoreSelectedToolStripMenuItem.Text = "Restore Selected (To Process)";
this.restoreSelectedToolStripMenuItem.Click += new System.EventHandler(this.restoreSelectedToolStripMenuItem_Click);
//
// restoreAllToolStripMenuItem
//
this.restoreAllToolStripMenuItem.Name = "restoreAllToolStripMenuItem";
this.restoreAllToolStripMenuItem.Size = new System.Drawing.Size(228, 22);
this.restoreAllToolStripMenuItem.Text = "Restore All";
this.restoreAllToolStripMenuItem.Click += new System.EventHandler(this.restoreAllToolStripMenuItem_Click);
//
// frmSync
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(759, 446);
this.Controls.Add(this.dgv);
this.Controls.Add(this.panel1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "frmSync";
this.Text = "Volian Sync";
this.Load += new System.EventHandler(this.frmSync_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSync_FormClosing);
this.LocationChanged += new System.EventHandler(this.frmSync_LocationChanged);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv)).EndInit();
this.cms.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btnBrwsDev;
private System.Windows.Forms.TextBox tbDevelopment;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnBrwsMail;
private System.Windows.Forms.TextBox tbMailBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnBrwsSS;
private System.Windows.Forms.TextBox tbSourceSafe;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.FolderBrowserDialog fbd;
private System.Windows.Forms.DataGridView dgv;
private System.Windows.Forms.Button btnBrwsSSMail;
private System.Windows.Forms.TextBox tbSSMailBox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem mailboxToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem buildToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem findToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem checkedOutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem differentToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem sourceSafeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreUnchangedToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreSelectedToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreAllToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip cms;
private System.Windows.Forms.ToolStripMenuItem compareToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem restoreToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem contentDifferentToolStripMenuItem;
}
}

View File

@@ -0,0 +1,687 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Xml;
using SevenZip;
namespace Sync
{
public partial class frmSync : Form
{
private List<FileCompare> _CheckedOut;
private bool IsLoading = false;
private float _DPI=100;
public frmSync()
{
InitializeComponent();
using (Graphics gr = CreateGraphics())
_DPI = gr.DpiX;
}
private void LoadSettings()
{
if (Properties.Settings.Default["Location"] != null)
Location = Properties.Settings.Default.Location;
if (Properties.Settings.Default["Size"] != null)
Size = Properties.Settings.Default.Size;
if (Properties.Settings.Default.DevelopmentFolder != "")
tbDevelopment.Text = Properties.Settings.Default.DevelopmentFolder;
if (Properties.Settings.Default.SourceSafeFolder != "")
tbSourceSafe.Text = Properties.Settings.Default.SourceSafeFolder;
if(Properties.Settings.Default.MailBoxDevelopmentFolder != "")
tbMailBox.Text = Properties.Settings.Default.MailBoxDevelopmentFolder;
if (Properties.Settings.Default.MailBoxSourceSafeFolder != "")
tbSSMailBox.Text = Properties.Settings.Default.MailBoxSourceSafeFolder;
}
private void frmSync_Load(object sender, EventArgs e)
{
LoadSettings();
Setup();
}
private void Setup()
{
// Setup Browse Buttons
btnBrwsDev.Tag = this.tbDevelopment;
btnBrwsSS.Tag = this.tbSourceSafe;
btnBrwsMail.Tag = this.tbMailBox;
btnBrwsSSMail.Tag = this.tbSSMailBox;
}
private void btnBrowse_Click(object sender, EventArgs e)
{
TextBox tb = (TextBox)((Button)sender).Tag;
fbd.SelectedPath = tb.Text;
if (fbd.ShowDialog() == DialogResult.OK)
tb.Text = fbd.SelectedPath;
}
private void ClearResults()
{
_CheckedOut = new List<FileCompare>();
dgv.DataSource = null;
Application.DoEvents();
}
private void FindCheckedOut(DirectoryInfo di)
{
FindCheckedOut(di.GetFiles());
FindCheckedOut(di.GetDirectories());
}
private void FindCheckedOut(DirectoryInfo[] directoryInfoList)
{
foreach (DirectoryInfo di in directoryInfoList)
FindCheckedOut(di);
}
private void FindCheckedOut(FileInfo[] fileInfoList)
{
foreach (FileInfo fi in fileInfoList)
FindCheckedOut(fi);
}
private void FindCheckedOut(FileInfo fi)
{
if (fi.Name.ToLower().EndsWith("scc")) return;
if (fi.Name.ToLower().EndsWith("sln")) return;
if (fi.Name.ToLower().EndsWith("csproj"))
{
// Find files that have been added to the new Project
List<string> compileList = GetCompileList(fi.FullName);
FileInfo fi1csproj = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
if (fi1csproj.Exists)
{
List<string> compileList1 = GetCompileList(fi1csproj.FullName);
CompareLists(compileList, compileList1, fi, fi1csproj);
}
return;
}
if (fi.Name.ToLower().EndsWith("licx")) return;
FileInfo fi1 = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
if ((fi1.Attributes & FileAttributes.ReadOnly) != FileAttributes.ReadOnly)
AddToResults(fi, fi1);
}
private void CompareLists(List<string> compileList, List<string> compileList1, FileInfo fi, FileInfo fi1)
{
// If anything is in compileList1 and not in CompileList add it to the results
foreach (string filename in compileList1)
if (!compileList.Contains(filename))
AddToResults(fi, fi1, filename);
}
private void AddToResults(FileInfo fi, FileInfo fi1, string filename)
{
FileInfo newfi = new FileInfo(fi.DirectoryName + "/" + filename);
FileInfo newfi1 = new FileInfo(fi1.DirectoryName + "/" + filename);
if(!newfi.Exists)AddToResults(newfi, newfi1); // Only add if the file does not exist
}
private List<string> GetCompileList(string fileName)
{
List<string> retval = new List<string>();
XmlDocument doc = new XmlDocument();
doc.Load(fileName);
XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
foreach (XmlAttribute attrib in doc.DocumentElement.Attributes)
if (attrib.Name == "xmlns")
nsmgr.AddNamespace("ns", attrib.Value);
XmlNodeList xl = doc.DocumentElement.SelectNodes(@"//ns:Compile/@Include",nsmgr);
foreach (XmlAttribute xa in xl)
retval.Add(xa.Value);
xl = doc.DocumentElement.SelectNodes(@"//ns:Content/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
{
if (xa.Value.ToUpper().EndsWith("DLL"))
retval.Add(xa.Value);
if (xa.Value.ToUpper().EndsWith("XML"))
retval.Add(xa.Value);
if (xa.Value.ToUpper().EndsWith("SVG"))
retval.Add(xa.Value);
if (xa.Value.ToUpper().EndsWith("BAS"))
retval.Add(xa.Value);
}
xl = doc.DocumentElement.SelectNodes(@"//ns:EmbeddedResource/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
if (!xa.Value.ToUpper().EndsWith("LICX"))
retval.Add(xa.Value);
xl = doc.DocumentElement.SelectNodes(@"//ns:None/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
{
if(xa.Value.ToUpper().EndsWith("SQL"))
retval.Add(xa.Value);
if (xa.Value.ToUpper().EndsWith("FRM"))
retval.Add(xa.Value);
if (xa.Value.ToUpper().EndsWith("FRX"))
retval.Add(xa.Value);
}
return retval;
}
private void AddToResults(FileInfo fiSS,FileInfo fiDev)
{
FileCompare fc = new FileCompare(fiDev, fiSS);
FileInfo fiMB = new FileInfo(fc.FileName.Replace(tbDevelopment.Text, tbSSMailBox.Text));
if (fiMB.Exists && fiSS.LastWriteTimeUtc != fiMB.LastWriteTimeUtc)
fc.Merge = true;
//if(!_OnlyContentDifferent || (fc.Different && (fc.DevModified != null)))
if (!_OnlyContentDifferent || (fc.Different))
_CheckedOut.Add(fc);
//if (tbResults.Text == "") tbResults.Text = "Found:";
//tbResults.Text += "\r\n" + fiDev.FullName + " - " + ((fiDev.Attributes & FileAttributes.ReadOnly) != FileAttributes.ReadOnly ? "" : "ReadOnly");
}
private void ClearMailBox()
{
DeleteFolder(new DirectoryInfo(tbMailBox.Text));
DeleteFolder(new DirectoryInfo(tbSSMailBox.Text));
}
private void DeleteFolder(DirectoryInfo directoryInfo)
{
if (directoryInfo.Exists)
{
AdjustAttributes(directoryInfo);
directoryInfo.Delete(true);
}
}
private void AdjustAttributes(DirectoryInfo directoryInfo)
{
foreach (DirectoryInfo di in directoryInfo.GetDirectories())
AdjustAttributes(di);
foreach (FileInfo fi in directoryInfo.GetFiles())
AdjustAttribute(fi);
}
private void AdjustAttribute(FileInfo fi)
{
fi.Attributes &= (fi.Attributes ^ FileAttributes.ReadOnly);// Turn-Off ReadOnly Attribute
fi.Attributes &= (fi.Attributes ^ FileAttributes.Hidden);// Turn-Off Hidden Attribute
}
private void frmSync_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.Location = Location;
Properties.Settings.Default.Size = Size;
Properties.Settings.Default.DevelopmentFolder = tbDevelopment.Text;
Properties.Settings.Default.SourceSafeFolder = tbSourceSafe.Text;
Properties.Settings.Default.MailBoxDevelopmentFolder = tbMailBox.Text;
Properties.Settings.Default.MailBoxSourceSafeFolder = tbSSMailBox.Text;
Properties.Settings.Default.Save();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void clearToolStripMenuItem_Click(object sender, EventArgs e)
{
ClearMailBox();
}
private void buildToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearMailBox();
if (_CheckedOut == null)
checkedOutToolStripMenuItem_Click(sender, e);
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess)
{
fc.MoveDevToMailBox(tbDevelopment.Text, tbMailBox.Text);
fc.MoveSSToMailBox(tbSourceSafe.Text, tbSSMailBox.Text);
}
}
BuildZipOfMailBox(tbMailBox.Text);
}
private string _RTFFile = null;
public string RTFFile
{
get { return _RTFFile; }
set { _RTFFile = value; }
}
private void BuildZipOfMailBox(string mailbox)
{
SevenZipCompressor.SetLibraryPath(Application.StartupPath + @"\7z.dll");
SevenZipCompressor cmpr = new SevenZipCompressor();
cmpr.PreserveDirectoryRoot = true;
string fileDate = DateTime.Now.ToString("yyyyMMdd HHmm");
RTFFile = string.Format("{0} To SS {1}.Rtf", mailbox, fileDate);
string zipName = string.Format("{0} To SS {1}.7z", mailbox, fileDate);
cmpr.CompressDirectory(mailbox, zipName, "*.*", true);
MessageBox.Show(string.Format("{0} created!", zipName), "Mailbox Zip Created", MessageBoxButtons.OK, MessageBoxIcon.Information);
//if (System.IO.File.Exists(@"c:\program files\7-zip\7z.exe"))
//{
// string args = string.Format(@"a -t7z ""{0} To SS {1}.7z"" ""{0}\*.*"" -r", mailbox, DateTime.Now.ToString("yyyyMMdd HHmm"));
// System.Diagnostics.Process p = System.Diagnostics.Process.Start(@"c:\program files\7-zip\7z", args);
// p.WaitForExit();
//}
//"c:\program files\7-zip\7z" a -t7z "C:\Development\MailBox\Proms To SS 20120424 1850.7z" "C:\Development\MailBox\Proms\*.*" -r
}
private void checkedOutToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearResults();
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindCheckedOut(new DirectoryInfo(tbSourceSafe.Text));
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void syncAllToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
fc.MoveToDevelopment();
}
}
private void restoreUnchangedToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
if(!fc.Different || fc.DevModified == null)
fc.MoveToDevelopment();
}
}
private void restoreSelectedToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess) fc.MoveToDevelopment();
}
}
private void restoreAllToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
fc.MoveToDevelopment();
}
}
private List<FileCompare> SelectedList
{
get
{
dgv.EndEdit();
List<FileCompare> fcList = new List<FileCompare>();
foreach (DataGridViewCell dgc in dgv.SelectedCells)
{
FileCompare fc = dgv.Rows[dgc.RowIndex].DataBoundItem as FileCompare;
if (fc != null && fcList.Contains(fc) == false)
fcList.Add(fc);
}
return fcList;
}
}
private void compareToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
// This should launch UltraCompare with the two files
// Which Item am I on
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
CompareOneFile(fc.FileName, fc.SSFileName);
}
}
private static void CompareOneFile(string fileDev, string fileSS)
{
Console.WriteLine("Compare {0} and {1}", fileDev, fileSS);
string progname = string.Empty;
if (System.IO.File.Exists(@"C:\Program Files\IDM Computer Solutions\UltraCompare\UC.exe"))
progname = @"C:\Program Files\IDM Computer Solutions\UltraCompare\UC.exe";
if (System.IO.File.Exists(@"C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\UC.exe"))
progname = @"C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\UC.exe";
// string cmd = string.Format("\"{0}\" -t \"{1}\" \"{2}\"", progname, fc.FileName, fc.SSFileName);
System.Diagnostics.ProcessStartInfo psi =
new System.Diagnostics.ProcessStartInfo(progname, string.Format(@" -t ""{0}"" ""{1}""", fileDev, fileSS));
System.Diagnostics.Process prc = System.Diagnostics.Process.Start(psi);
}
private void restoreToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
fc.MoveToDevelopment();
}
}
private bool _ExcludeSolutions = true;
private void differentAllToolStripMenuItem_Click(object sender, EventArgs e)
{
_ExcludeSolutions = false;
dgv.EndEdit();
ClearResults();
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindDifferent(new DirectoryInfo(tbSourceSafe.Text));
dgv.DataSource = _CheckedOut;
SetColumnWidth();
_ExcludeSolutions = true;
}
private void differentToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearResults();
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindDifferent(new DirectoryInfo(tbSourceSafe.Text));
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void SetColumnWidth()
{
IsLoading = true;
if (Properties.Settings.Default["Widths"] == null)
{
dgv.Columns[0].Width = 60;
dgv.Columns[1].Visible = false;
dgv.Columns[2].Width = 125;
dgv.Columns[3].Width = 125;
dgv.Columns[4].Width = 50;
dgv.Columns[5].Width = 500;
}
else
{
for (int i = 0; i < Properties.Settings.Default.Widths.Count; i++)
{
string sWidth = Properties.Settings.Default.Widths[i];
if (sWidth == "Invisible")
dgv.Columns[i].Visible = false;
else
dgv.Columns[i].Width = int.Parse(sWidth);
}
}
dgv.Columns[1].Visible = false;
IsLoading = false;
}
private void FindDifferent(DirectoryInfo di)
{
FindDifferent(di.GetFiles());
FindDifferent(di.GetDirectories());
}
private void FindDifferent(DirectoryInfo[] directoryInfoList)
{
foreach (DirectoryInfo di in directoryInfoList)
FindDifferent(di);
}
private void FindDifferent(FileInfo[] fileInfoList)
{
foreach (FileInfo fi in fileInfoList)
FindDifferent(fi);
}
private void FindDifferent(FileInfo fi)
{
if (fi.Name.ToLower().EndsWith("scc")) return;
if (_ExcludeSolutions && fi.Name.ToLower().EndsWith("sln")) return;
if (_ExcludeSolutions && fi.Name.ToLower().EndsWith("csproj"))
{
// Find files that have been added to the new Project
List<string> compileList = GetCompileList(fi.FullName);
FileInfo fi1csproj = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
if (fi1csproj.Exists)
{
List<string> compileList1 = GetCompileList(fi1csproj.FullName);
CompareLists(compileList, compileList1, fi, fi1csproj);
}
if(_ExcludeSolutions ) return;
}
if (fi.Name.ToLower().EndsWith("licx")) return;
FileInfo fiD = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
FileInfo fiS = fi;
// Only check Read-Only flag, other attributes are unimportant
if (fiS.LastWriteTimeUtc != fiD.LastWriteTimeUtc || (fiS.Attributes & FileAttributes.ReadOnly ) != (fiD.Attributes & FileAttributes.ReadOnly ))
AddToResults(fi, fiD);
}
private void dgv_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
{
if (!IsLoading)
{
System.Collections.Specialized.StringCollection widths = new System.Collections.Specialized.StringCollection();
foreach (DataGridViewColumn col in dgv.Columns)
widths.Add(col.Visible ? col.Width.ToString() : "Invisible");
Properties.Settings.Default.Widths = widths;
Properties.Settings.Default.Save();
}
}
private bool _OnlyContentDifferent = false;
private void contentDifferentToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearResults();
_OnlyContentDifferent = true;
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindDifferent(new DirectoryInfo(tbSourceSafe.Text));
_OnlyContentDifferent = false;
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void frmSync_LocationChanged(object sender, EventArgs e)
{
Rectangle rec = Screen.GetWorkingArea(this);
int newLeft = Left;
int newTop = Top;
if (Math.Abs(Left - rec.X) < 10) newLeft = rec.X;
if (Math.Abs(Top - rec.Y) < 10) newTop = rec.Y;
if (Math.Abs(rec.X + rec.Width - Right) < 10) newLeft = rec.X + rec.Width - Width;
if (Math.Abs(rec.Y + rec.Height - Bottom) < 10) newTop = rec.Y + rec.Height - Height;
if (newTop != Top || newLeft != Left)
Location = new Point(newLeft, newTop);
}
private void restoreReadOnlyToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ReadOnly) fc.MoveToDevelopment();
}
}
private void listToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{
RichTextBox rtb = new RichTextBox();
Font fntNormal = new Font("Arial", 10, FontStyle.Regular);
rtb.Font = fntNormal;
Font fntBold = new Font("Arial", 12, FontStyle.Bold);
Font fntWing = new Font("Wingdings 2", 11, FontStyle.Regular);
Font fntItalic = new Font("Arial", 11, FontStyle.Italic);
Font fntBoldItalic = new Font("Arial", 14, FontStyle.Bold | FontStyle.Italic);
StringBuilder sb = new StringBuilder();
dgv.EndEdit();
sb.Append("Applicability:\r\n\r\n");
AddText(rtb, fntBold, "Applicability:");
AddText(rtb, fntNormal, "\r\n\r\n\r\n\r\n");
if (HasFmtXML(_CheckedOut))
{
sb.Append("* This change includes format changes which must be loaded into the databases.\r\n\r\n");
AddText(rtb, fntBoldItalic, "*\tThis change includes format changes\r\n\twhich must be loaded into the databases.",Color.Orange);
AddText(rtb, fntNormal, "\r\n\r\n",Color.Black);
}
if (HasFormats(_CheckedOut))
{
sb.Append("* This change includes format changes which must be loaded into the databases.\r\n\r\n");
AddText(rtb, fntBoldItalic, "*\tThis change includes format changes\r\n\twhich must be loaded into the databases.", Color.Orange);
AddText(rtb, fntNormal, "\r\n\r\n", Color.Black);
}
if (HasPromsFixes(_CheckedOut))
{
sb.Append("* This change includes changes to PROMSFixes.SQL which must be loaded into the databases.\r\n\r\n");
AddText(rtb, fntBoldItalic, "*\tThis change includes changes to PROMSFixes.SQL\r\n\twhich must be loaded into the databases.\r\n\r\n", Color.Red);
AddText(rtb, fntNormal, "\r\n\r\n", Color.Black);
}
sb.Append("\r\nInternal Data Fixes:\r\n\r\n");
AddText(rtb, fntBold, "Internal Data Fixes:");
AddText(rtb, fntNormal, "\r\n\r\n\r\n\r\n",Color.Magenta);
sb.Append("Code Changes:\r\n\r\n");
AddText(rtb, fntBold, "Code Changes:");
AddText(rtb, fntNormal, "\r\n\r\n");
int lenFolder = tbDevelopment.Text.Length;
string lastFolder = "";
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess)
{
FileInfo fi = new FileInfo(fc.FileName);
FileInfo fis = new FileInfo(fc.SSFileName);
string folder = fi.Directory.FullName.Substring(lenFolder + 1);
if (folder != lastFolder)
{
sb.Append(folder + ":\r\n");
AddText(rtb, fntItalic, folder + ":\r\n");
lastFolder = folder;
}
sb.Append((fis.Exists ? "" : " =>NEW") + "\t" + fi.Name + "\r\n");
AddText(rtb, fntNormal, (fis.Exists ? "" : " =>NEW") + "\t" + fi.Name + "\r\n");
AddIndent(rtb);
}
}
sb.Append("\r\nInternal Release:\r\n\r\n");
sb.Append("\r\nGeneric External Release:\r\n\r\n");
sb.Append("\r\nPlant Specific Information for Release Letter:\r\n\r\n");
sb.Append("\r\nTesting Performed:\r\n\r\n");
sb.Append("\r\nTesting Requirements:\r\n\r\n");
sb.Append("\r\nChanges/Additions to User Documentation:\r\n\r\n");
AddText(rtb, fntNormal, "\r\n");
AddText(rtb, fntBold, "Internal Release:");
AddText(rtb, fntNormal, "\r\n\r\n\r\n\r\n");
AddText(rtb, fntBold, "Generic External Release:");
AddText(rtb, fntNormal, "\r\n\r\n\r\n\r\n");
AddText(rtb, fntBold, "Plant Specific Information for Release Letter:");
AddText(rtb, fntNormal, "\r\n\r\n\r\n\r\n");
AddText(rtb, fntBold, "Testing Performed:");
AddText(rtb, fntNormal, "\r\n\r\n\r\n\r\n");
AddText(rtb, fntBold, "Testing Requirements:");
AddText(rtb, fntNormal, "\r\n\r\n");
AddText(rtb, fntWing, "\x51\x52\xA3");
AddText(rtb, fntNormal, " Sample Checkboxes");
AddText(rtb, fntNormal, "\r\n\r\n");
AddText(rtb, fntBold, "Changes/Additions to User Documentation:");
AddText(rtb, fntNormal, "\r\n\r\n");
try
{
Clipboard.Clear();
DataObject dao = new DataObject();
dao.SetData(DataFormats.Text,sb.ToString());
dao.SetData(DataFormats.Rtf, rtb.Rtf);
Clipboard.SetDataObject(dao, true, 10, 500);
if (RTFFile != null)
{
rtb.SaveFile(RTFFile);
System.Diagnostics.Process.Start(RTFFile);
}
else
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
StringBuilder sb2 = new StringBuilder();
string prefix = "";
while (ex != null)
{
sb2.AppendLine(string.Format("{0}{1} - {2}",prefix, ex.GetType().Name, ex.Message));
prefix += " ";
}
MessageBox.Show(sb2.ToString(), "Error saving Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private bool HasPromsFixes(List<FileCompare> _CheckedOut)
{
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess && fc.FileName.ToLower().Contains("promsfixes.sql"))
return true;
}
return false;
}
private bool HasFmtXML(List<FileCompare> _CheckedOut)
{
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess && fc.FileName.ToLower().Contains("\\fmtxml\\"))
return true;
}
return false;
}
private bool HasFormats(List<FileCompare> _CheckedOut)
{
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess && fc.FileName.ToLower().Contains("\\formats\\"))
return true;
}
return false;
}
private void AddIndent(RichTextBox rtb)
{
rtb.Select(rtb.TextLength, 0);
rtb.SelectionIndent = (int) _DPI;
rtb.SelectedText = "\r\n";
rtb.Select(rtb.TextLength, 0);
rtb.SelectionIndent = 0;
}
private static void AddText(RichTextBox rtb, Font font, string txt)
{
rtb.Select(rtb.TextLength, 0);
rtb.SelectionFont = font;
rtb.SelectedText = txt;
}
private static void AddText(RichTextBox rtb, Font font, string txt, Color myColor)
{
rtb.Select(rtb.TextLength, 0);
rtb.SelectionFont = font;
rtb.SelectionColor = myColor;
rtb.SelectedText = txt;
rtb.Select(rtb.TextLength, 0);
rtb.SelectionColor = Color.Black;
}
private void dgv_MouseDown(object sender, MouseEventArgs e)
{
dgv.ClearSelection();
DataGridView.HitTestInfo info = dgv.HitTest(e.X, e.Y);
if (info.RowIndex < 0) return;
dgv.CurrentCell = dgv[0, info.RowIndex];
dgv.Rows[info.RowIndex].Selected = true;
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
{
if (_CheckedOut == null || _CheckedOut.Count == 0)
{
MessageBox.Show("Don't you really think you should get a list first!", "Hey Moron!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop);
return;
}
foreach (FileCompare fc in _CheckedOut) fc.ToProcess = true;
dgv.Refresh();
}
private void selectNoneToolStripMenuItem_Click(object sender, EventArgs e)
{
if (_CheckedOut == null || _CheckedOut.Count == 0)
{
MessageBox.Show("Don't you really think you should get a list first!", "Hey Moron!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop);
return;
}
foreach (FileCompare fc in _CheckedOut) fc.ToProcess = false;
dgv.Refresh();
}
private void compareSourceSafeToolStripMenuItem_Click(object sender, EventArgs e)
{
// Compare SS version with SS version from Mailbox
dgv.EndEdit();
// This should launch UltraCompare with the two files
// Which Item am I on
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
CompareOneFile(fc.SSFileName, fc.SSFileName.Replace(tbSourceSafe.Text, tbSSMailBox.Text));
}
}
private void compareMailboxToolStripMenuItem_Click(object sender, EventArgs e)
{
// Compare MailBox version with Mailbox Source Safe version
dgv.EndEdit();
// This should launch UltraCompare with the two files
// Which Item am I on
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
CompareOneFile(fc.FileName, fc.FileName.Replace(tbDevelopment.Text, tbSSMailBox.Text));
}
}
}
}

View File

@@ -0,0 +1,321 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Sync
{
public partial class frmSync : Form
{
private List<FileCompare> _CheckedOut;
private bool IsLoading = false;
public frmSync()
{
InitializeComponent();
}
private void LoadSettings()
{
if (Properties.Settings.Default["Location"] != null)
Location = Properties.Settings.Default.Location;
if (Properties.Settings.Default["Size"] != null)
Size = Properties.Settings.Default.Size;
if (Properties.Settings.Default.DevelopmentFolder != "")
tbDevelopment.Text = Properties.Settings.Default.DevelopmentFolder;
if (Properties.Settings.Default.SourceSafeFolder != "")
tbSourceSafe.Text = Properties.Settings.Default.SourceSafeFolder;
if(Properties.Settings.Default.MailBoxDevelopmentFolder != "")
tbMailBox.Text = Properties.Settings.Default.MailBoxDevelopmentFolder;
if (Properties.Settings.Default.MailBoxSourceSafeFolder != "")
tbSSMailBox.Text = Properties.Settings.Default.MailBoxSourceSafeFolder;
}
private void frmSync_Load(object sender, EventArgs e)
{
LoadSettings();
Setup();
}
private void Setup()
{
// Setup Browse Buttons
btnBrwsDev.Tag = this.tbDevelopment;
btnBrwsSS.Tag = this.tbSourceSafe;
btnBrwsMail.Tag = this.tbMailBox;
btnBrwsSSMail.Tag = this.tbSSMailBox;
}
private void btnBrowse_Click(object sender, EventArgs e)
{
TextBox tb = (TextBox)((Button)sender).Tag;
fbd.SelectedPath = tb.Text;
if (fbd.ShowDialog() == DialogResult.OK)
tb.Text = fbd.SelectedPath;
}
private void ClearResults()
{
_CheckedOut = new List<FileCompare>();
}
private void FindCheckedOut(DirectoryInfo di)
{
FindCheckedOut(di.GetFiles());
FindCheckedOut(di.GetDirectories());
}
private void FindCheckedOut(DirectoryInfo[] directoryInfoList)
{
foreach (DirectoryInfo di in directoryInfoList)
FindCheckedOut(di);
}
private void FindCheckedOut(FileInfo[] fileInfoList)
{
foreach (FileInfo fi in fileInfoList)
FindCheckedOut(fi);
}
private void FindCheckedOut(FileInfo fi)
{
if (fi.Name.ToLower().EndsWith("scc")) return;
if (fi.Name.ToLower().EndsWith("sln")) return;
if (fi.Name.ToLower().EndsWith("csproj")) return;
if (fi.Name.ToLower().EndsWith("licx")) return;
FileInfo fi1 = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
if ((fi1.Attributes & FileAttributes.ReadOnly) != FileAttributes.ReadOnly)
AddToResults(fi, fi1);
}
private void AddToResults(FileInfo fiSS,FileInfo fiDev)
{
FileCompare fc = new FileCompare(fiDev, fiSS);
if(!_OnlyContentDifferent || (fc.Different && (fc.DevModified != null)))
_CheckedOut.Add(fc);
//if (tbResults.Text == "") tbResults.Text = "Found:";
//tbResults.Text += "\r\n" + fiDev.FullName + " - " + ((fiDev.Attributes & FileAttributes.ReadOnly) != FileAttributes.ReadOnly ? "" : "ReadOnly");
}
private void ClearMailBox()
{
DeleteFolder(new DirectoryInfo(tbMailBox.Text));
DeleteFolder(new DirectoryInfo(tbSSMailBox.Text));
}
private void DeleteFolder(DirectoryInfo directoryInfo)
{
if (directoryInfo.Exists)
{
AdjustAttributes(directoryInfo);
directoryInfo.Delete(true);
}
}
private void AdjustAttributes(DirectoryInfo directoryInfo)
{
foreach (DirectoryInfo di in directoryInfo.GetDirectories())
AdjustAttributes(di);
foreach (FileInfo fi in directoryInfo.GetFiles())
AdjustAttribute(fi);
}
private void AdjustAttribute(FileInfo fi)
{
if ((fi.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
fi.Attributes = fi.Attributes ^ FileAttributes.ReadOnly;
}
private void frmSync_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.Location = Location;
Properties.Settings.Default.Size = Size;
Properties.Settings.Default.DevelopmentFolder = tbDevelopment.Text;
Properties.Settings.Default.SourceSafeFolder = tbSourceSafe.Text;
Properties.Settings.Default.MailBoxDevelopmentFolder = tbMailBox.Text;
Properties.Settings.Default.MailBoxSourceSafeFolder = tbSSMailBox.Text;
Properties.Settings.Default.Save();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void clearToolStripMenuItem_Click(object sender, EventArgs e)
{
ClearMailBox();
}
private void buildToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearMailBox();
if (_CheckedOut == null)
checkedOutToolStripMenuItem_Click(sender, e);
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess)
{
fc.MoveDevToMailBox(tbDevelopment.Text, tbMailBox.Text);
fc.MoveSSToMailBox(tbSourceSafe.Text, tbSSMailBox.Text);
}
}
}
private void checkedOutToolStripMenuItem_Click(object sender, EventArgs e)
{
ClearResults();
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindCheckedOut(new DirectoryInfo(tbSourceSafe.Text));
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void syncAllToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
fc.MoveToDevelopment();
}
}
private void restoreUnchangedToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
if(!fc.Different || fc.DevModified == null)
fc.MoveToDevelopment();
}
}
private void restoreSelectedToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess) fc.MoveToDevelopment();
}
}
private void restoreAllToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
fc.MoveToDevelopment();
}
}
private List<FileCompare> SelectedList
{
get
{
dgv.EndEdit();
List<FileCompare> fcList = new List<FileCompare>();
foreach (DataGridViewCell dgc in dgv.SelectedCells)
{
FileCompare fc = dgv.Rows[dgc.RowIndex].DataBoundItem as FileCompare;
if (fc != null && fcList.Contains(fc) == false)
fcList.Add(fc);
}
return fcList;
}
}
private void compareToolStripMenuItem_Click(object sender, EventArgs e)
{
// This should launch UltraCompare with the two files
// Which Item am I on
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
Console.WriteLine("Compare {0} and {1}", fc.FileName, fc.SSFileName);
string cmd = string.Format("\"C:\\Program Files\\IDM Computer Solutions\\UltraCompare\\UC.exe\" -t \"{0}\" \"{1}\"", fc.FileName, fc.SSFileName);
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(@"C:\Program Files\IDM Computer Solutions\UltraCompare\UC.exe",
string.Format(@" -t ""{0}"" ""{1}""", fc.FileName, fc.SSFileName));
System.Diagnostics.Process prc = System.Diagnostics.Process.Start(psi);
}
}
private void restoreToolStripMenuItem_Click(object sender, EventArgs e)
{
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
fc.MoveToDevelopment();
}
}
private void differentToolStripMenuItem_Click(object sender, EventArgs e)
{
ClearResults();
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindDifferent(new DirectoryInfo(tbSourceSafe.Text));
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void SetColumnWidth()
{
IsLoading = true;
if (Properties.Settings.Default["Widths"] == null)
{
dgv.Columns[0].Width = 60;
dgv.Columns[1].Visible = false;
dgv.Columns[2].Width = 125;
dgv.Columns[3].Width = 125;
dgv.Columns[4].Width = 50;
dgv.Columns[5].Width = 500;
}
else
{
for (int i = 0; i < Properties.Settings.Default.Widths.Count; i++)
{
string sWidth = Properties.Settings.Default.Widths[i];
if (sWidth == "Invisible")
dgv.Columns[i].Visible = false;
else
dgv.Columns[i].Width = int.Parse(sWidth);
}
}
dgv.Columns[1].Visible = false;
IsLoading = false;
}
private void FindDifferent(DirectoryInfo di)
{
FindDifferent(di.GetFiles());
FindDifferent(di.GetDirectories());
}
private void FindDifferent(DirectoryInfo[] directoryInfoList)
{
foreach (DirectoryInfo di in directoryInfoList)
FindDifferent(di);
}
private void FindDifferent(FileInfo[] fileInfoList)
{
foreach (FileInfo fi in fileInfoList)
FindDifferent(fi);
}
private void FindDifferent(FileInfo fi)
{
if (fi.Name.ToLower().EndsWith("scc")) return;
if (fi.Name.ToLower().EndsWith("sln")) return;
if (fi.Name.ToLower().EndsWith("csproj")) return;
if (fi.Name.ToLower().EndsWith("licx")) return;
FileInfo fiD = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
FileInfo fiS = fi;
// Only check Read-Only flag, other attributes are unimportant
if (fiS.LastWriteTimeUtc != fiD.LastWriteTimeUtc || (fiS.Attributes & FileAttributes.ReadOnly ) != (fiD.Attributes & FileAttributes.ReadOnly ))
AddToResults(fi, fiD);
}
private void dgv_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
{
if (!IsLoading)
{
System.Collections.Specialized.StringCollection widths = new System.Collections.Specialized.StringCollection();
foreach (DataGridViewColumn col in dgv.Columns)
widths.Add(col.Visible ? col.Width.ToString() : "Invisible");
Properties.Settings.Default.Widths = widths;
Properties.Settings.Default.Save();
}
}
private bool _OnlyContentDifferent = false;
private void contentDifferentToolStripMenuItem_Click(object sender, EventArgs e)
{
ClearResults();
_OnlyContentDifferent = true;
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindDifferent(new DirectoryInfo(tbSourceSafe.Text));
_OnlyContentDifferent = false;
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void frmSync_LocationChanged(object sender, EventArgs e)
{
Rectangle rec = Screen.GetWorkingArea(this);
if (Math.Abs(Left - rec.X) < 10) Left = rec.X;
if (Math.Abs(Top - rec.Y) < 10) Top = rec.Y;
if (Math.Abs(rec.X + rec.Width - Right) < 10) Left = rec.X + rec.Width - Width;
if (Math.Abs(rec.Y + rec.Height - Bottom) < 10) Top = rec.Y + rec.Height - Height;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml.Serialization;
namespace SyncMany
{
[XmlRoot("SyncFile")]
public class SyncFile
{
private CompareItems _Items=new CompareItems();
[XmlElement("CompareItem")]
public CompareItems Items
{
get { return _Items; }
set { _Items = value; }
}
}
public partial class CompareItems : List<CompareItem>
{
}
public class CompareItem
{
private string _Source;
[XmlAttribute("Source")]
public string Source
{
get { return _Source; }
set { _Source = value; }
}
private string _Destination;
[XmlAttribute("Destination")]
public string DestinationItem
{
get { return _Destination; }
set { _Destination = value; }
}
public CompareItem()
{
}
public CompareItem(string source, string destination)
{
_Source = source;
_Destination = destination;
}
private FileInfo _SourceFile;
[XmlIgnore]
public FileInfo SourceFile
{
get
{
if (_SourceFile == null)
_SourceFile = new FileInfo(_Source);
return _SourceFile;
}
set { _SourceFile = value; }
}
private FileInfo _DestinationFile;
[XmlIgnore]
public FileInfo DestinationFile
{
get
{
if (_DestinationFile == null)
_DestinationFile = new FileInfo(_Destination);
return _DestinationFile;
}
set { _DestinationFile = value; }
}
public bool IsDifferent
{
get
{
string srcText = ReadFile(SourceFile);
string dstText = ReadFile(DestinationFile);
return srcText != dstText;
}
}
private string ReadFile(FileInfo myFile)
{
string retval;
using (StreamReader sr = myFile.OpenText())
{
retval = sr.ReadToEnd();
sr.Close();
}
return retval;
}
public void CopySourceToDestination()
{
_DestinationFile.IsReadOnly = false;
_SourceFile.CopyTo(_Destination,true);
}
public void CopyDestinationToSource()
{
_SourceFile.IsReadOnly = false;
_DestinationFile.CopyTo(Source,true);
}
}
}

View File

@@ -0,0 +1,99 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
namespace SyncMany
{
public static class ObjectSerializer<T> where T : class
{
public static string StringSerialize(T t)
{
string strOutput = string.Empty;
XmlSerializer xs = new XmlSerializer(typeof(T));
using (MemoryStream ms = new MemoryStream())
{
xs.Serialize(new NonXsiTextWriter(ms, Encoding.UTF8), t);
//xs.Serialize(ms, t);
ms.Position = 0;
StreamReader sr = new StreamReader(ms);
strOutput = sr.ReadToEnd();
ms.Close();
}
return strOutput;
}
public static T StringDeserialize(string s)
{
T t;
XmlSerializer xs = new XmlSerializer(typeof(T));
UTF8Encoding enc = new UTF8Encoding();
Byte[] arrBytData = enc.GetBytes(s);
using (MemoryStream ms = new MemoryStream(arrBytData))
{
t = (T)xs.Deserialize(ms);
}
return t;
}
public static void WriteFile(T t, string fileName)
{
string strOutput = string.Empty;
XmlSerializer xs = new XmlSerializer(typeof(T));
using (FileStream fs = new FileStream(fileName, FileMode.Create))
{
xs.Serialize(new NonXsiTextWriter(fs, Encoding.UTF8), t);
fs.Close();
}
}
public static T ReadFile(string fileName)
{
T t;
XmlSerializer xs = new XmlSerializer(typeof(T));
using (FileStream fs = new FileStream(fileName, FileMode.Open))
{
t = (T)xs.Deserialize(fs);
}
return t;
}
}
public class NonXsiTextWriter : XmlTextWriter
{
public NonXsiTextWriter(TextWriter w) : base(w) { }
public NonXsiTextWriter(Stream w, Encoding encoding)
: base(w, encoding)
{
this.Formatting = Formatting.Indented;
}
public NonXsiTextWriter(string filename, Encoding encoding) : base(filename, encoding) { }
bool _skip = false;
public override void WriteStartAttribute(string prefix, string localName, string ns)
{
if ((prefix == "xmlns" && (localName == "xsd" || localName == "xsi")) || // Omits XSD and XSI declarations.
ns == XmlSchema.InstanceNamespace) // Omits all XSI attributes.
{
_skip = true;
return;
}
if (localName == "xlink_href")
base.WriteStartAttribute(prefix, "xlink:href", ns);
else
base.WriteStartAttribute(prefix, localName, ns);
}
public override void WriteString(string text)
{
if (_skip) return;
base.WriteString(text);
}
public override void WriteEndAttribute()
{
if (_skip)
{ // Reset the flag, so we keep writing.
_skip = false;
return;
}
base.WriteEndAttribute();
}
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace SyncMany
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmSyncMany());
}
}
}

View File

@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SyncMany")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SyncMany")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1d309448-e6cc-4ad8-97ca-15dd2d5c551a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="CompareItems" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>SyncMany.CompareItems, SyncMany, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SyncMany.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SyncMany.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,96 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18408
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SyncMany.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[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())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Drawing.Size Size {
get {
return ((global::System.Drawing.Size)(this["Size"]));
}
set {
this["Size"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Drawing.Point Location {
get {
return ((global::System.Drawing.Point)(this["Location"]));
}
set {
this["Location"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Normal")]
public global::System.Windows.Forms.FormWindowState WindowState {
get {
return ((global::System.Windows.Forms.FormWindowState)(this["WindowState"]));
}
set {
this["WindowState"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FileName {
get {
return ((string)(this["FileName"]));
}
set {
this["FileName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SourceFolder {
get {
return ((string)(this["SourceFolder"]));
}
set {
this["SourceFolder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string DestinationFolder {
get {
return ((string)(this["DestinationFolder"]));
}
set {
this["DestinationFolder"] = value;
}
}
}
}

View File

@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SyncMany.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="Size" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Location" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="WindowState" Type="System.Windows.Forms.FormWindowState" Scope="User">
<Value Profile="(Default)">Normal</Value>
</Setting>
<Setting Name="FileName" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SourceFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="DestinationFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{256A41AF-440F-42FE-A9B1-2CE36F1261A2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SyncMany</RootNamespace>
<AssemblyName>SyncMany</AssemblyName>
<ApplicationIcon>sync.ico</ApplicationIcon>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CompareItem.cs" />
<Compile Include="frmAddCompareItem.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmAddCompareItem.Designer.cs">
<DependentUpon>frmAddCompareItem.cs</DependentUpon>
</Compile>
<Compile Include="frmSyncMany.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSyncMany.Designer.cs">
<DependentUpon>frmSyncMany.cs</DependentUpon>
</Compile>
<Compile Include="GenericSerializer.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmAddCompareItem.resx">
<SubType>Designer</SubType>
<DependentUpon>frmAddCompareItem.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSyncMany.resx">
<SubType>Designer</SubType>
<DependentUpon>frmSyncMany.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\DataSources\CompareItems.datasource" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="sync.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Binary file not shown.

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="SyncMany.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<SyncMany.Properties.Settings>
<setting name="WindowState" serializeAs="String">
<value>Normal</value>
</setting>
<setting name="FileName" serializeAs="String">
<value />
</setting>
<setting name="SourceFolder" serializeAs="String">
<value />
</setting>
<setting name="DestinationFolder" serializeAs="String">
<value />
</setting>
</SyncMany.Properties.Settings>
</userSettings>
</configuration>

View File

@@ -0,0 +1,155 @@
namespace SyncMany
{
partial class frmAddCompareItem
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnSource = new System.Windows.Forms.Button();
this.tbSource = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.tbDestination = new System.Windows.Forms.TextBox();
this.btnDestination = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.ofd = new System.Windows.Forms.OpenFileDialog();
this.SuspendLayout();
//
// btnSource
//
this.btnSource.Location = new System.Drawing.Point(634, 11);
this.btnSource.Name = "btnSource";
this.btnSource.Size = new System.Drawing.Size(75, 23);
this.btnSource.TabIndex = 0;
this.btnSource.Text = "Browse...";
this.btnSource.UseVisualStyleBackColor = true;
this.btnSource.Click += new System.EventHandler(this.btnSource_Click);
//
// tbSource
//
this.tbSource.Location = new System.Drawing.Point(90, 13);
this.tbSource.Name = "tbSource";
this.tbSource.Size = new System.Drawing.Size(538, 20);
this.tbSource.TabIndex = 1;
this.tbSource.TextChanged += new System.EventHandler(this.tbText_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Source";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 42);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(60, 13);
this.label2.TabIndex = 5;
this.label2.Text = "Destination";
//
// tbDestination
//
this.tbDestination.Location = new System.Drawing.Point(90, 39);
this.tbDestination.Name = "tbDestination";
this.tbDestination.Size = new System.Drawing.Size(538, 20);
this.tbDestination.TabIndex = 4;
this.tbDestination.TextChanged += new System.EventHandler(this.tbText_TextChanged);
//
// btnDestination
//
this.btnDestination.Location = new System.Drawing.Point(634, 37);
this.btnDestination.Name = "btnDestination";
this.btnDestination.Size = new System.Drawing.Size(75, 23);
this.btnDestination.TabIndex = 3;
this.btnDestination.Text = "Browse...";
this.btnDestination.UseVisualStyleBackColor = true;
this.btnDestination.Click += new System.EventHandler(this.btnDestination_Click);
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(553, 65);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 6;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Retry;
this.btnCancel.Location = new System.Drawing.Point(634, 65);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 7;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// ofd
//
this.ofd.Filter = "CSharp Files|*.cs|All Files|*.*";
//
// frmAddCompareItem
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(782, 145);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.label2);
this.Controls.Add(this.tbDestination);
this.Controls.Add(this.btnDestination);
this.Controls.Add(this.label1);
this.Controls.Add(this.tbSource);
this.Controls.Add(this.btnSource);
this.Name = "frmAddCompareItem";
this.Text = "frmAddCompareItem";
this.Resize += new System.EventHandler(this.frmAddCompareItem_Resize);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnSource;
private System.Windows.Forms.TextBox tbSource;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tbDestination;
private System.Windows.Forms.Button btnDestination;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.OpenFileDialog ofd;
}
}

View File

@@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace SyncMany
{
public partial class frmAddCompareItem : Form
{
public string SourceName
{ get { return tbSource.Text; } }
public string DestinationName
{ get { return tbDestination.Text; } }
private string _SourceFolder;
public string SourceFolder
{
get { return _SourceFolder; }
set { _SourceFolder = value; }
}
private string _DestinationFolder;
public string DestinationFolder
{
get { return _DestinationFolder; }
set { _DestinationFolder = value; }
}
public frmAddCompareItem(string sourceFolder, string destinationFolder)
{
InitializeComponent();
SetupButtons();
SourceFolder = sourceFolder;
DestinationFolder = destinationFolder;
}
private void SetupButtons()
{
btnOK.Enabled = tbDestination.Text != null && tbSource != null;
}
private void frmAddCompareItem_Resize(object sender, EventArgs e)
{
if(Height != 131)
Height = 131;
}
private void tbText_TextChanged(object sender, EventArgs e)
{
SetupButtons();
}
private void btnSource_Click(object sender, EventArgs e)
{
if (tbSource.Text != "")
{
SourceFolder = SetupOpenFileDialog(tbSource.Text);
}
else
{
ofd.InitialDirectory = SourceFolder;
}
if (ofd.ShowDialog() != DialogResult.OK)
return;
tbSource.Text = ofd.FileName;
SourceFolder = SetupOpenFileDialog(ofd.FileName);
}
private string SetupOpenFileDialog(string fileName)
{
FileInfo fi = new FileInfo(fileName);
ofd.InitialDirectory = fi.Directory.FullName;
ofd.FileName = fi.Name;
return ofd.InitialDirectory;
}
private void btnDestination_Click(object sender, EventArgs e)
{
if (tbDestination.Text != "")
{
DestinationFolder = SetupOpenFileDialog(tbDestination.Text);
}
else
{
ofd.InitialDirectory = DestinationFolder;
}
if (ofd.ShowDialog() != DialogResult.OK)
return;
tbDestination.Text = ofd.FileName;
DestinationFolder = SetupOpenFileDialog(ofd.FileName);
}
}
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="ofd.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,285 @@
namespace SyncMany
{
partial class frmSyncMany
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSyncMany));
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ofd = new System.Windows.Forms.OpenFileDialog();
this.sfd = new System.Windows.Forms.SaveFileDialog();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.tsslStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.dgv = new System.Windows.Forms.DataGridView();
this.IsDifferent = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.sourceDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.destinationItemDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.cms = new System.Windows.Forms.ContextMenuStrip(this.components);
this.compareToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.copySourceToDestinationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.copyDestinationToSourceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.compareItemsBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv)).BeginInit();
this.cms.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.compareItemsBindingSource)).BeginInit();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.addToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(672, 24);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openToolStripMenuItem,
this.saveToolStripMenuItem,
this.saveAsToolStripMenuItem,
this.toolStripMenuItem1,
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "&File";
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.openToolStripMenuItem.Text = "&Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveToolStripMenuItem.Text = "&Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// saveAsToolStripMenuItem
//
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveAsToolStripMenuItem.Text = "Save&As";
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(149, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// addToolStripMenuItem
//
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
this.addToolStripMenuItem.Size = new System.Drawing.Size(41, 20);
this.addToolStripMenuItem.Text = "Add";
this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
//
// ofd
//
this.ofd.FileName = "SyncList.xml";
this.ofd.Filter = "XML Files|*.xml";
this.ofd.FileOk += new System.ComponentModel.CancelEventHandler(this.ofd_FileOk);
//
// sfd
//
this.sfd.FileName = "SyncList.XML";
this.sfd.Filter = "XML Files|*.xml";
this.sfd.FileOk += new System.ComponentModel.CancelEventHandler(this.sfd_FileOk);
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsslStatus});
this.statusStrip1.Location = new System.Drawing.Point(0, 333);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(672, 22);
this.statusStrip1.TabIndex = 1;
this.statusStrip1.Text = "statusStrip1";
//
// tsslStatus
//
this.tsslStatus.Name = "tsslStatus";
this.tsslStatus.Size = new System.Drawing.Size(39, 17);
this.tsslStatus.Text = "Ready";
//
// dgv
//
this.dgv.AllowUserToAddRows = false;
this.dgv.AllowUserToDeleteRows = false;
this.dgv.AutoGenerateColumns = false;
this.dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.IsDifferent,
this.sourceDataGridViewTextBoxColumn,
this.destinationItemDataGridViewTextBoxColumn});
this.dgv.ContextMenuStrip = this.cms;
this.dgv.DataSource = this.compareItemsBindingSource;
this.dgv.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgv.Location = new System.Drawing.Point(0, 24);
this.dgv.Name = "dgv";
this.dgv.Size = new System.Drawing.Size(672, 309);
this.dgv.TabIndex = 2;
this.dgv.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgv_CellMouseDown);
//
// IsDifferent
//
this.IsDifferent.DataPropertyName = "IsDifferent";
this.IsDifferent.HeaderText = "IsDifferent";
this.IsDifferent.Name = "IsDifferent";
this.IsDifferent.ReadOnly = true;
//
// sourceDataGridViewTextBoxColumn
//
this.sourceDataGridViewTextBoxColumn.DataPropertyName = "Source";
this.sourceDataGridViewTextBoxColumn.HeaderText = "Source";
this.sourceDataGridViewTextBoxColumn.Name = "sourceDataGridViewTextBoxColumn";
//
// destinationItemDataGridViewTextBoxColumn
//
this.destinationItemDataGridViewTextBoxColumn.DataPropertyName = "DestinationItem";
this.destinationItemDataGridViewTextBoxColumn.HeaderText = "DestinationItem";
this.destinationItemDataGridViewTextBoxColumn.Name = "destinationItemDataGridViewTextBoxColumn";
//
// cms
//
this.cms.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.compareToolStripMenuItem1,
this.copySourceToDestinationToolStripMenuItem,
this.copyDestinationToSourceToolStripMenuItem,
this.removeToolStripMenuItem});
this.cms.Name = "cms";
this.cms.Size = new System.Drawing.Size(219, 92);
//
// compareToolStripMenuItem1
//
this.compareToolStripMenuItem1.Name = "compareToolStripMenuItem1";
this.compareToolStripMenuItem1.Size = new System.Drawing.Size(218, 22);
this.compareToolStripMenuItem1.Text = "Compare";
this.compareToolStripMenuItem1.Click += new System.EventHandler(this.compareToolStripMenuItem1_Click);
//
// copySourceToDestinationToolStripMenuItem
//
this.copySourceToDestinationToolStripMenuItem.Name = "copySourceToDestinationToolStripMenuItem";
this.copySourceToDestinationToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.copySourceToDestinationToolStripMenuItem.Text = "Copy Source to Destination";
this.copySourceToDestinationToolStripMenuItem.Click += new System.EventHandler(this.copySourceToDestinationToolStripMenuItem_Click);
//
// copyDestinationToSourceToolStripMenuItem
//
this.copyDestinationToSourceToolStripMenuItem.Name = "copyDestinationToSourceToolStripMenuItem";
this.copyDestinationToSourceToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.copyDestinationToSourceToolStripMenuItem.Text = "Copy Destination to Source";
this.copyDestinationToSourceToolStripMenuItem.Click += new System.EventHandler(this.copyDestinationToSourceToolStripMenuItem_Click);
//
// removeToolStripMenuItem
//
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
this.removeToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.removeToolStripMenuItem.Text = "Remove";
this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
//
// compareItemsBindingSource
//
this.compareItemsBindingSource.DataSource = typeof(SyncMany.CompareItem);
//
// frmSyncMany
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(672, 355);
this.Controls.Add(this.dgv);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "frmSyncMany";
this.Text = "Sync Many";
this.Load += new System.EventHandler(this.frmSyncMany_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSyncMany_FormClosing);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv)).EndInit();
this.cms.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.compareItemsBindingSource)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.OpenFileDialog ofd;
private System.Windows.Forms.SaveFileDialog sfd;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel tsslStatus;
private System.Windows.Forms.DataGridView dgv;
private System.Windows.Forms.BindingSource compareItemsBindingSource;
private System.Windows.Forms.ContextMenuStrip cms;
private System.Windows.Forms.ToolStripMenuItem compareToolStripMenuItem1;
private System.Windows.Forms.DataGridViewCheckBoxColumn IsDifferent;
private System.Windows.Forms.DataGridViewTextBoxColumn sourceDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn destinationItemDataGridViewTextBoxColumn;
private System.Windows.Forms.ToolStripMenuItem copySourceToDestinationToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem copyDestinationToSourceToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
}
}

View File

@@ -0,0 +1,269 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace SyncMany
{
public partial class frmSyncMany : Form
{
public string MyStatus
{
get { return tsslStatus.Text; }
set { tsslStatus.Text = value; Application.DoEvents(); }
}
private string _MyFileName;
public string MyFileName
{
get { return _MyFileName; }
set { _MyFileName = value; ofd.FileName = value; sfd.FileName = value; }
}
SyncFile _MySyncFile = new SyncFile();
public SyncFile MySyncFile
{
get { return _MySyncFile; }
set
{
_MySyncFile = value;
ResetOriginalSync();
dgv.DataSource = value.Items;
dgv.AutoResizeColumns();
}
}
private void ResetOriginalSync()
{
_OriginalSync = ObjectSerializer<SyncFile>.StringSerialize(MySyncFile);
}
private string _SourceFolder;
public string SourceFolder
{
get { return _SourceFolder; }
set { _SourceFolder = value; }
}
private string _DestinationFolder;
public string DestinationFolder
{
get { return _DestinationFolder; }
set { _DestinationFolder = value; }
}
public frmSyncMany()
{
InitializeComponent();
compareItemsBindingSource.DataSource = MySyncFile.Items;
}
public string _OriginalSync = "";
public bool IsDirty
{
get
{
string tmp = ObjectSerializer<SyncFile>.StringSerialize(MySyncFile);
return tmp != _OriginalSync;
}
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
if (ofd.ShowDialog() == DialogResult.OK)
{
MySyncFile = ObjectSerializer<SyncFile>.ReadFile(MyFileName);
}
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
if (MyFileName == null)
saveAsToolStripMenuItem_Click(sender, e);
else
{
ObjectSerializer<SyncFile>.WriteFile(MySyncFile, MyFileName);
ResetOriginalSync();
}
}
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
{
if (sfd.ShowDialog() == DialogResult.OK)
{
ObjectSerializer<SyncFile>.WriteFile(MySyncFile, MyFileName);
ResetOriginalSync();
}
}
private void ofd_FileOk(object sender, CancelEventArgs e)
{
MyFileName = ofd.FileName;
}
private void sfd_FileOk(object sender, CancelEventArgs e)
{
MyFileName = sfd.FileName;
}
private void addToolStripMenuItem_Click(object sender, EventArgs e)
{
frmAddCompareItem myCompareItem = new frmAddCompareItem(SourceFolder,DestinationFolder);
if (myCompareItem.ShowDialog() == DialogResult.OK)
{
SourceFolder = myCompareItem.SourceFolder;
DestinationFolder = myCompareItem.DestinationFolder;
MySyncFile.Items.Add(new CompareItem(myCompareItem.SourceName, myCompareItem.DestinationName));
//compareItemsBindingSource.Add(new CompareItem(myCompareItem.SourceName, myCompareItem.DestinationName));
compareItemsBindingSource.DataSource = null;
compareItemsBindingSource.DataSource = MySyncFile.Items;
dgv.DataSource = null;
dgv.DataSource = compareItemsBindingSource;
dgv.Refresh();
}
}
private void compareToolStripMenuItem1_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in dgv.SelectedRows)
{
CompareItem item = row.DataBoundItem as CompareItem;
if (item != null)
{
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(@"C:\Program Files\IDM Computer Solutions\UltraCompare\UC.exe",
string.Format(@" -t ""{0}"" ""{1}""", item.Source, item.DestinationItem));
System.Diagnostics.Process prc = System.Diagnostics.Process.Start(psi);
}
}
}
private void frmSyncMany_Load(object sender, EventArgs e)
{
LoadSettings();
this.Move +=new EventHandler(frmSyncMany_Move);
this.Resize +=new EventHandler(frmSyncMany_Resize);
FileInfo myInfo = new FileInfo(MyFileName);
if (myInfo.Exists)
MySyncFile = ObjectSerializer<SyncFile>.ReadFile(MyFileName);
else
MySyncFile = new SyncFile();
}
private void copySourceToDestinationToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in dgv.SelectedRows)
{
CompareItem item = row.DataBoundItem as CompareItem;
if (item != null)
{
item.CopySourceToDestination();
}
dgv.Refresh();
}
}
private void copyDestinationToSourceToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in dgv.SelectedRows)
{
CompareItem item = row.DataBoundItem as CompareItem;
if (item != null)
{
item.CopyDestinationToSource();
}
}
dgv.Refresh();
}
private void frmSyncMany_FormClosing(object sender, FormClosingEventArgs e)
{
if (IsDirty)
{
DialogResult result = MessageBox.Show("Do you want to Save changes?","Save Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
switch (result)
{
case DialogResult.Cancel:
// Don't close
e.Cancel = true;
return;
break;
case DialogResult.No:
// Don't do anything
break;
case DialogResult.Yes:
saveToolStripMenuItem_Click(this, e);
break;
}
}
SaveSettings();
}
private string GetPropertyString(string propertyName)
{
object prop = Properties.Settings.Default[propertyName];
return prop == null ? "" : prop.ToString();
}
private void LoadSettings()
{
string myDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
if (GetPropertyString("Location") != "")
this.Location = Properties.Settings.Default.Location;
if ((Properties.Settings.Default["Size"] ?? "") != "")
this.Size = Properties.Settings.Default.Size;
this.WindowState = Properties.Settings.Default.WindowState;
string test = GetPropertyString("FileName");
if (GetPropertyString("FileName") != "")
MyFileName = Properties.Settings.Default.FileName;
else
MyFileName = myDocuments + @"\SyncList.XML";
SetupOpenFileDialog(MyFileName);
if (GetPropertyString("SourceFolder") != "")
SourceFolder = Properties.Settings.Default.SourceFolder;
else
SourceFolder = myDocuments;
if (GetPropertyString("DestinationFolder") != "")
DestinationFolder = Properties.Settings.Default.DestinationFolder;
else
DestinationFolder = myDocuments;
}
private string SetupOpenFileDialog(string fileName)
{
FileInfo fi = new FileInfo(fileName);
sfd.InitialDirectory = ofd.InitialDirectory = fi.Directory.FullName;
sfd.FileName = ofd.FileName = fi.Name;
return ofd.InitialDirectory;
}
private void SaveSettings()
{
Properties.Settings.Default.WindowState = this.WindowState;
Properties.Settings.Default.FileName = MyFileName;
Properties.Settings.Default.SourceFolder = SourceFolder;
Properties.Settings.Default.DestinationFolder = DestinationFolder;
Properties.Settings.Default.Save();
}
private void frmSyncMany_Move(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Normal)
{
Properties.Settings.Default.Location = this.Location;
Properties.Settings.Default.Size = this.Size;
}
}
private void frmSyncMany_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Normal)
{
Properties.Settings.Default.Location = this.Location;
Properties.Settings.Default.Size = this.Size;
}
}
private void removeToolStripMenuItem_Click(object sender, EventArgs e)
{
int index = dgv.SelectedRows[0].Index;
dgv.Rows[index].Selected = false;
MySyncFile.Items.RemoveAt(index);
compareItemsBindingSource.DataSource = MySyncFile.Items;
dgv.DataSource = null;
dgv.DataSource = compareItemsBindingSource;
dgv.Refresh();
}
private void dgv_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.RowIndex >= 0)
{
dgv.Rows[e.RowIndex].Selected = true;
dgv.CurrentCell = dgv[0, e.RowIndex];
}
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
PROMS/xxxSync/Thumbs.db Normal file

Binary file not shown.

535
PROMS/xxxSync/frmSync.cs Normal file
View File

@@ -0,0 +1,535 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Xml;
using SevenZip;
namespace Sync
{
public partial class frmSync : Form
{
private List<FileCompare> _CheckedOut;
private bool IsLoading = false;
public frmSync()
{
InitializeComponent();
}
private void LoadSettings()
{
if (Properties.Settings.Default["Location"] != null)
Location = Properties.Settings.Default.Location;
if (Properties.Settings.Default["Size"] != null)
Size = Properties.Settings.Default.Size;
if (Properties.Settings.Default.DevelopmentFolder != "")
tbDevelopment.Text = Properties.Settings.Default.DevelopmentFolder;
if (Properties.Settings.Default.SourceSafeFolder != "")
tbSourceSafe.Text = Properties.Settings.Default.SourceSafeFolder;
if(Properties.Settings.Default.MailBoxDevelopmentFolder != "")
tbMailBox.Text = Properties.Settings.Default.MailBoxDevelopmentFolder;
if (Properties.Settings.Default.MailBoxSourceSafeFolder != "")
tbSSMailBox.Text = Properties.Settings.Default.MailBoxSourceSafeFolder;
}
private void frmSync_Load(object sender, EventArgs e)
{
LoadSettings();
Setup();
}
private void Setup()
{
// Setup Browse Buttons
btnBrwsDev.Tag = this.tbDevelopment;
btnBrwsSS.Tag = this.tbSourceSafe;
btnBrwsMail.Tag = this.tbMailBox;
btnBrwsSSMail.Tag = this.tbSSMailBox;
}
private void btnBrowse_Click(object sender, EventArgs e)
{
TextBox tb = (TextBox)((Button)sender).Tag;
fbd.SelectedPath = tb.Text;
if (fbd.ShowDialog() == DialogResult.OK)
tb.Text = fbd.SelectedPath;
}
private void ClearResults()
{
_CheckedOut = new List<FileCompare>();
dgv.DataSource = null;
Application.DoEvents();
}
private void FindCheckedOut(DirectoryInfo di)
{
FindCheckedOut(di.GetFiles());
FindCheckedOut(di.GetDirectories());
}
private void FindCheckedOut(DirectoryInfo[] directoryInfoList)
{
foreach (DirectoryInfo di in directoryInfoList)
FindCheckedOut(di);
}
private void FindCheckedOut(FileInfo[] fileInfoList)
{
foreach (FileInfo fi in fileInfoList)
FindCheckedOut(fi);
}
private void FindCheckedOut(FileInfo fi)
{
if (fi.Name.ToLower().EndsWith("scc")) return;
if (fi.Name.ToLower().EndsWith("sln")) return;
if (fi.Name.ToLower().EndsWith("csproj"))
{
// Find files that have been added to the new Project
List<string> compileList = GetCompileList(fi.FullName);
FileInfo fi1csproj = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
if (fi1csproj.Exists)
{
List<string> compileList1 = GetCompileList(fi1csproj.FullName);
CompareLists(compileList, compileList1, fi, fi1csproj);
}
return;
}
if (fi.Name.ToLower().EndsWith("licx")) return;
FileInfo fi1 = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
if ((fi1.Attributes & FileAttributes.ReadOnly) != FileAttributes.ReadOnly)
AddToResults(fi, fi1);
}
private void CompareLists(List<string> compileList, List<string> compileList1, FileInfo fi, FileInfo fi1)
{
// If anything is in compileList1 and not in CompileList add it to the results
foreach (string filename in compileList1)
if (!compileList.Contains(filename))
AddToResults(fi, fi1, filename);
}
private void AddToResults(FileInfo fi, FileInfo fi1, string filename)
{
FileInfo newfi = new FileInfo(fi.DirectoryName + "/" + filename);
FileInfo newfi1 = new FileInfo(fi1.DirectoryName + "/" + filename);
if(!newfi.Exists)AddToResults(newfi, newfi1); // Only add if the file does not exist
}
private List<string> GetCompileList(string fileName)
{
List<string> retval = new List<string>();
XmlDocument doc = new XmlDocument();
doc.Load(fileName);
XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
foreach (XmlAttribute attrib in doc.DocumentElement.Attributes)
if (attrib.Name == "xmlns")
nsmgr.AddNamespace("ns", attrib.Value);
XmlNodeList xl = doc.DocumentElement.SelectNodes(@"//ns:Compile/@Include",nsmgr);
foreach (XmlAttribute xa in xl)
retval.Add(xa.Value);
xl = doc.DocumentElement.SelectNodes(@"//ns:None/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
if(xa.Value.ToUpper().EndsWith("SQL"))
retval.Add(xa.Value);
xl = doc.DocumentElement.SelectNodes(@"//ns:Content/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
if (xa.Value.ToUpper().EndsWith("DLL"))
retval.Add(xa.Value);
xl = doc.DocumentElement.SelectNodes(@"//ns:Content/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
if (xa.Value.ToUpper().EndsWith("XML"))
retval.Add(xa.Value);
xl = doc.DocumentElement.SelectNodes(@"//ns:EmbeddedResource/@Include", nsmgr);
foreach (XmlAttribute xa in xl)
if (!xa.Value.ToUpper().EndsWith("LICX"))
retval.Add(xa.Value);
return retval;
}
private void AddToResults(FileInfo fiSS,FileInfo fiDev)
{
FileCompare fc = new FileCompare(fiDev, fiSS);
//if(!_OnlyContentDifferent || (fc.Different && (fc.DevModified != null)))
if (!_OnlyContentDifferent || (fc.Different))
_CheckedOut.Add(fc);
//if (tbResults.Text == "") tbResults.Text = "Found:";
//tbResults.Text += "\r\n" + fiDev.FullName + " - " + ((fiDev.Attributes & FileAttributes.ReadOnly) != FileAttributes.ReadOnly ? "" : "ReadOnly");
}
private void ClearMailBox()
{
DeleteFolder(new DirectoryInfo(tbMailBox.Text));
DeleteFolder(new DirectoryInfo(tbSSMailBox.Text));
}
private void DeleteFolder(DirectoryInfo directoryInfo)
{
if (directoryInfo.Exists)
{
AdjustAttributes(directoryInfo);
directoryInfo.Delete(true);
}
}
private void AdjustAttributes(DirectoryInfo directoryInfo)
{
foreach (DirectoryInfo di in directoryInfo.GetDirectories())
AdjustAttributes(di);
foreach (FileInfo fi in directoryInfo.GetFiles())
AdjustAttribute(fi);
}
private void AdjustAttribute(FileInfo fi)
{
fi.Attributes &= (fi.Attributes ^ FileAttributes.ReadOnly);// Turn-Off ReadOnly Attribute
fi.Attributes &= (fi.Attributes ^ FileAttributes.Hidden);// Turn-Off Hidden Attribute
}
private void frmSync_FormClosing(object sender, FormClosingEventArgs e)
{
Properties.Settings.Default.Location = Location;
Properties.Settings.Default.Size = Size;
Properties.Settings.Default.DevelopmentFolder = tbDevelopment.Text;
Properties.Settings.Default.SourceSafeFolder = tbSourceSafe.Text;
Properties.Settings.Default.MailBoxDevelopmentFolder = tbMailBox.Text;
Properties.Settings.Default.MailBoxSourceSafeFolder = tbSSMailBox.Text;
Properties.Settings.Default.Save();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void clearToolStripMenuItem_Click(object sender, EventArgs e)
{
ClearMailBox();
}
private void buildToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearMailBox();
if (_CheckedOut == null)
checkedOutToolStripMenuItem_Click(sender, e);
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess)
{
fc.MoveDevToMailBox(tbDevelopment.Text, tbMailBox.Text);
fc.MoveSSToMailBox(tbSourceSafe.Text, tbSSMailBox.Text);
}
}
BuildZipOfMailBox(tbMailBox.Text);
}
private void BuildZipOfMailBox(string mailbox)
{
SevenZipCompressor.SetLibraryPath(Application.StartupPath + @"\7z.dll");
SevenZipCompressor cmpr = new SevenZipCompressor();
cmpr.PreserveDirectoryRoot = true;
string zipName = string.Format("{0} To SS {1}.7z", mailbox, DateTime.Now.ToString("yyyyMMdd HHmm"));
cmpr.CompressDirectory(mailbox, zipName, "*.*", true);
MessageBox.Show(string.Format("{0} created!", zipName), "Mailbox Zip Created", MessageBoxButtons.OK, MessageBoxIcon.Information);
//if (System.IO.File.Exists(@"c:\program files\7-zip\7z.exe"))
//{
// string args = string.Format(@"a -t7z ""{0} To SS {1}.7z"" ""{0}\*.*"" -r", mailbox, DateTime.Now.ToString("yyyyMMdd HHmm"));
// System.Diagnostics.Process p = System.Diagnostics.Process.Start(@"c:\program files\7-zip\7z", args);
// p.WaitForExit();
//}
//"c:\program files\7-zip\7z" a -t7z "C:\Development\MailBox\Proms To SS 20120424 1850.7z" "C:\Development\MailBox\Proms\*.*" -r
}
private void checkedOutToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearResults();
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindCheckedOut(new DirectoryInfo(tbSourceSafe.Text));
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void syncAllToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
fc.MoveToDevelopment();
}
}
private void restoreUnchangedToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
if(!fc.Different || fc.DevModified == null)
fc.MoveToDevelopment();
}
}
private void restoreSelectedToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess) fc.MoveToDevelopment();
}
}
private void restoreAllToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
fc.MoveToDevelopment();
}
}
private List<FileCompare> SelectedList
{
get
{
dgv.EndEdit();
List<FileCompare> fcList = new List<FileCompare>();
foreach (DataGridViewCell dgc in dgv.SelectedCells)
{
FileCompare fc = dgv.Rows[dgc.RowIndex].DataBoundItem as FileCompare;
if (fc != null && fcList.Contains(fc) == false)
fcList.Add(fc);
}
return fcList;
}
}
private void compareToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
// This should launch UltraCompare with the two files
// Which Item am I on
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
CompareOneFile(fc.FileName, fc.SSFileName);
}
}
private static void CompareOneFile(string fileDev, string fileSS)
{
Console.WriteLine("Compare {0} and {1}", fileDev, fileSS);
string progname = string.Empty;
if (System.IO.File.Exists(@"C:\Program Files\IDM Computer Solutions\UltraCompare\UC.exe"))
progname = @"C:\Program Files\IDM Computer Solutions\UltraCompare\UC.exe";
if (System.IO.File.Exists(@"C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\UC.exe"))
progname = @"C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\UC.exe";
// string cmd = string.Format("\"{0}\" -t \"{1}\" \"{2}\"", progname, fc.FileName, fc.SSFileName);
System.Diagnostics.ProcessStartInfo psi =
new System.Diagnostics.ProcessStartInfo(progname, string.Format(@" -t ""{0}"" ""{1}""", fileDev, fileSS));
System.Diagnostics.Process prc = System.Diagnostics.Process.Start(psi);
}
private void restoreToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
fc.MoveToDevelopment();
}
}
private void differentToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearResults();
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindDifferent(new DirectoryInfo(tbSourceSafe.Text));
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void SetColumnWidth()
{
IsLoading = true;
if (Properties.Settings.Default["Widths"] == null)
{
dgv.Columns[0].Width = 60;
dgv.Columns[1].Visible = false;
dgv.Columns[2].Width = 125;
dgv.Columns[3].Width = 125;
dgv.Columns[4].Width = 50;
dgv.Columns[5].Width = 500;
}
else
{
for (int i = 0; i < Properties.Settings.Default.Widths.Count; i++)
{
string sWidth = Properties.Settings.Default.Widths[i];
if (sWidth == "Invisible")
dgv.Columns[i].Visible = false;
else
dgv.Columns[i].Width = int.Parse(sWidth);
}
}
dgv.Columns[1].Visible = false;
IsLoading = false;
}
private void FindDifferent(DirectoryInfo di)
{
FindDifferent(di.GetFiles());
FindDifferent(di.GetDirectories());
}
private void FindDifferent(DirectoryInfo[] directoryInfoList)
{
foreach (DirectoryInfo di in directoryInfoList)
FindDifferent(di);
}
private void FindDifferent(FileInfo[] fileInfoList)
{
foreach (FileInfo fi in fileInfoList)
FindDifferent(fi);
}
private void FindDifferent(FileInfo fi)
{
if (fi.Name.ToLower().EndsWith("scc")) return;
if (fi.Name.ToLower().EndsWith("sln")) return;
if (fi.Name.ToLower().EndsWith("csproj"))
{
// Find files that have been added to the new Project
List<string> compileList = GetCompileList(fi.FullName);
FileInfo fi1csproj = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
if (fi1csproj.Exists)
{
List<string> compileList1 = GetCompileList(fi1csproj.FullName);
CompareLists(compileList, compileList1, fi, fi1csproj);
}
return;
}
if (fi.Name.ToLower().EndsWith("licx")) return;
FileInfo fiD = new FileInfo(fi.FullName.Replace(tbSourceSafe.Text, tbDevelopment.Text));
FileInfo fiS = fi;
// Only check Read-Only flag, other attributes are unimportant
if (fiS.LastWriteTimeUtc != fiD.LastWriteTimeUtc || (fiS.Attributes & FileAttributes.ReadOnly ) != (fiD.Attributes & FileAttributes.ReadOnly ))
AddToResults(fi, fiD);
}
private void dgv_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
{
if (!IsLoading)
{
System.Collections.Specialized.StringCollection widths = new System.Collections.Specialized.StringCollection();
foreach (DataGridViewColumn col in dgv.Columns)
widths.Add(col.Visible ? col.Width.ToString() : "Invisible");
Properties.Settings.Default.Widths = widths;
Properties.Settings.Default.Save();
}
}
private bool _OnlyContentDifferent = false;
private void contentDifferentToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
ClearResults();
_OnlyContentDifferent = true;
// Walk though Source Safe and check to see if the files in the Development folder are read-only
FindDifferent(new DirectoryInfo(tbSourceSafe.Text));
_OnlyContentDifferent = false;
dgv.DataSource = _CheckedOut;
SetColumnWidth();
}
private void frmSync_LocationChanged(object sender, EventArgs e)
{
Rectangle rec = Screen.GetWorkingArea(this);
int newLeft = Left;
int newTop = Top;
if (Math.Abs(Left - rec.X) < 10) newLeft = rec.X;
if (Math.Abs(Top - rec.Y) < 10) newTop = rec.Y;
if (Math.Abs(rec.X + rec.Width - Right) < 10) newLeft = rec.X + rec.Width - Width;
if (Math.Abs(rec.Y + rec.Height - Bottom) < 10) newTop = rec.Y + rec.Height - Height;
if (newTop != Top || newLeft != Left)
Location = new Point(newLeft, newTop);
}
private void restoreReadOnlyToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ReadOnly) fc.MoveToDevelopment();
}
}
private void listToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{
dgv.EndEdit();
StringBuilder sb = new StringBuilder();
int lenFolder = tbDevelopment.Text.Length;
string lastFolder = "";
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ToProcess)
{
FileInfo fi = new FileInfo(fc.FileName);
FileInfo fis = new FileInfo(fc.SSFileName);
string folder = fi.Directory.FullName.Substring(lenFolder + 1);
if (folder != lastFolder)
{
sb.Append(folder + ":\r\n");
lastFolder = folder;
}
sb.Append((fis.Exists ? "" : " =>NEW") + "\t" + fi.Name + "\r\n");
}
}
try
{
sb.Append("\r\nInternal Release:\r\n");
sb.Append("\r\nExternal Release:\r\n");
sb.Append("\r\nTesting Performed:\r\n");
sb.Append("\r\nTesting Requirements:\r\n");
Clipboard.Clear();
Clipboard.SetText(sb.ToString());
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
StringBuilder sb2 = new StringBuilder();
string prefix = "";
while (ex != null)
{
sb2.AppendLine(string.Format("{0}{1} - {2}",prefix, ex.GetType().Name, ex.Message));
prefix += " ";
}
MessageBox.Show(sb2.ToString(), "Error saving Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void dgv_MouseDown(object sender, MouseEventArgs e)
{
dgv.ClearSelection();
DataGridView.HitTestInfo info = dgv.HitTest(e.X, e.Y);
if (info.RowIndex < 0) return;
dgv.CurrentCell = dgv[0, info.RowIndex];
dgv.Rows[info.RowIndex].Selected = true;
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
{
if (_CheckedOut == null || _CheckedOut.Count == 0)
{
MessageBox.Show("Don't you really think you should get a list first!", "Hey Moron!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop);
return;
}
foreach (FileCompare fc in _CheckedOut) fc.ToProcess = true;
dgv.Refresh();
}
private void selectNoneToolStripMenuItem_Click(object sender, EventArgs e)
{
if (_CheckedOut == null || _CheckedOut.Count == 0)
{
MessageBox.Show("Don't you really think you should get a list first!", "Hey Moron!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop);
return;
}
foreach (FileCompare fc in _CheckedOut) fc.ToProcess = false;
dgv.Refresh();
}
private void compareSourceSafeToolStripMenuItem_Click(object sender, EventArgs e)
{
// Compare SS version with SS version from Mailbox
dgv.EndEdit();
// This should launch UltraCompare with the two files
// Which Item am I on
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
CompareOneFile(fc.SSFileName, fc.SSFileName.Replace(tbSourceSafe.Text, tbSSMailBox.Text));
}
}
private void compareMailboxToolStripMenuItem_Click(object sender, EventArgs e)
{
// Compare MailBox version with Mailbox Source Safe version
dgv.EndEdit();
// This should launch UltraCompare with the two files
// Which Item am I on
List<FileCompare> fcList = SelectedList;
foreach (FileCompare fc in fcList)
{
CompareOneFile(fc.FileName, fc.FileName.Replace(tbDevelopment.Text, tbSSMailBox.Text));
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
PROMS/xxxSync/iSync.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
PROMS/xxxSync/sync.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB