Disassembled CarotDav v1.14.7 with dotPeek 2017.2

This commit is contained in:
Mike Schwörer 2017-10-06 17:20:58 +02:00
commit 2002a53fb5
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
191 changed files with 69359 additions and 0 deletions

456
.gitignore vendored Normal file
View File

@ -0,0 +1,456 @@
# Created by https://www.gitignore.io/api/csharp,windows,visualstudio
### Csharp ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Uncomment the next line to ignore your web deploy settings.
# By default, sensitive information, such as encrypted password
# should be stored in the .pubxml.user file.
#*.pubxml
*.pubxml.user
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Typescript v1 declaration files
typings/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### VisualStudio ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
# User-specific files (MonoDevelop/Xamarin Studio)
# Build results
# Visual Studio 2015 cache/options directory
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
# NUNIT
# Build Results of an ATL Project
# .NET Core
# Chutzpah Test files
# Visual C++ cache files
# Visual Studio profiler
# TFS 2012 Local Workspace
# Guidance Automation Toolkit
# ReSharper is a .NET coding add-in
# JustCode is a .NET coding add-in
# TeamCity is a build add-in
# DotCover is a Code Coverage Tool
# Visual Studio code coverage results
# NCrunch
# MightyMoose
# Web workbench (sass)
# Installshield output folder
# DocProject is a documentation generator add-in
# Click-Once directory
# Publish Web Output
# TODO: Uncomment the next line to ignore your web deploy settings.
# By default, sensitive information, such as encrypted password
# should be stored in the .pubxml.user file.
#*.pubxml
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
# NuGet Packages
# The packages folder can be ignored because of Package Restore
# except build/, which is used as an MSBuild target.
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignorable files
# Microsoft Azure Build Output
# Microsoft Azure Emulator
# Windows Store app package directories and files
# Visual Studio cache files
# files ending in .cache can be ignored
# but keep track of directories ending in .cache
# Others
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
# SQL Server files
# Business Intelligence projects
# Microsoft Fakes
# GhostDoc plugin setting file
# Node.js Tools for Visual Studio
# Typescript v1 declaration files
# Visual Studio 6 build log
# Visual Studio 6 workspace options file
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
# Visual Studio LightSwitch build output
# Paket dependency manager
# FAKE - F# Make
# JetBrains Rider
# CodeRush
# Python Tools for Visual Studio (PTVS)
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Telerik's JustMock configuration file
# BizTalk build output
### VisualStudio Patch ###
# By default, sensitive information, such as encrypted password
# should be stored in the .pubxml.user file.
# End of https://www.gitignore.io/api/csharp,windows,visualstudio

233
CarotDAV/AboutForm.cs Normal file
View File

@ -0,0 +1,233 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.AboutForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
public class AboutForm : Form
{
private IContainer components;
[AccessedThroughProperty("lblSoftwareName")]
private Label _lblSoftwareName;
[AccessedThroughProperty("lblCopy")]
private Label _lblCopy;
[AccessedThroughProperty("PictureBox1")]
private PictureBox _PictureBox1;
[AccessedThroughProperty("SupportLinkLabel")]
private LinkLabel _SupportLinkLabel;
public AboutForm()
{
this.Load += new EventHandler(this.AboutForm_Load);
this.InitializeComponent();
}
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
internal virtual Label lblSoftwareName
{
get
{
return this._lblSoftwareName;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._lblSoftwareName = value;
}
}
internal virtual Label lblCopy
{
get
{
return this._lblCopy;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._lblCopy = value;
}
}
internal virtual PictureBox PictureBox1
{
get
{
return this._PictureBox1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.PictureBox1_Click);
if (this._PictureBox1 != null)
this._PictureBox1.Click -= eventHandler;
this._PictureBox1 = value;
if (this._PictureBox1 == null)
return;
this._PictureBox1.Click += eventHandler;
}
}
internal virtual LinkLabel SupportLinkLabel
{
get
{
return this._SupportLinkLabel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.SupportLinkLabel_Click);
if (this._SupportLinkLabel != null)
this._SupportLinkLabel.Click -= eventHandler;
this._SupportLinkLabel = value;
if (this._SupportLinkLabel == null)
return;
this._SupportLinkLabel.Click += eventHandler;
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.lblSoftwareName = new Label();
this.lblCopy = new Label();
this.PictureBox1 = new PictureBox();
this.SupportLinkLabel = new LinkLabel();
((ISupportInitialize) this.PictureBox1).BeginInit();
this.SuspendLayout();
this.lblSoftwareName.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
this.lblSoftwareName.BackColor = Color.Transparent;
Label lblSoftwareName1 = this.lblSoftwareName;
Point point1 = new Point(8, 12);
Point point2 = point1;
lblSoftwareName1.Location = point2;
this.lblSoftwareName.Name = "lblSoftwareName";
Label lblSoftwareName2 = this.lblSoftwareName;
Size size1 = new Size(238, 16);
Size size2 = size1;
lblSoftwareName2.Size = size2;
this.lblSoftwareName.TabIndex = 0;
this.lblSoftwareName.Text = "Software Name";
this.lblCopy.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
this.lblCopy.BackColor = Color.Transparent;
Label lblCopy1 = this.lblCopy;
point1 = new Point(8, 36);
Point point3 = point1;
lblCopy1.Location = point3;
this.lblCopy.Name = "lblCopy";
Label lblCopy2 = this.lblCopy;
size1 = new Size(238, 16);
Size size3 = size1;
lblCopy2.Size = size3;
this.lblCopy.TabIndex = 1;
this.lblCopy.Text = "Copyright";
this.PictureBox1.Cursor = Cursors.Hand;
this.PictureBox1.Image = (Image) CarotDAV.My.Resources.Resources.logo_w;
PictureBox pictureBox1_1 = this.PictureBox1;
point1 = new Point(248, 0);
Point point4 = point1;
pictureBox1_1.Location = point4;
this.PictureBox1.Name = "PictureBox1";
PictureBox pictureBox1_2 = this.PictureBox1;
size1 = new Size(100, 82);
Size size4 = size1;
pictureBox1_2.Size = size4;
this.PictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
this.PictureBox1.TabIndex = 5;
this.PictureBox1.TabStop = false;
LinkLabel supportLinkLabel1 = this.SupportLinkLabel;
point1 = new Point(8, 60);
Point point5 = point1;
supportLinkLabel1.Location = point5;
this.SupportLinkLabel.Name = "SupportLinkLabel";
LinkLabel supportLinkLabel2 = this.SupportLinkLabel;
size1 = new Size(216, 16);
Size size5 = size1;
supportLinkLabel2.Size = size5;
this.SupportLinkLabel.TabIndex = 2;
this.SupportLinkLabel.TabStop = true;
this.SupportLinkLabel.Text = "Support URI";
size1 = new Size(5, 12);
this.AutoScaleBaseSize = size1;
this.BackColor = Color.White;
size1 = new Size(354, 82);
this.ClientSize = size1;
this.Controls.Add((Control) this.SupportLinkLabel);
this.Controls.Add((Control) this.PictureBox1);
this.Controls.Add((Control) this.lblCopy);
this.Controls.Add((Control) this.lblSoftwareName);
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = nameof (AboutForm);
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = FormStartPosition.CenterScreen;
this.Text = "About";
((ISupportInitialize) this.PictureBox1).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private void AboutForm_Load(object sender, EventArgs e)
{
Assembly executingAssembly = Assembly.GetExecutingAssembly();
string str = executingAssembly.GetName().Version.ToString(3);
string product = ((AssemblyProductAttribute) executingAssembly.GetCustomAttributes(typeof (AssemblyProductAttribute), false)[0]).Product;
string copyright = ((AssemblyCopyrightAttribute) executingAssembly.GetCustomAttributes(typeof (AssemblyCopyrightAttribute), false)[0]).Copyright;
string description = ((AssemblyDescriptionAttribute) executingAssembly.GetCustomAttributes(typeof (AssemblyDescriptionAttribute), false)[0]).Description;
this.lblSoftwareName.Text = product + " " + str;
this.lblCopy.Text = copyright;
this.SupportLinkLabel.Text = "http://rei.to/";
this.PictureBox1.Location = new Point(checked (this.ClientRectangle.Width - this.PictureBox1.Width), checked (this.ClientRectangle.Height - this.PictureBox1.Height));
}
private void SupportLinkLabel_Click(object sender, EventArgs e)
{
this.SupportLinkLabel.LinkVisited = true;
try
{
Process.Start(this.SupportLinkLabel.Text);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
}
private void PictureBox1_Click(object sender, EventArgs e)
{
try
{
Process.Start(this.SupportLinkLabel.Text);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
}
}
}

120
CarotDAV/AboutForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

12
CarotDAV/AssemblyInfo.cs Normal file
View File

@ -0,0 +1,12 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyProduct("CarotDAV")]
[assembly: ComVisible(false)]
[assembly: AssemblyDescription("WebDAV Client")]
[assembly: Guid("6942ff74-9153-4b3f-a978-d5d07508ee33")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCompany("Rei Software")]
[assembly: AssemblyCopyright("(C) 2007-2016 Rei HOBARA")]
[assembly: AssemblyTitle("CarotDAV")]
[assembly: AssemblyVersion("1.13.2.18337")]

2277
CarotDAV/AsyncCopy.cs Normal file

File diff suppressed because it is too large Load Diff

840
CarotDAV/CacheManager.cs Normal file
View File

@ -0,0 +1,840 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.CacheManager
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using Rei.Fs;
using System;
using System.Collections.Generic;
using System.IO;
namespace CarotDAV
{
public class CacheManager
{
public Dictionary<Uri, ResourceInfo> infodic;
public Dictionary<Uri, List<Uri>> entriesdic;
public Uri watchuri;
public CacheManager()
{
this.infodic = new Dictionary<Uri, ResourceInfo>();
this.entriesdic = new Dictionary<Uri, List<Uri>>();
}
public event CacheManager.ResourceChangedEventHandler ResourceChanged;
public void RegisterWatchUri(Uri target)
{
lock (this.infodic)
this.watchuri = target;
}
public void Clear()
{
lock (this.infodic)
{
this.infodic.Clear();
this.entriesdic.Clear();
}
}
public ResourceInfo GetInfo(FsBase fs, ResourceId id, bool enablecache)
{
lock (this.infodic)
{
if (enablecache)
{
if (this.infodic.ContainsKey(id.Uri))
return this.infodic[id.Uri];
}
}
Uri parent = UriUtil.GetParent(id.Uri);
ResourceInfo info;
try
{
info = fs.GetInfo(id);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateNotFound(id.Uri);
throw;
}
ResourceChangedEventArgs e = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
if (this.infodic.ContainsKey(info.Id.Uri))
this.infodic[info.Id.Uri] = info;
else
this.infodic.Add(info.Id.Uri, info);
if (this.entriesdic.ContainsKey(parent) && !this.entriesdic[parent].Contains(info.Id.Uri))
this.entriesdic.Remove(parent);
if (!(this.watchuri == id.Uri))
{
if (!(this.watchuri == parent))
goto label_21;
}
e = new ResourceChangedEventArgs((ReturnedInfo) info);
}
label_21:
if (e != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e);
}
return info;
}
public ResourceInfo GetInfo(FsBase fs, ResourceId parentid, string name, bool enablecache)
{
if (enablecache)
{
lock (this.infodic)
{
if (this.entriesdic.ContainsKey(parentid.Uri))
{
int num1 = 0;
int num2 = checked (this.entriesdic[parentid.Uri].Count - 1);
int index = num1;
while (index <= num2)
{
if (Operators.CompareString(name, UriUtil.GetLastName(this.entriesdic[parentid.Uri][index]), false) == 0)
{
if (this.infodic.ContainsKey(this.entriesdic[parentid.Uri][index]))
return this.infodic[this.entriesdic[parentid.Uri][index]];
goto label_11;
}
else
checked { ++index; }
}
throw new RemoteResourceNotFoundException(UriUtil.CombineName(parentid.Uri, name), (Exception) null);
}
}
}
label_11:
ResourceInfo info;
try
{
info = fs.GetInfo(parentid, name);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
Uri target = UriUtil.CombineName(parentid.Uri, name);
lock (this.infodic)
this.InnerUpdateNotFound(target);
throw;
}
ResourceChangedEventArgs e = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
if (this.infodic.ContainsKey(info.Id.Uri))
this.infodic[info.Id.Uri] = info;
else
this.infodic.Add(info.Id.Uri, info);
if (this.entriesdic.ContainsKey(parentid.Uri) && !this.entriesdic[parentid.Uri].Contains(info.Id.Uri))
this.entriesdic.Remove(parentid.Uri);
if (!(this.watchuri == info.Id.Uri))
{
if (!(this.watchuri == parentid.Uri))
goto label_27;
}
e = new ResourceChangedEventArgs((ReturnedInfo) info);
}
label_27:
if (e != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e);
}
return info;
}
public ResourceInfo[] GetEntries(FsBase fs, ResourceId id, bool enablecache)
{
if (enablecache)
{
lock (this.infodic)
{
if (this.entriesdic.ContainsKey(id.Uri))
{
List<ResourceInfo> resourceInfoList = new List<ResourceInfo>();
int num1 = 0;
int num2 = checked (this.entriesdic[id.Uri].Count - 1);
int index = num1;
while (index <= num2)
{
if (this.infodic.ContainsKey(this.entriesdic[id.Uri][index]))
{
resourceInfoList.Add(this.infodic[this.entriesdic[id.Uri][index]]);
checked { ++index; }
}
else
goto label_9;
}
return resourceInfoList.ToArray();
}
}
}
label_9:
ResourceInfo[] entries;
try
{
entries = fs.GetEntries(id);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateInfoAndEntries_NotFound(id.Uri);
throw;
}
List<ResourceChangedEventArgs> changedEventArgsList = new List<ResourceChangedEventArgs>();
lock (this.infodic)
{
if (this.entriesdic.ContainsKey(id.Uri))
this.entriesdic[id.Uri].Clear();
else
this.entriesdic.Add(id.Uri, new List<Uri>());
int num1 = 0;
int num2 = checked (entries.Length - 1);
int index1 = num1;
while (index1 <= num2)
{
this.entriesdic[id.Uri].Add(entries[index1].Id.Uri);
if (this.infodic.ContainsKey(entries[index1].Id.Uri))
this.infodic[entries[index1].Id.Uri] = entries[index1];
else
this.infodic.Add(entries[index1].Id.Uri, entries[index1]);
checked { ++index1; }
}
int num3 = 0;
int num4 = checked (entries.Length - 1);
int index2 = num3;
while (index2 <= num4)
{
if (this.watchuri == id.Uri || this.watchuri == entries[index2].Id.Uri)
changedEventArgsList.Add(new ResourceChangedEventArgs((ReturnedInfo) entries[index2]));
checked { ++index2; }
}
}
int num5 = 0;
int num6 = checked (changedEventArgsList.Count - 1);
int index3 = num5;
while (index3 <= num6)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, changedEventArgsList[index3]);
checked { ++index3; }
}
return entries;
}
public ResourceInfo[] GetInfoAndEntries(FsBase fs, Uri targeturi, bool enablecache)
{
if (enablecache)
{
ResourceInfo[] infoAndEntries;
lock (this.infodic)
infoAndEntries = this.InnerFindInfoAndEntries(targeturi);
if (infoAndEntries != null)
return infoAndEntries;
}
ResourceInfo[] infoAndEntries1;
try
{
infoAndEntries1 = fs.GetInfoAndEntries(targeturi);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateInfoAndEntries_NotFound(targeturi);
throw;
}
List<ResourceChangedEventArgs> changedEventArgsList = new List<ResourceChangedEventArgs>();
lock (this.infodic)
{
this.InnerUpdateInfoAndEntries_Success(infoAndEntries1);
if (this.watchuri == UriUtil.GetParent(infoAndEntries1[0].Id.Uri) || this.watchuri == infoAndEntries1[0].Id.Uri)
changedEventArgsList.Add(new ResourceChangedEventArgs((ReturnedInfo) infoAndEntries1[0]));
int num1 = 1;
int num2 = checked (infoAndEntries1.Length - 1);
int index = num1;
while (index <= num2)
{
if (this.watchuri == targeturi || this.watchuri == infoAndEntries1[index].Id.Uri)
changedEventArgsList.Add(new ResourceChangedEventArgs((ReturnedInfo) infoAndEntries1[index]));
checked { ++index; }
}
}
int num3 = 0;
int num4 = checked (changedEventArgsList.Count - 1);
int index1 = num3;
while (index1 <= num4)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, changedEventArgsList[index1]);
checked { ++index1; }
}
return infoAndEntries1;
}
public ResourceInfo[] GetInfoAndEntries(FsBase fs, ResourceId id, bool enablecache)
{
if (enablecache)
{
ResourceInfo[] infoAndEntries;
lock (this.infodic)
infoAndEntries = this.InnerFindInfoAndEntries(id.Uri);
if (infoAndEntries != null)
return infoAndEntries;
}
ResourceInfo[] infoAndEntries1;
try
{
infoAndEntries1 = fs.GetInfoAndEntries(id);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateInfoAndEntries_NotFound(id.Uri);
throw;
}
List<ResourceChangedEventArgs> changedEventArgsList = new List<ResourceChangedEventArgs>();
lock (this.infodic)
{
this.InnerUpdateInfoAndEntries_Success(infoAndEntries1);
if (this.watchuri == UriUtil.GetParent(infoAndEntries1[0].Id.Uri) || this.watchuri == infoAndEntries1[0].Id.Uri)
changedEventArgsList.Add(new ResourceChangedEventArgs((ReturnedInfo) infoAndEntries1[0]));
int num1 = 1;
int num2 = checked (infoAndEntries1.Length - 1);
int index = num1;
while (index <= num2)
{
if (this.watchuri == id.Uri || this.watchuri == infoAndEntries1[index].Id.Uri)
changedEventArgsList.Add(new ResourceChangedEventArgs((ReturnedInfo) infoAndEntries1[index]));
checked { ++index; }
}
}
int num3 = 0;
int num4 = checked (changedEventArgsList.Count - 1);
int index1 = num3;
while (index1 <= num4)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, changedEventArgsList[index1]);
checked { ++index1; }
}
return infoAndEntries1;
}
public ResourceInfo[] GetParentInfoAndEntries(FsBase fs, ResourceId childid, bool enablecache)
{
Uri parent = UriUtil.GetParent(childid.Uri);
if (enablecache)
{
ResourceInfo[] infoAndEntries;
lock (this.infodic)
infoAndEntries = this.InnerFindInfoAndEntries(parent);
if (infoAndEntries != null)
return infoAndEntries;
}
ResourceInfo[] parentInfoAndEntries;
try
{
parentInfoAndEntries = fs.GetParentInfoAndEntries(childid);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateInfoAndEntries_NotFound(parent);
throw;
}
List<ResourceChangedEventArgs> changedEventArgsList = new List<ResourceChangedEventArgs>();
lock (this.infodic)
{
this.InnerUpdateInfoAndEntries_Success(parentInfoAndEntries);
if (this.watchuri == UriUtil.GetParent(parentInfoAndEntries[0].Id.Uri) || this.watchuri == parentInfoAndEntries[0].Id.Uri)
changedEventArgsList.Add(new ResourceChangedEventArgs((ReturnedInfo) parentInfoAndEntries[0]));
int num1 = 1;
int num2 = checked (parentInfoAndEntries.Length - 1);
int index = num1;
while (index <= num2)
{
if (this.watchuri == parentInfoAndEntries[0].Id.Uri || this.watchuri == parentInfoAndEntries[index].Id.Uri)
changedEventArgsList.Add(new ResourceChangedEventArgs((ReturnedInfo) parentInfoAndEntries[index]));
checked { ++index; }
}
}
int num3 = 0;
int num4 = checked (changedEventArgsList.Count - 1);
int index1 = num3;
while (index1 <= num4)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, changedEventArgsList[index1]);
checked { ++index1; }
}
return parentInfoAndEntries;
}
public ReturnedInfo CreateCollection(FsBase fs, ResourceId parentid, string name)
{
ReturnedInfo collection;
try
{
collection = fs.CreateCollection(parentid, name);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateNotFound(parentid.Uri);
throw;
}
ResourceInfo resourceInfo = collection as ResourceInfo;
ResourceId resourceId = resourceInfo != null ? resourceInfo.Id : collection as ResourceId;
ResourceChangedEventArgs e = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
if (resourceInfo != null)
{
if (this.infodic.ContainsKey(resourceInfo.Id.Uri))
this.infodic[resourceInfo.Id.Uri] = resourceInfo;
else
this.infodic.Add(resourceInfo.Id.Uri, resourceInfo);
if (!this.entriesdic.ContainsKey(parentid.Uri))
this.entriesdic.Add(parentid.Uri, new List<Uri>());
if (this.entriesdic[parentid.Uri].Contains(resourceInfo.Id.Uri))
this.entriesdic[parentid.Uri].Remove(resourceInfo.Id.Uri);
this.entriesdic[parentid.Uri].Add(resourceInfo.Id.Uri);
}
else
this.entriesdic.Remove(parentid.Uri);
if (!(this.watchuri == resourceId.Uri))
{
if (!(this.watchuri == parentid.Uri))
goto label_20;
}
e = new ResourceChangedEventArgs(collection, ResourceChangedEventArgs.ChangeType.Create);
}
label_20:
if (e != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e);
}
return collection;
}
public void Delete(FsBase fs, ResourceId id)
{
try
{
fs.Delete(id);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateNotFound(id.Uri);
throw;
}
ResourceChangedEventArgs e = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
this.InnerDiscardList(UriUtil.GetParent(id.Uri));
this.InnerDiscardInfo(id.Uri);
this.InnerDiscardList(id.Uri);
if (!(this.watchuri == id.Uri))
{
if (!(this.watchuri == UriUtil.GetParent(id.Uri)))
goto label_11;
}
e = new ResourceChangedEventArgs((ReturnedInfo) id, ResourceChangedEventArgs.ChangeType.Delete);
}
label_11:
if (e == null)
return;
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent == null)
return;
resourceChangedEvent((object) this, e);
}
public ReturnedInfo Move(FsBase fs, ResourceId id, ResourceId newparentid, string newname, bool overwrite)
{
ReturnedInfo re;
try
{
re = fs.Move(id, newparentid, newname, overwrite);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateNotFound(id.Uri);
throw;
}
ResourceInfo resourceInfo = re as ResourceInfo;
ResourceId resourceId = resourceInfo != null ? resourceInfo.Id : re as ResourceId;
ResourceChangedEventArgs e1 = (ResourceChangedEventArgs) null;
ResourceChangedEventArgs e2 = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
this.infodic.Remove(id.Uri);
this.entriesdic.Remove(id.Uri);
if ((object) newparentid != null)
{
Uri parent = UriUtil.GetParent(id.Uri);
if (this.entriesdic.ContainsKey(parent))
this.entriesdic[parent].Remove(id.Uri);
}
if (resourceInfo != null)
{
if (this.infodic.ContainsKey(resourceInfo.Id.Uri))
this.infodic[resourceInfo.Id.Uri] = resourceInfo;
else
this.infodic.Add(resourceInfo.Id.Uri, resourceInfo);
if ((object) newparentid != null && this.entriesdic.ContainsKey(newparentid.Uri))
{
if (this.entriesdic[newparentid.Uri].Contains(resourceInfo.Id.Uri))
this.entriesdic[newparentid.Uri].Remove(resourceInfo.Id.Uri);
this.entriesdic[newparentid.Uri].Add(resourceInfo.Id.Uri);
}
}
else if ((object) newparentid != null)
this.entriesdic.Remove(newparentid.Uri);
if (this.watchuri == id.Uri || this.watchuri == UriUtil.GetParent(id.Uri))
e1 = new ResourceChangedEventArgs((ReturnedInfo) id, ResourceChangedEventArgs.ChangeType.Delete);
if (!(this.watchuri == resourceId.Uri))
{
if (!(this.watchuri == UriUtil.GetParent(resourceId.Uri)))
goto label_25;
}
e2 = new ResourceChangedEventArgs(re, ResourceChangedEventArgs.ChangeType.Create);
}
label_25:
if (e1 != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e1);
}
if (e2 != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e2);
}
return re;
}
public ReturnedInfo Copy(FsBase fs, ResourceId id, ResourceId newparentid, string newname, bool overwrite)
{
ReturnedInfo re;
try
{
re = fs.Copy(id, newparentid, newname, overwrite);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateNotFound(id.Uri);
throw;
}
ResourceInfo resourceInfo = re as ResourceInfo;
ResourceId resourceId = resourceInfo != null ? resourceInfo.Id : re as ResourceId;
ResourceChangedEventArgs e = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
if (resourceInfo != null)
{
if (this.infodic.ContainsKey(resourceInfo.Id.Uri))
this.infodic[resourceInfo.Id.Uri] = resourceInfo;
else
this.infodic.Add(resourceInfo.Id.Uri, resourceInfo);
if ((object) newparentid != null && this.entriesdic.ContainsKey(newparentid.Uri))
{
if (this.entriesdic[newparentid.Uri].Contains(resourceInfo.Id.Uri))
this.entriesdic[newparentid.Uri].Remove(resourceInfo.Id.Uri);
this.entriesdic[newparentid.Uri].Add(resourceInfo.Id.Uri);
}
}
else if ((object) newparentid != null)
this.entriesdic.Remove(newparentid.Uri);
if (!(this.watchuri == resourceId.Uri))
{
if (!(this.watchuri == UriUtil.GetParent(resourceId.Uri)))
goto label_20;
}
e = new ResourceChangedEventArgs(re, ResourceChangedEventArgs.ChangeType.Create);
}
label_20:
if (e != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e);
}
return re;
}
public ReturnedInfo SetResourceInfo(FsBase fs, ResourceInfo newinfo, ResourceInfo originalinfo)
{
ReturnedInfo returnedInfo;
try
{
returnedInfo = fs.SetResourceInfo(newinfo, originalinfo);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateNotFound(originalinfo.Id.Uri);
throw;
}
ResourceInfo resourceInfo = returnedInfo as ResourceInfo;
ResourceId resourceId = resourceInfo != null ? resourceInfo.Id : returnedInfo as ResourceId;
ResourceChangedEventArgs e = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
if (resourceInfo != null)
{
if (this.infodic.ContainsKey(resourceInfo.Id.Uri))
this.infodic[resourceInfo.Id.Uri] = resourceInfo;
else
this.infodic.Add(resourceInfo.Id.Uri, resourceInfo);
}
else
this.infodic.Remove(resourceId.Uri);
if (!(this.watchuri == originalinfo.Id.Uri))
{
if (!(this.watchuri == UriUtil.GetParent(originalinfo.Id.Uri)))
goto label_15;
}
e = new ResourceChangedEventArgs((ReturnedInfo) originalinfo.Id, ResourceChangedEventArgs.ChangeType.PropertyChange);
}
label_15:
if (e != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e);
}
return returnedInfo;
}
public ReturnedInfo SetTimes(FsBase fs, ResourceId id, DateTime lastmodifiedtime, DateTime creationtime, DateTime lastaccesstime)
{
ReturnedInfo re;
try
{
re = fs.SetTimes(id, lastmodifiedtime, creationtime, lastaccesstime);
}
catch (RemoteResourceNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
lock (this.infodic)
this.InnerUpdateNotFound(id.Uri);
throw;
}
ResourceInfo resourceInfo = re as ResourceInfo;
ResourceId resourceId = resourceInfo != null ? resourceInfo.Id : re as ResourceId;
ResourceChangedEventArgs e = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
if (resourceInfo != null)
{
if (this.infodic.ContainsKey(resourceInfo.Id.Uri))
this.infodic[resourceInfo.Id.Uri] = resourceInfo;
else
this.infodic.Add(resourceInfo.Id.Uri, resourceInfo);
}
else
this.infodic.Remove(resourceId.Uri);
if (!(this.watchuri == id.Uri))
{
if (!(this.watchuri == UriUtil.GetParent(id.Uri)))
goto label_15;
}
e = new ResourceChangedEventArgs(re, ResourceChangedEventArgs.ChangeType.PropertyUpdate);
}
label_15:
if (e != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e);
}
return re;
}
public Stream OpenRead(FsBase fs, Uri targeturi)
{
return fs.OpenRead(targeturi);
}
public Stream OpenRead(FsBase fs, ResourceId id, ref long start, ref long length)
{
return fs.OpenRead(id, ref start, ref length);
}
public Stream OpenWrite(FsBase fs, ResourceId parentid, string name, long length)
{
return fs.OpenWrite(parentid, name, length);
}
public Stream OpenWriteOver(FsBase fs, ResourceId id, long length)
{
return fs.OpenWriteOver(id, length);
}
public Stream OpenWriteResume(FsBase fs, ResourceId id, ref long start, ref long length)
{
return fs.OpenWriteResume(id, ref start, ref length);
}
public ReturnedInfo CloseWrite(FsBase fs, Stream st)
{
ReturnedInfo re = fs.CloseWrite(st);
ResourceInfo resourceInfo = re as ResourceInfo;
ResourceId resourceId = resourceInfo != null ? resourceInfo.Id : re as ResourceId;
ResourceChangedEventArgs e = (ResourceChangedEventArgs) null;
lock (this.infodic)
{
Uri parent = UriUtil.GetParent(resourceId.Uri);
if (resourceInfo != null)
{
if (this.infodic.ContainsKey(resourceInfo.Id.Uri))
this.infodic[resourceInfo.Id.Uri] = resourceInfo;
else
this.infodic.Add(resourceInfo.Id.Uri, resourceInfo);
if (!this.entriesdic.ContainsKey(parent))
this.entriesdic.Add(parent, new List<Uri>());
if (this.entriesdic[parent].Contains(resourceInfo.Id.Uri))
this.entriesdic[parent].Remove(resourceInfo.Id.Uri);
this.entriesdic[parent].Add(resourceInfo.Id.Uri);
}
else
this.entriesdic.Remove(parent);
if (!(this.watchuri == resourceId.Uri))
{
if (!(this.watchuri == UriUtil.GetParent(resourceId.Uri)))
goto label_15;
}
e = new ResourceChangedEventArgs(re, ResourceChangedEventArgs.ChangeType.Create);
}
label_15:
if (e != null)
{
CacheManager.ResourceChangedEventHandler resourceChangedEvent = this.ResourceChangedEvent;
if (resourceChangedEvent != null)
resourceChangedEvent((object) this, e);
}
return re;
}
private void InnerUpdateNotFound(Uri target)
{
Uri parent = UriUtil.GetParent(target);
this.infodic.Remove(target);
if (!this.entriesdic.ContainsKey(parent) || !this.entriesdic[parent].Contains(target))
return;
this.entriesdic.Remove(parent);
}
private ResourceInfo[] InnerFindInfoAndEntries(Uri target)
{
if (!this.infodic.ContainsKey(target) || !this.entriesdic.ContainsKey(target))
return (ResourceInfo[]) null;
List<ResourceInfo> resourceInfoList = new List<ResourceInfo>();
resourceInfoList.Add(this.infodic[target]);
int num1 = 0;
int num2 = checked (this.entriesdic[target].Count - 1);
int index = num1;
while (index <= num2)
{
if (!this.infodic.ContainsKey(this.entriesdic[target][index]))
return (ResourceInfo[]) null;
resourceInfoList.Add(this.infodic[this.entriesdic[target][index]]);
checked { ++index; }
}
return resourceInfoList.ToArray();
}
private void InnerUpdateInfoAndEntries_Success(ResourceInfo[] ris)
{
Uri parent = UriUtil.GetParent(ris[0].Id.Uri);
if (this.infodic.ContainsKey(ris[0].Id.Uri))
this.infodic[ris[0].Id.Uri] = ris[0];
else
this.infodic.Add(ris[0].Id.Uri, ris[0]);
if (this.entriesdic.ContainsKey(parent) && !this.entriesdic[parent].Contains(ris[0].Id.Uri))
this.entriesdic.Remove(parent);
if (this.entriesdic.ContainsKey(ris[0].Id.Uri))
this.entriesdic[ris[0].Id.Uri].Clear();
else
this.entriesdic.Add(ris[0].Id.Uri, new List<Uri>());
int num1 = 1;
int num2 = checked (ris.Length - 1);
int index = num1;
while (index <= num2)
{
this.entriesdic[ris[0].Id.Uri].Add(ris[index].Id.Uri);
if (this.infodic.ContainsKey(ris[index].Id.Uri))
this.infodic[ris[index].Id.Uri] = ris[index];
else
this.infodic.Add(ris[index].Id.Uri, ris[index]);
checked { ++index; }
}
}
private void InnerUpdateInfoAndEntries_NotFound(Uri targeturi)
{
Uri parent = UriUtil.GetParent(targeturi);
if (this.infodic.ContainsKey(targeturi))
this.infodic.Remove(targeturi);
if (this.entriesdic.ContainsKey(parent) && this.entriesdic[parent].Contains(targeturi))
this.entriesdic.Remove(targeturi);
if (!this.entriesdic.ContainsKey(targeturi))
return;
int num1 = 0;
int num2 = checked (this.entriesdic[targeturi].Count - 1);
int index = num1;
while (index <= num2)
{
this.infodic.Remove(this.entriesdic[targeturi][index]);
checked { ++index; }
}
this.entriesdic.Remove(targeturi);
}
private void InnerDiscardInfo(Uri targeturi)
{
this.infodic.Remove(targeturi);
}
private void InnerDiscardList(Uri targeturi)
{
this.entriesdic.Remove(targeturi);
}
public delegate void ResourceChangedEventHandler(object sender, ResourceChangedEventArgs e);
}
}

