This commit is contained in:
Rich
2010-03-26 12:10:02 +00:00
parent 53cc599846
commit 2eb5d9d6bc
32 changed files with 12506 additions and 0 deletions

View File

@@ -0,0 +1,135 @@
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; }
}
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,112 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.832
//
// 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", "2.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;
}
}
internal static System.Drawing.Icon iSync {
get {
object obj = ResourceManager.GetObject("iSync", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap iSync_128x128 {
get {
object obj = ResourceManager.GetObject("iSync_128x128", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Icon wi0124_16 {
get {
object obj = ResourceManager.GetObject("wi0124_16", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Icon wi0124_24 {
get {
object obj = ResourceManager.GetObject("wi0124_24", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Icon wi0124_32 {
get {
object obj = ResourceManager.GetObject("wi0124_32", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Icon wi0124_48 {
get {
object obj = ResourceManager.GetObject("wi0124_48", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
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:2.0.50727.1433
//
// 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", "8.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>

103
PROMS/Sync/Sync/Sync.csproj Normal file
View File

@@ -0,0 +1,103 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<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>
</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="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>
<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,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>

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

@@ -0,0 +1,450 @@
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.restoreReadOnlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.listToClipboardToolStripMenuItem = 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.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);
//
// 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.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);
//
// 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;
private System.Windows.Forms.ToolStripMenuItem restoreReadOnlyToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem listToClipboardToolStripMenuItem;
}
}

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;
}
}

416
PROMS/Sync/Sync/frmSync.cs Normal file
View File

@@ -0,0 +1,416 @@
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;
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"))
{
// 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);
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);
}
}
}
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)
{
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)
{
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");
}
}
Clipboard.Clear();
Clipboard.SetText(sb.ToString());
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}

View File

@@ -0,0 +1,377 @@
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;
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"))
{
// 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));
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);
return retval;
}
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"))
{
// 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));
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)
{
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)
{
foreach (FileCompare fc in _CheckedOut)
{
if (fc.ReadOnly) fc.MoveToDevelopment();
}
}
}
}

1516
PROMS/Sync/Sync/frmSync.resx Normal file

File diff suppressed because it is too large Load Diff