126
CarotDAV/CarotDAV.csproj Normal file
View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--Project was exported from assembly: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1B177F3B-4B5D-4434-9BFE-EB1C7E07EDEC}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AssemblyName>CarotDAV</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<ApplicationVersion>1.13.2.18337</ApplicationVersion>
<FileAlignment>512</FileAlignment>
<RootNamespace>CarotDAV</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System" />
<Reference Include="Rei.Fs">
<HintPath>lib\Rei.Fs.dll</HintPath>
</Reference>
<Reference Include="Rei.Com">
<HintPath>lib\Rei.Com.dll</HintPath>
</Reference>
<Reference Include="Rei.Net.HttpServer">
<HintPath>lib\Rei.Net.HttpServer.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Xml" />
<Reference Include="Rei.Fs.Webdav">
<HintPath>lib\Rei.Fs.Webdav.dll</HintPath>
</Reference>
<Reference Include="System.Security" />
</ItemGroup>
<ItemGroup>
<Compile Include="AsyncCopy.cs" />
<Compile Include="CacheManager.cs" />
<Compile Include="CarotDAVDataObject.cs" />
<Compile Include="NoEatMenuStrip.cs" />
<Compile Include="NoEatToolStrip.cs" />
<Compile Include="RightAlignToolStrip.cs" />
<Compile Include="WallMarkListView.cs" />
<Compile Include="DAVServer.cs" />
<Compile Include="AboutForm.cs" />
<Compile Include="ConflictPromptForm.cs" />
<Compile Include="ConflictType.cs" />
<Compile Include="ConflictAction.cs" />
<Compile Include="ConflictPromptFormResult.cs" />
<Compile Include="ConflictPromptManager.cs" />
<Compile Include="DestinationForm.cs" />
<Compile Include="DestinationMethodType.cs" />
<Compile Include="ErrorPromptForm.cs" />
<Compile Include="ErrorPromptType.cs" />
<Compile Include="ErrorAction.cs" />
<Compile Include="ErrorPromptFormResult.cs" />
<Compile Include="ErrorPromptManager.cs" />
<Compile Include="MasterPasswordChangeForm.cs" />
<Compile Include="MasterPasswordInputForm.cs" />
<Compile Include="NewFolderForm.cs" />
<Compile Include="ServerCertErrorPromptForm.cs" />
<Compile Include="ExceptionOccurredEventArgs.cs" />
<Compile Include="FsTestForm.cs" />
<Compile Include="LogWriter.cs" />
<Compile Include="MainForm.cs" />
<Compile Include="MasterPasswordException.cs" />
<Compile Include="Misc.cs" />
<Compile Include="NetDriveManager.cs" />
<Compile Include="OleStream.cs" />
<Compile Include="OleStreamCreator.cs" />
<Compile Include="PropertyForm.cs" />
<Compile Include="ResouceListingForm.cs" />
<Compile Include="ResourceChangedEventArgs.cs" />
<Compile Include="FsManager.cs" />
<Compile Include="SettingSupport.cs" />
<Compile Include="WebDAVClientSetting.cs" />
<Compile Include="WebDAVClientSettingForm.cs" />
<Compile Include="XmlSettingManager.cs" />
<Compile Include="SimpleResourceInfo.cs" />
<Compile Include="TaskbarManager.cs" />
<Compile Include="UpDownForm.cs" />
<Compile Include="My\MyApplication.cs" />
<Compile Include="My\MyComputer.cs" />
<Compile Include="My\MyProject.cs" />
<Compile Include="My\MySettings.cs" />
<Compile Include="My\MySettingsProperty.cs" />
<Compile Include="My\Resources\Resources.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AboutForm.resx" />
<EmbeddedResource Include="ConflictPromptForm.resx" />
<EmbeddedResource Include="DestinationForm.resx" />
<EmbeddedResource Include="ErrorPromptForm.resx" />
<EmbeddedResource Include="FsTestForm.resx" />
<EmbeddedResource Include="MainForm.resx" />
<EmbeddedResource Include="MasterPasswordChangeForm.resx" />
<EmbeddedResource Include="MasterPasswordInputForm.resx" />
<EmbeddedResource Include="NewFolderForm.resx" />
<EmbeddedResource Include="PropertyForm.resx" />
<EmbeddedResource Include="ResouceListingForm.resx" />
<EmbeddedResource Include="Resources.resx" />
<EmbeddedResource Include="ServerCertErrorPromptForm.resx" />
<EmbeddedResource Include="UpDownForm.resx" />
<EmbeddedResource Include="WebDAVClientSettingForm.resx" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,902 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.CarotDAVDataObject
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using Rei.Com;
using Rei.Fs;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace CarotDAV
{
public class CarotDAVDataObject : Rei.Com.DataObject
{
private ConnectionSettingBase pCs;
private FsBase pFs;
private CarotDAVDataObject.CarotDAVDataObjectType pType;
internal DragDropEffects pReturn;
private List<VirtualFileInfo> pFileList;
private List<Uri> pUriList;
private bool pDirty;
private ResourceInfo[] pResources;
private CacheManager pCache;
private bool threadcomp;
private bool pCanCopyInternally;
private bool pCanMoveInternally;
internal int files;
internal long sizes;
internal int folders;
internal int restfolders;
internal ResourceId targetid;
internal object syncobject;
internal Exception ex;
private CarotDAVDataObject.CarotDAVDataObjectState pState;
public ErrorPromptManager pErrorManager;
private EventHandler<ExceptionOccurredEventArgs> pExceptionHandler;
public bool IsInUsebymyself;
private bool pDisposed;
public event CarotDAVDataObject.LogMessageEventHandler LogMessage;
public event CarotDAVDataObject.ReleaseEventHandler Release;
public ResourceInfo[] Resources
{
get
{
return this.pResources;
}
}
public CarotDAVDataObject.CarotDAVDataObjectType Type
{
get
{
return this.pType;
}
}
public bool CanCopyInternally
{
get
{
return this.pCanCopyInternally;
}
}
public bool CanMoveInternally
{
get
{
return this.pCanMoveInternally;
}
}
public CarotDAVDataObject.CarotDAVDataObjectState State
{
get
{
return this.pState;
}
set
{
if (this.pState == value)
return;
if (this.pState == CarotDAVDataObject.CarotDAVDataObjectState.Cancelled)
throw new InvalidOperationException();
switch (value)
{
case CarotDAVDataObject.CarotDAVDataObjectState.WaitTransfer:
this.pState = CarotDAVDataObject.CarotDAVDataObjectState.WaitTransfer;
break;
case CarotDAVDataObject.CarotDAVDataObjectState.Finished:
case CarotDAVDataObject.CarotDAVDataObjectState.Cancelled:
lock (this.pFileList)
{
this.pFileList.Clear();
this.pUriList.Clear();
this.RemoveAll();
this.pDirty = false;
this.pState = value;
break;
}
default:
throw new InvalidOperationException();
}
}
}
public CarotDAVDataObject(ConnectionSettingBase cs, ResourceInfo[] resources, CarotDAVDataObject.CarotDAVDataObjectType type, CacheManager cache)
{
this.AsyncOperationStart += new EventHandler(this.CarotDAVDataObject_AsyncOperationStart);
this.AsyncOperationFinished += new EventHandler<Rei.Com.DataObject.AsyncOperationFinishedEventArgs>(this.CarotDAVDataObject_AsyncOperationFinished);
this.DataQueried += new EventHandler<Rei.Com.DataObject.DataEventArgs>(this.CarotDAVDataObject_DataQueried);
this.DataRequested += new EventHandler<Rei.Com.DataObject.DataEventArgs>(this.CarotDAVDataObject_DataRequested);
this.Release += new CarotDAVDataObject.ReleaseEventHandler(this.CarotDAVDataObject_Release);
this.pFileList = new List<VirtualFileInfo>();
this.pUriList = new List<Uri>();
this.syncobject = RuntimeHelpers.GetObjectValue(new object());
this.pErrorManager = new ErrorPromptManager();
this.pExceptionHandler = new EventHandler<ExceptionOccurredEventArgs>(this.OnExceptionOccurred);
this.pDisposed = false;
this.AsyncSupported = true;
this.IsInUsebymyself = false;
this.pCs = cs;
this.pDirty = true;
this.pFs = cs.GetClient();
this.pFs.GroupName = "OLE" + DateTime.Now.ToString();
this.pResources = resources;
this.pState = CarotDAVDataObject.CarotDAVDataObjectState.WaitListing;
this.pType = type;
this.pCache = cache;
switch (type)
{
case CarotDAVDataObject.CarotDAVDataObjectType.Cut:
this.SetPreferredDropEffect(DragDropEffects.Move);
break;
case CarotDAVDataObject.CarotDAVDataObjectType.Copy:
this.SetPreferredDropEffect(DragDropEffects.Copy);
break;
case CarotDAVDataObject.CarotDAVDataObjectType.DragDrop:
this.SetPreferredDropEffect(DragDropEffects.Copy);
break;
}
if (this.pResources.Length == 1)
this.SetUri(this.pResources[0].Id.Uri);
string[] strs = new string[checked (this.pResources.Length - 1 + 1)];
int num1 = 0;
int num2 = checked (this.pResources.Length - 1);
int index1 = num1;
while (index1 <= num2)
{
strs[index1] = this.pResources[index1].Id.Uri.ToString();
checked { ++index1; }
}
this.SetTexts(strs);
CarotDAVDataObject.InterAppDataStore interAppDataStore = new CarotDAVDataObject.InterAppDataStore();
int num3 = 0;
int num4 = checked (resources.Length - 1);
int index2 = num3;
while (index2 <= num4)
{
interAppDataStore.Files.Add(resources[index2].Id);
checked { ++index2; }
}
interAppDataStore.Type = this.pType;
interAppDataStore.ConnectionSetting = this.pCs;
interAppDataStore.ID = (long) Process.GetCurrentProcess().Id;
this.SetManagedObject((object) interAppDataStore);
this.pCanCopyInternally = true;
this.pCanMoveInternally = true;
int num5 = 0;
int num6 = checked (this.pResources.Length - 1);
int index3 = num5;
while (index3 <= num6)
{
if (!this.pResources[index3].CanCopy)
this.pCanCopyInternally = false;
if (!this.pResources[index3].CanMove)
this.pCanMoveInternally = false;
checked { ++index3; }
}
this.pFs.LogMessage += new EventHandler<LogMessageEventArgs>(this.pFS_LogMessage);
}
protected override void Dispose(bool disposing)
{
try
{
if (!this.pDisposed)
return;
int num = disposing ? 1 : 0;
}
finally
{
base.Dispose(disposing);
}
}
public override FORMATETC[] SupportedFormats()
{
List<FORMATETC> formatetcList = new List<FORMATETC>();
formatetcList.AddRange((IEnumerable<FORMATETC>) base.SupportedFormats());
FORMATETC formatetc;
formatetc.dwAspect = DVASPECT.DVASPECT_CONTENT;
formatetc.lindex = -1;
formatetc.tymed = TYMED.TYMED_HGLOBAL;
formatetc.cfFormat = Rei.Com.DataObject.MakecfFormat(ShellClipboardFormats.FileGroupDescriptorW);
formatetcList.Add(formatetc);
formatetc.cfFormat = Rei.Com.DataObject.MakecfFormat(ShellClipboardFormats.FileContents);
formatetc.tymed = TYMED.TYMED_ISTREAM;
formatetcList.Add(formatetc);
formatetc.cfFormat = Rei.Com.DataObject.MakecfFormat(ShellClipboardFormats.ShellIDListArray);
formatetc.tymed = TYMED.TYMED_HGLOBAL;
formatetcList.Add(formatetc);
formatetc.cfFormat = Rei.Com.DataObject.MakecfFormat(ShellClipboardFormats.PasteSucceeded);
formatetc.tymed = TYMED.TYMED_HGLOBAL;
formatetcList.Add(formatetc);
return formatetcList.ToArray();
}
public void Add(ResourceInfo ri, string name)
{
if (this.pCs.DownloadFilenameNormalization != UCSNormalization.None)
name = name.Normalize((NormalizationForm) this.pCs.DownloadFilenameNormalization);
VirtualFileInfo virtualFileInfo = new VirtualFileInfo();
virtualFileInfo.FileName = name;
if (ri.IsCollection)
{
virtualFileInfo.FileAttributes = FileAttributes.Directory;
virtualFileInfo.Flags = virtualFileInfo.Flags | FDFlags.FD_ATTRIBUTES;
}
else
{
virtualFileInfo.FileAttributes = FileAttributes.Normal;
virtualFileInfo.Flags = virtualFileInfo.Flags | FDFlags.FD_ATTRIBUTES;
}
if (DateTime.Compare(ri.CreationTime, DateTime.MinValue) != 0)
{
virtualFileInfo.CreationTime = ri.CreationTime;
virtualFileInfo.Flags = virtualFileInfo.Flags | FDFlags.FD_CREATETIME;
}
if (DateTime.Compare(ri.LastAccessTime, DateTime.MinValue) != 0)
{
virtualFileInfo.LastAccessTime = ri.LastAccessTime;
virtualFileInfo.Flags = virtualFileInfo.Flags | FDFlags.FD_ACCESSTIME;
}
if (DateTime.Compare(ri.LastModifiedTime, DateTime.MinValue) != 0)
{
virtualFileInfo.LastWriteTime = ri.LastModifiedTime;
virtualFileInfo.Flags = virtualFileInfo.Flags | FDFlags.FD_WRITESTIME;
}
if (ri.IsCollection)
{
virtualFileInfo.FileSize = 0UL;
virtualFileInfo.Flags = virtualFileInfo.Flags | FDFlags.FD_FILESIZE;
}
else if (ri.Size >= 0L)
{
virtualFileInfo.FileSize = checked ((ulong) ri.Size);
virtualFileInfo.Flags = virtualFileInfo.Flags | FDFlags.FD_FILESIZE;
}
if (!ri.IsCollection)
{
OleStreamCreator oleStreamCreator = new OleStreamCreator(ri, name, this.pFs, this.pErrorManager);
oleStreamCreator.ExceptionOccurred += this.pExceptionHandler;
virtualFileInfo.IStreamCreator = (IStreamCreator) oleStreamCreator;
}
lock (this.pFileList)
{
this.pFileList.Add(virtualFileInfo);
this.pUriList.Add(ri.Id.Uri);
this.pDirty = true;
}
}
public void Update()
{
lock (this.pFileList)
{
if (!this.pDirty)
return;
string[] strs = new string[checked (this.pUriList.Count - 1 + 1)];
int num1 = 0;
int num2 = checked (this.pUriList.Count - 1);
int index = num1;
while (index <= num2)
{
strs[index] = this.pUriList[index].ToString();
checked { ++index; }
}
this.SetVirtualFiles(this.pFileList.ToArray(), true);
this.SetTexts(strs);
this.pDirty = false;
}
}
public void SetDragDropResult(DragDropEffects r)
{
this.pReturn = r;
if (this.IsInOperation)
return;
this.OnTransferFinish();
}
protected override void OnDataRequested(Rei.Com.DataObject.DataEventArgs e)
{
if (((int) e.Format.cfFormat == (int) Rei.Com.DataObject.MakecfFormat(ShellClipboardFormats.FileGroupDescriptorW) || (int) e.Format.cfFormat == (int) Rei.Com.DataObject.MakecfFormat(ShellClipboardFormats.FileGroupDescriptor) || ((int) e.Format.cfFormat == (int) Rei.Com.DataObject.MakecfFormat(DataFormats.UnicodeText) || (int) e.Format.cfFormat == (int) Rei.Com.DataObject.MakecfFormat(DataFormats.Text))) && this.State == CarotDAVDataObject.CarotDAVDataObjectState.WaitListing)
{
this.threadcomp = false;
Thread thread = new Thread(new ParameterizedThreadStart(this.ThreadStartPoint));
thread.Start((object) this);
DateTime now = DateTime.Now;
DialogResult dialogResult = DialogResult.OK;
while (!thread.Join(100))
{
if (DateTime.Now.Subtract(now).TotalSeconds > 1.0)
{
using (ResouceListingForm resouceListingForm = new ResouceListingForm())
{
resouceListingForm.Thread = thread;
resouceListingForm.pDataObject = this;
dialogResult = resouceListingForm.ShowDialog();
thread.Abort();
break;
}
}
}
thread.Join();
if (this.ex != null)
throw this.ex;
if (dialogResult != DialogResult.OK || !this.threadcomp)
{
this.State = CarotDAVDataObject.CarotDAVDataObjectState.Cancelled;
this.pFs.ResetConnection();
}
else
this.State = CarotDAVDataObject.CarotDAVDataObjectState.WaitTransfer;
}
base.OnDataRequested(e);
}
private void ThreadStartPoint(object param)
{
try
{
ErrorPromptManager pDragErrorManager = new ErrorPromptManager();
LinkedList<KeyValuePair<ResourceInfo, string>> linkedList1 = new LinkedList<KeyValuePair<ResourceInfo, string>>();
Dictionary<ResourceInfo, string> dictionary1 = new Dictionary<ResourceInfo, string>();
this.targetid = this.Resources[0].Id;
ResourceInfo[] resources = this.Resources;
List<string> stringList = new List<string>();
Dictionary<string, List<int>> dictionary2 = new Dictionary<string, List<int>>();
int num1 = 0;
int num2 = checked (resources.Length - 1);
int index1 = num1;
KeyValuePair<ResourceInfo, string> keyValuePair1;
while (index1 <= num2)
{
if (resources[index1].Id.Uri.Segments.Length <= 1)
{
LinkedList<KeyValuePair<ResourceInfo, string>> linkedList2 = linkedList1;
keyValuePair1 = new KeyValuePair<ResourceInfo, string>(resources[index1], "root");
KeyValuePair<ResourceInfo, string> keyValuePair2 = keyValuePair1;
linkedList2.AddFirst(keyValuePair2);
Interlocked.Increment(ref this.folders);
Interlocked.Increment(ref this.restfolders);
}
else
{
string absolutePath = UriUtil.GetParent(resources[index1].Id.Uri).AbsolutePath;
if (!dictionary2.ContainsKey(absolutePath))
{
stringList.Add(absolutePath);
dictionary2.Add(absolutePath, new List<int>());
}
dictionary2[absolutePath].Add(index1);
}
checked { ++index1; }
}
int num3 = 0;
int num4 = checked (stringList.Count - 1);
int index2 = num3;
while (index2 <= num4)
{
string index3 = stringList[index2];
if (dictionary2[index3].Count < 3)
{
int num5 = 0;
int num6 = checked (dictionary2[index3].Count - 1);
int index4 = num5;
while (index4 <= num6)
{
ResourceInfo[] info = this.InnerGetInfo(resources[dictionary2[index3][index4]].Id, pDragErrorManager);
if (info == null)
return;
ResourceInfo key = info[0];
string lastName = UriUtil.GetLastName(key.Id.Uri);
if (!key.IsCollection)
{
dictionary1.Add(key, lastName);
Interlocked.Increment(ref this.files);
Interlocked.Add(ref this.sizes, key.Size);
}
else
{
LinkedList<KeyValuePair<ResourceInfo, string>> linkedList2 = linkedList1;
keyValuePair1 = new KeyValuePair<ResourceInfo, string>(key, lastName);
KeyValuePair<ResourceInfo, string> keyValuePair2 = keyValuePair1;
linkedList2.AddFirst(keyValuePair2);
Interlocked.Increment(ref this.folders);
Interlocked.Increment(ref this.restfolders);
}
checked { ++index4; }
}
}
else
{
ResourceInfo[] parentInfoAndEntries = this.InnerGetParentInfoAndEntries(resources[dictionary2[index3][0]].Id, pDragErrorManager);
if (parentInfoAndEntries == null)
return;
int num5 = 0;
int num6 = checked (dictionary2[index3].Count - 1);
int index4 = num5;
while (index4 <= num6)
{
int num7 = 1;
int num8 = checked (parentInfoAndEntries.Length - 1);
int index5 = num7;
while (index5 <= num8)
{
if (parentInfoAndEntries[index5].Id.Uri == resources[dictionary2[index3][index4]].Id.Uri)
{
ResourceInfo key = parentInfoAndEntries[index5];
string lastName = UriUtil.GetLastName(key.Id.Uri);
if (!key.IsCollection)
{
dictionary1.Add(key, lastName);
Interlocked.Increment(ref this.files);
Interlocked.Add(ref this.sizes, key.Size);
}
else
{
LinkedList<KeyValuePair<ResourceInfo, string>> linkedList2 = linkedList1;
keyValuePair1 = new KeyValuePair<ResourceInfo, string>(key, lastName);
KeyValuePair<ResourceInfo, string> keyValuePair2 = keyValuePair1;
linkedList2.AddFirst(keyValuePair2);
Interlocked.Increment(ref this.folders);
Interlocked.Increment(ref this.restfolders);
}
}
checked { ++index5; }
}
checked { ++index4; }
}
}
checked { ++index2; }
}
while (linkedList1.First != null)
{
KeyValuePair<ResourceInfo, string> keyValuePair2 = linkedList1.First.Value;
linkedList1.RemoveFirst();
ResourceInfo[] entries = this.InnerGetEntries(keyValuePair2.Key.Id, pDragErrorManager);
dictionary1.Add(keyValuePair2.Key, keyValuePair2.Value);
int num5 = 0;
int num6 = checked (entries.Length - 1);
int index3 = num5;
while (index3 <= num6)
{
string str = Path.Combine(keyValuePair2.Value, UriUtil.GetLastName(entries[index3].Id.Uri));
if (!entries[index3].IsCollection)
{
dictionary1.Add(entries[index3], str);
Interlocked.Increment(ref this.files);
Interlocked.Add(ref this.sizes, entries[index3].Size);
}
else
{
LinkedList<KeyValuePair<ResourceInfo, string>> linkedList2 = linkedList1;
keyValuePair1 = new KeyValuePair<ResourceInfo, string>(entries[index3], str);
KeyValuePair<ResourceInfo, string> keyValuePair3 = keyValuePair1;
linkedList2.AddFirst(keyValuePair3);
Interlocked.Increment(ref this.folders);
Interlocked.Increment(ref this.restfolders);
}
checked { ++index3; }
}
Interlocked.Decrement(ref this.restfolders);
}
Dictionary<ResourceInfo, string>.Enumerator enumerator;
try
{
enumerator = dictionary1.GetEnumerator();
while (enumerator.MoveNext())
{
KeyValuePair<ResourceInfo, string> current = enumerator.Current;
this.Add(current.Key, current.Value);
}
}
finally
{
enumerator.Dispose();
}
this.Update();
this.threadcomp = true;
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
this.ex = ex;
ProjectData.ClearProjectError();
}
finally
{
}
}
private ResourceInfo[] InnerGetParentInfoAndEntries(ResourceId id, ErrorPromptManager pDragErrorManager)
{
this.targetid = id;
int retryminutes = 1;
ResourceInfo[] resourceInfoArray;
while (true)
{
try
{
return this.pCache.GetParentInfoAndEntries(this.pFs, id, false);
}
catch (ThreadAbortException ex)
{
ProjectData.SetProjectError((Exception) ex);
throw;
}
catch (Exception ex1)
{
ProjectData.SetProjectError(ex1);
Exception ex2 = ex1;
if (ex2.InnerException is ThreadAbortException)
{
throw;
}
else
{
ErrorAction errorAction;
if (pDragErrorManager.IgnoreAll())
{
errorAction = ErrorAction.Ignore;
}
else
{
ExceptionOccurredEventArgs e = new ExceptionOccurredEventArgs("Error occurred during retrieving properties.", id.ToString(), ErrorPromptType.IgnoreAllIgnoreRetryCancel, ex2, retryminutes);
this.OnExceptionOccurred((object) this, e);
pDragErrorManager.RegisterAction(e.Result);
errorAction = e.Result.Action;
}
switch (errorAction)
{
case ErrorAction.Ignore:
resourceInfoArray = new ResourceInfo[0];
ProjectData.ClearProjectError();
goto label_15;
case ErrorAction.Retry:
ProjectData.ClearProjectError();
continue;
case ErrorAction.AutoRetry:
checked { retryminutes *= 2; }
ProjectData.ClearProjectError();
continue;
case ErrorAction.Cancel:
resourceInfoArray = (ResourceInfo[]) null;
ProjectData.ClearProjectError();
goto label_15;
default:
throw;
}
}
}
}
label_15:
return resourceInfoArray;
}
private ResourceInfo[] InnerGetInfo(ResourceId id, ErrorPromptManager pDragErrorManager)
{
this.targetid = id;
int retryminutes = 1;
ResourceInfo info;
ResourceInfo[] resourceInfoArray;
while (true)
{
try
{
info = this.pCache.GetInfo(this.pFs, id, false);
break;
}
catch (ThreadAbortException ex)
{
ProjectData.SetProjectError((Exception) ex);
throw;
}
catch (Exception ex1)
{
ProjectData.SetProjectError(ex1);
Exception ex2 = ex1;
if (ex2.InnerException is ThreadAbortException)
{
throw;
}
else
{
ErrorAction errorAction;
if (pDragErrorManager.IgnoreAll())
{
errorAction = ErrorAction.Ignore;
}
else
{
ExceptionOccurredEventArgs e = new ExceptionOccurredEventArgs("Error occurred during retrieving properties.", id.ToString(), ErrorPromptType.IgnoreAllIgnoreRetryCancel, ex2, retryminutes);
this.OnExceptionOccurred((object) this, e);
pDragErrorManager.RegisterAction(e.Result);
errorAction = e.Result.Action;
}
switch (errorAction)
{
case ErrorAction.Ignore:
resourceInfoArray = new ResourceInfo[0];
ProjectData.ClearProjectError();
goto label_16;
case ErrorAction.Retry:
ProjectData.ClearProjectError();
continue;
case ErrorAction.AutoRetry:
checked { retryminutes *= 2; }
ProjectData.ClearProjectError();
continue;
case ErrorAction.Cancel:
resourceInfoArray = (ResourceInfo[]) null;
ProjectData.ClearProjectError();
goto label_16;
default:
throw;
}
}
}
}
return new ResourceInfo[1]{ info };
label_16:
return resourceInfoArray;
}
private ResourceInfo[] InnerGetEntries(ResourceId id, ErrorPromptManager pDragErrorManager)
{
this.targetid = id;
int retryminutes = 1;
ResourceInfo[] resourceInfoArray;
while (true)
{
try
{
return this.pCache.GetEntries(this.pFs, id, false);
}
catch (ThreadAbortException ex)
{
ProjectData.SetProjectError((Exception) ex);
throw;
}
catch (Exception ex1)
{
ProjectData.SetProjectError(ex1);
Exception ex2 = ex1;
if (ex2.InnerException is ThreadAbortException)
{
throw;
}
else
{
ErrorAction errorAction;
if (pDragErrorManager.IgnoreAll())
{
errorAction = ErrorAction.Ignore;
}
else
{
ExceptionOccurredEventArgs e = new ExceptionOccurredEventArgs("Error occurred during retrieving properties.", id.ToString(), ErrorPromptType.IgnoreAllIgnoreRetryCancel, ex2, retryminutes);
this.OnExceptionOccurred((object) this, e);
pDragErrorManager.RegisterAction(e.Result);
errorAction = e.Result.Action;
}
switch (errorAction)
{
case ErrorAction.Ignore:
Interlocked.Decrement(ref this.restfolders);
resourceInfoArray = new ResourceInfo[0];
ProjectData.ClearProjectError();
goto label_15;
case ErrorAction.Retry:
ProjectData.ClearProjectError();
continue;
case ErrorAction.AutoRetry:
checked { retryminutes *= 2; }
ProjectData.ClearProjectError();
continue;
case ErrorAction.Cancel:
resourceInfoArray = (ResourceInfo[]) null;
ProjectData.ClearProjectError();
goto label_15;
default:
throw;
}
}
}
}
label_15:
return resourceInfoArray;
}
protected override void OnDataStored(Rei.Com.DataObject.DataEventArgs e)
{
base.OnDataStored(e);
if ((int) e.Format.cfFormat != (int) Rei.Com.DataObject.MakecfFormat(ShellClipboardFormats.PasteSucceeded))
return;
this.pReturn = this.GetPasteSucceeded();
if (this.IsInOperation)
return;
this.OnTransferFinish();
}
protected virtual void PerformDeleteOnPaste()
{
if (this.GetPerformedDropEffect() != DragDropEffects.Move)
return;
int num1 = 0;
int num2 = checked (this.Resources.Length - 1);
int index = num1;
while (index <= num2)
{
int retryminutes = 1;
while (true)
{
ResourceId id = this.Resources[index].Id;
try
{
this.pCache.Delete(this.pFs, id);
break;
}
catch (Exception ex1)
{
ProjectData.SetProjectError(ex1);
Exception ex2 = ex1;
ErrorAction errorAction;
if (this.pErrorManager.IgnoreAll())
{
errorAction = ErrorAction.Ignore;
}
else
{
ExceptionOccurredEventArgs e = new ExceptionOccurredEventArgs("Error occurred during deleting resource.", id.ToString(), ErrorPromptType.IgnoreAllIgnoreRetryCancel, ex2, retryminutes);
this.OnExceptionOccurred((object) this, e);
this.pErrorManager.RegisterAction(e.Result);
errorAction = e.Result.Action;
}
switch (errorAction)
{
case ErrorAction.Retry:
ProjectData.ClearProjectError();
continue;
case ErrorAction.AutoRetry:
checked { retryminutes *= 2; }
ProjectData.ClearProjectError();
continue;
case ErrorAction.Cancel:
ProjectData.ClearProjectError();
return;
default:
ProjectData.ClearProjectError();
goto label_14;
}
}
}
label_14:
checked { ++index; }
}
}
private void OnExceptionOccurred(object sender, ExceptionOccurredEventArgs e)
{
e.Result = ErrorPromptForm.ShowDialog((IWin32Window) null, e.Message, e.Target, e.Exception, e.Type, e.RetryMinutes);
}
private void pFS_LogMessage(object sender, LogMessageEventArgs e)
{
CarotDAVDataObject.LogMessageEventHandler logMessageEvent = this.LogMessageEvent;
if (logMessageEvent == null)
return;
logMessageEvent(RuntimeHelpers.GetObjectValue(sender), e);
}
public void OnTransferFinish()
{
this.PerformDeleteOnPaste();
this.State = CarotDAVDataObject.CarotDAVDataObjectState.Finished;
CarotDAVDataObject.ReleaseEventHandler releaseEvent = this.ReleaseEvent;
if (releaseEvent == null)
return;
releaseEvent((object) this, EventArgs.Empty);
}
private void CarotDAVDataObject_AsyncOperationStart(object sender, EventArgs e)
{
}
private void CarotDAVDataObject_AsyncOperationFinished(object sender, Rei.Com.DataObject.AsyncOperationFinishedEventArgs e)
{
this.OnTransferFinish();
}
private void CarotDAVDataObject_DataQueried(object sender, Rei.Com.DataObject.DataEventArgs e)
{
if (e.Format.ptd != IntPtr.Zero)
return;
FORMATETC format = e.Format;
if (format.dwAspect != DVASPECT.DVASPECT_CONTENT)
return;
format = e.Format;
if (format.lindex != -1)
return;
format = e.Format;
if ((int) format.cfFormat == (int) BitConverter.ToInt16(BitConverter.GetBytes(DataFormats.GetFormat("FileContents").Id), 0) && (e.Format.tymed & TYMED.TYMED_ISTREAM) != TYMED.TYMED_NULL)
{
e.QueryResult = Rei.Com.DataObject.QueryGetDataResultType.Exists;
}
else
{
if ((int) e.Format.cfFormat == (int) BitConverter.ToInt16(BitConverter.GetBytes(DataFormats.GetFormat("FileGroupDescriptorW").Id), 0))
{
format = e.Format;
if ((format.tymed & TYMED.TYMED_HGLOBAL) != TYMED.TYMED_NULL)
{
e.QueryResult = Rei.Com.DataObject.QueryGetDataResultType.Exists;
return;
}
}
if ((int) e.Format.cfFormat != (int) BitConverter.ToInt16(BitConverter.GetBytes(DataFormats.GetFormat("FileGroupDescriptor").Id), 0))
return;
format = e.Format;
if ((format.tymed & TYMED.TYMED_HGLOBAL) == TYMED.TYMED_NULL)
return;
e.QueryResult = Rei.Com.DataObject.QueryGetDataResultType.Exists;
}
}
private void CarotDAVDataObject_DataRequested(object sender, Rei.Com.DataObject.DataEventArgs e)
{
}
private void CarotDAVDataObject_Release(object sender, EventArgs e)
{
}
public enum CarotDAVDataObjectState
{
WaitListing,
WaitTransfer,
Finished,
Cancelled,
}
public enum CarotDAVDataObjectType
{
Cut,
Copy,
DragDrop,
}
public delegate void LogMessageEventHandler(object sender, LogMessageEventArgs e);
public delegate void ReleaseEventHandler(object sender, EventArgs e);
[Serializable]
public class InterAppDataStore
{
public List<ResourceId> Files;
public CarotDAVDataObject.CarotDAVDataObjectType Type;
public ConnectionSettingBase ConnectionSetting;
public long ID;
public InterAppDataStore()
{
this.Files = new List<ResourceId>();
}
}
}
}

View File

@ -0,0 +1,23 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ConflictAction
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
namespace CarotDAV
{
public enum ConflictAction
{
NoConfliction,
Overwrite,
OverwriteNewer,
Resume,
Integrate,
DeleteTarget,
Retry,
AutoRetry,
ChangeName,
Skip,
CancelAll,
}
}

View File

@ -0,0 +1,851 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ConflictPromptForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using Rei.Fs;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class ConflictPromptForm : Form
{
private IContainer components;
[AccessedThroughProperty("OverwriteRadio")]
private RadioButton _OverwriteRadio;
[AccessedThroughProperty("OverwriteNewerRadio")]
private RadioButton _OverwriteNewerRadio;
[AccessedThroughProperty("SkipRadio")]
private RadioButton _SkipRadio;
[AccessedThroughProperty("SourceTextBox")]
private TextBox _SourceTextBox;
[AccessedThroughProperty("m_CancelButton")]
private Button _m_CancelButton;
[AccessedThroughProperty("OKButton")]
private Button _OKButton;
[AccessedThroughProperty("IntegrateRadio")]
private RadioButton _IntegrateRadio;
[AccessedThroughProperty("DeleteRadio")]
private RadioButton _DeleteRadio;
[AccessedThroughProperty("ToAllCheck")]
private CheckBox _ToAllCheck;
[AccessedThroughProperty("RetryButton")]
private Button _RetryButton;
[AccessedThroughProperty("DestinationTextBox")]
private TextBox _DestinationTextBox;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("Label2")]
private Label _Label2;
[AccessedThroughProperty("MessageTextBox")]
private TextBox _MessageTextBox;
[AccessedThroughProperty("ChangeNameRadio")]
private RadioButton _ChangeNameRadio;
[AccessedThroughProperty("ResumeRadio")]
private RadioButton _ResumeRadio;
[AccessedThroughProperty("DestInfoTextBox")]
private TextBox _DestInfoTextBox;
[AccessedThroughProperty("SourceInfoTextBox")]
private TextBox _SourceInfoTextBox;
[AccessedThroughProperty("Timer1")]
private Timer _Timer1;
private ConflictType pConflict;
private ConflictAction pSolution;
private bool pEnableResume;
private FsAbility pDestinationAbility;
private int pRetryMinutes;
private DateTime pIdleStartTime;
public ConflictPromptForm()
{
this.Load += new EventHandler(this.ConflictPromptForm_Load);
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.components = (IContainer) new System.ComponentModel.Container();
this.OverwriteRadio = new RadioButton();
this.OverwriteNewerRadio = new RadioButton();
this.SkipRadio = new RadioButton();
this.SourceTextBox = new TextBox();
this.m_CancelButton = new Button();
this.OKButton = new Button();
this.IntegrateRadio = new RadioButton();
this.DeleteRadio = new RadioButton();
this.ToAllCheck = new CheckBox();
this.RetryButton = new Button();
this.DestinationTextBox = new TextBox();
this.Label1 = new Label();
this.Label2 = new Label();
this.MessageTextBox = new TextBox();
this.ChangeNameRadio = new RadioButton();
this.ResumeRadio = new RadioButton();
this.DestInfoTextBox = new TextBox();
this.SourceInfoTextBox = new TextBox();
this.Timer1 = new Timer(this.components);
this.SuspendLayout();
this.OverwriteRadio.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.OverwriteRadio.AutoSize = true;
RadioButton overwriteRadio1 = this.OverwriteRadio;
Point point1 = new Point(8, 216);
Point point2 = point1;
overwriteRadio1.Location = point2;
this.OverwriteRadio.Name = "OverwriteRadio";
RadioButton overwriteRadio2 = this.OverwriteRadio;
Size size1 = new Size(92, 16);
Size size2 = size1;
overwriteRadio2.Size = size2;
this.OverwriteRadio.TabIndex = 7;
this.OverwriteRadio.TabStop = true;
this.OverwriteRadio.Text = "Overwrite (&O)";
this.OverwriteRadio.UseVisualStyleBackColor = true;
this.OverwriteNewerRadio.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.OverwriteNewerRadio.AutoSize = true;
RadioButton overwriteNewerRadio1 = this.OverwriteNewerRadio;
point1 = new Point(8, 240);
Point point3 = point1;
overwriteNewerRadio1.Location = point3;
this.OverwriteNewerRadio.Name = "OverwriteNewerRadio";
RadioButton overwriteNewerRadio2 = this.OverwriteNewerRadio;
size1 = new Size(137, 16);
Size size3 = size1;
overwriteNewerRadio2.Size = size3;
this.OverwriteNewerRadio.TabIndex = 8;
this.OverwriteNewerRadio.TabStop = true;
this.OverwriteNewerRadio.Text = "Overwrite if newer (&N)";
this.OverwriteNewerRadio.UseVisualStyleBackColor = true;
this.SkipRadio.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.SkipRadio.AutoSize = true;
RadioButton skipRadio1 = this.SkipRadio;
point1 = new Point(168, 240);
Point point4 = point1;
skipRadio1.Location = point4;
this.SkipRadio.Name = "SkipRadio";
RadioButton skipRadio2 = this.SkipRadio;
size1 = new Size(64, 16);
Size size4 = size1;
skipRadio2.Size = size4;
this.SkipRadio.TabIndex = 12;
this.SkipRadio.TabStop = true;
this.SkipRadio.Text = "Skip (&S)";
this.SkipRadio.UseVisualStyleBackColor = true;
this.SourceTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox sourceTextBox1 = this.SourceTextBox;
point1 = new Point(8, 48);
Point point5 = point1;
sourceTextBox1.Location = point5;
this.SourceTextBox.Multiline = true;
this.SourceTextBox.Name = "SourceTextBox";
this.SourceTextBox.ReadOnly = true;
TextBox sourceTextBox2 = this.SourceTextBox;
size1 = new Size(312, 40);
Size size5 = size1;
sourceTextBox2.Size = size5;
this.SourceTextBox.TabIndex = 2;
this.SourceTextBox.TabStop = false;
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.m_CancelButton.DialogResult = DialogResult.Cancel;
Button mCancelButton1 = this.m_CancelButton;
point1 = new Point(248, 352);
Point point6 = point1;
mCancelButton1.Location = point6;
this.m_CancelButton.Name = "m_CancelButton";
Button mCancelButton2 = this.m_CancelButton;
size1 = new Size(72, 24);
Size size6 = size1;
mCancelButton2.Size = size6;
this.m_CancelButton.TabIndex = 17;
this.m_CancelButton.Text = "Cancel All";
this.m_CancelButton.UseVisualStyleBackColor = true;
this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button okButton1 = this.OKButton;
point1 = new Point(168, 352);
Point point7 = point1;
okButton1.Location = point7;
this.OKButton.Name = "OKButton";
Button okButton2 = this.OKButton;
size1 = new Size(72, 24);
Size size7 = size1;
okButton2.Size = size7;
this.OKButton.TabIndex = 16;
this.OKButton.Text = "OK";
this.OKButton.UseVisualStyleBackColor = true;
this.IntegrateRadio.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.IntegrateRadio.AutoSize = true;
RadioButton integrateRadio1 = this.IntegrateRadio;
point1 = new Point(168, 216);
Point point8 = point1;
integrateRadio1.Location = point8;
this.IntegrateRadio.Name = "IntegrateRadio";
RadioButton integrateRadio2 = this.IntegrateRadio;
size1 = new Size(83, 16);
Size size8 = size1;
integrateRadio2.Size = size8;
this.IntegrateRadio.TabIndex = 11;
this.IntegrateRadio.TabStop = true;
this.IntegrateRadio.Text = "Integrate (&I)";
this.IntegrateRadio.UseVisualStyleBackColor = true;
this.DeleteRadio.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.DeleteRadio.AutoSize = true;
RadioButton deleteRadio1 = this.DeleteRadio;
point1 = new Point(8, 288);
Point point9 = point1;
deleteRadio1.Location = point9;
this.DeleteRadio.Name = "DeleteRadio";
RadioButton deleteRadio2 = this.DeleteRadio;
size1 = new Size((int) sbyte.MaxValue, 16);
Size size9 = size1;
deleteRadio2.Size = size9;
this.DeleteRadio.TabIndex = 10;
this.DeleteRadio.TabStop = true;
this.DeleteRadio.Text = "Delete and write (&D)";
this.DeleteRadio.UseVisualStyleBackColor = true;
this.ToAllCheck.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.ToAllCheck.AutoSize = true;
CheckBox toAllCheck1 = this.ToAllCheck;
point1 = new Point(8, 320);
Point point10 = point1;
toAllCheck1.Location = point10;
this.ToAllCheck.Name = "ToAllCheck";
CheckBox toAllCheck2 = this.ToAllCheck;
size1 = new Size(73, 16);
Size size10 = size1;
toAllCheck2.Size = size10;
this.ToAllCheck.TabIndex = 14;
this.ToAllCheck.Text = "To all (&A)";
this.ToAllCheck.UseVisualStyleBackColor = true;
this.RetryButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button retryButton1 = this.RetryButton;
point1 = new Point(64, 352);
Point point11 = point1;
retryButton1.Location = point11;
this.RetryButton.Name = "RetryButton";
Button retryButton2 = this.RetryButton;
size1 = new Size(96, 24);
Size size11 = size1;
retryButton2.Size = size11;
this.RetryButton.TabIndex = 15;
this.RetryButton.Text = "Retry";
this.RetryButton.UseVisualStyleBackColor = true;
this.DestinationTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox destinationTextBox1 = this.DestinationTextBox;
point1 = new Point(8, 136);
Point point12 = point1;
destinationTextBox1.Location = point12;
this.DestinationTextBox.Multiline = true;
this.DestinationTextBox.Name = "DestinationTextBox";
this.DestinationTextBox.ReadOnly = true;
TextBox destinationTextBox2 = this.DestinationTextBox;
size1 = new Size(312, 40);
Size size12 = size1;
destinationTextBox2.Size = size12;
this.DestinationTextBox.TabIndex = 5;
this.DestinationTextBox.TabStop = false;
this.Label1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
this.Label1.AutoSize = true;
Label label1_1 = this.Label1;
point1 = new Point(8, 32);
Point point13 = point1;
label1_1.Location = point13;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(40, 12);
Size size13 = size1;
label1_2.Size = size13;
this.Label1.TabIndex = 1;
this.Label1.Text = "Source";
this.Label2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
this.Label2.AutoSize = true;
Label label2_1 = this.Label2;
point1 = new Point(8, 120);
Point point14 = point1;
label2_1.Location = point14;
this.Label2.Name = "Label2";
Label label2_2 = this.Label2;
size1 = new Size(63, 12);
Size size14 = size1;
label2_2.Size = size14;
this.Label2.TabIndex = 4;
this.Label2.Text = "Destination";
this.MessageTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
this.MessageTextBox.BorderStyle = BorderStyle.None;
TextBox messageTextBox1 = this.MessageTextBox;
point1 = new Point(8, 8);
Point point15 = point1;
messageTextBox1.Location = point15;
this.MessageTextBox.Name = "MessageTextBox";
this.MessageTextBox.ReadOnly = true;
TextBox messageTextBox2 = this.MessageTextBox;
size1 = new Size(312, 12);
Size size15 = size1;
messageTextBox2.Size = size15;
this.MessageTextBox.TabIndex = 0;
this.MessageTextBox.TabStop = false;
this.MessageTextBox.Text = "Message";
this.ChangeNameRadio.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.ChangeNameRadio.AutoSize = true;
RadioButton changeNameRadio1 = this.ChangeNameRadio;
point1 = new Point(168, 264);
Point point16 = point1;
changeNameRadio1.Location = point16;
this.ChangeNameRadio.Name = "ChangeNameRadio";
RadioButton changeNameRadio2 = this.ChangeNameRadio;
size1 = new Size(114, 16);
Size size16 = size1;
changeNameRadio2.Size = size16;
this.ChangeNameRadio.TabIndex = 13;
this.ChangeNameRadio.TabStop = true;
this.ChangeNameRadio.Text = "Change Name (&C)";
this.ChangeNameRadio.UseVisualStyleBackColor = true;
this.ResumeRadio.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.ResumeRadio.AutoSize = true;
RadioButton resumeRadio1 = this.ResumeRadio;
point1 = new Point(8, 264);
Point point17 = point1;
resumeRadio1.Location = point17;
this.ResumeRadio.Name = "ResumeRadio";
RadioButton resumeRadio2 = this.ResumeRadio;
size1 = new Size(136, 16);
Size size17 = size1;
resumeRadio2.Size = size17;
this.ResumeRadio.TabIndex = 9;
this.ResumeRadio.TabStop = true;
this.ResumeRadio.Text = "Resume if smaller (&R)";
this.ResumeRadio.UseVisualStyleBackColor = true;
this.DestInfoTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox destInfoTextBox1 = this.DestInfoTextBox;
point1 = new Point(136, 176);
Point point18 = point1;
destInfoTextBox1.Location = point18;
this.DestInfoTextBox.Multiline = true;
this.DestInfoTextBox.Name = "DestInfoTextBox";
this.DestInfoTextBox.ReadOnly = true;
TextBox destInfoTextBox2 = this.DestInfoTextBox;
size1 = new Size(184, 32);
Size size18 = size1;
destInfoTextBox2.Size = size18;
this.DestInfoTextBox.TabIndex = 6;
this.DestInfoTextBox.TabStop = false;
this.DestInfoTextBox.TextAlign = HorizontalAlignment.Right;
this.SourceInfoTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox sourceInfoTextBox1 = this.SourceInfoTextBox;
point1 = new Point(136, 88);
Point point19 = point1;
sourceInfoTextBox1.Location = point19;
this.SourceInfoTextBox.Multiline = true;
this.SourceInfoTextBox.Name = "SourceInfoTextBox";
this.SourceInfoTextBox.ReadOnly = true;
TextBox sourceInfoTextBox2 = this.SourceInfoTextBox;
size1 = new Size(184, 32);
Size size19 = size1;
sourceInfoTextBox2.Size = size19;
this.SourceInfoTextBox.TabIndex = 3;
this.SourceInfoTextBox.TabStop = false;
this.SourceInfoTextBox.TextAlign = HorizontalAlignment.Right;
this.AcceptButton = (IButtonControl) this.OKButton;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.m_CancelButton;
size1 = new Size(328, 384);
this.ClientSize = size1;
this.Controls.Add((Control) this.DestInfoTextBox);
this.Controls.Add((Control) this.SourceInfoTextBox);
this.Controls.Add((Control) this.ResumeRadio);
this.Controls.Add((Control) this.ChangeNameRadio);
this.Controls.Add((Control) this.MessageTextBox);
this.Controls.Add((Control) this.Label2);
this.Controls.Add((Control) this.Label1);
this.Controls.Add((Control) this.DestinationTextBox);
this.Controls.Add((Control) this.RetryButton);
this.Controls.Add((Control) this.ToAllCheck);
this.Controls.Add((Control) this.DeleteRadio);
this.Controls.Add((Control) this.IntegrateRadio);
this.Controls.Add((Control) this.m_CancelButton);
this.Controls.Add((Control) this.OKButton);
this.Controls.Add((Control) this.SourceTextBox);
this.Controls.Add((Control) this.SkipRadio);
this.Controls.Add((Control) this.OverwriteNewerRadio);
this.Controls.Add((Control) this.OverwriteRadio);
this.MaximizeBox = false;
this.MinimizeBox = false;
size1 = new Size(344, 422);
this.MinimumSize = size1;
this.Name = nameof (ConflictPromptForm);
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "Overwrite Confirmation";
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual RadioButton OverwriteRadio
{
get
{
return this._OverwriteRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._OverwriteRadio = value;
}
}
internal virtual RadioButton OverwriteNewerRadio
{
get
{
return this._OverwriteNewerRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._OverwriteNewerRadio = value;
}
}
internal virtual RadioButton SkipRadio
{
get
{
return this._SkipRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._SkipRadio = value;
}
}
internal virtual TextBox SourceTextBox
{
get
{
return this._SourceTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._SourceTextBox = value;
}
}
internal virtual Button m_CancelButton
{
get
{
return this._m_CancelButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.m_CancelButton_Click);
if (this._m_CancelButton != null)
this._m_CancelButton.Click -= eventHandler;
this._m_CancelButton = value;
if (this._m_CancelButton == null)
return;
this._m_CancelButton.Click += eventHandler;
}
}
internal virtual Button OKButton
{
get
{
return this._OKButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.OKButton_Click);
if (this._OKButton != null)
this._OKButton.Click -= eventHandler;
this._OKButton = value;
if (this._OKButton == null)
return;
this._OKButton.Click += eventHandler;
}
}
internal virtual RadioButton IntegrateRadio
{
get
{
return this._IntegrateRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._IntegrateRadio = value;
}
}
internal virtual RadioButton DeleteRadio
{
get
{
return this._DeleteRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DeleteRadio = value;
}
}
internal virtual CheckBox ToAllCheck
{
get
{
return this._ToAllCheck;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._ToAllCheck = value;
}
}
internal virtual Button RetryButton
{
get
{
return this._RetryButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.RetryButton_Click);
if (this._RetryButton != null)
this._RetryButton.Click -= eventHandler;
this._RetryButton = value;
if (this._RetryButton == null)
return;
this._RetryButton.Click += eventHandler;
}
}
internal virtual TextBox DestinationTextBox
{
get
{
return this._DestinationTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DestinationTextBox = value;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual Label Label2
{
get
{
return this._Label2;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label2 = value;
}
}
internal virtual TextBox MessageTextBox
{
get
{
return this._MessageTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._MessageTextBox = value;
}
}
internal virtual RadioButton ChangeNameRadio
{
get
{
return this._ChangeNameRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._ChangeNameRadio = value;
}
}
internal virtual RadioButton ResumeRadio
{
get
{
return this._ResumeRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._ResumeRadio = value;
}
}
internal virtual TextBox DestInfoTextBox
{
get
{
return this._DestInfoTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DestInfoTextBox = value;
}
}
internal virtual TextBox SourceInfoTextBox
{
get
{
return this._SourceInfoTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._SourceInfoTextBox = value;
}
}
internal virtual Timer Timer1
{
get
{
return this._Timer1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.Timer1_Tick);
if (this._Timer1 != null)
this._Timer1.Tick -= eventHandler;
this._Timer1 = value;
if (this._Timer1 == null)
return;
this._Timer1.Tick += eventHandler;
}
}
public ConflictType Conflict
{
get
{
return this.pConflict;
}
set
{
this.pConflict = value;
}
}
public ConflictAction Solution
{
get
{
return this.pSolution;
}
}
public bool ToAll
{
get
{
return this.ToAllCheck.Checked;
}
}
private void ConflictPromptForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.CarotDAV;
switch (this.Conflict)
{
case ConflictType.FolderToFolder:
this.MessageTextBox.Text = "Same name folder exists. Choose action.";
this.OverwriteRadio.Enabled = false;
this.OverwriteNewerRadio.Enabled = false;
this.ResumeRadio.Enabled = false;
this.IntegrateRadio.Enabled = true;
this.DeleteRadio.Enabled = true;
this.SkipRadio.Enabled = true;
this.ChangeNameRadio.Enabled = true;
this.IntegrateRadio.Checked = true;
break;
case ConflictType.FolderToFile:
this.MessageTextBox.Text = "Same name file exists. Choose action.";
this.OverwriteRadio.Enabled = false;
this.OverwriteNewerRadio.Enabled = false;
this.ResumeRadio.Enabled = false;
this.IntegrateRadio.Enabled = false;
this.DeleteRadio.Enabled = true;
this.SkipRadio.Enabled = true;
this.ChangeNameRadio.Enabled = true;
this.SkipRadio.Checked = true;
break;
case ConflictType.FileToFolder:
this.MessageTextBox.Text = "Same name folder exists. Choose action.";
this.OverwriteRadio.Enabled = false;
this.OverwriteNewerRadio.Enabled = false;
this.ResumeRadio.Enabled = false;
this.IntegrateRadio.Enabled = false;
this.DeleteRadio.Enabled = true;
this.SkipRadio.Enabled = true;
this.ChangeNameRadio.Enabled = true;
this.SkipRadio.Checked = true;
break;
case ConflictType.FileToFile:
this.MessageTextBox.Text = "Same name file exists. Choose action.";
this.OverwriteRadio.Enabled = (this.pDestinationAbility & FsAbility.OverWriteFile) != FsAbility.None;
this.OverwriteNewerRadio.Enabled = (this.pDestinationAbility & FsAbility.OverWriteFile) != FsAbility.None;
this.ResumeRadio.Enabled = this.pEnableResume;
this.IntegrateRadio.Enabled = false;
this.DeleteRadio.Enabled = true;
this.SkipRadio.Enabled = true;
this.ChangeNameRadio.Enabled = true;
if (this.OverwriteRadio.Enabled)
{
this.OverwriteRadio.Checked = true;
break;
}
if (this.DeleteRadio.Enabled)
{
this.DeleteRadio.Checked = true;
break;
}
break;
case ConflictType.Move:
this.MessageTextBox.Text = "Same name resource exists. Choose action.";
this.OverwriteRadio.Enabled = (this.pDestinationAbility & FsAbility.MoveOver) != FsAbility.None;
this.OverwriteNewerRadio.Enabled = false;
this.ResumeRadio.Enabled = false;
this.IntegrateRadio.Enabled = false;
this.DeleteRadio.Enabled = true;
this.SkipRadio.Enabled = true;
this.ChangeNameRadio.Enabled = true;
this.ChangeNameRadio.Checked = true;
break;
case ConflictType.Copy:
this.MessageTextBox.Text = "Same name resource exists. Choose action.";
this.OverwriteRadio.Enabled = (this.pDestinationAbility & FsAbility.CopyOver) != FsAbility.None;
this.OverwriteNewerRadio.Enabled = false;
this.ResumeRadio.Enabled = false;
this.IntegrateRadio.Enabled = false;
this.DeleteRadio.Enabled = true;
this.SkipRadio.Enabled = true;
this.ChangeNameRadio.Enabled = true;
this.ChangeNameRadio.Checked = true;
break;
}
this.pIdleStartTime = DateTime.MaxValue;
this.Activate();
this.Timer1.Start();
}
private void RetryButton_Click(object sender, EventArgs e)
{
this.pSolution = ConflictAction.Retry;
this.DialogResult = DialogResult.Retry;
}
private void OKButton_Click(object sender, EventArgs e)
{
this.pSolution = !this.OverwriteRadio.Checked ? (!this.OverwriteNewerRadio.Checked ? (!this.ResumeRadio.Checked ? (!this.IntegrateRadio.Checked ? (!this.DeleteRadio.Checked ? (!this.ChangeNameRadio.Checked ? ConflictAction.Skip : ConflictAction.ChangeName) : ConflictAction.DeleteTarget) : ConflictAction.Integrate) : ConflictAction.Resume) : ConflictAction.OverwriteNewer) : ConflictAction.Overwrite;
this.DialogResult = DialogResult.OK;
}
private void m_CancelButton_Click(object sender, EventArgs e)
{
this.pSolution = ConflictAction.CancelAll;
}
public static ConflictPromptFormResult ShowDialog(IWin32Window owner, SimpleResourceInfo source, SimpleResourceInfo destination, ConflictType type, bool supportresume, FsAbility destability, int retryminutes)
{
ConflictPromptFormResult promptFormResult = new ConflictPromptFormResult();
using (ConflictPromptForm conflictPromptForm = new ConflictPromptForm())
{
conflictPromptForm.SourceTextBox.Text = source.Name;
conflictPromptForm.SourceInfoTextBox.Text = source.Size.ToString() + " Byte\r\n" + source.LastModifiedTime.ToString();
conflictPromptForm.DestinationTextBox.Text = destination.Name;
conflictPromptForm.DestInfoTextBox.Text = destination.Size.ToString() + " Byte\r\n" + destination.LastModifiedTime.ToString();
conflictPromptForm.Conflict = type;
conflictPromptForm.pEnableResume = source.Size > destination.Size && type == ConflictType.FileToFile && (supportresume && source.Size >= 0L) && destination.Size >= 0L;
conflictPromptForm.pDestinationAbility = destability;
conflictPromptForm.pRetryMinutes = retryminutes;
conflictPromptForm.pIdleStartTime = DateTime.Now;
int num = (int) conflictPromptForm.ShowDialog(owner);
promptFormResult.Type = type;
promptFormResult.Action = conflictPromptForm.Solution;
promptFormResult.ToAll = conflictPromptForm.ToAll;
}
return promptFormResult;
}
private void Timer1_Tick(object sender, EventArgs e)
{
if (this.pRetryMinutes < 0)
return;
if ((long) Misc.GetIdleTime() > 600000L)
{
if (DateTime.Compare(this.pIdleStartTime, DateTime.MaxValue) == 0)
this.pIdleStartTime = DateTime.Now;
}
else
{
if (Form.ActiveForm == this)
{
if (DateTime.Compare(this.pIdleStartTime, DateTime.MaxValue) == 0)
return;
this.pIdleStartTime = DateTime.MaxValue;
this.RetryButton.Text = "Retry";
return;
}
if (DateTime.Compare(this.pIdleStartTime, DateTime.MaxValue) == 0)
this.pIdleStartTime = DateTime.Now;
}
if (DateTime.Compare(this.pIdleStartTime, DateTime.MaxValue) == 0)
return;
TimeSpan timeSpan = TimeSpan.FromMinutes((double) this.pRetryMinutes).Subtract(DateTime.Now.Subtract(this.pIdleStartTime));
if (timeSpan.TotalSeconds < 0.0)
{
this.pSolution = ConflictAction.AutoRetry;
this.DialogResult = DialogResult.Retry;
this.Close();
}
else if (timeSpan.TotalSeconds <= 60.0)
this.RetryButton.Text = string.Format("Retry {0:f0}[s]", (object) timeSpan.TotalSeconds);
else if (timeSpan.TotalMinutes <= 60.0)
this.RetryButton.Text = string.Format("Retry {0:f0}[min]", (object) timeSpan.TotalMinutes);
else if (timeSpan.TotalHours <= 24.0)
this.RetryButton.Text = string.Format("Retry {0:f0}[h]", (object) timeSpan.TotalHours);
else
this.RetryButton.Text = "Retry";
}
}
}

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,15 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ConflictPromptFormResult
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
namespace CarotDAV
{
public class ConflictPromptFormResult
{
public ConflictType Type;
public ConflictAction Action;
public bool ToAll;
}
}

View File

@ -0,0 +1,48 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ConflictPromptManager
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using System.Collections.Generic;
namespace CarotDAV
{
public class ConflictPromptManager
{
private Dictionary<ConflictType, ConflictAction> pActionDic;
public ConflictPromptManager()
{
this.pActionDic = new Dictionary<ConflictType, ConflictAction>();
}
public bool IsRegistered(ConflictType type)
{
if (type == ConflictType.NoConfliction)
return true;
if (this.pActionDic.ContainsKey(type))
return this.pActionDic[type] != ConflictAction.NoConfliction;
return false;
}
public ConflictAction GetAction(ConflictType type)
{
if (type == ConflictType.NoConfliction)
return ConflictAction.NoConfliction;
return this.pActionDic[type];
}
public void RegisterAction(ConflictPromptFormResult r)
{
if (!r.ToAll)
return;
if (r.Action == ConflictAction.Retry || r.Action == ConflictAction.AutoRetry)
this.pActionDic.Remove(r.Type);
else if (this.pActionDic.ContainsKey(r.Type))
this.pActionDic[r.Type] = r.Action;
else
this.pActionDic.Add(r.Type, r.Action);
}
}
}

19
CarotDAV/ConflictType.cs Normal file
View File

@ -0,0 +1,19 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ConflictType
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
namespace CarotDAV
{
public enum ConflictType
{
NoConfliction,
FolderToFolder,
FolderToFile,
FileToFolder,
FileToFile,
Move,
Copy,
}
}

1628
CarotDAV/DAVServer.cs Normal file

File diff suppressed because it is too large Load Diff

600
CarotDAV/DestinationForm.cs Normal file
View File

@ -0,0 +1,600 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.DestinationForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class DestinationForm : Form
{
private IContainer components;
[AccessedThroughProperty("Label5")]
private Label _Label5;
[AccessedThroughProperty("Label4")]
private Label _Label4;
[AccessedThroughProperty("SourceTextBox")]
private TextBox _SourceTextBox;
[AccessedThroughProperty("m_CancelButton")]
private Button _m_CancelButton;
[AccessedThroughProperty("OKButton")]
private Button _OKButton;
[AccessedThroughProperty("Label2")]
private Label _Label2;
[AccessedThroughProperty("DestinationTextBox")]
private TextBox _DestinationTextBox;
[AccessedThroughProperty("TableLayoutPanel1")]
private TableLayoutPanel _TableLayoutPanel1;
[AccessedThroughProperty("Panel1")]
private Panel _Panel1;
[AccessedThroughProperty("Panel2")]
private Panel _Panel2;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("DepthInfinite")]
private RadioButton _DepthInfinite;
[AccessedThroughProperty("DepthOneRadio")]
private RadioButton _DepthOneRadio;
[AccessedThroughProperty("DepthZeroRadio")]
private RadioButton _DepthZeroRadio;
[AccessedThroughProperty("DepthPanel")]
private Panel _DepthPanel;
private DestinationMethodType pMethod;
public DestinationForm()
{
this.Load += new EventHandler(this.DestinationForm_Load);
this.Shown += new EventHandler(this.DestinationForm_Shown);
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.Label5 = new Label();
this.Label4 = new Label();
this.SourceTextBox = new TextBox();
this.m_CancelButton = new Button();
this.OKButton = new Button();
this.Label2 = new Label();
this.DestinationTextBox = new TextBox();
this.TableLayoutPanel1 = new TableLayoutPanel();
this.Panel1 = new Panel();
this.Panel2 = new Panel();
this.Label1 = new Label();
this.DepthInfinite = new RadioButton();
this.DepthOneRadio = new RadioButton();
this.DepthZeroRadio = new RadioButton();
this.DepthPanel = new Panel();
this.TableLayoutPanel1.SuspendLayout();
this.Panel1.SuspendLayout();
this.Panel2.SuspendLayout();
this.DepthPanel.SuspendLayout();
this.SuspendLayout();
this.Label5.AutoSize = true;
Label label5_1 = this.Label5;
Point point1 = new Point(0, 0);
Point point2 = point1;
label5_1.Location = point2;
this.Label5.Name = "Label5";
Label label5_2 = this.Label5;
Size size1 = new Size(111, 12);
Size size2 = size1;
label5_2.Size = size2;
this.Label5.TabIndex = 0;
this.Label5.Text = "Destination URI (To)";
this.Label4.AutoSize = true;
Label label4_1 = this.Label4;
point1 = new Point(0, 0);
Point point3 = point1;
label4_1.Location = point3;
this.Label4.Name = "Label4";
Label label4_2 = this.Label4;
size1 = new Size(101, 12);
Size size3 = size1;
label4_2.Size = size3;
this.Label4.TabIndex = 0;
this.Label4.Text = "Source URI (From)";
this.SourceTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox sourceTextBox1 = this.SourceTextBox;
point1 = new Point(0, 16);
Point point4 = point1;
sourceTextBox1.Location = point4;
this.SourceTextBox.Multiline = true;
this.SourceTextBox.Name = "SourceTextBox";
this.SourceTextBox.ReadOnly = true;
TextBox sourceTextBox2 = this.SourceTextBox;
size1 = new Size(352, 42);
Size size4 = size1;
sourceTextBox2.Size = size4;
this.SourceTextBox.TabIndex = 1;
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.m_CancelButton.DialogResult = DialogResult.Cancel;
Button mCancelButton1 = this.m_CancelButton;
point1 = new Point(296, 184);
Point point5 = point1;
mCancelButton1.Location = point5;
this.m_CancelButton.Name = "m_CancelButton";
Button mCancelButton2 = this.m_CancelButton;
size1 = new Size(72, 24);
Size size5 = size1;
mCancelButton2.Size = size5;
this.m_CancelButton.TabIndex = 4;
this.m_CancelButton.Text = "Cancel";
this.m_CancelButton.UseVisualStyleBackColor = true;
this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button okButton1 = this.OKButton;
point1 = new Point(216, 184);
Point point6 = point1;
okButton1.Location = point6;
this.OKButton.Name = "OKButton";
Button okButton2 = this.OKButton;
size1 = new Size(72, 24);
Size size6 = size1;
okButton2.Size = size6;
this.OKButton.TabIndex = 3;
this.OKButton.Text = "OK";
this.OKButton.UseVisualStyleBackColor = true;
this.Label2.AutoSize = true;
Label label2_1 = this.Label2;
point1 = new Point(8, 8);
Point point7 = point1;
label2_1.Location = point7;
this.Label2.Name = "Label2";
Label label2_2 = this.Label2;
size1 = new Size(94, 12);
Size size7 = size1;
label2_2.Size = size7;
this.Label2.TabIndex = 0;
this.Label2.Text = "Enter Destination";
this.DestinationTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox destinationTextBox1 = this.DestinationTextBox;
point1 = new Point(0, 16);
Point point8 = point1;
destinationTextBox1.Location = point8;
this.DestinationTextBox.Multiline = true;
this.DestinationTextBox.Name = "DestinationTextBox";
TextBox destinationTextBox2 = this.DestinationTextBox;
size1 = new Size(352, 42);
Size size8 = size1;
destinationTextBox2.Size = size8;
this.DestinationTextBox.TabIndex = 1;
this.TableLayoutPanel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
this.TableLayoutPanel1.ColumnCount = 1;
this.TableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
this.TableLayoutPanel1.Controls.Add((Control) this.Panel1, 0, 0);
this.TableLayoutPanel1.Controls.Add((Control) this.Panel2, 0, 1);
TableLayoutPanel tableLayoutPanel1_1 = this.TableLayoutPanel1;
point1 = new Point(8, 24);
Point point9 = point1;
tableLayoutPanel1_1.Location = point9;
this.TableLayoutPanel1.Name = "TableLayoutPanel1";
this.TableLayoutPanel1.RowCount = 2;
this.TableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50f));
this.TableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50f));
TableLayoutPanel tableLayoutPanel1_2 = this.TableLayoutPanel1;
size1 = new Size(360, 128);
Size size9 = size1;
tableLayoutPanel1_2.Size = size9;
this.TableLayoutPanel1.TabIndex = 1;
this.Panel1.Controls.Add((Control) this.SourceTextBox);
this.Panel1.Controls.Add((Control) this.Label4);
this.Panel1.Dock = DockStyle.Fill;
Panel panel1_1 = this.Panel1;
point1 = new Point(3, 3);
Point point10 = point1;
panel1_1.Location = point10;
this.Panel1.Name = "Panel1";
Panel panel1_2 = this.Panel1;
size1 = new Size(354, 58);
Size size10 = size1;
panel1_2.Size = size10;
this.Panel1.TabIndex = 0;
this.Panel2.Controls.Add((Control) this.DestinationTextBox);
this.Panel2.Controls.Add((Control) this.Label5);
this.Panel2.Dock = DockStyle.Fill;
Panel panel2_1 = this.Panel2;
point1 = new Point(3, 67);
Point point11 = point1;
panel2_1.Location = point11;
this.Panel2.Name = "Panel2";
Panel panel2_2 = this.Panel2;
size1 = new Size(354, 58);
Size size11 = size1;
panel2_2.Size = size11;
this.Panel2.TabIndex = 1;
this.Label1.AutoSize = true;
Label label1_1 = this.Label1;
point1 = new Point(8, 8);
Point point12 = point1;
label1_1.Location = point12;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(37, 12);
Size size12 = size1;
label1_2.Size = size12;
this.Label1.TabIndex = 0;
this.Label1.Text = "Depth:";
this.DepthInfinite.AutoSize = true;
this.DepthInfinite.Checked = true;
RadioButton depthInfinite1 = this.DepthInfinite;
point1 = new Point(48, 8);
Point point13 = point1;
depthInfinite1.Location = point13;
this.DepthInfinite.Name = "DepthInfinite";
RadioButton depthInfinite2 = this.DepthInfinite;
size1 = new Size(58, 16);
Size size13 = size1;
depthInfinite2.Size = size13;
this.DepthInfinite.TabIndex = 1;
this.DepthInfinite.TabStop = true;
this.DepthInfinite.Text = "Infinite";
this.DepthInfinite.UseVisualStyleBackColor = true;
this.DepthOneRadio.AutoSize = true;
RadioButton depthOneRadio1 = this.DepthOneRadio;
point1 = new Point(112, 8);
Point point14 = point1;
depthOneRadio1.Location = point14;
this.DepthOneRadio.Name = "DepthOneRadio";
RadioButton depthOneRadio2 = this.DepthOneRadio;
size1 = new Size(29, 16);
Size size14 = size1;
depthOneRadio2.Size = size14;
this.DepthOneRadio.TabIndex = 2;
this.DepthOneRadio.Text = "1";
this.DepthOneRadio.UseVisualStyleBackColor = true;
this.DepthZeroRadio.AutoSize = true;
RadioButton depthZeroRadio1 = this.DepthZeroRadio;
point1 = new Point(152, 8);
Point point15 = point1;
depthZeroRadio1.Location = point15;
this.DepthZeroRadio.Name = "DepthZeroRadio";
RadioButton depthZeroRadio2 = this.DepthZeroRadio;
size1 = new Size(29, 16);
Size size15 = size1;
depthZeroRadio2.Size = size15;
this.DepthZeroRadio.TabIndex = 3;
this.DepthZeroRadio.Text = "0";
this.DepthZeroRadio.UseVisualStyleBackColor = true;
this.DepthPanel.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
this.DepthPanel.Controls.Add((Control) this.DepthZeroRadio);
this.DepthPanel.Controls.Add((Control) this.Label1);
this.DepthPanel.Controls.Add((Control) this.DepthInfinite);
this.DepthPanel.Controls.Add((Control) this.DepthOneRadio);
Panel depthPanel1 = this.DepthPanel;
point1 = new Point(8, 160);
Point point16 = point1;
depthPanel1.Location = point16;
this.DepthPanel.Name = "DepthPanel";
Panel depthPanel2 = this.DepthPanel;
size1 = new Size(192, 32);
Size size16 = size1;
depthPanel2.Size = size16;
this.DepthPanel.TabIndex = 2;
this.DepthPanel.Visible = false;
this.AcceptButton = (IButtonControl) this.OKButton;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.m_CancelButton;
size1 = new Size(376, 215);
this.ClientSize = size1;
this.Controls.Add((Control) this.DepthPanel);
this.Controls.Add((Control) this.TableLayoutPanel1);
this.Controls.Add((Control) this.Label2);
this.Controls.Add((Control) this.m_CancelButton);
this.Controls.Add((Control) this.OKButton);
size1 = new Size(392, 253);
this.MaximumSize = size1;
size1 = new Size(256, 205);
this.MinimumSize = size1;
this.Name = nameof (DestinationForm);
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "Destination";
this.TableLayoutPanel1.ResumeLayout(false);
this.Panel1.ResumeLayout(false);
this.Panel1.PerformLayout();
this.Panel2.ResumeLayout(false);
this.Panel2.PerformLayout();
this.DepthPanel.ResumeLayout(false);
this.DepthPanel.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual Label Label5
{
get
{
return this._Label5;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label5 = value;
}
}
internal virtual Label Label4
{
get
{
return this._Label4;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label4 = value;
}
}
internal virtual TextBox SourceTextBox
{
get
{
return this._SourceTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._SourceTextBox = value;
}
}
internal virtual Button m_CancelButton
{
get
{
return this._m_CancelButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._m_CancelButton = value;
}
}
internal virtual Button OKButton
{
get
{
return this._OKButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.OKButton_Click);
if (this._OKButton != null)
this._OKButton.Click -= eventHandler;
this._OKButton = value;
if (this._OKButton == null)
return;
this._OKButton.Click += eventHandler;
}
}
internal virtual Label Label2
{
get
{
return this._Label2;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label2 = value;
}
}
internal virtual TextBox DestinationTextBox
{
get
{
return this._DestinationTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.DestinationTextBox_TextChanged);
if (this._DestinationTextBox != null)
this._DestinationTextBox.TextChanged -= eventHandler;
this._DestinationTextBox = value;
if (this._DestinationTextBox == null)
return;
this._DestinationTextBox.TextChanged += eventHandler;
}
}
internal virtual TableLayoutPanel TableLayoutPanel1
{
get
{
return this._TableLayoutPanel1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TableLayoutPanel1 = value;
}
}
internal virtual Panel Panel1
{
get
{
return this._Panel1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Panel1 = value;
}
}
internal virtual Panel Panel2
{
get
{
return this._Panel2;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Panel2 = value;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual RadioButton DepthInfinite
{
get
{
return this._DepthInfinite;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DepthInfinite = value;
}
}
internal virtual RadioButton DepthOneRadio
{
get
{
return this._DepthOneRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DepthOneRadio = value;
}
}
internal virtual RadioButton DepthZeroRadio
{
get
{
return this._DepthZeroRadio;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DepthZeroRadio = value;
}
}
internal virtual Panel DepthPanel
{
get
{
return this._DepthPanel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DepthPanel = value;
}
}
public DestinationMethodType Method
{
get
{
return this.pMethod;
}
set
{
this.pMethod = value;
}
}
public string Source
{
get
{
return this.SourceTextBox.Text;
}
set
{
this.SourceTextBox.Text = value;
}
}
public string Destination
{
get
{
return this.DestinationTextBox.Text;
}
set
{
this.DestinationTextBox.Text = value;
}
}
public void Initialize(DestinationMethodType method, Uri sourceuri)
{
this.Method = method;
this.SourceTextBox.Text = sourceuri.ToString();
}
private void DestinationForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.CarotDAV;
this.DestinationTextBox.Text = this.SourceTextBox.Text;
switch (this.Method)
{
case DestinationMethodType.Copy:
this.OKButton.Text = "Copy";
this.DepthPanel.Visible = true;
break;
case DestinationMethodType.Move:
this.OKButton.Text = "Move";
this.DepthPanel.Visible = false;
break;
}
int num = this.DestinationTextBox.Text.LastIndexOf("/");
if (num == checked (this.DestinationTextBox.Text.Length - 1))
num = this.DestinationTextBox.Text.LastIndexOf("/", checked (num - 1));
if (num < 0)
return;
this.DestinationTextBox.Select(checked (num + 1), checked (this.DestinationTextBox.Text.Length - num - 1));
}
private void DestinationForm_Shown(object sender, EventArgs e)
{
this.DestinationTextBox.Focus();
}
private void OKButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
}
private void DestinationTextBox_TextChanged(object sender, EventArgs e)
{
this.OKButton.Enabled = Operators.CompareString(this.SourceTextBox.Text, this.DestinationTextBox.Text, false) != 0;
}
}
}

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,14 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.DestinationMethodType
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
namespace CarotDAV
{
public enum DestinationMethodType
{
Copy,
Move,
}
}

16
CarotDAV/ErrorAction.cs Normal file
View File

@ -0,0 +1,16 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ErrorAction
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
namespace CarotDAV
{
public enum ErrorAction
{
Ignore,
Retry,
AutoRetry,
Cancel,
}
}

592
CarotDAV/ErrorPromptForm.cs Normal file
View File

@ -0,0 +1,592 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ErrorPromptForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class ErrorPromptForm : Form
{
private IContainer components;
[AccessedThroughProperty("m_CancelButton")]
private Button _m_CancelButton;
[AccessedThroughProperty("IgnoreButton")]
private Button _IgnoreButton;
[AccessedThroughProperty("DescLabel")]
private Label _DescLabel;
[AccessedThroughProperty("IgnoreAllButton")]
private Button _IgnoreAllButton;
[AccessedThroughProperty("MessageLabel")]
private Label _MessageLabel;
[AccessedThroughProperty("DescTextBox")]
private TextBox _DescTextBox;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("TargetTextBox")]
private TextBox _TargetTextBox;
[AccessedThroughProperty("Timer1")]
private Timer _Timer1;
[AccessedThroughProperty("RetryButton")]
private Button _RetryButton;
private Exception pEx;
private string pMessage;
private string pTarget;
private ErrorPromptType pType;
private ErrorAction pAction;
private bool pToAll;
private int pRetryMinutes;
private DateTime pIdleStartTime;
public ErrorPromptForm()
{
this.Load += new EventHandler(this.ErrorPromptForm_Load);
this.pMessage = string.Empty;
this.pTarget = string.Empty;
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.components = (IContainer) new System.ComponentModel.Container();
this.m_CancelButton = new Button();
this.RetryButton = new Button();
this.IgnoreButton = new Button();
this.DescLabel = new Label();
this.IgnoreAllButton = new Button();
this.MessageLabel = new Label();
this.DescTextBox = new TextBox();
this.Label1 = new Label();
this.TargetTextBox = new TextBox();
this.Timer1 = new Timer(this.components);
this.SuspendLayout();
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.m_CancelButton.DialogResult = DialogResult.Cancel;
Button mCancelButton1 = this.m_CancelButton;
Point point1 = new Point(288, 152);
Point point2 = point1;
mCancelButton1.Location = point2;
this.m_CancelButton.Name = "m_CancelButton";
Button mCancelButton2 = this.m_CancelButton;
Size size1 = new Size(72, 24);
Size size2 = size1;
mCancelButton2.Size = size2;
this.m_CancelButton.TabIndex = 8;
this.m_CancelButton.Text = "Cancel";
this.m_CancelButton.UseVisualStyleBackColor = true;
this.RetryButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button retryButton1 = this.RetryButton;
point1 = new Point(184, 152);
Point point3 = point1;
retryButton1.Location = point3;
this.RetryButton.Name = "RetryButton";
Button retryButton2 = this.RetryButton;
size1 = new Size(96, 24);
Size size3 = size1;
retryButton2.Size = size3;
this.RetryButton.TabIndex = 7;
this.RetryButton.Text = "Retry";
this.RetryButton.UseVisualStyleBackColor = true;
this.IgnoreButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button ignoreButton1 = this.IgnoreButton;
point1 = new Point(104, 152);
Point point4 = point1;
ignoreButton1.Location = point4;
this.IgnoreButton.Name = "IgnoreButton";
Button ignoreButton2 = this.IgnoreButton;
size1 = new Size(72, 25);
Size size4 = size1;
ignoreButton2.Size = size4;
this.IgnoreButton.TabIndex = 6;
this.IgnoreButton.Text = "Ignore";
this.IgnoreButton.UseVisualStyleBackColor = true;
this.DescLabel.AutoSize = true;
Label descLabel1 = this.DescLabel;
point1 = new Point(8, 80);
Point point5 = point1;
descLabel1.Location = point5;
this.DescLabel.Name = "DescLabel";
Label descLabel2 = this.DescLabel;
size1 = new Size(65, 12);
Size size5 = size1;
descLabel2.Size = size5;
this.DescLabel.TabIndex = 3;
this.DescLabel.Text = "Description:";
this.IgnoreAllButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button ignoreAllButton1 = this.IgnoreAllButton;
point1 = new Point(24, 152);
Point point6 = point1;
ignoreAllButton1.Location = point6;
this.IgnoreAllButton.Name = "IgnoreAllButton";
Button ignoreAllButton2 = this.IgnoreAllButton;
size1 = new Size(72, 24);
Size size6 = size1;
ignoreAllButton2.Size = size6;
this.IgnoreAllButton.TabIndex = 5;
this.IgnoreAllButton.Text = "Ignore All";
this.IgnoreAllButton.UseVisualStyleBackColor = true;
this.MessageLabel.AutoSize = true;
Label messageLabel1 = this.MessageLabel;
point1 = new Point(8, 8);
Point point7 = point1;
messageLabel1.Location = point7;
this.MessageLabel.Name = "MessageLabel";
Label messageLabel2 = this.MessageLabel;
size1 = new Size(79, 12);
Size size7 = size1;
messageLabel2.Size = size7;
this.MessageLabel.TabIndex = 0;
this.MessageLabel.Text = "Error Message";
this.DescTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox descTextBox1 = this.DescTextBox;
point1 = new Point(8, 96);
Point point8 = point1;
descTextBox1.Location = point8;
this.DescTextBox.Multiline = true;
this.DescTextBox.Name = "DescTextBox";
this.DescTextBox.ReadOnly = true;
TextBox descTextBox2 = this.DescTextBox;
size1 = new Size(352, 48);
Size size8 = size1;
descTextBox2.Size = size8;
this.DescTextBox.TabIndex = 4;
this.DescTextBox.TabStop = false;
this.Label1.AutoSize = true;
Label label1_1 = this.Label1;
point1 = new Point(8, 24);
Point point9 = point1;
label1_1.Location = point9;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(38, 12);
Size size9 = size1;
label1_2.Size = size9;
this.Label1.TabIndex = 1;
this.Label1.Text = "Target";
this.TargetTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox targetTextBox1 = this.TargetTextBox;
point1 = new Point(8, 40);
Point point10 = point1;
targetTextBox1.Location = point10;
this.TargetTextBox.Multiline = true;
this.TargetTextBox.Name = "TargetTextBox";
this.TargetTextBox.ReadOnly = true;
TextBox targetTextBox2 = this.TargetTextBox;
size1 = new Size(352, 32);
Size size10 = size1;
targetTextBox2.Size = size10;
this.TargetTextBox.TabIndex = 2;
this.TargetTextBox.TabStop = false;
this.AcceptButton = (IButtonControl) this.RetryButton;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.m_CancelButton;
size1 = new Size(368, 184);
this.ClientSize = size1;
this.Controls.Add((Control) this.TargetTextBox);
this.Controls.Add((Control) this.RetryButton);
this.Controls.Add((Control) this.Label1);
this.Controls.Add((Control) this.m_CancelButton);
this.Controls.Add((Control) this.DescTextBox);
this.Controls.Add((Control) this.DescLabel);
this.Controls.Add((Control) this.MessageLabel);
this.Controls.Add((Control) this.IgnoreButton);
this.Controls.Add((Control) this.IgnoreAllButton);
this.MaximizeBox = false;
this.MinimizeBox = false;
size1 = new Size(384, 222);
this.MinimumSize = size1;
this.Name = nameof (ErrorPromptForm);
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "Error";
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual Button m_CancelButton
{
get
{
return this._m_CancelButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.m_CancelButton_Click);
if (this._m_CancelButton != null)
this._m_CancelButton.Click -= eventHandler;
this._m_CancelButton = value;
if (this._m_CancelButton == null)
return;
this._m_CancelButton.Click += eventHandler;
}
}
internal virtual Button IgnoreButton
{
get
{
return this._IgnoreButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.IgnoreButton_Click);
if (this._IgnoreButton != null)
this._IgnoreButton.Click -= eventHandler;
this._IgnoreButton = value;
if (this._IgnoreButton == null)
return;
this._IgnoreButton.Click += eventHandler;
}
}
internal virtual Label DescLabel
{
get
{
return this._DescLabel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DescLabel = value;
}
}
internal virtual Button IgnoreAllButton
{
get
{
return this._IgnoreAllButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.IgnoreAllButton_Click);
if (this._IgnoreAllButton != null)
this._IgnoreAllButton.Click -= eventHandler;
this._IgnoreAllButton = value;
if (this._IgnoreAllButton == null)
return;
this._IgnoreAllButton.Click += eventHandler;
}
}
internal virtual Label MessageLabel
{
get
{
return this._MessageLabel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._MessageLabel = value;
}
}
internal virtual TextBox DescTextBox
{
get
{
return this._DescTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._DescTextBox = value;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual TextBox TargetTextBox
{
get
{
return this._TargetTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TargetTextBox = value;
}
}
internal virtual Timer Timer1
{
get
{
return this._Timer1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.Timer1_Tick);
if (this._Timer1 != null)
this._Timer1.Tick -= eventHandler;
this._Timer1 = value;
if (this._Timer1 == null)
return;
this._Timer1.Tick += eventHandler;
}
}
private virtual Button RetryButton
{
get
{
return this._RetryButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.RetryButton_Click);
if (this._RetryButton != null)
this._RetryButton.Click -= eventHandler;
this._RetryButton = value;
if (this._RetryButton == null)
return;
this._RetryButton.Click += eventHandler;
}
}
public Exception Exception
{
get
{
return this.pEx;
}
set
{
this.pEx = value;
}
}
public string Message
{
get
{
return this.pMessage;
}
set
{
if (value == null)
value = string.Empty;
if (value.Length == 0)
value = "Unknown error occurred.";
this.pMessage = value;
}
}
public string Target
{
get
{
return this.pTarget;
}
set
{
if (value == null)
value = string.Empty;
this.pTarget = value;
}
}
public ErrorPromptType Type
{
get
{
return this.pType;
}
set
{
this.pType = value;
}
}
public ErrorAction Action
{
get
{
return this.pAction;
}
set
{
this.pAction = value;
}
}
public bool ToAll
{
get
{
return this.pToAll;
}
set
{
this.pToAll = value;
}
}
private void ErrorPromptForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.CarotDAV;
this.MessageLabel.Text = this.pMessage;
this.TargetTextBox.Text = this.pTarget;
this.DescTextBox.Text = this.pEx.ToString();
switch (this.Type)
{
case ErrorPromptType.RetryCancel:
this.IgnoreAllButton.Visible = false;
this.IgnoreButton.Visible = false;
this.RetryButton.Visible = true;
this.m_CancelButton.Visible = true;
break;
case ErrorPromptType.IgnoreCancel:
this.IgnoreAllButton.Visible = false;
this.IgnoreButton.Visible = true;
this.RetryButton.Visible = false;
this.m_CancelButton.Visible = true;
break;
case ErrorPromptType.IgnoreRetryCancel:
this.IgnoreAllButton.Visible = false;
this.IgnoreButton.Visible = true;
this.RetryButton.Visible = true;
this.m_CancelButton.Visible = true;
break;
case ErrorPromptType.IgnoreAllIgnoreCancel:
this.IgnoreAllButton.Visible = true;
this.IgnoreButton.Visible = true;
this.RetryButton.Visible = false;
this.m_CancelButton.Visible = true;
break;
case ErrorPromptType.IgnoreAllIgnoreRetryCancel:
this.IgnoreAllButton.Visible = true;
this.IgnoreButton.Visible = true;
this.RetryButton.Visible = true;
this.m_CancelButton.Visible = true;
break;
default:
throw new NotImplementedException();
}
this.pIdleStartTime = DateTime.MaxValue;
this.Activate();
this.Timer1.Start();
}
private void IgnoreAllButton_Click(object sender, EventArgs e)
{
this.ToAll = true;
this.Action = ErrorAction.Ignore;
this.DialogResult = DialogResult.OK;
}
private void IgnoreButton_Click(object sender, EventArgs e)
{
this.ToAll = false;
this.Action = ErrorAction.Ignore;
this.DialogResult = DialogResult.OK;
}
private void RetryButton_Click(object sender, EventArgs e)
{
this.ToAll = false;
this.Action = ErrorAction.Retry;
this.DialogResult = DialogResult.OK;
}
private void m_CancelButton_Click(object sender, EventArgs e)
{
this.ToAll = false;
this.Action = ErrorAction.Cancel;
this.DialogResult = DialogResult.OK;
}
public static ErrorPromptFormResult ShowDialog(IWin32Window owner, string message, string target, Exception ex, ErrorPromptType type, int retryminutes)
{
ErrorPromptFormResult promptFormResult = new ErrorPromptFormResult();
using (ErrorPromptForm errorPromptForm = new ErrorPromptForm())
{
errorPromptForm.Message = message;
errorPromptForm.Target = target;
errorPromptForm.Exception = ex;
errorPromptForm.Type = type;
errorPromptForm.pRetryMinutes = retryminutes;
int num = (int) errorPromptForm.ShowDialog(owner);
promptFormResult.Action = errorPromptForm.Action;
promptFormResult.ToAll = errorPromptForm.ToAll;
}
return promptFormResult;
}
private void Timer1_Tick(object sender, EventArgs e)
{
if (this.pRetryMinutes < 0)
return;
if ((long) Misc.GetIdleTime() > 600000L)
{
if (DateTime.Compare(this.pIdleStartTime, DateTime.MaxValue) == 0)
this.pIdleStartTime = DateTime.Now;
}
else
{
if (Form.ActiveForm == this)
{
if (DateTime.Compare(this.pIdleStartTime, DateTime.MaxValue) == 0)
return;
this.pIdleStartTime = DateTime.MaxValue;
this.RetryButton.Text = "Retry";
return;
}
if (DateTime.Compare(this.pIdleStartTime, DateTime.MaxValue) == 0)
this.pIdleStartTime = DateTime.Now;
}
if (DateTime.Compare(this.pIdleStartTime, DateTime.MaxValue) == 0)
return;
TimeSpan timeSpan = TimeSpan.FromMinutes((double) this.pRetryMinutes).Subtract(DateTime.Now.Subtract(this.pIdleStartTime));
if (timeSpan.TotalSeconds < 0.0)
{
this.ToAll = false;
this.Action = ErrorAction.AutoRetry;
this.DialogResult = DialogResult.OK;
this.Close();
}
else if (timeSpan.TotalSeconds <= 60.0)
this.RetryButton.Text = string.Format("Retry {0:f0}[s]", (object) timeSpan.TotalSeconds);
else if (timeSpan.TotalMinutes <= 60.0)
this.RetryButton.Text = string.Format("Retry {0:f0}[min]", (object) timeSpan.TotalMinutes);
else if (timeSpan.TotalHours <= 24.0)
this.RetryButton.Text = string.Format("Retry {0:f0}[h]", (object) timeSpan.TotalHours);
else
this.RetryButton.Text = "Retry";
}
}
}

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,14 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ErrorPromptFormResult
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
namespace CarotDAV
{
public class ErrorPromptFormResult
{
public ErrorAction Action;
public bool ToAll;
}
}

View File

@ -0,0 +1,34 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ErrorPromptManager
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
namespace CarotDAV
{
public class ErrorPromptManager
{
private bool pIgnoreAll;
public bool IgnoreAll()
{
return this.pIgnoreAll;
}
public void RegisterAction(ErrorPromptFormResult r)
{
if (!r.ToAll)
return;
if (r.Action == ErrorAction.Ignore)
{
this.pIgnoreAll = true;
}
else
{
if (r.Action != ErrorAction.Retry)
return;
this.pIgnoreAll = false;
}
}
}
}

View File

@ -0,0 +1,17 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ErrorPromptType
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
namespace CarotDAV
{
public enum ErrorPromptType
{
RetryCancel,
IgnoreCancel,
IgnoreRetryCancel,
IgnoreAllIgnoreCancel,
IgnoreAllIgnoreRetryCancel,
}
}

View File

@ -0,0 +1,89 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ExceptionOccurredEventArgs
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using System;
namespace CarotDAV
{
public class ExceptionOccurredEventArgs : EventArgs
{
private string pMessage;
private string pTarget;
private Exception pException;
private ErrorPromptType pType;
private ErrorPromptFormResult pResult;
private int pRetryMinutes;
public ExceptionOccurredEventArgs(string message, string target, ErrorPromptType type, Exception ex, int retryminutes)
{
this.pMessage = message;
this.pException = ex;
this.pType = type;
this.pTarget = target;
this.pResult = new ErrorPromptFormResult();
this.pResult.ToAll = false;
this.pResult.Action = ErrorAction.Ignore;
this.pRetryMinutes = retryminutes;
}
public ExceptionOccurredEventArgs(string message, Uri target, ErrorPromptType type, Exception ex, int retryminutes)
: this(message, target.ToString(), type, ex, retryminutes)
{
}
public string Message
{
get
{
return this.pMessage;
}
}
public string Target
{
get
{
return this.pTarget;
}
}
public ErrorPromptType Type
{
get
{
return this.pType;
}
}
public Exception Exception
{
get
{
return this.pException;
}
}
public ErrorPromptFormResult Result
{
get
{
return this.pResult;
}
set
{
this.pResult = value;
}
}
public int RetryMinutes
{
get
{
return this.pRetryMinutes;
}
}
}
}

192
CarotDAV/FsManager.cs Normal file
View File

@ -0,0 +1,192 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.FsManager
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using Rei.Fs;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace CarotDAV
{
public class FsManager
{
private static List<System.Type> pFsTypeList = new List<System.Type>();
private static List<FsManager.TypeNamePair> pFsNameTypeList = new List<FsManager.TypeNamePair>();
private static Dictionary<System.Type, string> pFsTypeDllNameDic = new Dictionary<System.Type, string>();
private static List<MethodInfo> pTryCreateMethodInfos = new List<MethodInfo>();
private static Dictionary<System.Type, MethodInfo> pGetDefaultFaviconMethodInfos = new Dictionary<System.Type, MethodInfo>();
private static string pFsBaseDllPath;
public static System.Type[] FsTypes
{
get
{
return FsManager.pFsTypeList.ToArray();
}
}
public static void LoadFs()
{
string[] files = Directory.GetFiles(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "*.dll");
System.Type c = typeof (ConnectionSettingBase);
List<string> stringList = new List<string>();
Assembly executingAssembly = Assembly.GetExecutingAssembly();
System.Type[] types1 = new System.Type[0];
System.Type[] types2 = new System.Type[2]
{
typeof (Uri),
typeof (ConnectionSettingBase).MakeByRefType()
};
System.Type[] types3 = new System.Type[0];
FsManager.pFsBaseDllPath = Assembly.GetAssembly(typeof (FsBase)).Location;
AssemblyName[] referencedAssemblies = executingAssembly.GetReferencedAssemblies();
int index1 = 0;
FsManager.TypeNamePair typeNamePair;
while (index1 < referencedAssemblies.Length)
{
AssemblyName assemblyRef = referencedAssemblies[index1];
try
{
if (assemblyRef.FullName.StartsWith("Rei.Fs."))
{
Assembly assembly = Assembly.Load(assemblyRef);
System.Type[] types4 = assembly.GetTypes();
int index2 = 0;
while (index2 < types4.Length)
{
System.Type key = types4[index2];
if (key.IsClass && key.IsPublic && (!key.IsAbstract && key.IsSubclassOf(c)))
{
PropertyInfo property = key.GetProperty("TypeName", BindingFlags.Static | BindingFlags.Public, (Binder) null, typeof (string), types1, (ParameterModifier[]) null);
if (property != null)
{
string str = (string) property.GetValue((object) null, (object[]) null);
if (str != null && !FsManager.pFsTypeList.Contains(key))
{
FsManager.pFsTypeList.Add(key);
FsManager.pFsTypeDllNameDic.Add(key, assembly.Location);
typeNamePair.Type = key;
typeNamePair.Name = str;
FsManager.pFsNameTypeList.Add(typeNamePair);
MethodInfo method1 = key.GetMethod("TryCreate", BindingFlags.Static | BindingFlags.Public, (Binder) null, types2, (ParameterModifier[]) null);
if (method1 != null && method1.ReturnType == typeof (bool))
FsManager.pTryCreateMethodInfos.Add(method1);
MethodInfo method2 = key.GetMethod("GetDefaultFavicon", BindingFlags.Static | BindingFlags.Public, (Binder) null, types3, (ParameterModifier[]) null);
if (method2 != null && method2.ReturnType == typeof (Icon))
FsManager.pGetDefaultFaviconMethodInfos.Add(key, method2);
}
}
}
checked { ++index2; }
}
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
checked { ++index1; }
}
string[] strArray = files;
int index3 = 0;
while (index3 < strArray.Length)
{
string assemblyFile = strArray[index3];
try
{
Assembly assembly = Assembly.LoadFrom(assemblyFile);
System.Type[] types4 = assembly.GetTypes();
int index2 = 0;
while (index2 < types4.Length)
{
System.Type key = types4[index2];
if (key.IsClass && key.IsPublic && (!key.IsAbstract && key.IsSubclassOf(c)))
{
PropertyInfo property = key.GetProperty("TypeName", BindingFlags.Static | BindingFlags.Public, (Binder) null, typeof (string), types1, (ParameterModifier[]) null);
if (property != null)
{
string str = (string) property.GetValue((object) null, (object[]) null);
if (str != null && !FsManager.pFsTypeList.Contains(key))
{
FsManager.pFsTypeList.Add(key);
FsManager.pFsTypeDllNameDic.Add(key, assembly.Location);
typeNamePair.Type = key;
typeNamePair.Name = str;
FsManager.pFsNameTypeList.Add(typeNamePair);
MethodInfo method1 = key.GetMethod("TryCreate", BindingFlags.Static | BindingFlags.Public, (Binder) null, types2, (ParameterModifier[]) null);
if (method1 != null && method1.ReturnType == typeof (bool))
FsManager.pTryCreateMethodInfos.Add(method1);
MethodInfo method2 = key.GetMethod("GetDefaultFavicon", BindingFlags.Static | BindingFlags.Public, (Binder) null, types3, (ParameterModifier[]) null);
if (method2 != null && method2.ReturnType == typeof (Icon))
FsManager.pGetDefaultFaviconMethodInfos.Add(key, method2);
}
}
}
checked { ++index2; }
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
checked { ++index3; }
}
}
public static FsManager.TypeNamePair[] GetFsNameAndType()
{
return FsManager.pFsNameTypeList.ToArray();
}
public static bool TryCreate(Uri target, ref ConnectionSettingBase c)
{
int num1 = 0;
int num2 = checked (FsManager.pTryCreateMethodInfos.Count - 1);
int index = num1;
while (index <= num2)
{
object[] parameters = new object[2]
{
(object) target,
(object) null
};
if ((bool) FsManager.pTryCreateMethodInfos[index].Invoke((object) null, parameters))
{
c = (ConnectionSettingBase) parameters[1];
return true;
}
checked { ++index; }
}
return false;
}
public static Icon GetDefaultFavicon(System.Type type)
{
if (FsManager.pGetDefaultFaviconMethodInfos.ContainsKey(type))
return (Icon) FsManager.pGetDefaultFaviconMethodInfos[type].Invoke((object) null, (object[]) null);
return ConnectionSettingBase.GetDefaultFavicon();
}
public static string GetDefaultFaviconPath(System.Type type)
{
if (FsManager.pGetDefaultFaviconMethodInfos.ContainsKey(type))
return Path.Combine(Application.StartupPath, FsManager.pFsTypeDllNameDic[type]);
return FsManager.pFsBaseDllPath;
}
public struct TypeNamePair
{
public System.Type Type;
public string Name;
}
}
}

4525
CarotDAV/FsTestForm.cs Normal file

File diff suppressed because it is too large Load Diff

120
CarotDAV/FsTestForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

153
CarotDAV/LogWriter.cs Normal file
View File

@ -0,0 +1,153 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.LogWriter
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
namespace CarotDAV
{
public class LogWriter
{
private static object pSyncObject = RuntimeHelpers.GetObjectValue(new object());
private static bool pEnabled = false;
private static string pLogFilePath;
public static string LogFilePath
{
get
{
object pSyncObject = LogWriter.pSyncObject;
ObjectFlowControl.CheckForSyncLockOnValueType(pSyncObject);
Monitor.Enter(pSyncObject);
try
{
return LogWriter.pLogFilePath;
}
finally
{
Monitor.Exit(pSyncObject);
}
}
set
{
if (value != null && value.Length == 0)
value = (string) null;
object pSyncObject = LogWriter.pSyncObject;
ObjectFlowControl.CheckForSyncLockOnValueType(pSyncObject);
Monitor.Enter(pSyncObject);
try
{
LogWriter.pLogFilePath = value;
}
finally
{
Monitor.Exit(pSyncObject);
}
}
}
public static bool Enabled
{
get
{
object pSyncObject = LogWriter.pSyncObject;
ObjectFlowControl.CheckForSyncLockOnValueType(pSyncObject);
Monitor.Enter(pSyncObject);
try
{
return LogWriter.pEnabled;
}
finally
{
Monitor.Exit(pSyncObject);
}
}
set
{
object pSyncObject = LogWriter.pSyncObject;
ObjectFlowControl.CheckForSyncLockOnValueType(pSyncObject);
Monitor.Enter(pSyncObject);
try
{
LogWriter.pEnabled = value;
}
finally
{
Monitor.Exit(pSyncObject);
}
}
}
public static void ClearLog()
{
try
{
File.Delete(LogWriter.LogFilePath);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
}
public static void WriteException(Exception ex)
{
LogWriter.WriteMessage("Exception", ex.ToString() + "---" + ex.Message + "\r\n" + ex.StackTrace);
}
public static void WriteNotification(string message)
{
LogWriter.WriteMessage("Notification", message);
}
public static void WriteMessage(string type, string message)
{
LogWriter.InternalWriteLine(string.Join("", new string[7]
{
"[",
type,
"]",
" ",
DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"),
" ",
message
}));
}
protected static void InternalWriteLine(string message)
{
object pSyncObject = LogWriter.pSyncObject;
ObjectFlowControl.CheckForSyncLockOnValueType(pSyncObject);
Monitor.Enter(pSyncObject);
try
{
if (!LogWriter.pEnabled)
return;
if (LogWriter.pLogFilePath == null)
return;
try
{
using (StreamWriter streamWriter = new StreamWriter(LogWriter.pLogFilePath, true, Encoding.UTF8))
streamWriter.WriteLine(message);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
}
finally
{
Monitor.Exit(pSyncObject);
}
}
}
}

9345
CarotDAV/MainForm.cs Normal file

File diff suppressed because it is too large Load Diff

120
CarotDAV/MainForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,471 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.MasterPasswordChangeForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class MasterPasswordChangeForm : Form
{
private IContainer components;
[AccessedThroughProperty("TextBoxPassword")]
private TextBox _TextBoxPassword;
[AccessedThroughProperty("m_CancelButton")]
private Button _m_CancelButton;
[AccessedThroughProperty("OKButton")]
private Button _OKButton;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("TextBoxNew")]
private TextBox _TextBoxNew;
[AccessedThroughProperty("TextBoxConfirm")]
private TextBox _TextBoxConfirm;
[AccessedThroughProperty("Label2")]
private Label _Label2;
[AccessedThroughProperty("Label3")]
private Label _Label3;
[AccessedThroughProperty("Label4")]
private Label _Label4;
[AccessedThroughProperty("Label5")]
private Label _Label5;
[AccessedThroughProperty("ButtonClear")]
private Button _ButtonClear;
public string MasterPassword;
public MasterPasswordChangeForm()
{
this.Load += new EventHandler(this.MasterPasswordChangeForm_Load);
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.TextBoxPassword = new TextBox();
this.m_CancelButton = new Button();
this.OKButton = new Button();
this.Label1 = new Label();
this.TextBoxNew = new TextBox();
this.TextBoxConfirm = new TextBox();
this.Label2 = new Label();
this.Label3 = new Label();
this.Label4 = new Label();
this.Label5 = new Label();
this.ButtonClear = new Button();
this.SuspendLayout();
this.TextBoxPassword.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxPassword1 = this.TextBoxPassword;
Point point1 = new Point(64, 48);
Point point2 = point1;
textBoxPassword1.Location = point2;
this.TextBoxPassword.Name = "TextBoxPassword";
TextBox textBoxPassword2 = this.TextBoxPassword;
Size size1 = new Size(226, 19);
Size size2 = size1;
textBoxPassword2.Size = size2;
this.TextBoxPassword.TabIndex = 3;
this.TextBoxPassword.UseSystemPasswordChar = true;
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.m_CancelButton.DialogResult = DialogResult.Cancel;
Button mCancelButton1 = this.m_CancelButton;
point1 = new Point(218, 128);
Point point3 = point1;
mCancelButton1.Location = point3;
this.m_CancelButton.Name = "m_CancelButton";
Button mCancelButton2 = this.m_CancelButton;
size1 = new Size(72, 24);
Size size3 = size1;
mCancelButton2.Size = size3;
this.m_CancelButton.TabIndex = 10;
this.m_CancelButton.Text = "Cancel";
this.m_CancelButton.UseVisualStyleBackColor = true;
this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button okButton1 = this.OKButton;
point1 = new Point(138, 128);
Point point4 = point1;
okButton1.Location = point4;
this.OKButton.Name = "OKButton";
Button okButton2 = this.OKButton;
size1 = new Size(72, 24);
Size size4 = size1;
okButton2.Size = size4;
this.OKButton.TabIndex = 9;
this.OKButton.Text = "OK";
this.OKButton.UseVisualStyleBackColor = true;
this.Label1.AutoSize = true;
this.Label1.ForeColor = Color.Red;
Label label1_1 = this.Label1;
point1 = new Point(8, 24);
Point point5 = point1;
label1_1.Location = point5;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(50, 12);
Size size5 = size1;
label1_2.Size = size5;
this.Label1.TabIndex = 1;
this.Label1.Text = "Message";
this.TextBoxNew.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxNew1 = this.TextBoxNew;
point1 = new Point(64, 72);
Point point6 = point1;
textBoxNew1.Location = point6;
this.TextBoxNew.Name = "TextBoxNew";
TextBox textBoxNew2 = this.TextBoxNew;
size1 = new Size(226, 19);
Size size6 = size1;
textBoxNew2.Size = size6;
this.TextBoxNew.TabIndex = 5;
this.TextBoxNew.UseSystemPasswordChar = true;
this.TextBoxConfirm.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxConfirm1 = this.TextBoxConfirm;
point1 = new Point(64, 96);
Point point7 = point1;
textBoxConfirm1.Location = point7;
this.TextBoxConfirm.Name = "TextBoxConfirm";
TextBox textBoxConfirm2 = this.TextBoxConfirm;
size1 = new Size(226, 19);
Size size7 = size1;
textBoxConfirm2.Size = size7;
this.TextBoxConfirm.TabIndex = 7;
this.TextBoxConfirm.UseSystemPasswordChar = true;
this.Label2.AutoSize = true;
Label label2_1 = this.Label2;
point1 = new Point(8, 48);
Point point8 = point1;
label2_1.Location = point8;
this.Label2.Name = "Label2";
Label label2_2 = this.Label2;
size1 = new Size(22, 12);
Size size8 = size1;
label2_2.Size = size8;
this.Label2.TabIndex = 2;
this.Label2.Text = "Old";
this.Label3.AutoSize = true;
Label label3_1 = this.Label3;
point1 = new Point(8, 72);
Point point9 = point1;
label3_1.Location = point9;
this.Label3.Name = "Label3";
Label label3_2 = this.Label3;
size1 = new Size(27, 12);
Size size9 = size1;
label3_2.Size = size9;
this.Label3.TabIndex = 4;
this.Label3.Text = "New";
this.Label4.AutoSize = true;
Label label4_1 = this.Label4;
point1 = new Point(8, 96);
Point point10 = point1;
label4_1.Location = point10;
this.Label4.Name = "Label4";
Label label4_2 = this.Label4;
size1 = new Size(45, 12);
Size size10 = size1;
label4_2.Size = size10;
this.Label4.TabIndex = 6;
this.Label4.Text = "Confirm";
this.Label5.AutoSize = true;
Label label5_1 = this.Label5;
point1 = new Point(8, 8);
Point point11 = point1;
label5_1.Location = point11;
this.Label5.Name = "Label5";
Label label5_2 = this.Label5;
size1 = new Size(193, 12);
Size size11 = size1;
label5_2.Size = size11;
this.Label5.TabIndex = 0;
this.Label5.Text = "Enter Old and New Master Password";
this.ButtonClear.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button buttonClear1 = this.ButtonClear;
point1 = new Point(58, 128);
Point point12 = point1;
buttonClear1.Location = point12;
this.ButtonClear.Name = "ButtonClear";
Button buttonClear2 = this.ButtonClear;
size1 = new Size(72, 24);
Size size12 = size1;
buttonClear2.Size = size12;
this.ButtonClear.TabIndex = 8;
this.ButtonClear.Text = "Clear";
this.ButtonClear.UseVisualStyleBackColor = true;
this.AcceptButton = (IButtonControl) this.OKButton;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.m_CancelButton;
size1 = new Size(299, 161);
this.ClientSize = size1;
this.Controls.Add((Control) this.Label5);
this.Controls.Add((Control) this.Label4);
this.Controls.Add((Control) this.Label3);
this.Controls.Add((Control) this.Label2);
this.Controls.Add((Control) this.Label1);
this.Controls.Add((Control) this.m_CancelButton);
this.Controls.Add((Control) this.ButtonClear);
this.Controls.Add((Control) this.OKButton);
this.Controls.Add((Control) this.TextBoxConfirm);
this.Controls.Add((Control) this.TextBoxNew);
this.Controls.Add((Control) this.TextBoxPassword);
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
size1 = new Size(305, 125);
this.MinimumSize = size1;
this.Name = nameof (MasterPasswordChangeForm);
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "Change Master Password";
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual TextBox TextBoxPassword
{
get
{
return this._TextBoxPassword;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.TextBoxPassword_TextChanged);
if (this._TextBoxPassword != null)
this._TextBoxPassword.TextChanged -= eventHandler;
this._TextBoxPassword = value;
if (this._TextBoxPassword == null)
return;
this._TextBoxPassword.TextChanged += eventHandler;
}
}
internal virtual Button m_CancelButton
{
get
{
return this._m_CancelButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._m_CancelButton = value;
}
}
internal virtual Button OKButton
{
get
{
return this._OKButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.OKButton_Click);
if (this._OKButton != null)
this._OKButton.Click -= eventHandler;
this._OKButton = value;
if (this._OKButton == null)
return;
this._OKButton.Click += eventHandler;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual TextBox TextBoxNew
{
get
{
return this._TextBoxNew;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.TextBoxNew_TextChanged);
if (this._TextBoxNew != null)
this._TextBoxNew.TextChanged -= eventHandler;
this._TextBoxNew = value;
if (this._TextBoxNew == null)
return;
this._TextBoxNew.TextChanged += eventHandler;
}
}
internal virtual TextBox TextBoxConfirm
{
get
{
return this._TextBoxConfirm;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.TextBoxNew_TextChanged);
if (this._TextBoxConfirm != null)
this._TextBoxConfirm.TextChanged -= eventHandler;
this._TextBoxConfirm = value;
if (this._TextBoxConfirm == null)
return;
this._TextBoxConfirm.TextChanged += eventHandler;
}
}
internal virtual Label Label2
{
get
{
return this._Label2;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label2 = value;
}
}
internal virtual Label Label3
{
get
{
return this._Label3;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label3 = value;
}
}
internal virtual Label Label4
{
get
{
return this._Label4;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label4 = value;
}
}
internal virtual Label Label5
{
get
{
return this._Label5;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label5 = value;
}
}
internal virtual Button ButtonClear
{
get
{
return this._ButtonClear;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ButtonClear_Click);
if (this._ButtonClear != null)
this._ButtonClear.Click -= eventHandler;
this._ButtonClear = value;
if (this._ButtonClear == null)
return;
this._ButtonClear.Click += eventHandler;
}
}
public string NewMasterPassword
{
get
{
return this.TextBoxNew.Text;
}
set
{
this.TextBoxNew.Text = value;
}
}
private void MasterPasswordChangeForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.security;
if (string.IsNullOrEmpty(this.MasterPassword))
{
this.TextBoxPassword.Enabled = false;
this.OKButton.Enabled = false;
this.ButtonClear.Visible = false;
this.Label1.Text = "";
}
else
{
this.TextBoxPassword.Enabled = !string.IsNullOrEmpty(this.MasterPassword);
this.OKButton.Enabled = false;
this.ButtonClear.Enabled = this.TextBoxPassword.Text.Length > 0;
this.ButtonClear.Visible = true;
this.Label1.Text = "";
}
}
private void TextBoxPassword_TextChanged(object sender, EventArgs e)
{
this.OKButton.Enabled = Operators.CompareString(this.TextBoxNew.Text, this.TextBoxConfirm.Text, false) == 0 && this.TextBoxNew.Text.Length > 0 && (string.IsNullOrEmpty(this.MasterPassword) || this.TextBoxPassword.Text.Length > 0);
this.ButtonClear.Enabled = this.TextBoxPassword.Text.Length > 0;
}
private void TextBoxNew_TextChanged(object sender, EventArgs e)
{
this.OKButton.Enabled = Operators.CompareString(this.TextBoxNew.Text, this.TextBoxConfirm.Text, false) == 0 && this.TextBoxNew.Text.Length > 0 && (string.IsNullOrEmpty(this.MasterPassword) || this.TextBoxPassword.Text.Length > 0);
}
private void OKButton_Click(object sender, EventArgs e)
{
if (Operators.CompareString(this.TextBoxPassword.Text, this.MasterPassword, false) == 0)
this.DialogResult = DialogResult.OK;
else
this.Label1.Text = "Enter Valid Master Password";
}
private void ButtonClear_Click(object sender, EventArgs e)
{
if (Operators.CompareString(this.TextBoxPassword.Text, this.MasterPassword, false) == 0)
{
this.TextBoxNew.Text = (string) null;
this.DialogResult = DialogResult.OK;
}
else
this.Label1.Text = "Enter Valid Master Password";
}
}
}

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,36 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.MasterPasswordException
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
namespace CarotDAV
{
public class MasterPasswordException : Exception
{
private bool pPasswordInvalid;
public bool PasswordInvalid
{
get
{
return this.pPasswordInvalid;
}
}
public MasterPasswordException()
: base("Needs Master Password or Given Master Password invalid")
{
}
public MasterPasswordException(bool passwordinvalid)
: base(Conversions.ToString(Interaction.IIf(passwordinvalid, (object) "Password invalid", (object) "Needs Master Password")))
{
this.pPasswordInvalid = passwordinvalid;
}
}
}

View File

@ -0,0 +1,279 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.MasterPasswordInputForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class MasterPasswordInputForm : Form
{
private IContainer components;
[AccessedThroughProperty("TextBoxPassword")]
private TextBox _TextBoxPassword;
[AccessedThroughProperty("m_CancelButton")]
private Button _m_CancelButton;
[AccessedThroughProperty("OKButton")]
private Button _OKButton;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("ButtonClearAll")]
private Button _ButtonClearAll;
public bool PasswordInvalid;
public MasterPasswordInputForm()
{
this.Load += new EventHandler(this.MasterPasswordInputForm_Load);
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.TextBoxPassword = new TextBox();
this.m_CancelButton = new Button();
this.OKButton = new Button();
this.Label1 = new Label();
this.ButtonClearAll = new Button();
this.SuspendLayout();
this.TextBoxPassword.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxPassword1 = this.TextBoxPassword;
Point point1 = new Point(8, 24);
Point point2 = point1;
textBoxPassword1.Location = point2;
this.TextBoxPassword.Name = "TextBoxPassword";
TextBox textBoxPassword2 = this.TextBoxPassword;
Size size1 = new Size(283, 19);
Size size2 = size1;
textBoxPassword2.Size = size2;
this.TextBoxPassword.TabIndex = 1;
this.TextBoxPassword.UseSystemPasswordChar = true;
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.m_CancelButton.DialogResult = DialogResult.Cancel;
Button mCancelButton1 = this.m_CancelButton;
point1 = new Point(218, 66);
Point point3 = point1;
mCancelButton1.Location = point3;
this.m_CancelButton.Name = "m_CancelButton";
Button mCancelButton2 = this.m_CancelButton;
size1 = new Size(72, 24);
Size size3 = size1;
mCancelButton2.Size = size3;
this.m_CancelButton.TabIndex = 4;
this.m_CancelButton.Text = "Abort";
this.m_CancelButton.UseVisualStyleBackColor = true;
this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button okButton1 = this.OKButton;
point1 = new Point(138, 66);
Point point4 = point1;
okButton1.Location = point4;
this.OKButton.Name = "OKButton";
Button okButton2 = this.OKButton;
size1 = new Size(72, 24);
Size size4 = size1;
okButton2.Size = size4;
this.OKButton.TabIndex = 3;
this.OKButton.Text = "OK";
this.OKButton.UseVisualStyleBackColor = true;
this.Label1.AutoSize = true;
this.Label1.ForeColor = Color.Red;
Label label1_1 = this.Label1;
point1 = new Point(8, 8);
Point point5 = point1;
label1_1.Location = point5;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(50, 12);
Size size5 = size1;
label1_2.Size = size5;
this.Label1.TabIndex = 0;
this.Label1.Text = "Message";
this.ButtonClearAll.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button buttonClearAll1 = this.ButtonClearAll;
point1 = new Point(18, 66);
Point point6 = point1;
buttonClearAll1.Location = point6;
this.ButtonClearAll.Name = "ButtonClearAll";
Button buttonClearAll2 = this.ButtonClearAll;
size1 = new Size(112, 24);
Size size6 = size1;
buttonClearAll2.Size = size6;
this.ButtonClearAll.TabIndex = 2;
this.ButtonClearAll.Text = "Clear All Settings";
this.ButtonClearAll.UseVisualStyleBackColor = true;
this.AcceptButton = (IButtonControl) this.OKButton;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.m_CancelButton;
size1 = new Size(299, 97);
this.ClientSize = size1;
this.Controls.Add((Control) this.Label1);
this.Controls.Add((Control) this.m_CancelButton);
this.Controls.Add((Control) this.ButtonClearAll);
this.Controls.Add((Control) this.OKButton);
this.Controls.Add((Control) this.TextBoxPassword);
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
size1 = new Size(305, 125);
this.MaximumSize = size1;
this.MinimizeBox = false;
size1 = new Size(305, 125);
this.MinimumSize = size1;
this.Name = nameof (MasterPasswordInputForm);
this.StartPosition = FormStartPosition.CenterScreen;
this.Text = "Enter Master Password";
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual TextBox TextBoxPassword
{
get
{
return this._TextBoxPassword;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.TextBoxPassword_TextChanged);
if (this._TextBoxPassword != null)
this._TextBoxPassword.TextChanged -= eventHandler;
this._TextBoxPassword = value;
if (this._TextBoxPassword == null)
return;
this._TextBoxPassword.TextChanged += eventHandler;
}
}
internal virtual Button m_CancelButton
{
get
{
return this._m_CancelButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._m_CancelButton = value;
}
}
internal virtual Button OKButton
{
get
{
return this._OKButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.OKButton_Click);
if (this._OKButton != null)
this._OKButton.Click -= eventHandler;
this._OKButton = value;
if (this._OKButton == null)
return;
this._OKButton.Click += eventHandler;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual Button ButtonClearAll
{
get
{
return this._ButtonClearAll;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ButtonClearAll_Click);
if (this._ButtonClearAll != null)
this._ButtonClearAll.Click -= eventHandler;
this._ButtonClearAll = value;
if (this._ButtonClearAll == null)
return;
this._ButtonClearAll.Click += eventHandler;
}
}
public bool ShowClearAllButton
{
get
{
return this.ButtonClearAll.Visible;
}
set
{
this.ButtonClearAll.Visible = value;
}
}
public string MasterPassword
{
get
{
return this.TextBoxPassword.Text;
}
set
{
this.TextBoxPassword.Text = value;
}
}
private void MasterPasswordInputForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.security;
this.Label1.Text = !this.PasswordInvalid ? "" : "Password Invalid.";
this.OKButton.Enabled = false;
}
private void TextBoxPassword_TextChanged(object sender, EventArgs e)
{
this.OKButton.Enabled = this.TextBoxPassword.Text.Length > 0;
}
private void OKButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
}
private void ButtonClearAll_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Clear All Settings.", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) != DialogResult.OK)
return;
this.DialogResult = DialogResult.Ignore;
}
}
}

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

53
CarotDAV/Misc.cs Normal file
View File

@ -0,0 +1,53 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.Misc
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using System;
using System.Runtime.InteropServices;
namespace CarotDAV
{
public sealed class Misc
{
[DllImport("user32.dll")]
public static extern bool GetLastInputInfo(ref Misc.LASTINPUTINFO plii);
public static uint GetIdleTime()
{
Misc.LASTINPUTINFO plii = new Misc.LASTINPUTINFO();
plii.cbSize = Marshal.SizeOf((object) plii);
Misc.GetLastInputInfo(ref plii);
int tickCount = Environment.TickCount;
if (tickCount >= plii.dwTime)
return checked ((uint) ((long) tickCount - (long) plii.dwTime));
return checked ((uint) ((long) tickCount - (long) int.MinValue + (long) int.MaxValue + 1L - (long) plii.dwTime));
}
public struct LASTINPUTINFO
{
[MarshalAs(UnmanagedType.U4)]
public int cbSize;
[MarshalAs(UnmanagedType.U4)]
public int dwTime;
}
public struct WINDOWPOS
{
public IntPtr hwnd;
public IntPtr hwndInsertAfter;
public int x;
public int y;
public int cx;
public int cy;
public int flags;
}
public enum WindowMessageType
{
WM_WINDOWPOSCHANGING = 70,
WM_WINDOWPOSCHANGED = 71,
}
}
}

View File

@ -0,0 +1,51 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.My.MyApplication
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.ApplicationServices;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Forms;
namespace CarotDAV.My
{
[GeneratedCode("MyTemplate", "8.0.0.0")]
[EditorBrowsable(EditorBrowsableState.Never)]
internal class MyApplication : WindowsFormsApplicationBase
{
[STAThread]
[EditorBrowsable(EditorBrowsableState.Advanced)]
[DebuggerHidden]
internal static void Main(string[] Args)
{
try
{
Application.SetCompatibleTextRenderingDefault(WindowsFormsApplicationBase.UseCompatibleTextRendering);
}
finally
{
}
MyProject.Application.Run(Args);
}
[DebuggerStepThrough]
public MyApplication()
: base(AuthenticationMode.Windows)
{
this.IsSingleInstance = false;
this.EnableVisualStyles = true;
this.SaveMySettingsOnExit = false;
this.ShutdownStyle = ShutdownMode.AfterAllFormsClose;
}
[DebuggerStepThrough]
protected override void OnCreateMainForm()
{
this.MainForm = (Form) MyProject.Forms.MainForm;
}
}
}

24
CarotDAV/My/MyComputer.cs Normal file
View File

@ -0,0 +1,24 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.My.MyComputer
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.Devices;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
namespace CarotDAV.My
{
[EditorBrowsable(EditorBrowsableState.Never)]
[GeneratedCode("MyTemplate", "8.0.0.0")]
internal class MyComputer : Computer
{
[DebuggerHidden]
[EditorBrowsable(EditorBrowsableState.Never)]
public MyComputer()
{
}
}
}

491
CarotDAV/My/MyProject.cs Normal file
View File

@ -0,0 +1,491 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.My.MyProject
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.ApplicationServices;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace CarotDAV.My
{
[HideModuleName]
[StandardModule]
[GeneratedCode("MyTemplate", "8.0.0.0")]
internal sealed class MyProject
{
private static readonly MyProject.ThreadSafeObjectProvider<MyComputer> m_ComputerObjectProvider = new MyProject.ThreadSafeObjectProvider<MyComputer>();
private static readonly MyProject.ThreadSafeObjectProvider<MyApplication> m_AppObjectProvider = new MyProject.ThreadSafeObjectProvider<MyApplication>();
private static readonly MyProject.ThreadSafeObjectProvider<User> m_UserObjectProvider = new MyProject.ThreadSafeObjectProvider<User>();
private static MyProject.ThreadSafeObjectProvider<MyProject.MyForms> m_MyFormsObjectProvider = new MyProject.ThreadSafeObjectProvider<MyProject.MyForms>();
private static readonly MyProject.ThreadSafeObjectProvider<MyProject.MyWebServices> m_MyWebServicesObjectProvider = new MyProject.ThreadSafeObjectProvider<MyProject.MyWebServices>();
[HelpKeyword("My.Computer")]
internal static MyComputer Computer
{
[DebuggerHidden] get
{
return MyProject.m_ComputerObjectProvider.GetInstance;
}
}
[HelpKeyword("My.Application")]
internal static MyApplication Application
{
[DebuggerHidden] get
{
return MyProject.m_AppObjectProvider.GetInstance;
}
}
[HelpKeyword("My.User")]
internal static User User
{
[DebuggerHidden] get
{
return MyProject.m_UserObjectProvider.GetInstance;
}
}
[HelpKeyword("My.Forms")]
internal static MyProject.MyForms Forms
{
[DebuggerHidden] get
{
return MyProject.m_MyFormsObjectProvider.GetInstance;
}
}
[HelpKeyword("My.WebServices")]
internal static MyProject.MyWebServices WebServices
{
[DebuggerHidden] get
{
return MyProject.m_MyWebServicesObjectProvider.GetInstance;
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
[MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")]
internal sealed class MyForms
{
public AboutForm m_AboutForm;
public ConflictPromptForm m_ConflictPromptForm;
public DestinationForm m_DestinationForm;
public ErrorPromptForm m_ErrorPromptForm;
public FsTestForm m_FsTestForm;
public MainForm m_MainForm;
public MasterPasswordChangeForm m_MasterPasswordChangeForm;
public MasterPasswordInputForm m_MasterPasswordInputForm;
public NewFolderForm m_NewFolderForm;
public PropertyForm m_PropertyForm;
public ResouceListingForm m_ResouceListingForm;
public ServerCertErrorPromptForm m_ServerCertErrorPromptForm;
public UpDownForm m_UpDownForm;
public WebDAVClientSettingForm m_WebDAVClientSettingForm;
[ThreadStatic]
private static Hashtable m_FormBeingCreated;
public AboutForm AboutForm
{
get
{
this.m_AboutForm = MyProject.MyForms.Create__Instance__<AboutForm>(this.m_AboutForm);
return this.m_AboutForm;
}
set
{
if (value == this.m_AboutForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<AboutForm>(ref this.m_AboutForm);
}
}
public ConflictPromptForm ConflictPromptForm
{
get
{
this.m_ConflictPromptForm = MyProject.MyForms.Create__Instance__<ConflictPromptForm>(this.m_ConflictPromptForm);
return this.m_ConflictPromptForm;
}
set
{
if (value == this.m_ConflictPromptForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<ConflictPromptForm>(ref this.m_ConflictPromptForm);
}
}
public DestinationForm DestinationForm
{
get
{
this.m_DestinationForm = MyProject.MyForms.Create__Instance__<DestinationForm>(this.m_DestinationForm);
return this.m_DestinationForm;
}
set
{
if (value == this.m_DestinationForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<DestinationForm>(ref this.m_DestinationForm);
}
}
public ErrorPromptForm ErrorPromptForm
{
get
{
this.m_ErrorPromptForm = MyProject.MyForms.Create__Instance__<ErrorPromptForm>(this.m_ErrorPromptForm);
return this.m_ErrorPromptForm;
}
set
{
if (value == this.m_ErrorPromptForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<ErrorPromptForm>(ref this.m_ErrorPromptForm);
}
}
public FsTestForm FsTestForm
{
get
{
this.m_FsTestForm = MyProject.MyForms.Create__Instance__<FsTestForm>(this.m_FsTestForm);
return this.m_FsTestForm;
}
set
{
if (value == this.m_FsTestForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<FsTestForm>(ref this.m_FsTestForm);
}
}
public MainForm MainForm
{
get
{
this.m_MainForm = MyProject.MyForms.Create__Instance__<MainForm>(this.m_MainForm);
return this.m_MainForm;
}
set
{
if (value == this.m_MainForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<MainForm>(ref this.m_MainForm);
}
}
public MasterPasswordChangeForm MasterPasswordChangeForm
{
get
{
this.m_MasterPasswordChangeForm = MyProject.MyForms.Create__Instance__<MasterPasswordChangeForm>(this.m_MasterPasswordChangeForm);
return this.m_MasterPasswordChangeForm;
}
set
{
if (value == this.m_MasterPasswordChangeForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<MasterPasswordChangeForm>(ref this.m_MasterPasswordChangeForm);
}
}
public MasterPasswordInputForm MasterPasswordInputForm
{
get
{
this.m_MasterPasswordInputForm = MyProject.MyForms.Create__Instance__<MasterPasswordInputForm>(this.m_MasterPasswordInputForm);
return this.m_MasterPasswordInputForm;
}
set
{
if (value == this.m_MasterPasswordInputForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<MasterPasswordInputForm>(ref this.m_MasterPasswordInputForm);
}
}
public NewFolderForm NewFolderForm
{
get
{
this.m_NewFolderForm = MyProject.MyForms.Create__Instance__<NewFolderForm>(this.m_NewFolderForm);
return this.m_NewFolderForm;
}
set
{
if (value == this.m_NewFolderForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<NewFolderForm>(ref this.m_NewFolderForm);
}
}
public PropertyForm PropertyForm
{
get
{
this.m_PropertyForm = MyProject.MyForms.Create__Instance__<PropertyForm>(this.m_PropertyForm);
return this.m_PropertyForm;
}
set
{
if (value == this.m_PropertyForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<PropertyForm>(ref this.m_PropertyForm);
}
}
public ResouceListingForm ResouceListingForm
{
get
{
this.m_ResouceListingForm = MyProject.MyForms.Create__Instance__<ResouceListingForm>(this.m_ResouceListingForm);
return this.m_ResouceListingForm;
}
set
{
if (value == this.m_ResouceListingForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<ResouceListingForm>(ref this.m_ResouceListingForm);
}
}
public ServerCertErrorPromptForm ServerCertErrorPromptForm
{
get
{
this.m_ServerCertErrorPromptForm = MyProject.MyForms.Create__Instance__<ServerCertErrorPromptForm>(this.m_ServerCertErrorPromptForm);
return this.m_ServerCertErrorPromptForm;
}
set
{
if (value == this.m_ServerCertErrorPromptForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<ServerCertErrorPromptForm>(ref this.m_ServerCertErrorPromptForm);
}
}
public UpDownForm UpDownForm
{
get
{
this.m_UpDownForm = MyProject.MyForms.Create__Instance__<UpDownForm>(this.m_UpDownForm);
return this.m_UpDownForm;
}
set
{
if (value == this.m_UpDownForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<UpDownForm>(ref this.m_UpDownForm);
}
}
public WebDAVClientSettingForm WebDAVClientSettingForm
{
get
{
this.m_WebDAVClientSettingForm = MyProject.MyForms.Create__Instance__<WebDAVClientSettingForm>(this.m_WebDAVClientSettingForm);
return this.m_WebDAVClientSettingForm;
}
set
{
if (value == this.m_WebDAVClientSettingForm)
return;
if (value != null)
throw new ArgumentException("Property can only be set to Nothing");
this.Dispose__Instance__<WebDAVClientSettingForm>(ref this.m_WebDAVClientSettingForm);
}
}
[DebuggerHidden]
private static T Create__Instance__<T>(T Instance) where T : Form, new()
{
if ((object) Instance != null && !Instance.IsDisposed)
return Instance;
if (MyProject.MyForms.m_FormBeingCreated != null)
{
if (MyProject.MyForms.m_FormBeingCreated.ContainsKey((object) typeof (T)))
throw new InvalidOperationException(Utils.GetResourceString("WinForms_RecursiveFormCreate", new string[0]));
}
else
MyProject.MyForms.m_FormBeingCreated = new Hashtable();
MyProject.MyForms.m_FormBeingCreated.Add((object) typeof (T), (object) null);
try
{
return Activator.CreateInstance<T>();
}
catch (TargetInvocationException ex) when (
{
// ISSUE: unable to correctly present filter
ProjectData.SetProjectError((Exception) ex);
if (ex.InnerException != null)
{
SuccessfulFiltering;
}
else
throw;
}
)
{
throw new InvalidOperationException(Utils.GetResourceString("WinForms_SeeInnerException", new string[1]
{
ex.InnerException.Message
}), ex.InnerException);
}
finally
{
MyProject.MyForms.m_FormBeingCreated.Remove((object) typeof (T));
}
}
[DebuggerHidden]
private void Dispose__Instance__<T>(ref T instance) where T : Form
{
instance.Dispose();
instance = default (T);
}
[DebuggerHidden]
[EditorBrowsable(EditorBrowsableState.Never)]
public MyForms()
{
}
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object o)
{
return base.Equals(RuntimeHelpers.GetObjectValue(o));
}
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode()
{
return base.GetHashCode();
}
[EditorBrowsable(EditorBrowsableState.Never)]
internal new System.Type GetType()
{
return typeof (MyProject.MyForms);
}
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString()
{
return base.ToString();
}
}
[MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", "")]
[EditorBrowsable(EditorBrowsableState.Never)]
internal sealed class MyWebServices
{
[DebuggerHidden]
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object o)
{
return base.Equals(RuntimeHelpers.GetObjectValue(o));
}
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
public override int GetHashCode()
{
return base.GetHashCode();
}
[DebuggerHidden]
[EditorBrowsable(EditorBrowsableState.Never)]
internal new System.Type GetType()
{
return typeof (MyProject.MyWebServices);
}
[DebuggerHidden]
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString()
{
return base.ToString();
}
[DebuggerHidden]
private static T Create__Instance__<T>(T instance) where T : new()
{
if ((object) instance == null)
return Activator.CreateInstance<T>();
return instance;
}
[DebuggerHidden]
private void Dispose__Instance__<T>(ref T instance)
{
instance = default (T);
}
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
public MyWebServices()
{
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
[ComVisible(false)]
internal sealed class ThreadSafeObjectProvider<T> where T : new()
{
internal T GetInstance
{
[DebuggerHidden] get
{
if ((object) MyProject.ThreadSafeObjectProvider<T>.m_ThreadStaticValue == null)
MyProject.ThreadSafeObjectProvider<T>.m_ThreadStaticValue = Activator.CreateInstance<T>();
return MyProject.ThreadSafeObjectProvider<T>.m_ThreadStaticValue;
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
public ThreadSafeObjectProvider()
{
}
}
}
}

68
CarotDAV/My/MySettings.cs Normal file
View File

@ -0,0 +1,68 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.My.MySettings
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.ApplicationServices;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading;
namespace CarotDAV.My
{
[CompilerGenerated]
[EditorBrowsable(EditorBrowsableState.Advanced)]
[GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed class MySettings : ApplicationSettingsBase
{
private static MySettings defaultInstance = (MySettings) SettingsBase.Synchronized((SettingsBase) new MySettings());
private static object addedHandlerLockObject = RuntimeHelpers.GetObjectValue(new object());
private static bool addedHandler;
[EditorBrowsable(EditorBrowsableState.Advanced)]
[DebuggerNonUserCode]
private static void AutoSaveSettings(object sender, EventArgs e)
{
if (!MyProject.Application.SaveMySettingsOnExit)
return;
MySettingsProperty.Settings.Save();
}
public static MySettings Default
{
get
{
if (!MySettings.addedHandler)
{
object handlerLockObject = MySettings.addedHandlerLockObject;
ObjectFlowControl.CheckForSyncLockOnValueType(handlerLockObject);
Monitor.Enter(handlerLockObject);
try
{
if (!MySettings.addedHandler)
{
MyProject.Application.Shutdown += (ShutdownEventHandler) ((sender, e) =>
{
if (!MyProject.Application.SaveMySettingsOnExit)
return;
MySettingsProperty.Settings.Save();
});
MySettings.addedHandler = true;
}
}
finally
{
Monitor.Exit(handlerLockObject);
}
}
return MySettings.defaultInstance;
}
}
}
}

View File

@ -0,0 +1,30 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.My.MySettingsProperty
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace CarotDAV.My
{
[CompilerGenerated]
[HideModuleName]
[StandardModule]
[DebuggerNonUserCode]
internal sealed class MySettingsProperty
{
[HelpKeyword("My.Settings")]
internal static MySettings Settings
{
get
{
return MySettings.Default;
}
}
}
}

View File

@ -0,0 +1,365 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.My.Resources.Resources
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Resources;
using System.Runtime.CompilerServices;
namespace CarotDAV.My.Resources
{
[StandardModule]
[DebuggerNonUserCode]
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[CompilerGenerated]
[HideModuleName]
internal sealed class Resources
{
private static ResourceManager resourceMan;
private static CultureInfo resourceCulture;
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static ResourceManager ResourceManager
{
get
{
if (object.ReferenceEquals((object) CarotDAV.My.Resources.Resources.resourceMan, (object) null))
CarotDAV.My.Resources.Resources.resourceMan = new ResourceManager("CarotDAV.Resources", typeof (CarotDAV.My.Resources.Resources).Assembly);
return CarotDAV.My.Resources.Resources.resourceMan;
}
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static CultureInfo Culture
{
get
{
return CarotDAV.My.Resources.Resources.resourceCulture;
}
set
{
CarotDAV.My.Resources.Resources.resourceCulture = value;
}
}
internal static Icon _Error
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (_Error), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Icon CarotDAV
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (CarotDAV), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Icon CarotDrive
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (CarotDrive), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Icon Collection
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Collection), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Connect
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Connect), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap ConnectNew
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (ConnectNew), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Copy
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Copy), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Copy2
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Copy2), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Cut
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Cut), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Delete
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Delete), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Icon Document
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Document), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Icon Document_Split
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Document_Split), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Download
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Download), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Export
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Export), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap FolderUpload
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (FolderUpload), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Go
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Go), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap GoToParentFolder
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (GoToParentFolder), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Help
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Help), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Home
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Home), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Import
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Import), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Lock
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Lock), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap logo_w
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (logo_w), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Move
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Move), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap MoveDown
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (MoveDown), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap MoveUp
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (MoveUp), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap NavBack
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (NavBack), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap NavForward
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (NavForward), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap NewFolder
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (NewFolder), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap OptionsHS
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (OptionsHS), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Paste
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Paste), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Properties
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Properties), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Refresh
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Refresh), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap RenameFolderHS
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (RenameFolderHS), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Icon security
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (security), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Icon Security_Overlay
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Security_Overlay), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Upload
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Upload), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap View
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (View), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Bitmap Warning
{
get
{
return (Bitmap) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Warning), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
internal static Icon Warning_Overlay
{
get
{
return (Icon) RuntimeHelpers.GetObjectValue(CarotDAV.My.Resources.Resources.ResourceManager.GetObject(nameof (Warning_Overlay), CarotDAV.My.Resources.Resources.resourceCulture));
}
}
}
}

373
CarotDAV/NetDriveManager.cs Normal file
View File

@ -0,0 +1,373 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.NetDriveManager
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using Microsoft.Win32;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace CarotDAV
{
public class NetDriveManager
{
private const uint SHGFI_ICON = 256;
private const uint SHGFI_LARGEICON = 0;
private const uint SHGFI_SMALLICON = 1;
private const uint SHGFI_ICONLOCATION = 4096;
public const string WebClientParameterRegPath = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\WebClient\\Parameters";
public const string WebClientFileSizeLimitRegKey = "FileSizeLimitInBytes";
public const int CONNECT_UPDATE_PROFILE = 1;
public const int NO_ERROR = 0;
public const int ERROR_ACCESS_DENIED = 5;
public const int ERROR_ALREADY_ASSIGNED = 85;
public const int ERROR_BAD_DEV_TYPE = 66;
public const int ERROR_BAD_DEVICE = 1200;
public const int ERROR_BAD_NET_NAME = 67;
public const int ERROR_BAD_NETPATH = 53;
public const int ERROR_BAD_PROFILE = 1206;
public const int ERROR_BAD_PROVIDER = 1204;
public const int ERROR_BUSY = 170;
public const int ERROR_CANCELLED = 1223;
public const int ERROR_CANNOT_OPEN_PROFILE = 1205;
public const int ERROR_DEVICE_ALREADY_REMEMBERED = 1202;
public const int ERROR_EXTENDED_ERROR = 1208;
public const int ERROR_INVALID_PASSWORD = 86;
public const int ERROR_NO_NET_OR_BAD_PATH = 1203;
public const int ERROR_NOT_CONNECTED = 2250;
private const int ssfNETHOOD = 19;
[DllImport("shell32.dll")]
private static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref NetDriveManager.SHFILEINFO psfi, int cbSizeFileInfo, uint uFlags);
[DllImport("Shell32.dll")]
private static extern void SHUpdateImage(string pszHashItem, int iIndex, int uFlags, int iImageIndex);
[DllImport("user32.dll", SetLastError = true)]
private static extern bool DestroyIcon(IntPtr hIcon);
[DllImport("mpr.dll")]
private static extern int WNetAddConnection2(ref NetDriveManager.NETRESOURCE netResource, string password, string Username, int Flag);
[DllImport("mpr.dll")]
private static extern int WNetAddConnection3(IntPtr hwnd, ref NetDriveManager.NETRESOURCE netResource, string password, string Username, int Flag);
[DllImport("mpr.dll")]
private static extern int WNetGetConnection(string localName, StringBuilder remoteName, ref int length);
[DllImport("mpr.dll")]
private static extern int WNetCancelConnection2(string lpName, int dwFlags, bool fForce);
public static void MountDrive(char letter, string unc, string name, string iconpath, int index)
{
int num = NetDriveManager.WNetAddConnection2(ref new NetDriveManager.NETRESOURCE()
{
dwType = NetDriveManager.ResourceType.Disk,
lpLocalName = Conversions.ToString(letter) + ":",
lpRemoteName = unc,
lpProvider = (string) null
}, "", "", 0);
if (num != 0)
throw new Exception(num.ToString());
Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MountPoints2\\" + unc.Replace("\\", "#"), "_LabelFromReg", (object) name);
NetDriveManager.SHFILEINFO psfi = new NetDriveManager.SHFILEINFO();
IntPtr fileInfo = NetDriveManager.SHGetFileInfo(Conversions.ToString(letter) + ":", 0U, ref psfi, Marshal.SizeOf((object) psfi), 4096U);
string str = "";
int iIcon1;
int iIcon2;
if (fileInfo != IntPtr.Zero)
{
str = psfi.szDisplayName;
iIcon1 = psfi.iIcon;
if (NetDriveManager.SHGetFileInfo(Conversions.ToString(letter) + ":", 0U, ref psfi, Marshal.SizeOf((object) psfi), 256U) != IntPtr.Zero)
{
iIcon2 = psfi.iIcon;
NetDriveManager.DestroyIcon(psfi.hIcon);
}
}
Registry.SetValue("HKEY_CURRENT_USER\\Software\\Classes\\Applications\\Explorer.exe\\Drives\\" + Conversions.ToString(letter) + "\\DefaultIcon", (string) null, (object) (iconpath + "," + index.ToString()));
if (Operators.CompareString(str, "", false) == 0)
return;
NetDriveManager.SHUpdateImage(str, iIcon1, 0, iIcon2);
}
public static void UnmountDrive(char letter)
{
string str = "";
int iIcon1;
int iIcon2;
try
{
NetDriveManager.SHFILEINFO psfi = new NetDriveManager.SHFILEINFO();
if (NetDriveManager.SHGetFileInfo(Conversions.ToString(letter) + ":", 0U, ref psfi, Marshal.SizeOf((object) psfi), 4096U) != IntPtr.Zero)
{
str = psfi.szDisplayName;
iIcon1 = psfi.iIcon;
if (NetDriveManager.SHGetFileInfo(Conversions.ToString(letter) + ":", 0U, ref psfi, Marshal.SizeOf((object) psfi), 256U) != IntPtr.Zero)
{
iIcon2 = psfi.iIcon;
NetDriveManager.DestroyIcon(psfi.hIcon);
}
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
NetDriveManager.WNetCancelConnection2(Conversions.ToString(letter) + ":", 0, true);
try
{
Registry.CurrentUser.DeleteSubKeyTree("Software\\Classes\\Applications\\Explorer.exe\\Drives\\" + Conversions.ToString(letter));
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
try
{
if (Operators.CompareString(str, "", false) == 0)
return;
NetDriveManager.SHUpdateImage(str, iIcon1, 0, iIcon2);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
}
public static void MapFolder(string unc, string name, string iconpath, int iconindex)
{
try
{
object objectValue1 = RuntimeHelpers.GetObjectValue(Interaction.CreateObject("WScript.Shell", ""));
System.Type typeFromProgId = System.Type.GetTypeFromProgID("Shell.Application");
object objectValue2 = RuntimeHelpers.GetObjectValue(Activator.CreateInstance(typeFromProgId));
object objectValue3 = RuntimeHelpers.GetObjectValue(typeFromProgId.InvokeMember("Namespace", BindingFlags.InvokeMethod, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue2), new object[1]
{
(object) 19
}));
object objectValue4 = RuntimeHelpers.GetObjectValue(objectValue3.GetType().InvokeMember("Self", BindingFlags.GetProperty, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue3), (object[]) null));
string str = objectValue4.GetType().InvokeMember("Path", BindingFlags.GetProperty, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue4), new object[0]).ToString();
DirectoryInfo directoryInfo = new DirectoryInfo(str + "\\" + name);
if (directoryInfo.Exists)
{
directoryInfo.Attributes = FileAttributes.Directory;
directoryInfo.Delete(true);
}
directoryInfo.Create();
object objectValue5 = RuntimeHelpers.GetObjectValue(objectValue1.GetType().InvokeMember("CreateShortcut", BindingFlags.InvokeMethod, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue1), new object[1]
{
(object) (str + "\\" + name + "\\target.lnk")
}));
objectValue5.GetType().InvokeMember("TargetPath", BindingFlags.SetProperty, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue5), new object[1]
{
(object) unc
});
objectValue5.GetType().InvokeMember("IconLocation", BindingFlags.SetProperty, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue5), new object[1]
{
(object) (iconpath + "," + iconindex.ToString())
});
objectValue5.GetType().InvokeMember("Save", BindingFlags.InvokeMethod, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue5), new object[0]);
FileInfo fileInfo = new FileInfo(str + "\\" + name + "\\desktop.ini");
using (StreamWriter streamWriter = new StreamWriter((Stream) fileInfo.Create()))
{
streamWriter.WriteLine("[.ShellClassInfo]");
streamWriter.WriteLine("CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}");
streamWriter.WriteLine("Flags=2");
streamWriter.WriteLine("IconFile=" + iconpath);
streamWriter.WriteLine("IconIndex=" + Conversions.ToString(iconindex));
streamWriter.WriteLine("IconResource=" + iconpath + "," + Conversions.ToString(iconindex));
}
fileInfo.Attributes = FileAttributes.Hidden | FileAttributes.System;
directoryInfo.Attributes = FileAttributes.ReadOnly | FileAttributes.NotContentIndexed;
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
int num = (int) MessageBox.Show(ex.ToString());
ProjectData.ClearProjectError();
}
}
public static void UnmapFolder(string name)
{
try
{
RuntimeHelpers.GetObjectValue(Interaction.CreateObject("WScript.Shell", ""));
System.Type typeFromProgId = System.Type.GetTypeFromProgID("Shell.Application");
object objectValue1 = RuntimeHelpers.GetObjectValue(Activator.CreateInstance(typeFromProgId));
object objectValue2 = RuntimeHelpers.GetObjectValue(typeFromProgId.InvokeMember("Namespace", BindingFlags.InvokeMethod, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue1), new object[1]
{
(object) 19
}));
object objectValue3 = RuntimeHelpers.GetObjectValue(objectValue2.GetType().InvokeMember("Self", BindingFlags.GetProperty, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue2), (object[]) null));
DirectoryInfo directoryInfo = new DirectoryInfo(objectValue3.GetType().InvokeMember("Path", BindingFlags.GetProperty, (Binder) null, RuntimeHelpers.GetObjectValue(objectValue3), new object[0]).ToString() + "\\" + name);
if (!directoryInfo.Exists)
return;
directoryInfo.Attributes = FileAttributes.Directory;
directoryInfo.Delete(true);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
}
public static char FindMountedDriveLetter(string unc)
{
DriveInfo[] drives = DriveInfo.GetDrives();
int index = 0;
while (index < drives.Length)
{
DriveInfo driveInfo = drives[index];
if (driveInfo.DriveType == DriveType.Network)
{
StringBuilder stringBuilder1 = new StringBuilder(4096);
string localName = Conversions.ToString(driveInfo.Name[0]) + ":";
StringBuilder remoteName = stringBuilder1;
StringBuilder stringBuilder2 = stringBuilder1;
int capacity = stringBuilder2.Capacity;
int connection = NetDriveManager.WNetGetConnection(localName, remoteName, ref capacity);
stringBuilder2.Capacity = capacity;
if (connection == 0 && Operators.CompareString(stringBuilder1.ToString(), unc, false) == 0)
return driveInfo.Name[0];
}
checked { ++index; }
}
return char.MinValue;
}
public static long ReadMaxFileSize()
{
int integer = Conversions.ToInteger(Registry.GetValue("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\WebClient\\Parameters", "FileSizeLimitInBytes", (object) 50000000));
if (integer < 0)
return checked (4294967296L + (long) integer);
return (long) integer;
}
public static void WriteMaxFileSize(long size, IntPtr hwnd)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = true;
startInfo.FileName = "reg.exe";
startInfo.Verb = "runas";
startInfo.Arguments = "add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\WebClient\\Parameters /v FileSizeLimitInBytes /t REG_DWORD /d " + size.ToString() + " /f";
startInfo.ErrorDialog = true;
startInfo.ErrorDialogParentHandle = hwnd;
startInfo.CreateNoWindow = true;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
try
{
Process.Start(startInfo).WaitForExit();
}
catch (Win32Exception ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
}
public static void RebootWebClient(IntPtr hwnd)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = true;
startInfo.FileName = Environment.GetEnvironmentVariable("ComSpec");
startInfo.Verb = "runas";
startInfo.ErrorDialog = true;
startInfo.ErrorDialogParentHandle = hwnd;
startInfo.CreateNoWindow = true;
startInfo.Arguments = "/c net stop webclient & net stop mrxdav & net start mrxdav & net start webclient & pause";
try
{
Process.Start(startInfo).WaitForExit();
}
catch (Win32Exception ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
}
private struct SHFILEINFO
{
public IntPtr hIcon;
public int iIcon;
public uint dwAttributes;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
}
public struct NETRESOURCE
{
public NetDriveManager.ResourceScope dwScope;
public NetDriveManager.ResourceType dwType;
public NetDriveManager.ResourceDisplayType dwDisplayType;
public NetDriveManager.ResourceUsage dwUsage;
public string lpLocalName;
public string lpRemoteName;
public string lpComment;
public string lpProvider;
}
public enum ResourceScope : uint
{
Connected = 1,
GlobalNet = 2,
Remembered = 3,
Recent = 4,
Context = 5,
}
public enum ResourceType : uint
{
Any = 0,
Disk = 1,
Print = 2,
Reserved = 8,
Unknown = 4294967295,
}
public enum ResourceDisplayType : uint
{
Generic,
Domaim,
Server,
Share,
File,
Group,
Network,
Root,
ShareAdmin,
Directory,
Tree,
NDSContainer,
}
public enum ResourceUsage : uint
{
Connectable = 1,
Container = 2,
NoLocalDevice = 4,
Sibling = 8,
Attached = 16,
All = 19,
Reserved = 2147483648,
}
}
}

206
CarotDAV/NewFolderForm.cs Normal file
View File

@ -0,0 +1,206 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.NewFolderForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class NewFolderForm : Form
{
private IContainer components;
[AccessedThroughProperty("FolderNameTextBox")]
private TextBox _FolderNameTextBox;
[AccessedThroughProperty("m_CancelButton")]
private Button _m_CancelButton;
[AccessedThroughProperty("OKButton")]
private Button _OKButton;
[AccessedThroughProperty("Label1")]
private Label _Label1;
public NewFolderForm()
{
this.Load += new EventHandler(this.NewFolderForm_Load);
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.FolderNameTextBox = new TextBox();
this.m_CancelButton = new Button();
this.OKButton = new Button();
this.Label1 = new Label();
this.SuspendLayout();
this.FolderNameTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox folderNameTextBox1 = this.FolderNameTextBox;
Point point1 = new Point(8, 24);
Point point2 = point1;
folderNameTextBox1.Location = point2;
this.FolderNameTextBox.Name = "FolderNameTextBox";
TextBox folderNameTextBox2 = this.FolderNameTextBox;
Size size1 = new Size(272, 19);
Size size2 = size1;
folderNameTextBox2.Size = size2;
this.FolderNameTextBox.TabIndex = 1;
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.m_CancelButton.DialogResult = DialogResult.Cancel;
Button mCancelButton1 = this.m_CancelButton;
point1 = new Point(208, 56);
Point point3 = point1;
mCancelButton1.Location = point3;
this.m_CancelButton.Name = "m_CancelButton";
Button mCancelButton2 = this.m_CancelButton;
size1 = new Size(72, 24);
Size size3 = size1;
mCancelButton2.Size = size3;
this.m_CancelButton.TabIndex = 3;
this.m_CancelButton.Text = "Cancel";
this.m_CancelButton.UseVisualStyleBackColor = true;
this.OKButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button okButton1 = this.OKButton;
point1 = new Point(128, 56);
Point point4 = point1;
okButton1.Location = point4;
this.OKButton.Name = "OKButton";
Button okButton2 = this.OKButton;
size1 = new Size(72, 24);
Size size4 = size1;
okButton2.Size = size4;
this.OKButton.TabIndex = 2;
this.OKButton.Text = "OK";
this.OKButton.UseVisualStyleBackColor = true;
this.Label1.AutoSize = true;
Label label1_1 = this.Label1;
point1 = new Point(8, 8);
Point point5 = point1;
label1_1.Location = point5;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(96, 12);
Size size5 = size1;
label1_2.Size = size5;
this.Label1.TabIndex = 0;
this.Label1.Text = "New Folder Name";
this.AcceptButton = (IButtonControl) this.OKButton;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.m_CancelButton;
size1 = new Size(289, 89);
this.ClientSize = size1;
this.Controls.Add((Control) this.Label1);
this.Controls.Add((Control) this.m_CancelButton);
this.Controls.Add((Control) this.OKButton);
this.Controls.Add((Control) this.FolderNameTextBox);
this.MaximizeBox = false;
this.MinimizeBox = false;
size1 = new Size(305, 125);
this.MinimumSize = size1;
this.Name = nameof (NewFolderForm);
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "Create New Folder";
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual TextBox FolderNameTextBox
{
get
{
return this._FolderNameTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._FolderNameTextBox = value;
}
}
internal virtual Button m_CancelButton
{
get
{
return this._m_CancelButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._m_CancelButton = value;
}
}
internal virtual Button OKButton
{
get
{
return this._OKButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.OKButton_Click);
if (this._OKButton != null)
this._OKButton.Click -= eventHandler;
this._OKButton = value;
if (this._OKButton == null)
return;
this._OKButton.Click += eventHandler;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
public string NewFolderName
{
get
{
return this.FolderNameTextBox.Text;
}
set
{
this.FolderNameTextBox.Text = value;
}
}
private void OKButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
}
private void NewFolderForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.CarotDAV;
}
}
}

120
CarotDAV/NewFolderForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,28 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.NoEatMenuStrip
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using System;
using System.Windows.Forms;
namespace CarotDAV
{
public class NoEatMenuStrip : MenuStrip
{
private const int WM_MOUSEACTIVATE = 33;
private const int MA_ACTIVATE = 1;
private const int MA_ACTIVATEANDEAT = 2;
private const int MA_NOACTIVATE = 3;
private const int MA_NOACTIVATEANDEAT = 4;
protected override void WndProc(ref Message m)
{
if (m.Msg == 33)
m.Result = new IntPtr(1);
else
base.WndProc(ref m);
}
}
}

View File

@ -0,0 +1,37 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.NoEatToolStrip
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using System;
using System.Windows.Forms;
namespace CarotDAV
{
public class NoEatToolStrip : ToolStrip
{
private const int WM_MOUSEACTIVATE = 33;
private const int MA_ACTIVATE = 1;
private const int MA_ACTIVATEANDEAT = 2;
private const int MA_NOACTIVATE = 3;
private const int MA_NOACTIVATEANDEAT = 4;
public NoEatToolStrip()
{
}
public NoEatToolStrip(params ToolStripItem[] items)
: base(items)
{
}
protected override void WndProc(ref Message m)
{
if (m.Msg == 33)
m.Result = new IntPtr(1);
else
base.WndProc(ref m);
}
}
}

483
CarotDAV/OleStream.cs Normal file
View File

@ -0,0 +1,483 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.OleStream
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using Rei.Fs;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Threading;
namespace CarotDAV
{
[ClassInterface(ClassInterfaceType.None)]
public class OleStream : IStream, IDisposable
{
private static DateTime win32timeorigin = new DateTime(1601, 1, 1, 0, 0, 0, DateTimeKind.Utc);
private const int E_NOTIMPL = -2147483647;
private const int E_PENDING = -2147483638;
private const int STG_E_ACCESSDENIED = -2147287035;
private const int STG_E_INVALIDFLAG = -2147286785;
private const int S_OK = 0;
private const int S_FALSE = 1;
private const int STG_E_TERMINATED = -2147286526;
private const int STG_E_READFAULT = -2147287010;
private const int STG_E_REVERTED = -2147286782;
private const int STG_E_INVALIDPOINTER = -2147287031;
private const int STG_E_NOMOREFILES = -2147287022;
private const int STG_E_FILENOTFOUND = -2147287038;
private const int STG_E_INCOMPLETE = -2147286527;
private static int pOpenCount;
private Stream pStream;
private string pName;
private ResourceInfo pResourceInfo;
private int pSeekPointer;
private int pDisposed;
private bool pFinished;
private System.Runtime.InteropServices.ComTypes.STATSTG pStatstg;
private object pLock;
private FsBase pClient;
private ErrorPromptManager pErrorManager;
private List<OleStream> pClonelist;
public static int OpenCount
{
get
{
return OleStream.pOpenCount;
}
}
public event EventHandler<ExceptionOccurredEventArgs> ExceptionOccurred;
public OleStream(ResourceInfo ri, string name, FsBase client, ErrorPromptManager errormanager)
{
this.pDisposed = 0;
this.pResourceInfo = ri;
this.pName = name;
this.pStream = (Stream) null;
this.pSeekPointer = 0;
this.pFinished = false;
this.pLock = RuntimeHelpers.GetObjectValue(new object());
this.pClient = client;
this.pErrorManager = errormanager;
this.pClonelist = new List<OleStream>();
this.pStatstg.type = 2;
this.pStatstg.pwcsName = this.pName;
this.pStatstg.cbSize = this.pResourceInfo.Size;
this.pStatstg.mtime = this.ToFileTime(this.pResourceInfo.LastModifiedTime);
this.pStatstg.ctime = this.ToFileTime(this.pResourceInfo.CreationTime);
this.pStatstg.atime = this.ToFileTime(this.pResourceInfo.LastAccessTime);
this.pStatstg.grfMode = 0;
this.pStatstg.grfLocksSupported = 0;
this.pStatstg.clsid = Guid.Empty;
this.pStatstg.grfStateBits = 0;
this.pStatstg.reserved = 0;
}
public FsBase Client
{
get
{
return this.pClient;
}
}
[DebuggerStepThrough]
public void IStreamLockRegion(long libOffset, long cb, int dwLockType)
{
Marshal.ThrowExceptionForHR(-2147483647);
}
[DebuggerStepThrough]
public void IStreamUnlockRegion(long libOffset, long cb, int dwLockType)
{
Marshal.ThrowExceptionForHR(-2147483647);
}
[DebuggerStepThrough]
public void IStreamWrite(byte[] pv, int cb, IntPtr pcbWritten)
{
Marshal.ThrowExceptionForHR(-2147483647);
}
[DebuggerStepThrough]
public void IStreamCommit(int grfCommitFlags)
{
Marshal.ThrowExceptionForHR(-2147483647);
}
[DebuggerStepThrough]
public void IStreamRevert()
{
Marshal.ThrowExceptionForHR(-2147483647);
}
[DebuggerStepThrough]
public void IStreamSeek(long dlibMove, int dwOrigin, IntPtr plibNewPosition)
{
Marshal.ThrowExceptionForHR(-2147483647);
}
[DebuggerStepThrough]
public void IStreamSetSize(long libNewSize)
{
Marshal.ThrowExceptionForHR(-2147483647);
}
[DebuggerStepThrough]
public void IStreamCopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten)
{
Marshal.ThrowExceptionForHR(-2147483647);
}
public void IStreamClone(ref IStream ppstm)
{
OleStream oleStream = new OleStream(this.pResourceInfo, this.pName, this.pClient, this.pErrorManager);
oleStream.pLock = RuntimeHelpers.GetObjectValue(this.pLock);
oleStream.ExceptionOccurredEvent = (EventHandler<ExceptionOccurredEventArgs>) this.ExceptionOccurredEvent.Clone();
this.pClonelist.Add(oleStream);
ppstm = (IStream) oleStream;
}
public void IStreamStat(ref System.Runtime.InteropServices.ComTypes.STATSTG statstg, int grfStatFlag)
{
switch (grfStatFlag)
{
case 0:
statstg.pwcsName = this.pStatstg.pwcsName;
goto case 1;
case 1:
statstg.type = this.pStatstg.type;
statstg.cbSize = this.pStatstg.cbSize;
statstg.mtime = this.pStatstg.mtime;
statstg.ctime = this.pStatstg.ctime;
statstg.atime = this.pStatstg.atime;
statstg.grfMode = 0;
statstg.grfLocksSupported = 0;
statstg.clsid = Guid.Empty;
statstg.grfStateBits = 0;
statstg.reserved = 0;
break;
case 2:
Marshal.ThrowExceptionForHR(-2147286785);
goto case 1;
default:
Marshal.ThrowExceptionForHR(-2147286785);
goto case 1;
}
}
public void IStreamRead(byte[] pv, int cb, IntPtr pcbRead)
{
int num1 = 0;
object pLock = this.pLock;
ObjectFlowControl.CheckForSyncLockOnValueType(pLock);
Monitor.Enter(pLock);
try
{
if (this.pFinished)
{
if (!(pcbRead != IntPtr.Zero))
return;
Marshal.WriteInt32(pcbRead, num1);
}
else
{
if (Thread.VolatileRead(ref this.pDisposed) == 1)
{
if (pcbRead != IntPtr.Zero)
Marshal.WriteInt32(pcbRead, num1);
Marshal.ThrowExceptionForHR(-2147286526);
}
int retryminutes = 1;
label_9:
while (this.pStream == null)
{
try
{
FsBase pClient = this.pClient;
ResourceId id = this.pResourceInfo.Id;
long start = 0;
long length = -1;
this.pStream = pClient.OpenRead(id, ref start, ref length);
this.pSeekPointer = 0;
}
catch (Exception ex1)
{
ProjectData.SetProjectError(ex1);
Exception ex2 = ex1;
this.pStream = (Stream) null;
if (pcbRead != IntPtr.Zero)
Marshal.WriteInt32(pcbRead, num1);
ErrorAction errorAction;
if (this.pErrorManager.IgnoreAll())
{
errorAction = ErrorAction.Ignore;
}
else
{
ExceptionOccurredEventArgs e = new ExceptionOccurredEventArgs("Error occurred during downloading file.", this.pResourceInfo.Id.ToString(), ErrorPromptType.IgnoreAllIgnoreRetryCancel, ex2, retryminutes);
EventHandler<ExceptionOccurredEventArgs> exceptionOccurredEvent = this.ExceptionOccurredEvent;
if (exceptionOccurredEvent != null)
exceptionOccurredEvent((object) this, e);
this.pErrorManager.RegisterAction(e.Result);
errorAction = e.Result.Action;
}
switch (errorAction)
{
case ErrorAction.Ignore:
this.Dispose();
throw new COMException("", 1);
case ErrorAction.Retry:
ProjectData.ClearProjectError();
continue;
case ErrorAction.AutoRetry:
checked { retryminutes *= 2; }
ProjectData.ClearProjectError();
continue;
case ErrorAction.Cancel:
Marshal.ThrowExceptionForHR(-2147286526);
ProjectData.ClearProjectError();
break;
default:
throw;
}
}
Interlocked.Increment(ref OleStream.pOpenCount);
break;
}
while (num1 < cb)
{
int num2;
try
{
num2 = this.pStream.Read(pv, num1, checked (cb - num1));
}
catch (Exception ex1)
{
ProjectData.SetProjectError(ex1);
Exception ex2 = ex1;
try
{
this.pStream.Close();
}
catch (Exception ex3)
{
ProjectData.SetProjectError(ex3);
ProjectData.ClearProjectError();
}
Interlocked.Decrement(ref OleStream.pOpenCount);
this.pStream = (Stream) null;
if (pcbRead != IntPtr.Zero)
Marshal.WriteInt32(pcbRead, num1);
ErrorAction errorAction;
if (this.pErrorManager.IgnoreAll())
{
errorAction = ErrorAction.Ignore;
}
else
{
ExceptionOccurredEventArgs e = new ExceptionOccurredEventArgs("Error occurred during downloading file.", this.pResourceInfo.Id.ToString(), ErrorPromptType.IgnoreAllIgnoreRetryCancel, ex2, retryminutes);
EventHandler<ExceptionOccurredEventArgs> exceptionOccurredEvent = this.ExceptionOccurredEvent;
if (exceptionOccurredEvent != null)
exceptionOccurredEvent((object) this, e);
this.pErrorManager.RegisterAction(e.Result);
errorAction = e.Result.Action;
}
switch (errorAction)
{
case ErrorAction.Ignore:
this.Dispose();
throw new COMException("", 1);
case ErrorAction.Retry:
ProjectData.ClearProjectError();
goto label_9;
case ErrorAction.AutoRetry:
checked { retryminutes *= 2; }
ProjectData.ClearProjectError();
goto label_9;
case ErrorAction.Cancel:
Marshal.ThrowExceptionForHR(-2147286526);
ProjectData.ClearProjectError();
break;
default:
throw;
}
}
checked { num1 += num2; }
this.pSeekPointer = checked (this.pSeekPointer + num2);
if ((long) this.pSeekPointer != this.pStatstg.cbSize)
{
if (this.pStatstg.cbSize < 0L)
{
if (num2 == 0)
goto label_45;
}
if (num2 == 0)
{
if ((long) this.pSeekPointer < this.pStatstg.cbSize)
{
ErrorAction errorAction;
if (this.pErrorManager.IgnoreAll())
{
errorAction = ErrorAction.Ignore;
}
else
{
ExceptionOccurredEventArgs e = new ExceptionOccurredEventArgs("Error occurred during downloading file.", this.pResourceInfo.Id.ToString(), ErrorPromptType.IgnoreAllIgnoreRetryCancel, (Exception) new IOException("unexpected close of stream"), retryminutes);
EventHandler<ExceptionOccurredEventArgs> exceptionOccurredEvent = this.ExceptionOccurredEvent;
if (exceptionOccurredEvent != null)
exceptionOccurredEvent((object) this, e);
this.pErrorManager.RegisterAction(e.Result);
errorAction = e.Result.Action;
}
switch (errorAction)
{
case ErrorAction.Ignore:
this.Dispose();
throw new COMException("", 1);
case ErrorAction.Retry:
goto label_9;
case ErrorAction.AutoRetry:
checked { retryminutes *= 2; }
goto label_9;
case ErrorAction.Cancel:
Marshal.ThrowExceptionForHR(-2147286526);
continue;
default:
throw new Exception();
}
}
else
{
Marshal.ThrowExceptionForHR(-2147287010);
continue;
}
}
else
continue;
}
label_45:
try
{
this.pStream.Close();
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
Interlocked.Decrement(ref OleStream.pOpenCount);
this.pStream = (Stream) null;
this.pFinished = true;
break;
}
if (!(pcbRead != IntPtr.Zero))
return;
Marshal.WriteInt32(pcbRead, num1);
}
}
finally
{
Monitor.Exit(pLock);
}
}
protected virtual void Dispose(bool disposing)
{
if (Interlocked.CompareExchange(ref this.pDisposed, 1, 0) != 0 || !disposing)
return;
object pLock = this.pLock;
ObjectFlowControl.CheckForSyncLockOnValueType(pLock);
Monitor.Enter(pLock);
try
{
if (this.pStream != null)
{
try
{
this.pStream.Close();
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
Interlocked.Decrement(ref OleStream.pOpenCount);
this.pStream = (Stream) null;
}
List<OleStream>.Enumerator enumerator;
try
{
enumerator = this.pClonelist.GetEnumerator();
while (enumerator.MoveNext())
{
OleStream current = enumerator.Current;
try
{
current.Dispose();
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
}
}
finally
{
enumerator.Dispose();
}
}
finally
{
Monitor.Exit(pLock);
}
}
public void Dispose()
{
this.Dispose(true);
GC.SuppressFinalize((object) this);
}
~OleStream()
{
this.Dispose(false);
// ISSUE: explicit finalizer call
base.Finalize();
}
private System.Runtime.InteropServices.ComTypes.FILETIME ToFileTime(DateTime time)
{
byte[] bytes = BitConverter.GetBytes(DateTime.Compare(time, OleStream.win32timeorigin) >= 0 ? time.ToFileTime() : 0L);
System.Runtime.InteropServices.ComTypes.FILETIME filetime;
filetime.dwHighDateTime = BitConverter.ToInt32(bytes, 4);
filetime.dwLowDateTime = BitConverter.ToInt32(bytes, 0);
return filetime;
}
private enum STATFLAG
{
STATFLAG_DEFAULT,
STATFLAG_NONAME,
STATFLAG_NOOPEN,
}
[Flags]
private enum LOCKTYPE
{
LOCK_WRITE = 1,
LOCK_EXCLUSIVE = 2,
LOCK_ONLYONCE = 4,
}
}
}

View File

@ -0,0 +1,63 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.OleStreamCreator
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Rei.Com;
using Rei.Fs;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices.ComTypes;
namespace CarotDAV
{
public class OleStreamCreator : IStreamCreator
{
private string pName;
private ResourceInfo pResourceInfo;
private FsBase pClient;
private ErrorPromptManager pErrorManager;
private List<OleStream> Streams;
public event EventHandler<ExceptionOccurredEventArgs> ExceptionOccurred;
public OleStreamCreator(ResourceInfo ri, string name, FsBase client, ErrorPromptManager errormanager)
{
this.Streams = new List<OleStream>();
this.pResourceInfo = ri;
this.pName = name;
this.pClient = client;
this.pErrorManager = errormanager;
}
public IStream Create()
{
OleStream oleStream = new OleStream(this.pResourceInfo, this.pName, this.pClient, this.pErrorManager);
oleStream.ExceptionOccurred += new EventHandler<ExceptionOccurredEventArgs>(this.OnExceptionOccurred);
this.Streams.Add(oleStream);
return (IStream) oleStream;
}
public void OnExceptionOccurred(object sender, ExceptionOccurredEventArgs e)
{
EventHandler<ExceptionOccurredEventArgs> exceptionOccurredEvent = this.ExceptionOccurredEvent;
if (exceptionOccurredEvent == null)
return;
exceptionOccurredEvent(RuntimeHelpers.GetObjectValue(sender), e);
}
public void Dispose()
{
int num1 = 0;
int num2 = checked (this.Streams.Count - 1);
int index = num1;
while (index <= num2)
{
this.Streams[index].Dispose();
checked { ++index; }
}
}
}
}

1099
CarotDAV/PropertyForm.cs Normal file

File diff suppressed because it is too large Load Diff

120
CarotDAV/PropertyForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,456 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ResouceListingForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class ResouceListingForm : Form
{
private IContainer components;
[AccessedThroughProperty("TextBoxUri")]
private TextBox _TextBoxUri;
[AccessedThroughProperty("ButtonCancel")]
private Button _ButtonCancel;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("Label2")]
private Label _Label2;
[AccessedThroughProperty("Label3")]
private Label _Label3;
[AccessedThroughProperty("TextBoxFiles")]
private TextBox _TextBoxFiles;
[AccessedThroughProperty("TextBoxFoldes")]
private TextBox _TextBoxFoldes;
[AccessedThroughProperty("TextBoxTotalSize")]
private TextBox _TextBoxTotalSize;
[AccessedThroughProperty("TextBoxRestFolders")]
private TextBox _TextBoxRestFolders;
[AccessedThroughProperty("Label4")]
private Label _Label4;
[AccessedThroughProperty("Timer1")]
private System.Windows.Forms.Timer _Timer1;
internal CarotDAVDataObject pDataObject;
public Thread Thread;
private bool pTaskbarButtonCreated;
public ResouceListingForm()
{
this.Load += new EventHandler(this.ResouceListingForm_Load);
this.Shown += new EventHandler(this.ListingResoucesForm_Shown);
this.pTaskbarButtonCreated = false;
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.components = (IContainer) new System.ComponentModel.Container();
this.TextBoxUri = new TextBox();
this.ButtonCancel = new Button();
this.Label1 = new Label();
this.Label2 = new Label();
this.Label3 = new Label();
this.TextBoxFiles = new TextBox();
this.TextBoxFoldes = new TextBox();
this.TextBoxTotalSize = new TextBox();
this.TextBoxRestFolders = new TextBox();
this.Label4 = new Label();
this.Timer1 = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
this.TextBoxUri.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxUri1 = this.TextBoxUri;
Point point1 = new Point(8, 8);
Point point2 = point1;
textBoxUri1.Location = point2;
this.TextBoxUri.Multiline = true;
this.TextBoxUri.Name = "TextBoxUri";
this.TextBoxUri.ReadOnly = true;
TextBox textBoxUri2 = this.TextBoxUri;
Size size1 = new Size(240, 19);
Size size2 = size1;
textBoxUri2.Size = size2;
this.TextBoxUri.TabIndex = 1;
this.ButtonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.ButtonCancel.DialogResult = DialogResult.Cancel;
Button buttonCancel1 = this.ButtonCancel;
point1 = new Point(176, 136);
Point point3 = point1;
buttonCancel1.Location = point3;
this.ButtonCancel.Name = "ButtonCancel";
Button buttonCancel2 = this.ButtonCancel;
size1 = new Size(72, 24);
Size size3 = size1;
buttonCancel2.Size = size3;
this.ButtonCancel.TabIndex = 2;
this.ButtonCancel.Text = "Cancel";
this.ButtonCancel.UseVisualStyleBackColor = true;
this.Label1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
Label label1_1 = this.Label1;
point1 = new Point(8, 40);
Point point4 = point1;
label1_1.Location = point4;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(80, 16);
Size size4 = size1;
label1_2.Size = size4;
this.Label1.TabIndex = 3;
this.Label1.Text = "Files:";
this.Label1.TextAlign = ContentAlignment.MiddleRight;
this.Label2.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
Label label2_1 = this.Label2;
point1 = new Point(8, 64);
Point point5 = point1;
label2_1.Location = point5;
this.Label2.Name = "Label2";
Label label2_2 = this.Label2;
size1 = new Size(80, 16);
Size size5 = size1;
label2_2.Size = size5;
this.Label2.TabIndex = 4;
this.Label2.Text = "Folders:";
this.Label2.TextAlign = ContentAlignment.MiddleRight;
this.Label3.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
Label label3_1 = this.Label3;
point1 = new Point(8, 88);
Point point6 = point1;
label3_1.Location = point6;
this.Label3.Name = "Label3";
Label label3_2 = this.Label3;
size1 = new Size(80, 16);
Size size6 = size1;
label3_2.Size = size6;
this.Label3.TabIndex = 5;
this.Label3.Text = "Total Size:";
this.Label3.TextAlign = ContentAlignment.MiddleRight;
this.TextBoxFiles.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxFiles1 = this.TextBoxFiles;
point1 = new Point(88, 40);
Point point7 = point1;
textBoxFiles1.Location = point7;
this.TextBoxFiles.Name = "TextBoxFiles";
this.TextBoxFiles.ReadOnly = true;
TextBox textBoxFiles2 = this.TextBoxFiles;
size1 = new Size(160, 19);
Size size7 = size1;
textBoxFiles2.Size = size7;
this.TextBoxFiles.TabIndex = 6;
this.TextBoxFoldes.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxFoldes1 = this.TextBoxFoldes;
point1 = new Point(88, 64);
Point point8 = point1;
textBoxFoldes1.Location = point8;
this.TextBoxFoldes.Name = "TextBoxFoldes";
this.TextBoxFoldes.ReadOnly = true;
TextBox textBoxFoldes2 = this.TextBoxFoldes;
size1 = new Size(160, 19);
Size size8 = size1;
textBoxFoldes2.Size = size8;
this.TextBoxFoldes.TabIndex = 7;
this.TextBoxTotalSize.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxTotalSize1 = this.TextBoxTotalSize;
point1 = new Point(88, 88);
Point point9 = point1;
textBoxTotalSize1.Location = point9;
this.TextBoxTotalSize.Name = "TextBoxTotalSize";
this.TextBoxTotalSize.ReadOnly = true;
TextBox textBoxTotalSize2 = this.TextBoxTotalSize;
size1 = new Size(160, 19);
Size size9 = size1;
textBoxTotalSize2.Size = size9;
this.TextBoxTotalSize.TabIndex = 8;
this.TextBoxRestFolders.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
TextBox textBoxRestFolders1 = this.TextBoxRestFolders;
point1 = new Point(88, 112);
Point point10 = point1;
textBoxRestFolders1.Location = point10;
this.TextBoxRestFolders.Name = "TextBoxRestFolders";
this.TextBoxRestFolders.ReadOnly = true;
TextBox textBoxRestFolders2 = this.TextBoxRestFolders;
size1 = new Size(160, 19);
Size size10 = size1;
textBoxRestFolders2.Size = size10;
this.TextBoxRestFolders.TabIndex = 10;
this.Label4.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
Label label4_1 = this.Label4;
point1 = new Point(8, 112);
Point point11 = point1;
label4_1.Location = point11;
this.Label4.Name = "Label4";
Label label4_2 = this.Label4;
size1 = new Size(80, 16);
Size size11 = size1;
label4_2.Size = size11;
this.Label4.TabIndex = 9;
this.Label4.Text = "Rest Folders:";
this.Label4.TextAlign = ContentAlignment.MiddleRight;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.ButtonCancel;
size1 = new Size(257, 169);
this.ClientSize = size1;
this.Controls.Add((Control) this.TextBoxRestFolders);
this.Controls.Add((Control) this.Label4);
this.Controls.Add((Control) this.TextBoxTotalSize);
this.Controls.Add((Control) this.TextBoxFoldes);
this.Controls.Add((Control) this.TextBoxFiles);
this.Controls.Add((Control) this.Label3);
this.Controls.Add((Control) this.Label2);
this.Controls.Add((Control) this.Label1);
this.Controls.Add((Control) this.ButtonCancel);
this.Controls.Add((Control) this.TextBoxUri);
this.Cursor = Cursors.WaitCursor;
this.MaximizeBox = false;
this.MinimizeBox = false;
size1 = new Size(273, 207);
this.MinimumSize = size1;
this.Name = nameof (ResouceListingForm);
this.StartPosition = FormStartPosition.CenterScreen;
this.Text = "Listing Resources";
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual TextBox TextBoxUri
{
get
{
return this._TextBoxUri;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TextBoxUri = value;
}
}
internal virtual Button ButtonCancel
{
get
{
return this._ButtonCancel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ButtonCancel_Click);
if (this._ButtonCancel != null)
this._ButtonCancel.Click -= eventHandler;
this._ButtonCancel = value;
if (this._ButtonCancel == null)
return;
this._ButtonCancel.Click += eventHandler;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual Label Label2
{
get
{
return this._Label2;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label2 = value;
}
}
internal virtual Label Label3
{
get
{
return this._Label3;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label3 = value;
}
}
internal virtual TextBox TextBoxFiles
{
get
{
return this._TextBoxFiles;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TextBoxFiles = value;
}
}
internal virtual TextBox TextBoxFoldes
{
get
{
return this._TextBoxFoldes;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TextBoxFoldes = value;
}
}
internal virtual TextBox TextBoxTotalSize
{
get
{
return this._TextBoxTotalSize;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TextBoxTotalSize = value;
}
}
internal virtual TextBox TextBoxRestFolders
{
get
{
return this._TextBoxRestFolders;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TextBoxRestFolders = value;
}
}
internal virtual Label Label4
{
get
{
return this._Label4;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label4 = value;
}
}
internal virtual System.Windows.Forms.Timer Timer1
{
get
{
return this._Timer1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.Timer1_Tick);
if (this._Timer1 != null)
this._Timer1.Tick -= eventHandler;
this._Timer1 = value;
if (this._Timer1 == null)
return;
this._Timer1.Tick += eventHandler;
}
}
protected override void WndProc(ref Message m)
{
if (m.Msg == TaskbarManager.TaskbarButtonCreatedMessage)
this.pTaskbarButtonCreated = true;
base.WndProc(ref m);
}
public bool TaskbarButtonCreated
{
get
{
return this.pTaskbarButtonCreated;
}
}
private void ListingResoucesForm_Shown(object sender, EventArgs e)
{
this.Activate();
this.Timer1.Interval = 200;
this.Timer1.Start();
}
private void ButtonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void EnterWaitState()
{
Cursor.Current = Cursors.WaitCursor;
if (!this.TaskbarButtonCreated)
return;
TaskbarManager.SetProgressState((Control) this, TaskbarManager.TaskbarProgressBarStatus.Indeterminate);
}
private void LeaveWaitState()
{
if (this.TaskbarButtonCreated)
TaskbarManager.SetProgressState((Control) this, TaskbarManager.TaskbarProgressBarStatus.NoProgress);
Cursor.Current = Cursors.Default;
}
private void Timer1_Tick(object sender, EventArgs e)
{
object syncobject = this.pDataObject.syncobject;
ObjectFlowControl.CheckForSyncLockOnValueType(syncobject);
Monitor.Enter(syncobject);
try
{
this.TextBoxUri.Text = this.pDataObject.targetid.ToString();
}
finally
{
Monitor.Exit(syncobject);
}
this.TextBoxFiles.Text = this.pDataObject.files.ToString("#,0");
this.TextBoxFoldes.Text = this.pDataObject.folders.ToString("#,0");
this.TextBoxRestFolders.Text = this.pDataObject.restfolders.ToString("#,0");
this.TextBoxTotalSize.Text = Interlocked.Read(ref this.pDataObject.sizes).ToString("#,0");
if (this.Thread.IsAlive)
return;
this.DialogResult = DialogResult.OK;
this.Close();
}
private void ResouceListingForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.CarotDAV;
}
}
}

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,53 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ResourceChangedEventArgs
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Rei.Fs;
using System;
namespace CarotDAV
{
public class ResourceChangedEventArgs : EventArgs
{
private ResourceChangedEventArgs.ChangeType _type;
private ReturnedInfo _re;
public ResourceChangedEventArgs(ReturnedInfo re)
{
this._type = ResourceChangedEventArgs.ChangeType.PropertyUpdate;
this._re = re;
}
public ResourceChangedEventArgs(ReturnedInfo re, ResourceChangedEventArgs.ChangeType type)
{
this._re = re;
this._type = type;
}
public ReturnedInfo ReturnedInfo
{
get
{
return this._re;
}
}
public ResourceChangedEventArgs.ChangeType Type
{
get
{
return this._type;
}
}
public enum ChangeType
{
Create,
Delete,
PropertyChange,
PropertyUpdate,
}
}
}

9175
CarotDAV/Resources.resx Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,92 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.RightAlignToolStrip
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using System.Windows.Forms;
namespace CarotDAV
{
public class RightAlignToolStrip : ToolStrip
{
public RightAlignToolStrip()
{
}
public RightAlignToolStrip(params ToolStripItem[] items)
: base(items)
{
}
protected override void OnLayout(LayoutEventArgs e)
{
int num1 = this.DisplayRectangle.Width;
int num2 = 0;
if (num1 > 0)
{
int num3 = 0;
int num4 = checked (this.Items.Count - 1);
int index = num3;
Padding padding;
while (index <= num4)
{
if (this.Items[index].Visible)
{
int num5 = num1;
padding = this.Items[index].Margin;
int horizontal = padding.Horizontal;
num1 = checked (num5 - horizontal);
if ((this.Items[index].Anchor & AnchorStyles.Left) != AnchorStyles.None && (this.Items[index].Anchor & AnchorStyles.Right) != AnchorStyles.None)
checked { ++num2; }
else if (this.Items[index] is ToolStripTextBox)
checked { ++num2; }
else
checked { num1 -= this.Items[index].Width; }
}
checked { ++index; }
}
if (this.OverflowButton.Visible)
{
int num5 = num1;
padding = this.OverflowButton.Margin;
int horizontal = padding.Horizontal;
num1 = checked (num5 - horizontal - this.OverflowButton.Width);
}
int num6 = num1;
padding = this.Padding;
int horizontal1 = padding.Horizontal;
num1 = checked (num6 - horizontal1 - 1);
}
if (num1 > 0 && num2 > 0)
{
int num3 = 0;
int num4 = checked (this.Items.Count - 1);
int index = num3;
while (index <= num4)
{
if (this.Items[index].Visible)
{
this.Items[index].AutoSize = false;
if ((this.Items[index].Anchor & AnchorStyles.Left) != AnchorStyles.None && (this.Items[index].Anchor & AnchorStyles.Right) != AnchorStyles.None)
{
this.Items[index].Width = num1 / num2;
this.Items[index].Invalidate();
checked { num1 -= this.Items[index].Width; }
checked { --num2; }
}
else if (this.Items[index] is ToolStripTextBox)
{
this.Items[index].Width = num1 / num2;
this.Items[index].Invalidate();
checked { num1 -= this.Items[index].Width; }
checked { --num2; }
}
}
checked { ++index; }
}
}
base.OnLayout(e);
}
}
}

View File

@ -0,0 +1,458 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.ServerCertErrorPromptForm
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Net.Security;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace CarotDAV
{
[DesignerGenerated]
public class ServerCertErrorPromptForm : Form
{
private IContainer components;
[AccessedThroughProperty("m_CancelButton")]
private Button _m_CancelButton;
[AccessedThroughProperty("RetryButton")]
private Button _RetryButton;
[AccessedThroughProperty("IgnoreButton")]
private Button _IgnoreButton;
[AccessedThroughProperty("MessageLabel")]
private Label _MessageLabel;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("TargetTextBox")]
private TextBox _TargetTextBox;
[AccessedThroughProperty("ChainErrorLabel")]
private Label _ChainErrorLabel;
[AccessedThroughProperty("NameMismatchLabel")]
private Label _NameMismatchLabel;
[AccessedThroughProperty("NotAvailableLabel")]
private Label _NotAvailableLabel;
private string pMessage;
private SslPolicyErrors pPolicyError;
private string pTarget;
public ServerCertErrorPromptForm()
{
this.Shown += new EventHandler(this.ServerCertErrorPromptForm_Shown);
this.Load += new EventHandler(this.ServerCertErrorPromptForm_Load);
this.pMessage = string.Empty;
this.pTarget = string.Empty;
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.m_CancelButton = new Button();
this.RetryButton = new Button();
this.IgnoreButton = new Button();
this.MessageLabel = new Label();
this.Label1 = new Label();
this.TargetTextBox = new TextBox();
this.ChainErrorLabel = new Label();
this.NameMismatchLabel = new Label();
this.NotAvailableLabel = new Label();
this.SuspendLayout();
this.m_CancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
this.m_CancelButton.DialogResult = DialogResult.Cancel;
Button mCancelButton1 = this.m_CancelButton;
Point point1 = new Point(288, 152);
Point point2 = point1;
mCancelButton1.Location = point2;
this.m_CancelButton.Name = "m_CancelButton";
Button mCancelButton2 = this.m_CancelButton;
Size size1 = new Size(72, 24);
Size size2 = size1;
mCancelButton2.Size = size2;
this.m_CancelButton.TabIndex = 8;
this.m_CancelButton.Text = "Cancel";
this.m_CancelButton.UseVisualStyleBackColor = true;
this.RetryButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button retryButton1 = this.RetryButton;
point1 = new Point(208, 152);
Point point3 = point1;
retryButton1.Location = point3;
this.RetryButton.Name = "RetryButton";
Button retryButton2 = this.RetryButton;
size1 = new Size(72, 24);
Size size3 = size1;
retryButton2.Size = size3;
this.RetryButton.TabIndex = 7;
this.RetryButton.Text = "Retry";
this.RetryButton.UseVisualStyleBackColor = true;
this.IgnoreButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Button ignoreButton1 = this.IgnoreButton;
point1 = new Point(128, 152);
Point point4 = point1;
ignoreButton1.Location = point4;
this.IgnoreButton.Name = "IgnoreButton";
Button ignoreButton2 = this.IgnoreButton;
size1 = new Size(72, 25);
Size size4 = size1;
ignoreButton2.Size = size4;
this.IgnoreButton.TabIndex = 6;
this.IgnoreButton.Text = "Ignore";
this.IgnoreButton.UseVisualStyleBackColor = true;
this.MessageLabel.AutoSize = true;
Label messageLabel1 = this.MessageLabel;
point1 = new Point(8, 8);
Point point5 = point1;
messageLabel1.Location = point5;
this.MessageLabel.Name = "MessageLabel";
Label messageLabel2 = this.MessageLabel;
size1 = new Size(79, 12);
Size size5 = size1;
messageLabel2.Size = size5;
this.MessageLabel.TabIndex = 0;
this.MessageLabel.Text = "Error Message";
this.Label1.AutoSize = true;
Label label1_1 = this.Label1;
point1 = new Point(8, 24);
Point point6 = point1;
label1_1.Location = point6;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(38, 12);
Size size6 = size1;
label1_2.Size = size6;
this.Label1.TabIndex = 1;
this.Label1.Text = "Target";
this.TargetTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
TextBox targetTextBox1 = this.TargetTextBox;
point1 = new Point(8, 40);
Point point7 = point1;
targetTextBox1.Location = point7;
this.TargetTextBox.Multiline = true;
this.TargetTextBox.Name = "TargetTextBox";
this.TargetTextBox.ReadOnly = true;
TextBox targetTextBox2 = this.TargetTextBox;
size1 = new Size(352, 32);
Size size7 = size1;
targetTextBox2.Size = size7;
this.TargetTextBox.TabIndex = 2;
this.TargetTextBox.TabStop = false;
this.ChainErrorLabel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
Label chainErrorLabel1 = this.ChainErrorLabel;
point1 = new Point(32, 80);
Point point8 = point1;
chainErrorLabel1.Location = point8;
this.ChainErrorLabel.Name = "ChainErrorLabel";
Label chainErrorLabel2 = this.ChainErrorLabel;
size1 = new Size(328, 16);
Size size8 = size1;
chainErrorLabel2.Size = size8;
this.ChainErrorLabel.TabIndex = 3;
this.ChainErrorLabel.Text = "-";
this.NameMismatchLabel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
Label nameMismatchLabel1 = this.NameMismatchLabel;
point1 = new Point(32, 104);
Point point9 = point1;
nameMismatchLabel1.Location = point9;
this.NameMismatchLabel.Name = "NameMismatchLabel";
Label nameMismatchLabel2 = this.NameMismatchLabel;
size1 = new Size(328, 16);
Size size9 = size1;
nameMismatchLabel2.Size = size9;
this.NameMismatchLabel.TabIndex = 4;
this.NameMismatchLabel.Text = "-";
this.NotAvailableLabel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
Label notAvailableLabel1 = this.NotAvailableLabel;
point1 = new Point(32, 128);
Point point10 = point1;
notAvailableLabel1.Location = point10;
this.NotAvailableLabel.Name = "NotAvailableLabel";
Label notAvailableLabel2 = this.NotAvailableLabel;
size1 = new Size(328, 16);
Size size10 = size1;
notAvailableLabel2.Size = size10;
this.NotAvailableLabel.TabIndex = 5;
this.NotAvailableLabel.Text = "-";
this.AcceptButton = (IButtonControl) this.RetryButton;
this.AutoScaleDimensions = new SizeF(6f, 12f);
this.AutoScaleMode = AutoScaleMode.Font;
this.CancelButton = (IButtonControl) this.m_CancelButton;
size1 = new Size(368, 184);
this.ClientSize = size1;
this.Controls.Add((Control) this.NotAvailableLabel);
this.Controls.Add((Control) this.NameMismatchLabel);
this.Controls.Add((Control) this.ChainErrorLabel);
this.Controls.Add((Control) this.TargetTextBox);
this.Controls.Add((Control) this.Label1);
this.Controls.Add((Control) this.MessageLabel);
this.Controls.Add((Control) this.IgnoreButton);
this.Controls.Add((Control) this.m_CancelButton);
this.Controls.Add((Control) this.RetryButton);
this.MaximizeBox = false;
this.MinimizeBox = false;
size1 = new Size(384, 221);
this.MinimumSize = size1;
this.Name = nameof (ServerCertErrorPromptForm);
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "Server Certificate Error";
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual Button m_CancelButton
{
get
{
return this._m_CancelButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.m_CancelButton_Click);
if (this._m_CancelButton != null)
this._m_CancelButton.Click -= eventHandler;
this._m_CancelButton = value;
if (this._m_CancelButton == null)
return;
this._m_CancelButton.Click += eventHandler;
}
}
internal virtual Button RetryButton
{
get
{
return this._RetryButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.RetryButton_Click);
if (this._RetryButton != null)
this._RetryButton.Click -= eventHandler;
this._RetryButton = value;
if (this._RetryButton == null)
return;
this._RetryButton.Click += eventHandler;
}
}
internal virtual Button IgnoreButton
{
get
{
return this._IgnoreButton;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.IgnoreButton_Click);
if (this._IgnoreButton != null)
this._IgnoreButton.Click -= eventHandler;
this._IgnoreButton = value;
if (this._IgnoreButton == null)
return;
this._IgnoreButton.Click += eventHandler;
}
}
internal virtual Label MessageLabel
{
get
{
return this._MessageLabel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._MessageLabel = value;
}
}
internal virtual Label Label1
{
get
{
return this._Label1;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._Label1 = value;
}
}
internal virtual TextBox TargetTextBox
{
get
{
return this._TargetTextBox;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._TargetTextBox = value;
}
}
internal virtual Label ChainErrorLabel
{
get
{
return this._ChainErrorLabel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._ChainErrorLabel = value;
}
}
internal virtual Label NameMismatchLabel
{
get
{
return this._NameMismatchLabel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._NameMismatchLabel = value;
}
}
internal virtual Label NotAvailableLabel
{
get
{
return this._NotAvailableLabel;
}
[MethodImpl(MethodImplOptions.Synchronized)] set
{
this._NotAvailableLabel = value;
}
}
public string Message
{
get
{
return this.pMessage;
}
set
{
if (value == null)
value = string.Empty;
if (value.Length == 0)
value = "Server certificate error occurred.";
this.pMessage = value;
}
}
public SslPolicyErrors PolicyError
{
get
{
return this.pPolicyError;
}
set
{
this.pPolicyError = value;
if ((this.pPolicyError & SslPolicyErrors.RemoteCertificateChainErrors) != SslPolicyErrors.None)
{
this.ChainErrorLabel.Text = "Server certificate is not issued by trusted authority.";
this.ChainErrorLabel.ForeColor = Color.Red;
}
else
{
this.ChainErrorLabel.Text = "Server certificate is issued by trusted authority.";
this.ChainErrorLabel.ForeColor = Color.Black;
}
if ((this.pPolicyError & SslPolicyErrors.RemoteCertificateNameMismatch) != SslPolicyErrors.None)
{
this.NameMismatchLabel.Text = "Server certificate is not issued for the connected server.";
this.NameMismatchLabel.ForeColor = Color.Red;
}
else
{
this.NameMismatchLabel.Text = "Server certificate is issued for the connected server.";
this.NameMismatchLabel.ForeColor = Color.Black;
}
if ((this.pPolicyError & SslPolicyErrors.RemoteCertificateNotAvailable) != SslPolicyErrors.None)
{
this.NotAvailableLabel.Text = "Server certificate is not available any more.";
this.NotAvailableLabel.ForeColor = Color.Red;
}
else
{
this.NotAvailableLabel.Text = "Server Certificate is still available.";
this.NotAvailableLabel.ForeColor = Color.Black;
}
}
}
public string Target
{
get
{
return this.pTarget;
}
set
{
if (value == null)
value = string.Empty;
this.pTarget = value;
this.TargetTextBox.Text = this.pTarget;
}
}
private void ServerCertErrorPromptForm_Shown(object sender, EventArgs e)
{
this.Activate();
((Control) this.AcceptButton).Focus();
}
private void IgnoreButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Ignore;
}
private void RetryButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Retry;
}
private void m_CancelButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
public static DialogResult ShowDialog(IWin32Window owner, string message, SslPolicyErrors policyerror, string target)
{
using (ServerCertErrorPromptForm certErrorPromptForm = new ServerCertErrorPromptForm())
{
certErrorPromptForm.Message = message;
certErrorPromptForm.Target = target;
certErrorPromptForm.PolicyError = policyerror;
certErrorPromptForm.RetryButton.Focus();
return certErrorPromptForm.ShowDialog(owner);
}
}
private void ServerCertErrorPromptForm_Load(object sender, EventArgs e)
{
this.Icon = CarotDAV.My.Resources.Resources.CarotDAV;
}
}
}

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,80 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.SettingSupport
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using System.Collections;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace CarotDAV
{
public class SettingSupport
{
public static bool IsSameType(object object1, object object2)
{
if (object1 == null)
return object2 == null;
if (object2 == null)
return false;
return object1.GetType() == object2.GetType();
}
public static bool IsSameContents(object object1, object object2, bool includenonpublic)
{
if (object.ReferenceEquals(RuntimeHelpers.GetObjectValue(object1), RuntimeHelpers.GetObjectValue(object2)))
return true;
if (!SettingSupport.IsSameType(RuntimeHelpers.GetObjectValue(object1), RuntimeHelpers.GetObjectValue(object2)))
return false;
BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public;
if (includenonpublic)
bindingAttr |= BindingFlags.NonPublic;
FieldInfo[] fields = object1.GetType().GetFields(bindingAttr);
FieldInfo[] fieldInfoArray1 = fields;
int index1 = 0;
while (index1 < fieldInfoArray1.Length)
{
FieldInfo fieldInfo = fieldInfoArray1[index1];
object objectValue = RuntimeHelpers.GetObjectValue(fieldInfo.GetValue(RuntimeHelpers.GetObjectValue(object1)));
if (objectValue == null)
{
if (fieldInfo.GetValue(RuntimeHelpers.GetObjectValue(object2)) != null)
return false;
}
else if ((fieldInfo.FieldType.IsPrimitive || fieldInfo.FieldType.IsEnum) && !objectValue.Equals(RuntimeHelpers.GetObjectValue(fieldInfo.GetValue(RuntimeHelpers.GetObjectValue(object2)))))
return false;
checked { ++index1; }
}
FieldInfo[] fieldInfoArray2 = fields;
int index2 = 0;
while (index2 < fieldInfoArray2.Length)
{
FieldInfo fieldInfo = fieldInfoArray2[index2];
object objectValue1 = RuntimeHelpers.GetObjectValue(fieldInfo.GetValue(RuntimeHelpers.GetObjectValue(object1)));
object objectValue2 = RuntimeHelpers.GetObjectValue(fieldInfo.GetValue(RuntimeHelpers.GetObjectValue(object2)));
if (objectValue1 != null && !fieldInfo.FieldType.IsPrimitive && !fieldInfo.FieldType.IsEnum && (fieldInfo.FieldType.IsValueType || !object.ReferenceEquals(RuntimeHelpers.GetObjectValue(objectValue1), RuntimeHelpers.GetObjectValue(objectValue2))))
{
if (objectValue1 is ICollection)
{
ICollection collection1 = (ICollection) objectValue1;
ICollection collection2 = (ICollection) objectValue2;
if (collection1.Count != collection2.Count)
return false;
IEnumerator enumerator1 = collection1.GetEnumerator();
IEnumerator enumerator2 = collection2.GetEnumerator();
while (enumerator1.MoveNext() && enumerator2.MoveNext())
{
if (!SettingSupport.IsSameContents(RuntimeHelpers.GetObjectValue(enumerator1.Current), RuntimeHelpers.GetObjectValue(enumerator2.Current), includenonpublic))
return false;
}
}
else if (!objectValue1.Equals(RuntimeHelpers.GetObjectValue(objectValue2)))
return false;
}
checked { ++index2; }
}
return true;
}
}
}

View File

@ -0,0 +1,89 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.SimpleResourceInfo
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Rei.Fs;
using System;
using System.Diagnostics;
using System.IO;
namespace CarotDAV
{
[DebuggerDisplay("{DebuggerString}")]
[Serializable]
public class SimpleResourceInfo : ICloneable
{
public string Name;
public long Size;
public DateTime LastModifiedTime;
public bool IsCollection;
public SimpleResourceInfo()
{
this.Name = (string) null;
}
public SimpleResourceInfo(string name, long size, DateTime lastmodified, bool iscollection)
{
this.Name = name;
this.Size = size;
this.LastModifiedTime = lastmodified;
this.IsCollection = iscollection;
}
public SimpleResourceInfo(ResourceInfo ri)
{
this.Name = ri.Id.ToString();
this.Size = ri.Size;
this.LastModifiedTime = ri.LastModifiedTime;
this.IsCollection = ri.IsCollection;
}
public string DebuggerString
{
get
{
return this.ToString();
}
}
public override string ToString()
{
string str1 = "";
string str2 = this.Name != null ? str1 + this.Name : str1 + "Noname";
return (!this.IsCollection ? str2 + " <FILE> " : str2 + " <COLL> ") + this.Size.ToString();
}
public object Clone()
{
return (object) (SimpleResourceInfo) this.MemberwiseClone();
}
public static SimpleResourceInfo CreateLocalFileInfo(string path)
{
if (File.Exists(path))
{
FileInfo fileInfo = new FileInfo(path);
return new SimpleResourceInfo()
{
Name = path,
Size = fileInfo.Length,
LastModifiedTime = fileInfo.LastWriteTime,
IsCollection = false
};
}
if (!Directory.Exists(path))
return (SimpleResourceInfo) null;
DirectoryInfo directoryInfo = new DirectoryInfo(path);
return new SimpleResourceInfo()
{
Name = path,
Size = 0,
LastModifiedTime = directoryInfo.LastWriteTime,
IsCollection = true
};
}
}
}

498
CarotDAV/TaskbarManager.cs Normal file
View File

@ -0,0 +1,498 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.TaskbarManager
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace CarotDAV
{
public class TaskbarManager
{
private static int pTaskbarButtonCreatedMessage = -1;
private static TaskbarManager.ITaskbarList4 pTaskbarList4;
private static TaskbarManager.PropertyKey PKEY_Title;
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
private static extern int RegisterWindowMessage([MarshalAs(UnmanagedType.LPWStr)] string lpString);
[DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
private static extern int SetCurrentProcessExplicitAppUserModelID([MarshalAs(UnmanagedType.LPWStr)] string AppID);
[DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
private static extern void SHAddToRecentDocs(TaskbarManager.SHARD uflag, [In] ref TaskbarManager.SHARDAPPIDINFOLINK pv);
static TaskbarManager()
{
try
{
TaskbarManager.pTaskbarList4 = Activator.CreateInstance(System.Type.GetTypeFromCLSID(new Guid("56FDF344-FD6D-11d0-958A-006097C9A090"))) as TaskbarManager.ITaskbarList4;
if (TaskbarManager.pTaskbarList4 != null)
TaskbarManager.pTaskbarList4.HrInit();
}
catch (COMException ex)
{
ProjectData.SetProjectError((Exception) ex);
TaskbarManager.pTaskbarList4 = (TaskbarManager.ITaskbarList4) null;
ProjectData.ClearProjectError();
}
catch (NotImplementedException ex)
{
ProjectData.SetProjectError((Exception) ex);
TaskbarManager.pTaskbarList4 = (TaskbarManager.ITaskbarList4) null;
ProjectData.ClearProjectError();
}
TaskbarManager.PKEY_Title = new TaskbarManager.PropertyKey();
TaskbarManager.PKEY_Title.fmtid = new Guid("F29F85E0-4FF9-1068-AB91-08002B27B3D9");
TaskbarManager.PKEY_Title.pid = 2;
}
public static int TaskbarButtonCreatedMessage
{
get
{
return TaskbarManager.pTaskbarButtonCreatedMessage;
}
}
public static void RegisterTaskbarMessage()
{
try
{
if (TaskbarManager.pTaskbarButtonCreatedMessage != -1)
return;
TaskbarManager.pTaskbarButtonCreatedMessage = TaskbarManager.RegisterWindowMessage("TaskbarButtonCreated");
}
catch (DllNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
catch (EntryPointNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
}
public static void SetAppUserModelID(string AppID)
{
try
{
TaskbarManager.SetCurrentProcessExplicitAppUserModelID(AppID);
}
catch (DllNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
catch (EntryPointNotFoundException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
}
private static TaskbarManager.IShellLinkW CreateShellLink(string apppath, string arguments, string title, string tooltip, string iconpath, int iconindex)
{
try
{
TaskbarManager.IShellLinkW instance = Activator.CreateInstance(System.Type.GetTypeFromCLSID(new Guid("00021401-0000-0000-C000-000000000046"))) as TaskbarManager.IShellLinkW;
if (instance == null)
return (TaskbarManager.IShellLinkW) null;
TaskbarManager.IPropertyStore propertyStore = instance as TaskbarManager.IPropertyStore;
if (propertyStore == null)
return (TaskbarManager.IShellLinkW) null;
instance.SetPath(apppath);
if (arguments != null)
instance.SetArguments(arguments);
if (iconpath != null)
instance.SetIconLocation(iconpath, iconindex);
if (tooltip != null)
instance.SetDescription(tooltip);
propertyStore.SetValue(ref TaskbarManager.PKEY_Title, ref new TaskbarManager.PropVariant()
{
_ptr = Marshal.StringToCoTaskMemUni(title),
_valueType = VarEnum.VT_LPWSTR
});
propertyStore.Commit();
return instance;
}
catch (COMException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
catch (NotImplementedException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
return (TaskbarManager.IShellLinkW) null;
}
public static void AddToRecent(string appid, string apppath, string arguments, string title, string tooltip, string iconpath, int iconindex)
{
if (!TaskbarManager.IsSupportJumpList)
return;
TaskbarManager.IShellLinkW shellLink = TaskbarManager.CreateShellLink(apppath, arguments, title, tooltip, iconpath, iconindex);
if (shellLink == null)
return;
TaskbarManager.SHARDAPPIDINFOLINK pv;
pv.psl = shellLink;
pv.pszAppID = appid;
TaskbarManager.SHAddToRecentDocs(TaskbarManager.SHARD.SHARD_APPIDINFOLINK, ref pv);
}
public static void SetJumpListKnownCategory(string appid, bool frequent)
{
if (!TaskbarManager.IsSupportJumpList)
return;
try
{
TaskbarManager.ICustomDestinationList instance = Activator.CreateInstance(System.Type.GetTypeFromCLSID(new Guid("77F10CF0-3DB5-4966-B520-B7C54FD35ED6"))) as TaskbarManager.ICustomDestinationList;
if (instance == null)
return;
Guid riid = new Guid("92CA9DCD-5622-4BBA-A805-5E9F541BD8C9");
object ppvObject = (object) null;
instance.SetAppID(appid);
uint cMaxSlots;
instance.BeginList(out cMaxSlots, ref riid, out ppvObject);
if (frequent)
instance.AppendKnownCategory(TaskbarManager.KnownDestinationCategory.Frequent);
else
instance.AppendKnownCategory(TaskbarManager.KnownDestinationCategory.Recent);
instance.CommitList();
}
catch (COMException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
catch (NotImplementedException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
}
public static void ClearJumpList(string appid)
{
if (!TaskbarManager.IsSupportJumpList)
return;
try
{
TaskbarManager.IApplicationDestination instance = Activator.CreateInstance(System.Type.GetTypeFromCLSID(new Guid("86C14003-4D6B-4EF3-A7B4-0506663B2E68"))) as TaskbarManager.IApplicationDestination;
if (instance == null)
return;
instance.SetAppID(appid);
instance.RemoveAllDestinations();
}
catch (COMException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
catch (NotImplementedException ex)
{
ProjectData.SetProjectError((Exception) ex);
ProjectData.ClearProjectError();
}
}
public static void SetProgressState(Control control, TaskbarManager.TaskbarProgressBarStatus tbpFlags)
{
if (!TaskbarManager.IsSupportJumpList)
return;
try
{
TaskbarManager.pTaskbarList4.SetProgressState(control.Handle, tbpFlags);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
}
public static void SetProgressValue(Control control, ulong ullCompleted, ulong ullTotal)
{
if (!TaskbarManager.IsSupportJumpList)
return;
TaskbarManager.pTaskbarList4.SetProgressValue(control.Handle, ullCompleted, ullTotal);
}
public static bool IsSupportJumpList
{
get
{
return TaskbarManager.pTaskbarList4 != null;
}
}
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("C43DC798-95D1-4BEA-9030-BB99E2983A1A")]
[ComImport]
private interface ITaskbarList4
{
void HrInit();
void AddTab(IntPtr hwnd);
void DeleteTab(IntPtr hwnd);
void ActivateTab(IntPtr hwnd);
void SetActiveAlt(IntPtr hwnd);
void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen);
void SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal);
void SetProgressState(IntPtr hwnd, TaskbarManager.TaskbarProgressBarStatus tbpFlags);
void RegisterTab(IntPtr hwndTab, IntPtr hwndMDI);
void UnregisterTab(IntPtr hwndTab);
void SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore);
void SetTabActive(IntPtr hwndTab, IntPtr hwndInsertBefore, uint dwReserved);
void ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray)] TaskbarManager.ThumbButton[] pButtons);
void ThumbBarSetImageList(IntPtr hwnd, IntPtr himl);
void ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray)] TaskbarManager.ThumbButton[] pButtons);
void SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription);
void SetThumbnailClip(IntPtr hwnd, IntPtr prcClip);
void SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip);
void SetTabProperties(IntPtr hwndTab, TaskbarManager.SetTabPropertiesOption stpFlags);
}
public enum TaskbarProgressBarStatus
{
NoProgress = 0,
Indeterminate = 1,
Normal = 2,
Error = 4,
Paused = 8,
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct ThumbButton
{
internal const int Clicked = 6144;
[MarshalAs(UnmanagedType.U4)]
internal TaskbarManager.ThumbButtonMask Mask;
internal uint Id;
internal uint Bitmap;
internal IntPtr Icon;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
internal string Tip;
[MarshalAs(UnmanagedType.U4)]
internal TaskbarManager.ThumbButtonOptions Flags;
}
public enum ThumbButtonMask
{
Bitmap = 1,
Icon = 2,
Tooltip = 4,
THB_FLAGS = 8,
}
[Flags]
public enum ThumbButtonOptions
{
Disabled = 1,
DismissOnClick = 2,
Enabled = 0,
Hidden = 8,
NoBackground = 4,
NonInteractive = 16,
}
public enum SetTabPropertiesOption
{
None = 0,
UseAppThumbnailAlways = 1,
UseAppThumbnailWhenActive = 2,
UseAppPeekAlways = 4,
UseAppPeekWhenActive = 8,
}
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("6332DEBF-87B5-4670-90C0-5E57B408A49E")]
[ComImport]
private interface ICustomDestinationList
{
void SetAppID([MarshalAs(UnmanagedType.LPWStr)] string pszAppID);
void BeginList(out uint cMaxSlots, ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out object ppvObject);
void AppendCategory([MarshalAs(UnmanagedType.LPWStr)] string pszCategory, [MarshalAs(UnmanagedType.Interface)] TaskbarManager.IObjectArray poa);
void AppendKnownCategory([MarshalAs(UnmanagedType.I4)] TaskbarManager.KnownDestinationCategory category);
void AddUserTasks([MarshalAs(UnmanagedType.Interface)] TaskbarManager.IObjectArray poa);
void CommitList();
void GetRemovedDestinations(ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out object ppvObject);
void DeleteList([MarshalAs(UnmanagedType.LPWStr)] string pszAppID);
void AbortList();
}
[Guid("92CA9DCD-5622-4BBA-A805-5E9F541BD8C9")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport]
private interface IObjectArray
{
void GetCount(out uint cObjects);
void GetAt(uint iIndex, ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out object ppvObject);
}
public enum KnownDestinationCategory
{
Frequent = 1,
Recent = 2,
}
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("000214F9-0000-0000-C000-000000000046")]
[ComImport]
private interface IShellLinkW
{
void GetPath([MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder pszFile, int cchMaxPath, IntPtr pfd, uint fFlags);
void GetIDList(out IntPtr ppidl);
void SetIDList(IntPtr pidl);
void GetDescription([MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder pszFile, int cchMaxName);
void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
void GetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder pszDir, int cchMaxPath);
void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
void GetArguments([MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder pszArgs, int cchMaxPath);
void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
void GetHotKey(out short wHotKey);
void SetHotKey(short wHotKey);
void GetShowCmd(out uint iShowCmd);
void SetShowCmd(uint iShowCmd);
void GetIconLocation([MarshalAs(UnmanagedType.LPWStr)] out StringBuilder pszIconPath, int cchIconPath, out int iIcon);
void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, uint dwReserved);
void Resolve(IntPtr hwnd, uint fFlags);
void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
}
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("886D8EEB-8CF2-4446-8D02-CDBA1DBDCF99")]
[ComImport]
private interface IPropertyStore
{
void GetCount(out uint propertyCount);
void GetAt([In] uint propertyIndex, out TaskbarManager.PropertyKey key);
void GetValue([In] ref TaskbarManager.PropertyKey key, out TaskbarManager.PropVariant pv);
void SetValue([In] ref TaskbarManager.PropertyKey key, [In] ref TaskbarManager.PropVariant pv);
void Commit();
}
private struct PropertyKey
{
public Guid fmtid;
public int pid;
}
[StructLayout(LayoutKind.Explicit)]
private struct PropVariant
{
[FieldOffset(0)]
public VarEnum _valueType;
[FieldOffset(8)]
public IntPtr _ptr;
[FieldOffset(8)]
public sbyte _sbyte;
[FieldOffset(8)]
public short _short;
[FieldOffset(8)]
public int _int32;
[FieldOffset(8)]
public long _long;
[FieldOffset(8)]
public byte _byte;
[FieldOffset(8)]
public ushort _ushort;
[FieldOffset(8)]
public uint _uint32;
[FieldOffset(8)]
public ulong _ulong;
[FieldOffset(8)]
public double _double;
[FieldOffset(8)]
public float _float;
}
private struct SHARDAPPIDINFOLINK
{
public TaskbarManager.IShellLinkW psl;
[MarshalAs(UnmanagedType.LPWStr)]
public string pszAppID;
}
private enum SHARD
{
SHARD_PIDL = 1,
SHARD_PATHA = 2,
SHARD_PATHW = 3,
SHARD_APPIDINFO = 4,
SHARD_APPIDINFOIDLIST = 5,
SHARD_LINK = 6,
SHARD_APPIDINFOLINK = 7,
SHARD_SHELLITEM = 8,
}
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("12337D35-94C6-48A0-BCE7-6A9C69D4D600")]
[ComImport]
private interface IApplicationDestination
{
void SetAppID([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
void RemoveDestination(object punk);
void RemoveAllDestinations();
}
}
}

1884
CarotDAV/UpDownForm.cs Normal file

File diff suppressed because it is too large Load Diff

120
CarotDAV/UpDownForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,202 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.WallMarkListView
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace CarotDAV
{
public class WallMarkListView : ListView
{
private const int LVM_FIRST = 4096;
private const int LVM_SETBKIMAGE = 4234;
private const int LVM_GETBKCOLOR = 4096;
private const int LVM_SETTILEINFO = 4260;
private const int LVIS_CUT = 4;
private const int LVIS_DROPHILITED = 8;
private const int LVIS_GLOW = 16;
private const int LVIS_ACTIVATING = 32;
private const int LVIS_OVERLAYMASK = 3840;
private const int LVM_SETIMAGELIST = 4099;
private const int LVM_SETITEMSTATE = 4139;
public WallMarkListView()
{
int num = (int) Application.OleRequired();
this.DoubleBuffered = true;
}
protected override void CreateHandle()
{
base.CreateHandle();
if (this.BackgroundImage == null)
return;
this.SetBackgroundImage();
}
protected override void OnBackgroundImageChanged(EventArgs e)
{
this.SetBackgroundImage();
}
protected override void OnEnabledChanged(EventArgs e)
{
base.OnEnabledChanged(e);
this.SetBackgroundImage();
}
public void SetBackgroundImage()
{
int num = (int) Application.OleRequired();
WallMarkListView.LVBKIMAGE lParam = new WallMarkListView.LVBKIMAGE();
lParam.ulFlags = WallMarkListView.LVBKIF.LVBKIF_SOURCE_NONE;
WallMarkListView.SendMessage(this.Handle, 4234, IntPtr.Zero, lParam);
if (this.BackgroundImage == null)
{
lParam.ulFlags = WallMarkListView.LVBKIF.LVBKIF_SOURCE_NONE;
lParam.hBmp = IntPtr.Zero;
WallMarkListView.SendMessage(this.Handle, 4234, IntPtr.Zero, lParam);
}
else
{
lParam.ulFlags = WallMarkListView.LVBKIF.LVBKIF_TYPE_WATERMARK;
using (Bitmap bitmap = new Bitmap(this.BackgroundImage.Width, this.BackgroundImage.Height, PixelFormat.Format32bppArgb))
{
Color color = !this.Enabled ? SystemColors.Control : this.BackColor;
using (Graphics graphics = Graphics.FromImage((Image) bitmap))
{
graphics.Clear(color);
graphics.DrawImage(this.BackgroundImage, 0, 0);
}
lParam.hBmp = bitmap.GetHbitmap();
}
WallMarkListView.SendMessage(this.Handle, 4234, IntPtr.Zero, lParam);
}
this.Invalidate();
}
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, WallMarkListView.LVBKIMAGE lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, WallMarkListView.LVTILEINFO lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, WallMarkListView.LVITEM lParam);
[DllImport("comctl32.dll")]
private static extern int ImageList_SetOverlayImage(IntPtr himl, int iImage, int iOverlay);
public void SetTileVisibleColumn(int itemindex, int[] columns)
{
if (columns == null)
columns = new int[0];
WallMarkListView.LVTILEINFO lParam = new WallMarkListView.LVTILEINFO();
lParam.cbSize = checked ((uint) Marshal.SizeOf((object) lParam));
lParam.iItem = itemindex;
lParam.cColumns = checked ((uint) columns.Length);
lParam.puColumns = Marshal.AllocHGlobal(checked (columns.Length * 4));
int num1 = 0;
int num2 = checked (columns.Length - 1);
int index = num1;
while (index <= num2)
{
Marshal.WriteInt32(lParam.puColumns, checked (index * 4), columns[index]);
checked { ++index; }
}
WallMarkListView.SendMessage(this.Handle, 4260, IntPtr.Zero, lParam);
Marshal.FreeHGlobal(lParam.puColumns);
}
public static void SetOverlayIcon(ImageList imagelist, int index, int overlayindex)
{
WallMarkListView.ImageList_SetOverlayImage(imagelist.Handle, index, overlayindex);
}
public static void ListViewOverlay(ListViewItem listitem, uint overlayIndex)
{
if ((long) overlayIndex > 15L)
throw new ArgumentOutOfRangeException(nameof (overlayIndex));
WallMarkListView.SendMessage(listitem.ListView.Handle, 4139, new IntPtr(listitem.Index), new WallMarkListView.LVITEM()
{
stateMask = 3840,
state = checked ((int) (((long) overlayIndex & 15L) << 8))
});
}
public static void ListViewItemSetStateCut(ListViewItem listitem, bool value)
{
WallMarkListView.SendMessage(listitem.ListView.Handle, 4139, new IntPtr(listitem.Index), new WallMarkListView.LVITEM()
{
stateMask = 4,
state = !value ? 0 : 4
});
}
public static void ListViewItemSetStateDropHilited(ListViewItem listitem, bool value)
{
WallMarkListView.SendMessage(listitem.ListView.Handle, 4139, new IntPtr(listitem.Index), new WallMarkListView.LVITEM()
{
stateMask = 8,
state = !value ? 0 : 8
});
}
[Flags]
private enum LVBKIF
{
LVBKIF_SOURCE_NONE = 0,
LVBKIF_SOURCE_HBITMAP = 1,
LVBKIF_SOURCE_URL = 2,
LVBKIF_SOURCE_MASK = LVBKIF_SOURCE_URL | LVBKIF_SOURCE_HBITMAP,
LVBKIF_STYLE_NORMAL = 0,
LVBKIF_STYLE_TIKE = 16,
LVBKIF_STYLE_MASK = LVBKIF_STYLE_TIKE,
LVBKIF_TYPE_WATERMARK = 268435456,
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
private class LVBKIMAGE
{
public WallMarkListView.LVBKIF ulFlags;
public IntPtr hBmp;
public string pszImage;
public uint cchImageMax;
public int xOffset;
public int yOffset;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
private class LVTILEINFO
{
public uint cbSize;
public int iItem;
public uint cColumns;
public IntPtr puColumns;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public class LVITEM
{
public int mask;
public int iItem;
public int iSubItem;
public int state;
public int stateMask;
public string pszText;
public int cchTextMax;
public int iImage;
public IntPtr lParam;
public int iIndent;
public int iGroupId;
public int cColumns;
public IntPtr puColumns;
}
}
}

View File

@ -0,0 +1,90 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.WebDAVClientSetting
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Rei.Fs;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
namespace CarotDAV
{
[XmlRoot]
[Serializable]
public class WebDAVClientSetting
{
private List<ConnectionSettingBase> pConnectionSettingList;
[XmlIgnore]
public string MasterPassword;
public Size FormSize;
public Size ConnectionSettingListFormSize;
public View View;
public bool ShowLogWindow;
public bool ShowStatusBar;
public int[] ColumnIndexs;
public int[] ColumnWidth;
public bool AutoColumnWidth;
public WebDAVClientSetting.GroupType Group;
public string SortString;
public bool VersionCheckEnabled;
public bool EnableFileLogging;
public string BackgroundImagePath;
public string LastConnectionSetting;
public int MaxFaviconSize;
public string ServerIP;
public int ServerPort;
public bool AutoEnableDAVServer;
public string AutoMoundDriveLetter;
public bool AutoMoundWebFolder;
[XmlAnyElement]
public XmlElement[] OtherElements;
[XmlIgnore]
public List<XmlElement> UnsupportedConections;
[XmlAnyElement("EncryptedData")]
public XmlElement[] EncryptedElements;
public WebDAVClientSetting()
{
this.ColumnIndexs = new int[0];
this.ColumnWidth = new int[0];
this.pConnectionSettingList = new List<ConnectionSettingBase>();
this.ShowLogWindow = false;
this.ShowStatusBar = false;
this.SortString = "";
this.EnableFileLogging = false;
this.BackgroundImagePath = "";
this.View = View.Details;
this.AutoColumnWidth = true;
this.Group = WebDAVClientSetting.GroupType.None;
this.LastConnectionSetting = "";
this.MaxFaviconSize = 1048576;
this.VersionCheckEnabled = true;
this.ServerIP = "127.0.0.1";
this.ServerPort = 12346;
this.AutoEnableDAVServer = false;
this.AutoMoundDriveLetter = "";
this.AutoMoundWebFolder = false;
}
public List<ConnectionSettingBase> ConnectionSettings
{
get
{
return this.pConnectionSettingList;
}
}
public enum GroupType
{
None,
Name,
Type,
Size,
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,365 @@
// Decompiled with JetBrains decompiler
// Type: CarotDAV.XmlSettingManager
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.exe
using Microsoft.VisualBasic.CompilerServices;
using Rei.Fs;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Security.Cryptography;
using System.Security.Cryptography.Xml;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
namespace CarotDAV
{
public class XmlSettingManager
{
private static string pSettingFolder = (string) null;
private const string FormatName = "CarotDAV Encryption 1.0 ";
private const string SettingFileName = "Setting.xml";
private const string FaviconFolderName = "Favicon";
private static bool pIsPortable;
private static XmlAttributeOverrides attroverrides;
static XmlSettingManager()
{
Assembly entryAssembly = Assembly.GetEntryAssembly();
string directoryName = Path.GetDirectoryName(entryAssembly.Location);
XmlSettingManager.pIsPortable = !File.Exists(Path.Combine(directoryName, "Installed.txt"));
if (XmlSettingManager.pIsPortable)
{
XmlSettingManager.pSettingFolder = directoryName;
}
else
{
string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string str1 = "Rei Software";
string str2 = "CarotDAV";
object[] customAttributes = entryAssembly.GetCustomAttributes(typeof (AssemblyCompanyAttribute), false);
if (customAttributes != null && customAttributes.Length > 0)
str1 = ((AssemblyCompanyAttribute) customAttributes[0]).Company;
XmlSettingManager.pSettingFolder = string.Join(Conversions.ToString(Path.DirectorySeparatorChar), new string[3]
{
folderPath,
str1,
str2
});
}
}
public static bool IsPortable
{
get
{
return XmlSettingManager.pIsPortable;
}
}
public static string SettingFolder
{
get
{
return XmlSettingManager.pSettingFolder;
}
}
public static string FaviconFolder
{
get
{
return Path.Combine(XmlSettingManager.SettingFolder, "Favicon");
}
}
private static SymmetricAlgorithm CreateCrypto(string password)
{
Rijndael rijndael = Rijndael.Create();
rijndael.Mode = CipherMode.CBC;
rijndael.Padding = PaddingMode.None;
rijndael.BlockSize = 128;
rijndael.KeySize = 256;
byte[] bytes = Encoding.UTF8.GetBytes("CarotDAV Encryption 1.0 ");
Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(password, bytes, 1024);
rijndael.Key = rfc2898DeriveBytes.GetBytes(checked ((int) Math.Round(unchecked ((double) rijndael.KeySize / 8.0))));
rijndael.IV = rfc2898DeriveBytes.GetBytes(checked ((int) Math.Round(unchecked ((double) rijndael.BlockSize / 8.0))));
return (SymmetricAlgorithm) rijndael;
}
private static XmlAttributeOverrides GetSerializerAttributes()
{
if (XmlSettingManager.attroverrides == null)
{
XmlAttributes attributes = new XmlAttributes();
int num1 = 0;
int num2 = checked (FsManager.FsTypes.Length - 1);
int index = num1;
while (index <= num2)
{
attributes.XmlArrayItems.Add(new XmlArrayItemAttribute()
{
Type = FsManager.FsTypes[index]
});
checked { ++index; }
}
XmlSettingManager.attroverrides = new XmlAttributeOverrides();
XmlSettingManager.attroverrides.Add(typeof (WebDAVClientSetting), "ConnectionSettings", attributes);
}
return XmlSettingManager.attroverrides;
}
public static void SaveSetting(WebDAVClientSetting setting)
{
XmlSerializer xmls = new XmlSerializer(typeof (WebDAVClientSetting), XmlSettingManager.GetSerializerAttributes());
string settingFolder = XmlSettingManager.SettingFolder;
if (!Directory.Exists(settingFolder))
Directory.CreateDirectory(settingFolder);
XmlSettingManager.InnerSaveSetting(Path.Combine(settingFolder, "Setting.xml"), xmls, setting);
}
private static void InnerSaveSetting(string filepath, XmlSerializer xmls, WebDAVClientSetting setting)
{
byte[] array;
using (MemoryStream memoryStream = new MemoryStream())
{
using (StreamWriter streamWriter = new StreamWriter((Stream) memoryStream))
xmls.Serialize((TextWriter) streamWriter, (object) setting);
array = memoryStream.ToArray();
}
XmlDocument document = new XmlDocument();
using (MemoryStream memoryStream = new MemoryStream(array))
document.Load((Stream) memoryStream);
IEnumerator enumerator1;
try
{
enumerator1 = document.GetElementsByTagName("ConnectionSettings").GetEnumerator();
if (enumerator1.MoveNext())
{
XmlNode current = (XmlNode) enumerator1.Current;
int num1 = 0;
int num2 = checked (setting.UnsupportedConections.Count - 1);
int index = num1;
while (index <= num2)
{
current.AppendChild(document.ImportNode((XmlNode) setting.UnsupportedConections[index], true));
checked { ++index; }
}
}
}
finally
{
if (enumerator1 is IDisposable)
(enumerator1 as IDisposable).Dispose();
}
if (!string.IsNullOrEmpty(setting.MasterPassword))
{
List<XmlElement> xmlElementList = new List<XmlElement>();
try
{
foreach (XmlNode xmlNode in document.GetElementsByTagName("ConnectionSettings"))
xmlElementList.Add((XmlElement) xmlNode);
}
finally
{
IEnumerator enumerator2;
if (enumerator2 is IDisposable)
(enumerator2 as IDisposable).Dispose();
}
try
{
foreach (XmlNode xmlNode in document.GetElementsByTagName("LastConnectionSetting"))
xmlElementList.Add((XmlElement) xmlNode);
}
finally
{
IEnumerator enumerator2;
if (enumerator2 is IDisposable)
(enumerator2 as IDisposable).Dispose();
}
SymmetricAlgorithm crypto = XmlSettingManager.CreateCrypto(setting.MasterPassword);
int num1 = 0;
int num2 = checked (xmlElementList.Count - 1);
int index = num1;
while (index <= num2)
{
EncryptedXml encryptedXml = new EncryptedXml(document);
EncryptedData encryptedData = new EncryptedData();
encryptedData.Type = "http://www.w3.org/2001/04/xmlenc#Element";
encryptedData.EncryptionMethod = new EncryptionMethod("http://www.w3.org/2001/04/xmlenc#aes256-cbc");
encryptedData.CipherData.CipherValue = encryptedXml.EncryptData(xmlElementList[index], crypto, false);
EncryptedXml.ReplaceElement(xmlElementList[index], encryptedData, false);
checked { ++index; }
}
}
using (MemoryStream memoryStream = new MemoryStream())
{
document.Save((Stream) memoryStream);
array = memoryStream.ToArray();
}
using (FileStream fileStream = new FileStream(filepath, FileMode.Create, FileAccess.Write))
fileStream.Write(array, 0, array.Length);
}
public static WebDAVClientSetting LoadSetting(string masterpassword)
{
XmlAttributeOverrides attributeOverrides = new XmlAttributeOverrides();
XmlSerializer xmls = new XmlSerializer(typeof (WebDAVClientSetting), XmlSettingManager.GetSerializerAttributes());
XmlSettingManager.UnknownElementManager unknownElementManager = new XmlSettingManager.UnknownElementManager();
xmls.UnknownElement += new XmlElementEventHandler(unknownElementManager.OnUnknownElement);
string settingFolder = XmlSettingManager.SettingFolder;
if (!Directory.Exists(settingFolder))
Directory.CreateDirectory(settingFolder);
WebDAVClientSetting davClientSetting = XmlSettingManager.InnerLoadSetting(Path.Combine(settingFolder, "Setting.xml"), xmls, masterpassword) ?? new WebDAVClientSetting();
int index = 0;
while (index < checked (davClientSetting.ConnectionSettings.Count - 1))
{
if ((object) davClientSetting.ConnectionSettings[index].TargetUri == null)
davClientSetting.ConnectionSettings.RemoveAt(index);
else
checked { ++index; }
}
davClientSetting.UnsupportedConections = unknownElementManager.UnsupportedConections;
return davClientSetting;
}
private static WebDAVClientSetting InnerLoadSetting(string filepath, XmlSerializer xmls, string masterpassword)
{
WebDAVClientSetting davClientSetting = (WebDAVClientSetting) null;
if (!File.Exists(filepath))
return (WebDAVClientSetting) null;
XmlDocument document = new XmlDocument();
document.Load(filepath);
XmlNodeList elementsByTagName = document.GetElementsByTagName("EncryptedData");
if (elementsByTagName.Count > 0)
{
if (string.IsNullOrEmpty(masterpassword))
throw new MasterPasswordException(false);
SymmetricAlgorithm crypto = XmlSettingManager.CreateCrypto(masterpassword);
try
{
int num1 = 0;
int num2 = checked (elementsByTagName.Count - 1);
int num3 = num1;
while (num3 <= num2)
{
EncryptedData encryptedData = new EncryptedData();
EncryptedXml encryptedXml = new EncryptedXml(document);
encryptedData.LoadXml((XmlElement) elementsByTagName[0]);
encryptedXml.ReplaceData((XmlElement) elementsByTagName[0], encryptedXml.DecryptData(encryptedData, crypto));
checked { ++num3; }
}
}
catch (CryptographicException ex)
{
ProjectData.SetProjectError((Exception) ex);
throw new MasterPasswordException(true);
}
}
byte[] array;
using (MemoryStream memoryStream = new MemoryStream())
{
document.Save((Stream) memoryStream);
array = memoryStream.ToArray();
}
using (MemoryStream memoryStream = new MemoryStream(array))
davClientSetting = (WebDAVClientSetting) xmls.Deserialize((Stream) memoryStream);
davClientSetting.MasterPassword = masterpassword;
return davClientSetting;
}
public static void ExportSetting(ConnectionSettingBase connectionsetting, string filename)
{
using (MemoryStream memoryStream = new MemoryStream())
{
using (StreamWriter streamWriter = new StreamWriter((Stream) memoryStream))
new XmlSerializer(connectionsetting.GetType()).Serialize((TextWriter) streamWriter, (object) connectionsetting);
using (FileStream fileStream = new FileStream(filename, FileMode.Create, FileAccess.Write))
{
byte[] array = memoryStream.ToArray();
fileStream.Write(array, 0, array.Length);
}
}
}
public static ConnectionSettingBase ImportSetting(string filename)
{
ConnectionSettingBase connectionSettingBase1;
ConnectionSettingBase connectionSettingBase2;
try
{
using (TextReader textReader = (TextReader) new StreamReader(filename))
connectionSettingBase1 = (ConnectionSettingBase) new XmlSerializer(typeof (ConnectionSettingBase), FsManager.FsTypes).Deserialize(textReader);
connectionSettingBase2 = connectionSettingBase1;
}
catch (Exception ex1)
{
ProjectData.SetProjectError(ex1);
int num1 = 0;
int num2 = checked (FsManager.FsTypes.Length - 1);
int index = num1;
while (index <= num2)
{
try
{
using (TextReader textReader = (TextReader) new StreamReader(filename))
connectionSettingBase1 = (ConnectionSettingBase) new XmlSerializer(FsManager.FsTypes[index]).Deserialize(textReader);
connectionSettingBase2 = connectionSettingBase1;
ProjectData.ClearProjectError();
goto label_17;
}
catch (Exception ex2)
{
ProjectData.SetProjectError(ex2);
ProjectData.ClearProjectError();
}
checked { ++index; }
}
throw;
}
label_17:
return connectionSettingBase2;
}
public static ConnectionSettingBase CopyConnectionSetting(ConnectionSettingBase cs)
{
XmlSerializer xmlSerializer = new XmlSerializer(typeof (ConnectionSettingBase), FsManager.FsTypes);
StringBuilder sb = new StringBuilder();
using (StringWriter stringWriter = new StringWriter(sb))
xmlSerializer.Serialize((TextWriter) stringWriter, (object) cs);
using (StringReader stringReader = new StringReader(sb.ToString()))
return (ConnectionSettingBase) xmlSerializer.Deserialize((TextReader) stringReader);
}
public static string XmlSerializeConnectionSetting(ConnectionSettingBase cs)
{
XmlSerializer xmlSerializer = new XmlSerializer(typeof (ConnectionSettingBase), FsManager.FsTypes);
StringBuilder sb = new StringBuilder();
using (StringWriter stringWriter = new StringWriter(sb))
xmlSerializer.Serialize((TextWriter) stringWriter, (object) cs);
return sb.ToString();
}
private class UnknownElementManager
{
public List<XmlElement> UnsupportedConections;
public UnknownElementManager()
{
this.UnsupportedConections = new List<XmlElement>();
}
public void OnUnknownElement(object sender, XmlElementEventArgs e)
{
if (!e.ExpectedElements.Contains("ConnectionSetting"))
return;
this.UnsupportedConections.Add(e.Element);
}
}
}
}

BIN
CarotDAV/lib/Rei.Com.dll Normal file

Binary file not shown.

Binary file not shown.

BIN
CarotDAV/lib/Rei.Fs.dll Normal file

Binary file not shown.

Binary file not shown.

12
Rei.Com/AssemblyInfo.cs Normal file
View File

@ -0,0 +1,12 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
[assembly: AssemblyCopyright("Copyright (C) Rei HOBARA 2007-2016")]
[assembly: AssemblyProduct("Rei.COM")]
[assembly: AssemblyTrademark("")]
[assembly: Guid("792a1fdb-d92e-4b82-bff2-32b999c79d5c")]
[assembly: AssemblyCompany("Rei Software")]
[assembly: AssemblyDescription("COM Support Library")]
[assembly: AssemblyTitle("Rei.COM")]
[assembly: AssemblyVersion("1.13.2.9255")]

View File

@ -0,0 +1,102 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.ComStreamAdapterStream
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Rei.Com
{
public class ComStreamAdapterStream : Stream
{
private IStream pStream;
private System.Runtime.InteropServices.ComTypes.STATSTG pStat;
public ComStreamAdapterStream(IStream istream)
{
this.pStream = istream;
this.pStat = new System.Runtime.InteropServices.ComTypes.STATSTG();
this.pStream.Stat(out this.pStat, 0);
}
public override bool CanRead
{
get
{
return true;
}
}
public override bool CanSeek
{
get
{
return true;
}
}
public override bool CanWrite
{
get
{
return true;
}
}
public override void Flush()
{
throw new NotImplementedException();
}
public override long Length
{
get
{
return this.pStat.cbSize;
}
}
public override long Position
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public override int Read(byte[] buffer, int offset, int count)
{
IntPtr num = Marshal.AllocHGlobal(4);
byte[] pv = new byte[checked (count - 1 + 1)];
this.pStream.Read(pv, count, num);
int length = Marshal.ReadInt32(num, 0);
Array.Copy((Array) pv, 0, (Array) buffer, offset, length);
return length;
}
public override long Seek(long offset, SeekOrigin origin)
{
IntPtr num = Marshal.AllocHGlobal(4);
this.pStream.Seek(offset, (int) origin, num);
return Marshal.ReadInt64(num, 0);
}
public override void SetLength(long value)
{
this.pStream.SetSize(value);
}
public override void Write(byte[] buffer, int offset, int count)
{
this.pStream.Write(buffer, count, IntPtr.Zero);
}
}
}

1054
Rei.Com/DataObject.cs Normal file

File diff suppressed because it is too large Load Diff

283
Rei.Com/DataObjectHelper.cs Normal file
View File

@ -0,0 +1,283 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.DataObjectHelper
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Windows.Forms;
namespace Rei.Com
{
public class DataObjectHelper
{
public static VirtualFileInfo[] GetVirtualFileInfo(System.Windows.Forms.IDataObject dobj)
{
IntPtr zero = IntPtr.Zero;
List<VirtualFileInfo> virtualFileInfoList = new List<VirtualFileInfo>();
using (MemoryStream data = (MemoryStream) dobj.GetData("FileGroupDescriptorW"))
{
if (data == null)
return new VirtualFileInfo[0];
byte[] numArray1 = new byte[checked ((int) (data.Length - 1L) + 1)];
data.Read(numArray1, 0, numArray1.Length);
int int32 = BitConverter.ToInt32(numArray1, 0);
IntPtr num1 = Marshal.AllocHGlobal(numArray1.Length);
try
{
Marshal.Copy(numArray1, 0, num1, numArray1.Length);
IntPtr ptr = new IntPtr(checked (num1.ToInt64() + (long) Marshal.SizeOf((object) int32)));
int num2 = 0;
int num3 = checked (int32 - 1);
int num4 = num2;
while (num4 <= num3)
{
object structure = Marshal.PtrToStructure(ptr, typeof (FileDescriptor));
FileDescriptor fileDescriptor1;
FileDescriptor fileDescriptor2 = structure != null ? (FileDescriptor) structure : fileDescriptor1;
VirtualFileInfo virtualFileInfo = new VirtualFileInfo();
virtualFileInfo.FileName = fileDescriptor2.cFileName;
virtualFileInfo.Flags = fileDescriptor2.dwFlags;
if ((fileDescriptor2.dwFlags & FDFlags.FD_CLSID) == (FDFlags) 0)
;
if ((fileDescriptor2.dwFlags & FDFlags.FD_SIZEPOINT) == (FDFlags) 0)
;
if ((fileDescriptor2.dwFlags & FDFlags.FD_ATTRIBUTES) != (FDFlags) 0)
virtualFileInfo.FileAttributes = fileDescriptor2.dwFileAttributes;
if ((fileDescriptor2.dwFlags & FDFlags.FD_CREATETIME) != (FDFlags) 0)
virtualFileInfo.CreationTime = DateTime.FromFileTime(fileDescriptor2.ftCreationTime);
if ((fileDescriptor2.dwFlags & FDFlags.FD_ACCESSTIME) != (FDFlags) 0)
virtualFileInfo.LastAccessTime = DateTime.FromFileTime(fileDescriptor2.ftLastAccessTime);
if ((fileDescriptor2.dwFlags & FDFlags.FD_WRITESTIME) != (FDFlags) 0)
virtualFileInfo.LastWriteTime = DateTime.FromFileTime(fileDescriptor2.ftLastWriteTime);
if ((fileDescriptor2.dwFlags & FDFlags.FD_FILESIZE) != (FDFlags) 0)
virtualFileInfo.FileSize = fileDescriptor2.FileSize;
FORMATETC format = new FORMATETC();
format.cfFormat = BitConverter.ToInt16(BitConverter.GetBytes(DataFormats.GetFormat("FileContents").Id), 0);
format.dwAspect = DVASPECT.DVASPECT_CONTENT;
format.lindex = num4;
format.ptd = IntPtr.Zero;
format.tymed = TYMED.TYMED_HGLOBAL | TYMED.TYMED_ISTREAM;
STGMEDIUM medium = new STGMEDIUM();
try
{
((System.Runtime.InteropServices.ComTypes.IDataObject) dobj).GetData(ref format, out medium);
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
virtualFileInfo.FileAttributes = virtualFileInfo.FileAttributes | FileAttributes.System;
ProjectData.ClearProjectError();
}
if (medium.tymed == TYMED.TYMED_HGLOBAL)
{
IntPtr unionmember = medium.unionmember;
if (unionmember == IntPtr.Zero)
return (VirtualFileInfo[]) null;
int length = DataObject.GlobalSize(unionmember);
byte[] numArray2 = new byte[checked (length - 1 + 1)];
Marshal.Copy(unionmember, numArray2, 0, length);
virtualFileInfo.ManageStream = (Stream) new MemoryStream(numArray2);
}
else
{
if (medium.tymed == TYMED.TYMED_ISTORAGE)
throw new Exception("doesn't support IStorage");
if (medium.tymed == TYMED.TYMED_ISTREAM)
{
System.Runtime.InteropServices.ComTypes.IStream objectForIunknown = (System.Runtime.InteropServices.ComTypes.IStream) Marshal.GetObjectForIUnknown(medium.unionmember);
Marshal.Release(medium.unionmember);
virtualFileInfo.ManageStream = (Stream) new ComStreamAdapterStream(objectForIunknown);
}
}
if (virtualFileInfo.ManageStream == null)
virtualFileInfo.ManageStream = (Stream) new MemoryStream();
virtualFileInfoList.Add(virtualFileInfo);
ptr = new IntPtr(checked (ptr.ToInt64() + (long) Marshal.SizeOf((object) fileDescriptor2)));
checked { ++num4; }
}
}
finally
{
Marshal.FreeHGlobal(num1);
}
}
return virtualFileInfoList.ToArray();
}
public static DragDropEffects GetPreferredDragEffect(System.Windows.Forms.IDataObject dataobject)
{
DragDropEffects dragDropEffects = DragDropEffects.None;
if (dataobject.GetDataPresent(ShellClipboardFormats.PreferredDropEffect))
{
MemoryStream data = dataobject.GetData(ShellClipboardFormats.PreferredDropEffect) as MemoryStream;
try
{
if (data != null)
{
byte[] buffer = new byte[4];
data.Read(buffer, 0, 4);
data.Dispose();
dragDropEffects = (DragDropEffects) BitConverter.ToInt32(buffer, 0);
}
}
finally
{
if (data != null)
data.Dispose();
}
}
return dragDropEffects;
}
public static Uri GetUniformResourceLocator(System.Windows.Forms.IDataObject dataobject)
{
Uri result = (Uri) null;
string uriString;
if (dataobject.GetDataPresent(ShellClipboardFormats.UniformResourceLocatorW))
{
MemoryStream data = dataobject.GetData(ShellClipboardFormats.UniformResourceLocatorW) as MemoryStream;
if (data != null)
{
using (StreamReader streamReader = new StreamReader((Stream) data, Encoding.Unicode))
uriString = streamReader.ReadToEnd();
int length = uriString.IndexOf(char.MinValue);
if (length >= 0)
uriString = uriString.Substring(0, length);
if (Uri.TryCreate(uriString, UriKind.Absolute, out result))
return result;
}
}
if (dataobject.GetDataPresent(ShellClipboardFormats.UniformResourceLocator))
{
MemoryStream data = dataobject.GetData(ShellClipboardFormats.UniformResourceLocator) as MemoryStream;
if (data != null)
{
using (StreamReader streamReader = new StreamReader((Stream) data, Encoding.Default))
uriString = streamReader.ReadToEnd();
int length = uriString.IndexOf(char.MinValue);
if (length >= 0)
uriString = uriString.Substring(0, length);
if (Uri.TryCreate(uriString, UriKind.Absolute, out result))
return result;
}
}
return (Uri) null;
}
public static void SetPerformedDragEffect(System.Windows.Forms.IDataObject dataobject, DragDropEffects effect)
{
System.Runtime.InteropServices.ComTypes.IDataObject dataObject = dataobject as System.Runtime.InteropServices.ComTypes.IDataObject;
if (dataObject == null)
return;
FORMATETC formatIn;
formatIn.cfFormat = DataObject.MakecfFormat(ShellClipboardFormats.PerformedDropEffect);
formatIn.dwAspect = DVASPECT.DVASPECT_CONTENT;
formatIn.lindex = -1;
formatIn.ptd = new IntPtr();
formatIn.tymed = TYMED.TYMED_HGLOBAL;
STGMEDIUM medium;
medium.tymed = TYMED.TYMED_HGLOBAL;
medium.pUnkForRelease = (object) null;
medium.unionmember = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(medium.unionmember, 0, (int) effect);
dataObject.SetData(ref formatIn, ref medium, true);
}
public static void SetLogicalPerformedDragEffect(System.Windows.Forms.IDataObject dataobject, DragDropEffects effect)
{
System.Runtime.InteropServices.ComTypes.IDataObject dataObject = dataobject as System.Runtime.InteropServices.ComTypes.IDataObject;
if (dataObject == null)
return;
FORMATETC formatIn;
formatIn.cfFormat = DataObject.MakecfFormat(ShellClipboardFormats.LogicalPerformedDropEffect);
formatIn.dwAspect = DVASPECT.DVASPECT_CONTENT;
formatIn.lindex = -1;
formatIn.ptd = new IntPtr();
formatIn.tymed = TYMED.TYMED_HGLOBAL;
STGMEDIUM medium;
medium.tymed = TYMED.TYMED_HGLOBAL;
medium.pUnkForRelease = (object) null;
medium.unionmember = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(medium.unionmember, 0, (int) effect);
dataObject.SetData(ref formatIn, ref medium, true);
}
public static void SetPasteSucceeded(System.Windows.Forms.IDataObject dataobject, DragDropEffects effect)
{
System.Runtime.InteropServices.ComTypes.IDataObject dataObject = dataobject as System.Runtime.InteropServices.ComTypes.IDataObject;
if (dataObject == null)
return;
FORMATETC formatIn;
formatIn.cfFormat = DataObject.MakecfFormat(ShellClipboardFormats.PasteSucceeded);
formatIn.dwAspect = DVASPECT.DVASPECT_CONTENT;
formatIn.lindex = -1;
formatIn.ptd = new IntPtr();
formatIn.tymed = TYMED.TYMED_HGLOBAL;
STGMEDIUM medium;
medium.tymed = TYMED.TYMED_HGLOBAL;
medium.pUnkForRelease = (object) null;
medium.unionmember = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(medium.unionmember, 0, (int) effect);
dataObject.SetData(ref formatIn, ref medium, true);
}
public static bool CanAsync(System.Windows.Forms.IDataObject dobj)
{
object objectValue1 = RuntimeHelpers.GetObjectValue(typeof (System.Windows.Forms.DataObject).GetField("innerData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue((object) dobj));
IAsyncOperation objectValue2 = RuntimeHelpers.GetObjectValue(objectValue1.GetType().GetField("innerData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(RuntimeHelpers.GetObjectValue(objectValue1))) as IAsyncOperation;
if (objectValue2 == null)
return false;
bool pfIsOpAsync;
objectValue2.GetAsyncMode(out pfIsOpAsync);
return pfIsOpAsync;
}
public static void SetAsyncMode(System.Windows.Forms.IDataObject dobj, bool r)
{
object objectValue1 = RuntimeHelpers.GetObjectValue(typeof (System.Windows.Forms.DataObject).GetField("innerData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue((object) dobj));
IAsyncOperation objectValue2 = RuntimeHelpers.GetObjectValue(objectValue1.GetType().GetField("innerData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(RuntimeHelpers.GetObjectValue(objectValue1))) as IAsyncOperation;
if (objectValue2 == null)
return;
objectValue2.SetAsyncMode(r);
}
public static bool StartAsyncOperation(System.Windows.Forms.IDataObject dobj)
{
object objectValue1 = RuntimeHelpers.GetObjectValue(typeof (System.Windows.Forms.DataObject).GetField("innerData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue((object) dobj));
IAsyncOperation objectValue2 = RuntimeHelpers.GetObjectValue(objectValue1.GetType().GetField("innerData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(RuntimeHelpers.GetObjectValue(objectValue1))) as IAsyncOperation;
if (objectValue2 != null)
{
bool pfIsOpAsync = false;
objectValue2.GetAsyncMode(out pfIsOpAsync);
if (pfIsOpAsync)
{
objectValue2.StartOperation(IntPtr.Zero);
return true;
}
}
return false;
}
public static void EndAsyncOperation(System.Windows.Forms.IDataObject dobj, DragDropEffects dwEffect)
{
object objectValue1 = RuntimeHelpers.GetObjectValue(typeof (System.Windows.Forms.DataObject).GetField("innerData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue((object) dobj));
IAsyncOperation objectValue2 = RuntimeHelpers.GetObjectValue(objectValue1.GetType().GetField("innerData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(RuntimeHelpers.GetObjectValue(objectValue1))) as IAsyncOperation;
if (objectValue2 == null)
return;
bool pfIsOpAsync = false;
objectValue2.GetAsyncMode(out pfIsOpAsync);
if (!pfIsOpAsync)
return;
objectValue2.EndOperation(IntPtr.Zero, IntPtr.Zero, (int) dwEffect);
}
}
}

View File

@ -0,0 +1,19 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.DropDesctiption
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System.Runtime.InteropServices;
namespace Rei.Com
{
public struct DropDesctiption
{
public int type;
[MarshalAs(UnmanagedType.LPWStr)]
public string szMessage;
[MarshalAs(UnmanagedType.LPWStr)]
public string szInsert;
}
}

16
Rei.Com/DropFiles.cs Normal file
View File

@ -0,0 +1,16 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.DropFiles
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
namespace Rei.Com
{
public struct DropFiles
{
public int pFiles;
public POINTL pt;
public bool fNC;
public bool fWide;
}
}

24
Rei.Com/FDFlags.cs Normal file
View File

@ -0,0 +1,24 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.FDFlags
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System;
namespace Rei.Com
{
[Flags]
public enum FDFlags
{
FD_CLSID = 1,
FD_SIZEPOINT = 2,
FD_ATTRIBUTES = 4,
FD_CREATETIME = 8,
FD_ACCESSTIME = 16,
FD_WRITESTIME = 32,
FD_FILESIZE = 64,
FD_PROGRESSUI = 16384,
FD_LINKUI = 32768,
}
}

42
Rei.Com/FileDescriptor.cs Normal file
View File

@ -0,0 +1,42 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.FileDescriptor
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Rei.Com
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FileDescriptor
{
public FDFlags dwFlags;
public Guid clsid;
public SIZEL sizel;
public POINTL pointl;
public FileAttributes dwFileAttributes;
public long ftCreationTime;
public long ftLastAccessTime;
public long ftLastWriteTime;
public uint nFileSizeHigh;
public uint nFileSizeLow;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public string cFileName;
public ulong FileSize
{
get
{
return checked (4294967296UL * (ulong) this.nFileSizeHigh + (ulong) this.nFileSizeLow);
}
set
{
this.nFileSizeHigh = checked ((uint) (value >> 32));
this.nFileSizeLow = checked ((uint) (unchecked ((long) value) & (long) uint.MaxValue));
}
}
}
}

View File

@ -0,0 +1,17 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.FileGroupDescriptor
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System.Runtime.InteropServices;
namespace Rei.Com
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FileGroupDescriptor
{
public uint cItems;
public FileDescriptor[] fgd;
}
}

View File

@ -0,0 +1,27 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.IAsyncOperation
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System;
using System.Runtime.InteropServices;
namespace Rei.Com
{
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("3D8B0590-F691-11D2-8EA9-006097DF5BD4")]
[ComImport]
public interface IAsyncOperation
{
void SetAsyncMode(bool fDoOpAsync);
void GetAsyncMode(out bool pfIsOpAsync);
void StartOperation(IntPtr pbcReserved);
void InOperation(out bool pfInAsyncOp);
void EndOperation(IntPtr hResult, IntPtr pbcReserved, int dwEffects);
}
}

17
Rei.Com/IStreamCreator.cs Normal file
View File

@ -0,0 +1,17 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.IStreamCreator
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System.Runtime.InteropServices.ComTypes;
namespace Rei.Com
{
public interface IStreamCreator
{
IStream Create();
void Dispose();
}
}

View File

@ -0,0 +1,18 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.My.MyApplication
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using Microsoft.VisualBasic.ApplicationServices;
using System.CodeDom.Compiler;
using System.ComponentModel;
namespace Rei.Com.My
{
[EditorBrowsable(EditorBrowsableState.Never)]
[GeneratedCode("MyTemplate", "8.0.0.0")]
internal class MyApplication : ApplicationBase
{
}
}

24
Rei.Com/My/MyComputer.cs Normal file
View File

@ -0,0 +1,24 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.My.MyComputer
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using Microsoft.VisualBasic.Devices;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
namespace Rei.Com.My
{
[GeneratedCode("MyTemplate", "8.0.0.0")]
[EditorBrowsable(EditorBrowsableState.Never)]
internal class MyComputer : Computer
{
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
public MyComputer()
{
}
}
}

148
Rei.Com/My/MyProject.cs Normal file
View File

@ -0,0 +1,148 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.My.MyProject
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.ApplicationServices;
using Microsoft.VisualBasic.CompilerServices;
using Microsoft.VisualBasic.MyServices.Internal;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Rei.Com.My
{
[HideModuleName]
[StandardModule]
[GeneratedCode("MyTemplate", "8.0.0.0")]
internal sealed class MyProject
{
private static readonly MyProject.ThreadSafeObjectProvider<MyComputer> m_ComputerObjectProvider = new MyProject.ThreadSafeObjectProvider<MyComputer>();
private static readonly MyProject.ThreadSafeObjectProvider<MyApplication> m_AppObjectProvider = new MyProject.ThreadSafeObjectProvider<MyApplication>();
private static readonly MyProject.ThreadSafeObjectProvider<User> m_UserObjectProvider = new MyProject.ThreadSafeObjectProvider<User>();
private static readonly MyProject.ThreadSafeObjectProvider<MyProject.MyWebServices> m_MyWebServicesObjectProvider = new MyProject.ThreadSafeObjectProvider<MyProject.MyWebServices>();
[HelpKeyword("My.Computer")]
internal static MyComputer Computer
{
[DebuggerHidden] get
{
return MyProject.m_ComputerObjectProvider.GetInstance;
}
}
[HelpKeyword("My.Application")]
internal static MyApplication Application
{
[DebuggerHidden] get
{
return MyProject.m_AppObjectProvider.GetInstance;
}
}
[HelpKeyword("My.User")]
internal static User User
{
[DebuggerHidden] get
{
return MyProject.m_UserObjectProvider.GetInstance;
}
}
[HelpKeyword("My.WebServices")]
internal static MyProject.MyWebServices WebServices
{
[DebuggerHidden] get
{
return MyProject.m_MyWebServicesObjectProvider.GetInstance;
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
[MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", "")]
internal sealed class MyWebServices
{
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
public override bool Equals(object o)
{
return base.Equals(RuntimeHelpers.GetObjectValue(o));
}
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
public override int GetHashCode()
{
return base.GetHashCode();
}
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
internal new Type GetType()
{
return typeof (MyProject.MyWebServices);
}
[DebuggerHidden]
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString()
{
return base.ToString();
}
[DebuggerHidden]
private static T Create__Instance__<T>(T instance) where T : new()
{
if ((object) instance == null)
return Activator.CreateInstance<T>();
return instance;
}
[DebuggerHidden]
private void Dispose__Instance__<T>(ref T instance)
{
instance = default (T);
}
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
public MyWebServices()
{
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
[ComVisible(false)]
internal sealed class ThreadSafeObjectProvider<T> where T : new()
{
private readonly ContextValue<T> m_Context;
internal T GetInstance
{
[DebuggerHidden] get
{
T instance = this.m_Context.Value;
if ((object) instance == null)
{
instance = Activator.CreateInstance<T>();
this.m_Context.Value = instance;
}
return instance;
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
[DebuggerHidden]
public ThreadSafeObjectProvider()
{
this.m_Context = new ContextValue<T>();
}
}
}
}

29
Rei.Com/My/MySettings.cs Normal file
View File

@ -0,0 +1,29 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.My.MySettings
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Configuration;
using System.Runtime.CompilerServices;
namespace Rei.Com.My
{
[EditorBrowsable(EditorBrowsableState.Advanced)]
[CompilerGenerated]
[GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed class MySettings : ApplicationSettingsBase
{
private static MySettings defaultInstance = (MySettings) SettingsBase.Synchronized((SettingsBase) new MySettings());
public static MySettings Default
{
get
{
return MySettings.defaultInstance;
}
}
}
}

View File

@ -0,0 +1,30 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.My.MySettingsProperty
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace Rei.Com.My
{
[StandardModule]
[HideModuleName]
[CompilerGenerated]
[DebuggerNonUserCode]
internal sealed class MySettingsProperty
{
[HelpKeyword("My.Settings")]
internal static MySettings Settings
{
get
{
return MySettings.Default;
}
}
}
}

View File

@ -0,0 +1,52 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.My.Resources.Resources
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Resources;
using System.Runtime.CompilerServices;
namespace Rei.Com.My.Resources
{
[CompilerGenerated]
[HideModuleName]
[DebuggerNonUserCode]
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[StandardModule]
internal sealed class Resources
{
private static ResourceManager resourceMan;
private static CultureInfo resourceCulture;
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static ResourceManager ResourceManager
{
get
{
if (object.ReferenceEquals((object) Rei.Com.My.Resources.Resources.resourceMan, (object) null))
Rei.Com.My.Resources.Resources.resourceMan = new ResourceManager("Rei.Com.Resources", typeof (Rei.Com.My.Resources.Resources).Assembly);
return Rei.Com.My.Resources.Resources.resourceMan;
}
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static CultureInfo Culture
{
get
{
return Rei.Com.My.Resources.Resources.resourceCulture;
}
set
{
Rei.Com.My.Resources.Resources.resourceCulture = value;
}
}
}
}

14
Rei.Com/POINTL.cs Normal file
View File

@ -0,0 +1,14 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.POINTL
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
namespace Rei.Com
{
public struct POINTL
{
public int x;
public int y;
}
}

66
Rei.Com/Rei.Com.csproj Normal file
View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--Project was exported from assembly: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0D383F20-FCCC-4F1D-BB46-5A5B5B7E29FE}</ProjectGuid>
<OutputType>Library</OutputType>
<AssemblyName>Rei.Com</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<ApplicationVersion>1.13.2.9255</ApplicationVersion>
<FileAlignment>512</FileAlignment>
<RootNamespace>Rei.Com</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="ComStreamAdapterStream.cs" />
<Compile Include="DataObject.cs" />
<Compile Include="DataObjectHelper.cs" />
<Compile Include="IAsyncOperation.cs" />
<Compile Include="IStreamCreator.cs" />
<Compile Include="ShellClipboardFormats.cs" />
<Compile Include="FileDescriptor.cs" />
<Compile Include="FileGroupDescriptor.cs" />
<Compile Include="POINTL.cs" />
<Compile Include="SIZEL.cs" />
<Compile Include="DropFiles.cs" />
<Compile Include="FDFlags.cs" />
<Compile Include="DropDesctiption.cs" />
<Compile Include="VirtualFileInfo.cs" />
<Compile Include="My\MyApplication.cs" />
<Compile Include="My\MyComputer.cs" />
<Compile Include="My\MyProject.cs" />
<Compile Include="My\MySettings.cs" />
<Compile Include="My\MySettingsProperty.cs" />
<Compile Include="My\Resources\Resources.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources.resx" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

120
Rei.Com/Resources.resx Normal file
View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

14
Rei.Com/SIZEL.cs Normal file
View File

@ -0,0 +1,14 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.SIZEL
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
namespace Rei.Com
{
public struct SIZEL
{
public int cx;
public int cy;
}
}

View File

@ -0,0 +1,37 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.ShellClipboardFormats
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
namespace Rei.Com
{
public sealed class ShellClipboardFormats
{
public static readonly string ShellIDListArray = "Shell IDList Array";
public static readonly string ShellObjectsOffsets = "Shell Objects Offsets";
public static readonly string NetResource = "Net Resource";
public static readonly string FileGroupDescriptor = nameof (FileGroupDescriptor);
public static readonly string FileGroupDescriptorW = nameof (FileGroupDescriptorW);
public static readonly string FileContents = nameof (FileContents);
public static readonly string FileName = nameof (FileName);
public static readonly string FileNameW = nameof (FileNameW);
public static readonly string PrinterFri = nameof (PrinterFri);
public static readonly string FileNameMap = nameof (FileNameMap);
public static readonly string FileNameMapW = nameof (FileNameMapW);
public static readonly string UniformResourceLocator = nameof (UniformResourceLocator);
public static readonly string UniformResourceLocatorW = nameof (UniformResourceLocatorW);
public static readonly string PreferredDropEffect = "Preferred DropEffect";
public static readonly string PerformedDropEffect = "Performed DropEffect";
public static readonly string PasteSucceeded = "Paste Succeeded";
public static readonly string InShellDragLoop = nameof (InShellDragLoop);
public static readonly string DragContext = nameof (DragContext);
public static readonly string MountedVolume = nameof (MountedVolume);
public static readonly string PersistedDataObject = nameof (PersistedDataObject);
public static readonly string TargetCLSID = "TarCLSID";
public static readonly string LogicalPerformedDropEffect = "Logical Performed DropEffect";
public static readonly string AutoplayEnumeratedIDListArray = "Autoplay Enumerated IDList Array";
public static readonly string DropDescription = nameof (DropDescription);
public static readonly string UntrustedDragDrop = nameof (UntrustedDragDrop);
}
}

View File

@ -0,0 +1,39 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Com.VirtualFileInfo
// Assembly: Rei.Com, Version=1.13.2.9255, Culture=neutral, PublicKeyToken=null
// MVID: 608BC623-FF3D-4118-BA82-AC691A688790
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Com.dll
using System;
using System.Diagnostics;
using System.IO;
namespace Rei.Com
{
[DebuggerDisplay("{DebuggerString}")]
public class VirtualFileInfo
{
public string FileName;
public FDFlags Flags;
public ulong FileSize;
public FileAttributes FileAttributes;
public DateTime CreationTime;
public DateTime LastAccessTime;
public DateTime LastWriteTime;
public IStreamCreator IStreamCreator;
public Stream ManageStream;
public string DebuggerString
{
get
{
return string.Join(" ", new string[3]
{
this.FileName,
this.FileSize.ToString(),
this.LastWriteTime.ToString()
});
}
}
}
}

View File

@ -0,0 +1,12 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Rei Software")]
[assembly: AssemblyCopyright("Copyright (C) Rei HOBARA 2007-2016")]
[assembly: AssemblyDescription("WebDAV Support Library")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("Rei.Fs.WebDAV")]
[assembly: AssemblyProduct("Rei.Fs.WebDAV")]
[assembly: Guid("72c8af21-4017-4407-a1e4-2bba7bae25f0")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.13.2.18288")]

View File

@ -0,0 +1,275 @@
// Decompiled with JetBrains decompiler
// Type: Rei.Fs.Webdav.ConnectionSetting
// Assembly: Rei.Fs.Webdav, Version=1.13.2.18288, Culture=neutral, PublicKeyToken=null
// MVID: D30DD1E3-8520-48B5-AAE5-C87970350A82
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Fs.Webdav.dll
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Windows.Forms;
using System.Xml.Serialization;
namespace Rei.Fs.Webdav
{
[Serializable]
public class ConnectionSetting : ConnectionSettingBase
{
public bool UseDefaultCredential;
public List<string> ClientCertificates;
public bool UsePreAuthentication_Basic;
public bool UsePreAuthentication_WSSE;
private string[] pAuthModules;
[XmlIgnore]
public SslProtocols DisableTlsVersions;
public string URIRequestEncoding;
public string URIResponseEncoding;
public string CredentialEncoding;
public bool DontRequestGzip;
public bool DontRequestDeflate;
public bool RequestTranslatef;
public bool DontExpect100;
public bool SendEmptyPUT;
public bool DontUpdateProperty;
public bool UseFullUriInDestinationHeader;
public string UploadCompression;
public bool DontVerifyContentRange;
public bool RedirectionCollectionOnly;
public bool RemoveLastSlashOnMKCOL;
public bool DisableUploadResume;
public ConnectionSetting()
{
this.UseDefaultCredential = false;
this.UsePreAuthentication_Basic = false;
this.UsePreAuthentication_WSSE = false;
this.AuthModules = new string[0];
this.DisableTlsVersions = SslProtocols.None;
this.ClientCertificates = new List<string>();
this.URIRequestEncoding = "UTF-8";
this.URIResponseEncoding = "UTF-8";
this.CredentialEncoding = "UTF-8";
this.DontRequestGzip = false;
this.DontRequestDeflate = false;
this.RequestTranslatef = true;
this.DontExpect100 = false;
this.SendEmptyPUT = false;
this.DontUpdateProperty = false;
this.UseFullUriInDestinationHeader = true;
this.DontVerifyContentRange = false;
this.RedirectionCollectionOnly = false;
this.RemoveLastSlashOnMKCOL = true;
this.UploadCompression = "None";
this.DisableUploadResume = true;
}
public static string TypeName
{
get
{
return "WebDAV";
}
}
public static bool TryCreate(Uri target, ref ConnectionSettingBase c)
{
if (Operators.CompareString(target.Scheme, Uri.UriSchemeHttp, false) != 0 && Operators.CompareString(target.Scheme, Uri.UriSchemeHttps, false) != 0)
return false;
c = (ConnectionSettingBase) new ConnectionSetting();
c.TargetUri = target;
return true;
}
public new static Icon GetDefaultFavicon()
{
return Rei.Fs.Webdav.My.Resources.Resources.WebDAVFolder;
}
public override SecureType SecureType
{
get
{
return Operators.CompareString(this.TargetUri.Scheme, Uri.UriSchemeHttps, false) == 0 ? SecureType.Secure : SecureType.None;
}
}
[XmlIgnore]
public string[] AuthModules
{
get
{
return this.pAuthModules;
}
set
{
if (value == null)
value = new string[0];
this.pAuthModules = value;
}
}
[Browsable(false)]
[XmlElement("AuthModules")]
public string AuthModules_ForSerialization
{
get
{
return string.Join(",", this.pAuthModules);
}
set
{
this.pAuthModules = value.Split(new char[2]
{
' ',
','
}, StringSplitOptions.RemoveEmptyEntries);
}
}
[XmlElement("DisableTlsVersions")]
[Browsable(false)]
public string DisableTlsVersions_ForSerialization
{
get
{
string str = "";
if ((this.DisableTlsVersions & SslProtocols.Ssl2) != SslProtocols.None)
str += "ssl2 ";
if ((this.DisableTlsVersions & SslProtocols.Ssl3) != SslProtocols.None)
str += "ssl3 ";
if ((this.DisableTlsVersions & SslProtocols.Tls) != SslProtocols.None)
str += "tls10 ";
if ((this.DisableTlsVersions & SslProtocols.Tls11) != SslProtocols.None)
str += "tls11 ";
if ((this.DisableTlsVersions & SslProtocols.Tls12) != SslProtocols.None)
str += "tls12 ";
return str.Trim();
}
set
{
this.DisableTlsVersions = SslProtocols.None;
value = value.ToLowerInvariant();
if (value.Contains("ssl2"))
this.DisableTlsVersions = this.DisableTlsVersions | SslProtocols.Ssl2;
if (value.Contains("ssl3"))
this.DisableTlsVersions = this.DisableTlsVersions | SslProtocols.Ssl3;
if (value.Contains("tls10"))
this.DisableTlsVersions = this.DisableTlsVersions | SslProtocols.Tls;
if (value.Contains("tls11"))
this.DisableTlsVersions = this.DisableTlsVersions | SslProtocols.Tls11;
if (!value.Contains("tls12"))
return;
this.DisableTlsVersions = this.DisableTlsVersions | SslProtocols.Tls12;
}
}
public override FsBase GetBaseClient()
{
return (FsBase) this.InnerGetClient();
}
public WebdavFs InnerGetClient()
{
WebdavFs webdavFs = new WebdavFs(this);
webdavFs.UseDefaultCredential = this.UseDefaultCredential;
webdavFs.UsePreAuthentication_Basic = this.UsePreAuthentication_Basic;
webdavFs.UsePreAuthentication_WSSE = this.UsePreAuthentication_WSSE;
webdavFs.AuthModules = this.AuthModules;
webdavFs.DisableTlsVersions = this.DisableTlsVersions;
X509Store x509Store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
x509Store.Open(OpenFlags.ReadOnly);
try
{
int num1 = 0;
int num2 = checked (this.ClientCertificates.Count - 1);
int index1 = num1;
while (index1 <= num2)
{
int num3 = 0;
int num4 = checked (x509Store.Certificates.Count - 1);
int index2 = num3;
while (index2 <= num4)
{
if (Operators.CompareString(this.ClientCertificates[index1], x509Store.Certificates[index2].Thumbprint, false) == 0)
{
webdavFs.ClientCertificates.Add(x509Store.Certificates[index2]);
break;
}
checked { ++index2; }
}
checked { ++index1; }
}
}
finally
{
x509Store.Close();
}
webdavFs.URIRequestEncoding = Encoding.GetEncoding(this.URIRequestEncoding.Trim());
webdavFs.URIResponseEncoding = Encoding.GetEncoding(this.URIResponseEncoding.Trim());
webdavFs.CredentialEncoding = Encoding.GetEncoding(this.CredentialEncoding.Trim());
webdavFs.DontRequestGzip = this.DontRequestGzip;
webdavFs.DontRequestDeflate = this.DontRequestDeflate;
webdavFs.RequestTranslatef = this.RequestTranslatef;
webdavFs.DontExpect100 = this.DontExpect100;
webdavFs.SendEmptyPUT = this.SendEmptyPUT;
webdavFs.DontUpdateProperty = this.DontUpdateProperty;
webdavFs.UseFullUriInDestinationHeader = this.UseFullUriInDestinationHeader;
webdavFs.DontVerifyContentRange = this.DontVerifyContentRange;
webdavFs.RedirectionCollectionOnly = this.RedirectionCollectionOnly;
webdavFs.UploadCompression = this.UploadCompression;
webdavFs.RemoveLastSlashOnMKCOL = this.RemoveLastSlashOnMKCOL;
webdavFs.DisableUploadResume = this.DisableUploadResume;
if (this.Proxy == ProxyType.Default)
webdavFs.Proxy = WebRequest.GetSystemWebProxy();
else if (this.Proxy == ProxyType.Specify)
{
int length = this.ProxyUserName.IndexOf("\\");
NetworkCredential networkCredential = length < 0 ? new NetworkCredential(this.ProxyUserName, this.ProxyPassword) : new NetworkCredential(this.ProxyUserName.Substring(checked (length + 1)), this.ProxyPassword, this.ProxyUserName.Substring(0, length));
webdavFs.Proxy = (IWebProxy) new WebProxy(this.ProxyUri, this.ProxyByPassLocal, this.ProxyByPassList, (ICredentials) networkCredential);
}
else
webdavFs.Proxy = (IWebProxy) null;
webdavFs.ConnectTimeout = this.ConnectTimeout;
webdavFs.ReadWriteTimeout = this.ReadWriteTimeout;
return webdavFs;
}
public override Form GetSettingForm()
{
return (Form) new ConnectionSettingForm();
}
public override bool DoAuthorization(Uri target, bool PersistSelectable)
{
using (AuthDialog authDialog = new AuthDialog())
{
authDialog.Target = target.ToString();
authDialog.UserName = this.UserName;
authDialog.Password = this.Password;
if (PersistSelectable && !this.DontSave)
{
authDialog.ShowRememberCheckBox = true;
authDialog.Remember = false;
}
else
{
authDialog.ShowRememberCheckBox = false;
authDialog.Remember = true;
}
if (authDialog.ShowDialog() == DialogResult.OK)
{
this.SetUserPass(authDialog.UserName, authDialog.Password);
if (authDialog.Remember)
this.NeedPersist = true;
return true;
}
}
return false;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,120 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Some files were not shown because too many files have changed in this diff Show More