mirror of
https://github.com/claunia/osrepodbmgr.git
synced 2025-12-16 19:14:25 +00:00
Added support for clamd scanning.
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* DBOps.cs:
|
||||
* Context.cs:
|
||||
* Settings.cs:
|
||||
* packages.config:
|
||||
* Workers/Clamd.cs:
|
||||
* Workers/Database.cs:
|
||||
* Workers/Delegates.cs:
|
||||
* osrepodbmgr.Core.csproj:
|
||||
Added support for clamd scanning.
|
||||
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Workers.cs:
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace osrepodbmgr.Core
|
||||
public static CICMMetadataType metadata;
|
||||
public static bool userExtracting;
|
||||
public static bool usableDotNetZip;
|
||||
public static string clamdVersion;
|
||||
|
||||
public delegate void UnarChangeStatusDelegate();
|
||||
public static event UnarChangeStatusDelegate UnarChangeStatus;
|
||||
|
||||
@@ -312,6 +312,23 @@ namespace osrepodbmgr.Core
|
||||
return dbcmd;
|
||||
}
|
||||
|
||||
public bool UpdateFile(DBFile file)
|
||||
{
|
||||
IDbCommand dbcmd = GetFileCommand(file);
|
||||
IDbTransaction trans = dbCon.BeginTransaction();
|
||||
dbcmd.Transaction = trans;
|
||||
|
||||
const string sql = "UPDATE files SET crack = @crack, virscan = @virscan, clamtime = @clamtime, vtotaltime = @vtotaltime, virus = @virus, length = @length " +
|
||||
"WHERE sha256 = @sha256";
|
||||
|
||||
dbcmd.CommandText = sql;
|
||||
|
||||
dbcmd.ExecuteNonQuery();
|
||||
trans.Commit();
|
||||
dbcmd.Dispose();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool AddFile(DBFile file)
|
||||
{
|
||||
@@ -368,6 +385,46 @@ namespace osrepodbmgr.Core
|
||||
catch { return 0; }
|
||||
}
|
||||
|
||||
public DBFile GetFile(string hash)
|
||||
{
|
||||
string sql = string.Format("SELECT * FROM files WHERE sha256 = '{0}'", hash);
|
||||
|
||||
IDbCommand dbcmd = dbCon.CreateCommand();
|
||||
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
|
||||
dbcmd.CommandText = sql;
|
||||
DataSet dataSet = new DataSet();
|
||||
dataAdapter.SelectCommand = dbcmd;
|
||||
dataAdapter.Fill(dataSet);
|
||||
DataTable dataTable = dataSet.Tables[0];
|
||||
|
||||
foreach(DataRow dRow in dataTable.Rows)
|
||||
{
|
||||
DBFile fEntry = new DBFile();
|
||||
|
||||
fEntry.Id = ulong.Parse(dRow["id"].ToString());
|
||||
fEntry.Sha256 = dRow["sha256"].ToString();
|
||||
fEntry.Crack = bool.Parse(dRow["crack"].ToString());
|
||||
if(dRow["virscan"] == DBNull.Value)
|
||||
fEntry.HasVirus = null;
|
||||
else
|
||||
fEntry.HasVirus = bool.Parse(dRow["virscan"].ToString());
|
||||
if(dRow["clamtime"] == DBNull.Value)
|
||||
fEntry.ClamTime = null;
|
||||
else
|
||||
fEntry.ClamTime = DateTime.Parse(dRow["clamtime"].ToString());
|
||||
if(dRow["vtotaltime"] == DBNull.Value)
|
||||
fEntry.VirusTotalTime = null;
|
||||
else
|
||||
fEntry.VirusTotalTime = DateTime.Parse(dRow["vtotaltime"].ToString());
|
||||
fEntry.Virus = dRow["virus"].ToString();
|
||||
fEntry.Length = long.Parse(dRow["length"].ToString());
|
||||
|
||||
return fEntry;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool GetFiles(out List<DBFile> entries, ulong start, ulong count)
|
||||
{
|
||||
entries = new List<DBFile>();
|
||||
|
||||
@@ -40,6 +40,11 @@ namespace osrepodbmgr.Core
|
||||
public string RepositoryPath;
|
||||
public string UnArchiverPath;
|
||||
public AlgoEnum CompressionAlgorithm;
|
||||
public bool UseAntivirus;
|
||||
public bool UseClamd;
|
||||
public string ClamdHost;
|
||||
public ushort ClamdPort;
|
||||
public bool ClamdIsLocal;
|
||||
}
|
||||
|
||||
public static class Settings
|
||||
@@ -112,6 +117,41 @@ namespace osrepodbmgr.Core
|
||||
else
|
||||
Current.CompressionAlgorithm = AlgoEnum.GZip;
|
||||
|
||||
if(parsedPreferences.TryGetValue("UseAntivirus", out obj))
|
||||
{
|
||||
Current.UseAntivirus = ((NSNumber)obj).ToBool();
|
||||
}
|
||||
else
|
||||
Current.UseAntivirus = false;
|
||||
|
||||
if(parsedPreferences.TryGetValue("UseClamd", out obj))
|
||||
{
|
||||
Current.UseClamd = ((NSNumber)obj).ToBool();
|
||||
}
|
||||
else
|
||||
Current.UseClamd = false;
|
||||
|
||||
if(parsedPreferences.TryGetValue("ClamdHost", out obj))
|
||||
{
|
||||
Current.ClamdHost = ((NSString)obj).ToString();
|
||||
}
|
||||
else
|
||||
Current.ClamdHost = null;
|
||||
|
||||
if(parsedPreferences.TryGetValue("ClamdPort", out obj))
|
||||
{
|
||||
Current.ClamdPort = (ushort)((NSNumber)obj).ToLong();
|
||||
}
|
||||
else
|
||||
Current.ClamdPort = 3310;
|
||||
|
||||
if(parsedPreferences.TryGetValue("ClamdIsLocal", out obj))
|
||||
{
|
||||
Current.ClamdIsLocal = ((NSNumber)obj).ToBool();
|
||||
}
|
||||
else
|
||||
Current.ClamdIsLocal = false;
|
||||
|
||||
prefsFs.Close();
|
||||
}
|
||||
else {
|
||||
@@ -150,6 +190,11 @@ namespace osrepodbmgr.Core
|
||||
Current.UnArchiverPath = (string)key.GetValue("UnArchiverPath");
|
||||
if(!Enum.TryParse((string)key.GetValue("CompressionAlgorithm"), true, out Current.CompressionAlgorithm))
|
||||
Current.CompressionAlgorithm = AlgoEnum.GZip;
|
||||
Current.UseAntivirus = (bool)key.GetValue("UseAntivirus");
|
||||
Current.UseClamd = (bool)key.GetValue("UseClamd");
|
||||
Current.ClamdHost = (string)key.GetValue("ClamdHost");
|
||||
Current.ClamdPort = (ushort)key.GetValue("ClamdPort");
|
||||
Current.ClamdIsLocal = (bool)key.GetValue("ClamdIsLocal");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -201,6 +246,11 @@ namespace osrepodbmgr.Core
|
||||
root.Add("RepositoryPath", Current.RepositoryPath);
|
||||
root.Add("UnArchiverPath", Current.UnArchiverPath);
|
||||
root.Add("CompressionAlgorithm", Current.CompressionAlgorithm.ToString());
|
||||
root.Add("UseAntivirus", Current.UseAntivirus);
|
||||
root.Add("UseClamd", Current.UseClamd);
|
||||
root.Add("ClamdHost", Current.ClamdHost);
|
||||
root.Add("ClamdPort", Current.ClamdPort);
|
||||
root.Add("ClamdIsLocal", Current.ClamdIsLocal);
|
||||
|
||||
string preferencesPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Preferences");
|
||||
string preferencesFilePath = Path.Combine(preferencesPath, "com.claunia.museum.osrepodbmgr.plist");
|
||||
@@ -225,6 +275,11 @@ namespace osrepodbmgr.Core
|
||||
if (Current.UnArchiverPath != null)
|
||||
key.SetValue("UnArchiverPath", Current.UnArchiverPath);
|
||||
key.SetValue("CompressionAlgorithm", Current.CompressionAlgorithm);
|
||||
key.SetValue("UseAntivirus", Current.UseAntivirus);
|
||||
key.SetValue("UseClamd", Current.UseClamd);
|
||||
key.SetValue("ClamdHost", Current.ClamdHost);
|
||||
key.SetValue("ClamdPort", Current.ClamdPort);
|
||||
key.SetValue("ClamdIsLocal", Current.ClamdIsLocal);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -260,6 +315,11 @@ namespace osrepodbmgr.Core
|
||||
Current.RepositoryPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "osrepo");
|
||||
Current.UnArchiverPath = null;
|
||||
Current.CompressionAlgorithm = AlgoEnum.GZip;
|
||||
Current.UseAntivirus = false;
|
||||
Current.UseClamd = false;
|
||||
Current.ClamdHost = null;
|
||||
Current.ClamdPort = 3310;
|
||||
Current.ClamdIsLocal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
219
osrepodbmgr.Core/Workers/Clamd.cs
Normal file
219
osrepodbmgr.Core/Workers/Clamd.cs
Normal file
@@ -0,0 +1,219 @@
|
||||
//
|
||||
// Author:
|
||||
// Natalia Portillo claunia@claunia.com
|
||||
//
|
||||
// Copyright (c) 2017, © Claunia.com
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in
|
||||
// the documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
using System;
|
||||
using nClam;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using SharpCompress.Compressors.LZMA;
|
||||
using SharpCompress.Compressors.Deflate;
|
||||
using SharpCompress.Compressors.BZip2;
|
||||
using System.Threading;
|
||||
|
||||
namespace osrepodbmgr.Core
|
||||
{
|
||||
public static partial class Workers
|
||||
{
|
||||
static ClamClient clam;
|
||||
|
||||
public static void InitClamd()
|
||||
{
|
||||
if(!Settings.Current.UseClamd || !Settings.Current.UseAntivirus)
|
||||
{
|
||||
Context.clamdVersion = null;
|
||||
return;
|
||||
}
|
||||
|
||||
TestClamd();
|
||||
}
|
||||
|
||||
public static void TestClamd()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
clam = new ClamClient(Settings.Current.ClamdHost, Settings.Current.ClamdPort);
|
||||
Context.clamdVersion = await clam.GetVersionAsync();
|
||||
}
|
||||
catch(System.Net.Sockets.SocketException)
|
||||
{
|
||||
|
||||
}
|
||||
}).Wait();
|
||||
}
|
||||
|
||||
public static void ClamScanFileFromRepo(DBFile file)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(Context.clamdVersion == null)
|
||||
{
|
||||
if(Failed != null)
|
||||
Failed("clamd is not usable");
|
||||
return;
|
||||
}
|
||||
|
||||
if(clam == null)
|
||||
{
|
||||
if(Failed != null)
|
||||
Failed("clamd is not initalized");
|
||||
}
|
||||
|
||||
string repoPath;
|
||||
AlgoEnum algorithm;
|
||||
|
||||
if(File.Exists(Path.Combine(Settings.Current.RepositoryPath, file.Sha256[0].ToString(),
|
||||
file.Sha256[1].ToString(), file.Sha256[2].ToString(),
|
||||
file.Sha256[3].ToString(), file.Sha256[4].ToString(),
|
||||
file.Sha256 + ".gz")))
|
||||
{
|
||||
repoPath = Path.Combine(Settings.Current.RepositoryPath, file.Sha256[0].ToString(),
|
||||
file.Sha256[1].ToString(), file.Sha256[2].ToString(),
|
||||
file.Sha256[3].ToString(), file.Sha256[4].ToString(),
|
||||
file.Sha256 + ".gz");
|
||||
algorithm = AlgoEnum.GZip;
|
||||
}
|
||||
else if(File.Exists(Path.Combine(Settings.Current.RepositoryPath, file.Sha256[0].ToString(),
|
||||
file.Sha256[1].ToString(), file.Sha256[2].ToString(),
|
||||
file.Sha256[3].ToString(), file.Sha256[4].ToString(),
|
||||
file.Sha256 + ".bz2")))
|
||||
{
|
||||
repoPath = Path.Combine(Settings.Current.RepositoryPath, file.Sha256[0].ToString(),
|
||||
file.Sha256[1].ToString(), file.Sha256[2].ToString(),
|
||||
file.Sha256[3].ToString(), file.Sha256[4].ToString(),
|
||||
file.Sha256 + ".bz2");
|
||||
algorithm = AlgoEnum.BZip2;
|
||||
}
|
||||
else if(File.Exists(Path.Combine(Settings.Current.RepositoryPath, file.Sha256[0].ToString(),
|
||||
file.Sha256[1].ToString(), file.Sha256[2].ToString(),
|
||||
file.Sha256[3].ToString(), file.Sha256[4].ToString(),
|
||||
file.Sha256 + ".lzma")))
|
||||
{
|
||||
repoPath = Path.Combine(Settings.Current.RepositoryPath, file.Sha256[0].ToString(),
|
||||
file.Sha256[1].ToString(), file.Sha256[2].ToString(),
|
||||
file.Sha256[3].ToString(), file.Sha256[4].ToString(),
|
||||
file.Sha256 + ".lzma");
|
||||
algorithm = AlgoEnum.LZMA;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Failed != null)
|
||||
Failed(string.Format("Cannot find file with hash {0} in the repository", file.Sha256));
|
||||
return;
|
||||
}
|
||||
|
||||
ClamScanResult result = null;
|
||||
Stream zStream = null;
|
||||
|
||||
if(Settings.Current.ClamdIsLocal)
|
||||
{
|
||||
// clamd supports gzip and bzip2 but not lzma
|
||||
if(algorithm == AlgoEnum.LZMA)
|
||||
{
|
||||
string tmpFile = Path.Combine(Settings.Current.TemporaryFolder, Path.GetTempFileName());
|
||||
FileStream outFs = new FileStream(tmpFile, FileMode.Create, FileAccess.Write);
|
||||
FileStream inFs = new FileStream(repoPath, FileMode.Open, FileAccess.Read);
|
||||
|
||||
byte[] properties = new byte[5];
|
||||
inFs.Read(properties, 0, 5);
|
||||
inFs.Seek(8, SeekOrigin.Current);
|
||||
zStream = new LzmaStream(properties, inFs);
|
||||
|
||||
zStream.CopyTo(outFs);
|
||||
zStream.Close();
|
||||
outFs.Close();
|
||||
|
||||
Task.Run(async () =>
|
||||
{
|
||||
result = await clam.ScanFileOnServerMultithreadedAsync(tmpFile);
|
||||
}).Wait();
|
||||
|
||||
File.Delete(tmpFile);
|
||||
}
|
||||
else
|
||||
Task.Run(async () =>
|
||||
{
|
||||
result = await clam.ScanFileOnServerMultithreadedAsync(repoPath);
|
||||
}).Wait();
|
||||
}
|
||||
else
|
||||
{
|
||||
FileStream inFs = new FileStream(repoPath, FileMode.Open, FileAccess.Read);
|
||||
|
||||
switch(algorithm)
|
||||
{
|
||||
case AlgoEnum.GZip:
|
||||
zStream = new GZipStream(inFs, SharpCompress.Compressors.CompressionMode.Decompress);
|
||||
break;
|
||||
case AlgoEnum.BZip2:
|
||||
zStream = new BZip2Stream(inFs, SharpCompress.Compressors.CompressionMode.Decompress);
|
||||
break;
|
||||
case AlgoEnum.LZMA:
|
||||
byte[] properties = new byte[5];
|
||||
inFs.Read(properties, 0, 5);
|
||||
inFs.Seek(8, SeekOrigin.Current);
|
||||
zStream = new LzmaStream(properties, inFs);
|
||||
break;
|
||||
}
|
||||
|
||||
Task.Run(async () =>
|
||||
{
|
||||
result = await clam.SendAndScanFileAsync(zStream);
|
||||
}).Wait();
|
||||
zStream.Close();
|
||||
}
|
||||
|
||||
if(result.InfectedFiles != null && result.InfectedFiles.Count > 0)
|
||||
{
|
||||
file.HasVirus = true;
|
||||
file.Virus = result.InfectedFiles[0].VirusName;
|
||||
}
|
||||
else if(file.HasVirus == null)
|
||||
{
|
||||
// If no scan has been done, mark as false.
|
||||
// If a positive has already existed don't overwrite it.
|
||||
file.HasVirus = false;
|
||||
file.Virus = null;
|
||||
}
|
||||
file.ClamTime = DateTime.UtcNow;
|
||||
|
||||
dbCore.DBOps.UpdateFile(file);
|
||||
|
||||
if(ScanFinished != null)
|
||||
ScanFinished(file);
|
||||
|
||||
return;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
if(Failed != null)
|
||||
Failed(string.Format("Exception {0} when calling clamd", ex.Message));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,5 +349,10 @@ namespace osrepodbmgr.Core
|
||||
Failed(string.Format("Exception {0}\n{1}", ex.Message, ex.InnerException));
|
||||
}
|
||||
}
|
||||
|
||||
public static DBFile GetDBFile(string hash)
|
||||
{
|
||||
return dbCore.DBOps.GetFile(hash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace osrepodbmgr.Core
|
||||
public delegate void AddOSDelegate(DBEntry os, bool existsInRepo, string pathInRepo);
|
||||
public delegate void AddFileDelegate(DBFile file);
|
||||
public delegate void AddFilesDelegate(List<DBFile> file);
|
||||
public delegate void ScanFinishedDelegate(DBFile file);
|
||||
|
||||
public static event UpdateProgressDelegate UpdateProgress;
|
||||
public static event UpdateProgress2Delegate UpdateProgress2;
|
||||
@@ -51,5 +52,6 @@ namespace osrepodbmgr.Core
|
||||
public static event AddOSDelegate AddOS;
|
||||
public static event AddFileDelegate AddFile;
|
||||
public static event AddFilesDelegate AddFiles;
|
||||
public static event ScanFinishedDelegate ScanFinished;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
<Reference Include="SharpCompress">
|
||||
<HintPath>..\packages\SharpCompress.0.15.2\lib\net45\SharpCompress.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nClam">
|
||||
<HintPath>..\packages\nClam.3.0.0\lib\net45\nClam.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -66,6 +69,7 @@
|
||||
<Compile Include="Workers\Compression.cs" />
|
||||
<Compile Include="Workers\Miscellaneous.cs" />
|
||||
<Compile Include="Workers\DiscImageChef.cs" />
|
||||
<Compile Include="Workers\Clamd.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="DotNetZip" version="1.10.1" targetFramework="net45" />
|
||||
<package id="nClam" version="3.0.0" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
|
||||
<package id="plist-cil" version="1.15.0" targetFramework="net45" />
|
||||
<package id="SharpCompress" version="0.15.2" targetFramework="net45" />
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Program.cs:
|
||||
Added support for clamd scanning.
|
||||
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* osrepodbmgr.Eto.Desktop.csproj:
|
||||
|
||||
@@ -39,6 +39,11 @@ namespace osrepodbmgr.Eto.Desktop
|
||||
{
|
||||
Settings.LoadSettings();
|
||||
Context.CheckUnar();
|
||||
if(Core.Settings.Current.UseAntivirus)
|
||||
{
|
||||
if(Core.Settings.Current.UseClamd)
|
||||
Workers.InitClamd();
|
||||
}
|
||||
Context.usableDotNetZip = !Platform.Detect.IsMac && !Platform.Detect.IsIos;
|
||||
|
||||
new Application(Platform.Detect).Run(new frmMain());
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* Program.cs:
|
||||
Added support for clamd scanning.
|
||||
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* osrepodbmgr.Eto.XamMac2.csproj:
|
||||
|
||||
@@ -39,6 +39,11 @@ namespace osrepodbmgr.Eto.XamMac2
|
||||
{
|
||||
Settings.LoadSettings();
|
||||
Context.CheckUnar();
|
||||
if(Core.Settings.Current.UseAntivirus)
|
||||
{
|
||||
if(Core.Settings.Current.UseClamd)
|
||||
Workers.InitClamd();
|
||||
}
|
||||
Context.usableDotNetZip = false;
|
||||
new Application(Platforms.XamMac2).Run(new frmMain());
|
||||
}
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* frmMain.xeto:
|
||||
* frmMain.xeto.cs:
|
||||
* dlgSettings.xeto:
|
||||
* dlgSettings.xeto.cs:
|
||||
Added support for clamd scanning.
|
||||
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* dlgAdd.xeto:
|
||||
|
||||
@@ -1,68 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dialog xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="250" xmlns:e="clr-namespace:osrepodbmgr.Core;assembly=osrepodbmgr.Core">
|
||||
<Dialog xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="650" Height="175" xmlns:e="clr-namespace:osrepodbmgr.Core;assembly=osrepodbmgr.Core">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Database file</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtDatabase" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnDatabase" Click="OnBtnDatabaseClicked">Choose...</Button>
|
||||
</StackLayoutItem>
|
||||
<StackLayout Orientation="Vertical">
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Database file</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtDatabase" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnDatabase" Click="OnBtnDatabaseClicked">Choose...</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Repository folder</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtRepository" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnRepository" Click="OnBtnRepositoryClicked">Choose...</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Temporary folder</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtTmp" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnTmp" Click="OnBtnTmpClicked">Choose...</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Path to unar</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtUnar" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnUnar" Click="OnBtnUnarClicked">Choose...</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Center">
|
||||
<Label ID="lblUnarVersion" Visible="False">lblUnarVersion</Label>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
<StackLayout Orientation="Horizontal" ID="StackLayoutForAlgoEnum">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Compression algorithm</Label>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
<StackLayout Orientation="Vertical">
|
||||
<CheckBox ID="chkAntivirus" CheckedChanged="OnChkAntivirusToggled" ThreeState="False">Use antivirus?</CheckBox>
|
||||
<GroupBox Text="clamd" ID="frmClamd">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<CheckBox ID="chkClamd" CheckedChanged="OnChkClamdToggled" ThreeState="False">Use clamd?</CheckBox>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<Label>Host</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtClamdHost" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<Label>port</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<NumericUpDown ID="spClamdPort" MaxValue="65535" MinValue="1" Value="3310" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<Button ID="btnClamdTest" Click="OnBtnClamdTestClicked">Test</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<Label Visible="False" ID="lblClamdVersion" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<CheckBox ID="chkClamdIsLocal" ThreeState="False">Clamd is local?</CheckBox>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</GroupBox>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Repository folder</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtRepository" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnRepository" Click="OnBtnRepositoryClicked">Choose...</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Temporary folder</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtTmp" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnTmp" Click="OnBtnTmpClicked">Choose...</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Path to unar</Label>
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch" Expand="True">
|
||||
<TextBox ID="txtUnar" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Right">
|
||||
<Button ID="btnUnar" Click="OnBtnUnarClicked">Choose...</Button>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
</StackLayoutItem>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Center">
|
||||
<Label ID="lblUnarVersion" Visible="False">lblUnarVersion</Label>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
<StackLayout Orientation="Horizontal" ID="StackLayoutForAlgoEnum">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
<Label>Compression algorithm</Label>
|
||||
</StackLayoutItem>
|
||||
</StackLayout>
|
||||
<StackLayoutItem HorizontalAlignment="Center">
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<StackLayoutItem HorizontalAlignment="Left">
|
||||
|
||||
@@ -45,6 +45,14 @@ namespace osrepodbmgr.Eto
|
||||
Label lblUnarVersion;
|
||||
EnumDropDown<AlgoEnum> cmbCompAlg;
|
||||
StackLayout StackLayoutForAlgoEnum;
|
||||
GroupBox frmClamd;
|
||||
CheckBox chkAntivirus;
|
||||
CheckBox chkClamd;
|
||||
TextBox txtClamdHost;
|
||||
NumericUpDown spClamdPort;
|
||||
Button btnClamdTest;
|
||||
Label lblClamdVersion;
|
||||
CheckBox chkClamdIsLocal;
|
||||
#pragma warning restore 0649
|
||||
#endregion XAML UI elements
|
||||
|
||||
@@ -64,6 +72,17 @@ namespace osrepodbmgr.Eto
|
||||
cmbCompAlg = new EnumDropDown<AlgoEnum>();
|
||||
StackLayoutForAlgoEnum.Items.Add(new StackLayoutItem(cmbCompAlg, HorizontalAlignment.Stretch, true));
|
||||
cmbCompAlg.SelectedValue = Settings.Current.CompressionAlgorithm;
|
||||
|
||||
spClamdPort.Value = 3310;
|
||||
chkAntivirus.Checked = Core.Settings.Current.UseAntivirus;
|
||||
frmClamd.Visible = chkAntivirus.Checked.Value;
|
||||
if(Core.Settings.Current.UseAntivirus && Core.Settings.Current.UseClamd)
|
||||
{
|
||||
chkClamd.Checked = Core.Settings.Current.UseClamd;
|
||||
txtClamdHost.Text = Core.Settings.Current.ClamdHost;
|
||||
spClamdPort.Value = Core.Settings.Current.ClamdPort;
|
||||
chkClamdIsLocal.Checked = Core.Settings.Current.ClamdIsLocal;
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnBtnCancelClicked(object sender, EventArgs e)
|
||||
@@ -79,9 +98,18 @@ namespace osrepodbmgr.Eto
|
||||
Settings.Current.DatabasePath = txtDatabase.Text;
|
||||
Settings.Current.RepositoryPath = txtRepository.Text;
|
||||
Settings.Current.CompressionAlgorithm = cmbCompAlg.SelectedValue;
|
||||
if(!chkClamd.Checked.Value || !chkAntivirus.Checked.Value)
|
||||
{
|
||||
Core.Settings.Current.UseClamd = false;
|
||||
Core.Settings.Current.ClamdHost = null;
|
||||
Core.Settings.Current.ClamdPort = 3310;
|
||||
Core.Settings.Current.ClamdIsLocal = false;
|
||||
}
|
||||
Settings.SaveSettings();
|
||||
Workers.CloseDB();
|
||||
Workers.InitDB();
|
||||
Context.clamdVersion = null;
|
||||
Core.Workers.InitClamd();
|
||||
Context.CheckUnar();
|
||||
Close();
|
||||
}
|
||||
@@ -218,5 +246,53 @@ namespace osrepodbmgr.Eto
|
||||
MessageBox.Show(text, MessageBoxType.Error);
|
||||
});
|
||||
}
|
||||
|
||||
protected void OnChkAntivirusToggled(object sender, EventArgs e)
|
||||
{
|
||||
frmClamd.Visible = chkAntivirus.Checked.Value;
|
||||
}
|
||||
|
||||
protected void OnChkClamdToggled(object sender, EventArgs e)
|
||||
{
|
||||
txtClamdHost.Enabled = chkClamd.Checked.Value;
|
||||
spClamdPort.Enabled = chkClamd.Checked.Value;
|
||||
btnClamdTest.Enabled = chkClamd.Checked.Value;
|
||||
lblClamdVersion.Visible = false;
|
||||
chkClamdIsLocal.Enabled = chkClamd.Checked.Value;
|
||||
}
|
||||
|
||||
protected void OnBtnClamdTestClicked(object sender, EventArgs e)
|
||||
{
|
||||
lblClamdVersion.Visible = false;
|
||||
|
||||
if(string.IsNullOrEmpty(txtClamdHost.Text))
|
||||
{
|
||||
MessageBox.Show("clamd host cannot be empty", MessageBoxType.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
string oldVersion = Context.clamdVersion;
|
||||
Context.clamdVersion = null;
|
||||
|
||||
string oldHost = Core.Settings.Current.ClamdHost;
|
||||
ushort oldPort = Core.Settings.Current.ClamdPort;
|
||||
Core.Settings.Current.ClamdHost = txtClamdHost.Text;
|
||||
Core.Settings.Current.ClamdPort = (ushort)spClamdPort.Value;
|
||||
|
||||
Workers.TestClamd();
|
||||
|
||||
Core.Settings.Current.ClamdHost = oldHost;
|
||||
Core.Settings.Current.ClamdPort = oldPort;
|
||||
|
||||
if(string.IsNullOrEmpty(Context.clamdVersion))
|
||||
{
|
||||
MessageBox.Show("Cannot connect to clamd", MessageBoxType.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
lblClamdVersion.Text = Context.clamdVersion;
|
||||
Context.clamdVersion = oldVersion;
|
||||
lblClamdVersion.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<TabPage Text="Files" ID="tabFiles">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<StackLayoutItem Expand="True" HorizontalAlignment="Stretch">
|
||||
<GridView ID="treeFiles" Enabled="False" SelectionChanged="treeFilesSelectionChanged"/>
|
||||
<GridView ID="treeFiles" Enabled="False" SelectionChanged="treeFilesSelectionChanged" />
|
||||
</StackLayoutItem>
|
||||
<StackLayoutItem HorizontalAlignment="Stretch">
|
||||
<Label ID="lblProgressFiles1" Visible="False">lblProgress</Label>
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace osrepodbmgr.Eto
|
||||
Thread thdSaveAs;
|
||||
Thread thdPopulateFiles;
|
||||
bool populatingFiles;
|
||||
Thread thdScanFile;
|
||||
DBFile outIter;
|
||||
|
||||
#region XAML UI elements
|
||||
#pragma warning disable 0649
|
||||
@@ -637,6 +639,74 @@ namespace osrepodbmgr.Eto
|
||||
|
||||
protected void OnBtnScanWithClamdClicked(object sender, EventArgs e)
|
||||
{
|
||||
if(treeFiles.SelectedItem != null)
|
||||
{
|
||||
DBFile file = Workers.GetDBFile(((DBFile)treeFiles.SelectedItem).Sha256);
|
||||
outIter = (osrepodbmgr.Core.DBFile)treeFiles.SelectedItem;
|
||||
|
||||
if(file == null)
|
||||
{
|
||||
MessageBox.Show("Cannot get file from database", MessageBoxType.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
treeFiles.Enabled = false;
|
||||
btnToggleCrack.Enabled = false;
|
||||
btnScanWithClamd.Enabled = false;
|
||||
btnCheckInVirusTotal.Enabled = false;
|
||||
prgProgress.Visible = true;
|
||||
lblProgress.Visible = true;
|
||||
Workers.Failed += ClamdFailed;
|
||||
Workers.ScanFinished += ClamdFinished;
|
||||
|
||||
lblProgress.Text = "Scanning file with clamd.";
|
||||
prgProgress.Indeterminate = true;
|
||||
|
||||
thdScanFile = new Thread(() => Workers.ClamScanFileFromRepo(file));
|
||||
thdScanFile.Start();
|
||||
}
|
||||
}
|
||||
|
||||
void ClamdFailed(string text)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
treeFiles.Enabled = true;
|
||||
btnToggleCrack.Enabled = true;
|
||||
btnScanWithClamd.Enabled = true;
|
||||
btnCheckInVirusTotal.Enabled = true;
|
||||
prgProgress.Visible = false;
|
||||
lblProgress.Visible = false;
|
||||
Workers.Failed -= ClamdFailed;
|
||||
Workers.ScanFinished -= ClamdFinished;
|
||||
lblProgress.Text = "";
|
||||
if(thdScanFile != null)
|
||||
{
|
||||
thdScanFile.Abort();
|
||||
thdScanFile = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void ClamdFinished(DBFile file)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
treeFiles.Enabled = true;
|
||||
btnToggleCrack.Enabled = true;
|
||||
btnScanWithClamd.Enabled = true;
|
||||
btnCheckInVirusTotal.Enabled = true;
|
||||
Workers.Failed -= ClamdFailed;
|
||||
Workers.ScanFinished -= ClamdFinished;
|
||||
lblProgress.Text = "";
|
||||
prgProgress.Visible = false;
|
||||
lblProgress.Visible = false;
|
||||
if(thdScanFile != null)
|
||||
thdScanFile = null;
|
||||
|
||||
lstFiles.Remove(outIter);
|
||||
AddFile(file);
|
||||
});
|
||||
}
|
||||
|
||||
protected void OnBtnCheckInVirusTotalClicked(object sender, EventArgs e)
|
||||
@@ -646,7 +716,6 @@ namespace osrepodbmgr.Eto
|
||||
protected void OnBtnPopulateFilesClicked(object sender, EventArgs e)
|
||||
{
|
||||
// TODO: Implement
|
||||
btnScanWithClamd.Enabled = false;
|
||||
btnCheckInVirusTotal.Enabled = false;
|
||||
|
||||
tabOSes.Enabled = false;
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* frmMain.cs:
|
||||
* Program.cs:
|
||||
* dlgSettings.cs:
|
||||
* gtk-gui/gui.stetic:
|
||||
* gtk-gui/osrepodbmgr.dlgSettings.cs:
|
||||
Added support for clamd scanning.
|
||||
|
||||
2017-05-18 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* dlgAdd.cs:
|
||||
|
||||
@@ -37,6 +37,11 @@ namespace osrepodbmgr
|
||||
Core.Settings.LoadSettings();
|
||||
Context.CheckUnar();
|
||||
Context.usableDotNetZip = true;
|
||||
if(Core.Settings.Current.UseAntivirus)
|
||||
{
|
||||
if(Core.Settings.Current.UseClamd)
|
||||
Workers.InitClamd();
|
||||
}
|
||||
Application.Init();
|
||||
frmMain win = new frmMain();
|
||||
win.Show();
|
||||
|
||||
@@ -71,6 +71,17 @@ namespace osrepodbmgr
|
||||
}
|
||||
}
|
||||
while(cmbCompAlg.Model.IterNext(ref iter));
|
||||
|
||||
spClamdPort.Value = 3310;
|
||||
chkAntivirus.Active = Core.Settings.Current.UseAntivirus;
|
||||
frmClamd.Visible = chkAntivirus.Active;
|
||||
if(Core.Settings.Current.UseAntivirus && Core.Settings.Current.UseClamd)
|
||||
{
|
||||
chkClamd.Active = Core.Settings.Current.UseClamd;
|
||||
txtClamdHost.Text = Core.Settings.Current.ClamdHost;
|
||||
spClamdPort.Value = Core.Settings.Current.ClamdPort;
|
||||
chkClamdIsLocal.Active = Core.Settings.Current.ClamdIsLocal;
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnBtnCancelClicked(object sender, EventArgs e)
|
||||
@@ -80,15 +91,41 @@ namespace osrepodbmgr
|
||||
|
||||
protected void OnBtnApplyClicked(object sender, EventArgs e)
|
||||
{
|
||||
if(chkAntivirus.Active && chkClamd.Active)
|
||||
{
|
||||
if(string.IsNullOrEmpty(txtClamdHost.Text))
|
||||
{
|
||||
MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "clamd host cannot be empty");
|
||||
dlgMsg.Run();
|
||||
dlgMsg.Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// TODO: Check sanity
|
||||
Core.Settings.Current.TemporaryFolder = txtTmp.Text;
|
||||
Core.Settings.Current.UnArchiverPath = txtUnar.Text;
|
||||
Core.Settings.Current.DatabasePath = txtDatabase.Text;
|
||||
Core.Settings.Current.RepositoryPath = txtRepository.Text;
|
||||
Core.Settings.Current.UseAntivirus = chkAntivirus.Active;
|
||||
Core.Settings.Current.UseClamd = chkClamd.Active;
|
||||
Core.Settings.Current.ClamdHost = txtClamdHost.Text;
|
||||
Core.Settings.Current.ClamdPort = (ushort)spClamdPort.Value;
|
||||
Core.Settings.Current.ClamdIsLocal = chkClamdIsLocal.Active;
|
||||
Core.Settings.Current.CompressionAlgorithm = (AlgoEnum)Enum.Parse(typeof(AlgoEnum), cmbCompAlg.ActiveText);
|
||||
if(!chkClamd.Active || !chkAntivirus.Active)
|
||||
{
|
||||
Core.Settings.Current.UseClamd = false;
|
||||
Core.Settings.Current.ClamdHost = null;
|
||||
Core.Settings.Current.ClamdPort = 3310;
|
||||
Core.Settings.Current.ClamdIsLocal = false;
|
||||
}
|
||||
Core.Settings.SaveSettings();
|
||||
Core.Workers.CloseDB();
|
||||
Core.Workers.InitDB();
|
||||
Context.clamdVersion = null;
|
||||
Core.Workers.InitClamd();
|
||||
Context.CheckUnar();
|
||||
btnDialog.Click();
|
||||
}
|
||||
@@ -245,5 +282,57 @@ namespace osrepodbmgr
|
||||
dlgMsg.Destroy();
|
||||
});
|
||||
}
|
||||
|
||||
protected void OnChkAntivirusToggled(object sender, EventArgs e)
|
||||
{
|
||||
frmClamd.Visible = chkAntivirus.Active;
|
||||
}
|
||||
|
||||
protected void OnChkClamdToggled(object sender, EventArgs e)
|
||||
{
|
||||
txtClamdHost.Sensitive = chkClamd.Active;
|
||||
spClamdPort.Sensitive = chkClamd.Active;
|
||||
btnClamdTest.Sensitive = chkClamd.Active;
|
||||
lblClamdVersion.Visible = false;
|
||||
chkClamdIsLocal.Sensitive = chkClamd.Active;
|
||||
}
|
||||
|
||||
protected void OnBtnClamdTestClicked(object sender, EventArgs e)
|
||||
{
|
||||
lblClamdVersion.Visible = false;
|
||||
|
||||
if(string.IsNullOrEmpty(txtClamdHost.Text))
|
||||
{
|
||||
MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "clamd host cannot be empty");
|
||||
dlgMsg.Run();
|
||||
dlgMsg.Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
string oldVersion = Context.clamdVersion;
|
||||
Context.clamdVersion = null;
|
||||
|
||||
string oldHost = Core.Settings.Current.ClamdHost;
|
||||
ushort oldPort = Core.Settings.Current.ClamdPort;
|
||||
Core.Settings.Current.ClamdHost = txtClamdHost.Text;
|
||||
Core.Settings.Current.ClamdPort = (ushort)spClamdPort.Value;
|
||||
|
||||
Workers.TestClamd();
|
||||
|
||||
Core.Settings.Current.ClamdHost = oldHost;
|
||||
Core.Settings.Current.ClamdPort = oldPort;
|
||||
|
||||
if(string.IsNullOrEmpty(Context.clamdVersion))
|
||||
{
|
||||
MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "Cannot connect to clamd");
|
||||
dlgMsg.Run();
|
||||
dlgMsg.Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
lblClamdVersion.Text = Context.clamdVersion;
|
||||
Context.clamdVersion = oldVersion;
|
||||
lblClamdVersion.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ namespace osrepodbmgr
|
||||
Thread thdSaveAs;
|
||||
Thread thdPopulateFiles;
|
||||
bool populatingFiles;
|
||||
Thread thdScanFile;
|
||||
TreeIter outIter;
|
||||
|
||||
public frmMain() :
|
||||
base(WindowType.Toplevel)
|
||||
@@ -652,6 +654,93 @@ namespace osrepodbmgr
|
||||
|
||||
protected void OnBtnScanWithClamdClicked(object sender, EventArgs e)
|
||||
{
|
||||
if(treeFiles.Selection.GetSelected(out outIter))
|
||||
{
|
||||
DBFile file = Workers.GetDBFile((string)fileView.GetValue(outIter, 0));
|
||||
|
||||
if(file == null)
|
||||
{
|
||||
MessageDialog dlgMsg = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok,
|
||||
"Cannot get file from database");
|
||||
dlgMsg.Run();
|
||||
dlgMsg.Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
treeFiles.Sensitive = false;
|
||||
btnToggleCrack.Sensitive = false;
|
||||
btnScanWithClamd.Sensitive = false;
|
||||
btnCheckInVirusTotal.Sensitive = false;
|
||||
prgProgress.Visible = true;
|
||||
Workers.Failed += ClamdFailed;
|
||||
Workers.ScanFinished += ClamdFinished;
|
||||
|
||||
prgProgress.Text = "Scanning file with clamd.";
|
||||
thdPulseProgress = new Thread(() =>
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
Application.Invoke(delegate
|
||||
{
|
||||
prgProgress.Pulse();
|
||||
});
|
||||
Thread.Sleep(66);
|
||||
}
|
||||
});
|
||||
|
||||
thdScanFile = new Thread(() => Workers.ClamScanFileFromRepo(file));
|
||||
thdScanFile.Start();
|
||||
}
|
||||
}
|
||||
|
||||
void ClamdFailed(string text)
|
||||
{
|
||||
Application.Invoke(delegate
|
||||
{
|
||||
treeFiles.Sensitive = true;
|
||||
btnToggleCrack.Sensitive = true;
|
||||
btnScanWithClamd.Sensitive = true;
|
||||
btnCheckInVirusTotal.Sensitive = true;
|
||||
prgProgress.Visible = false;
|
||||
Workers.Failed -= ClamdFailed;
|
||||
Workers.ScanFinished -= ClamdFinished;
|
||||
prgProgress.Text = "";
|
||||
if(thdPulseProgress != null)
|
||||
{
|
||||
thdPulseProgress.Abort();
|
||||
thdPulseProgress = null;
|
||||
}
|
||||
if(thdScanFile != null)
|
||||
{
|
||||
thdScanFile.Abort();
|
||||
thdScanFile = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void ClamdFinished(DBFile file)
|
||||
{
|
||||
Application.Invoke(delegate
|
||||
{
|
||||
treeFiles.Sensitive = true;
|
||||
btnToggleCrack.Sensitive = true;
|
||||
btnScanWithClamd.Sensitive = true;
|
||||
btnCheckInVirusTotal.Sensitive = true;
|
||||
Workers.Failed -= ClamdFailed;
|
||||
Workers.ScanFinished -= ClamdFinished;
|
||||
prgProgress.Text = "";
|
||||
prgProgress.Visible = false;
|
||||
if(thdPulseProgress != null)
|
||||
{
|
||||
thdPulseProgress.Abort();
|
||||
thdPulseProgress = null;
|
||||
}
|
||||
if(thdScanFile != null)
|
||||
thdScanFile = null;
|
||||
|
||||
fileView.Remove(ref outIter);
|
||||
AddFile(file);
|
||||
});
|
||||
}
|
||||
|
||||
protected void OnBtnCheckInVirusTotalClicked(object sender, EventArgs e)
|
||||
@@ -661,7 +750,6 @@ namespace osrepodbmgr
|
||||
protected void OnBtnPopulateFilesClicked(object sender, EventArgs e)
|
||||
{
|
||||
// TODO: Implement
|
||||
btnScanWithClamd.Sensitive = false;
|
||||
btnCheckInVirusTotal.Sensitive = false;
|
||||
|
||||
notebook1.GetNthPage(0).Sensitive = false;
|
||||
|
||||
@@ -967,7 +967,7 @@ QNX/QNX/20090229/source.zip</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="Gtk.Dialog" id="osrepodbmgr.dlgSettings" design-size="400 250">
|
||||
<widget class="Gtk.Dialog" id="osrepodbmgr.dlgSettings" design-size="680 250">
|
||||
<property name="MemberName" />
|
||||
<property name="Title" translatable="yes">Settings</property>
|
||||
<property name="WindowPosition">CenterOnParent</property>
|
||||
@@ -978,13 +978,275 @@ QNX/QNX/20090229/source.zip</property>
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox26">
|
||||
<widget class="Gtk.HBox" id="hbox2">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblDatabase">
|
||||
<widget class="Gtk.VBox" id="vbox3">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Database file</property>
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox26">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblDatabase">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Database file</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtDatabase">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnDatabase">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-open Menu</property>
|
||||
<property name="Label" translatable="yes">Choose</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnDatabaseClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox25">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblRepository">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Repository folder</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtRepository">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnRepository">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-open Menu</property>
|
||||
<property name="Label" translatable="yes">Choose</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnRepositoryClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox24">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblTmp">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Temporary folder</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtTmp">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnTmp">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-open Menu</property>
|
||||
<property name="Label" translatable="yes">Choose</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnTmpClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox23">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblUnar">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Path to unar</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtUnar">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnUnar">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-open Menu</property>
|
||||
<property name="Label" translatable="yes">Choose</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnUnarClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblUnarVersion">
|
||||
<property name="MemberName" />
|
||||
<property name="Visible">False</property>
|
||||
<property name="LabelProp" translatable="yes">label1</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">4</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox1">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblCompAlg">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Compression algorithm</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.ComboBox" id="cmbCompAlg">
|
||||
<property name="MemberName" />
|
||||
<property name="IsTextCombo">True</property>
|
||||
<property name="Items" translatable="yes" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">5</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
@@ -994,30 +1256,194 @@ QNX/QNX/20090229/source.zip</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtDatabase">
|
||||
<widget class="Gtk.VBox" id="vbox4">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.CheckButton" id="chkAntivirus">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Label" translatable="yes">Use antivirus?</property>
|
||||
<property name="DrawIndicator">True</property>
|
||||
<property name="HasLabel">True</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Toggled" handler="OnChkAntivirusToggled" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Frame" id="frmClamd">
|
||||
<property name="MemberName" />
|
||||
<property name="ShadowType">None</property>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="GtkAlignment6">
|
||||
<property name="MemberName" />
|
||||
<property name="Xalign">0</property>
|
||||
<property name="Yalign">0</property>
|
||||
<property name="LeftPadding">12</property>
|
||||
<child>
|
||||
<widget class="Gtk.VBox" id="vbox6">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.CheckButton" id="chkClamd">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Label" translatable="yes">Use clamd?</property>
|
||||
<property name="DrawIndicator">True</property>
|
||||
<property name="HasLabel">True</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Toggled" handler="OnChkClamdToggled" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox3">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblClamdHost">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Host</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtClamdHost">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblClamdPort">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">port</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.SpinButton" id="spClamdPort">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Lower">1</property>
|
||||
<property name="Upper">65535</property>
|
||||
<property name="PageIncrement">10</property>
|
||||
<property name="StepIncrement">1</property>
|
||||
<property name="ClimbRate">1</property>
|
||||
<property name="Numeric">True</property>
|
||||
<property name="Value">3310</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnClamdTest">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextOnly</property>
|
||||
<property name="Label" translatable="yes">Test</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnClamdTestClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">4</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblClamdVersion">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">label4</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.CheckButton" id="chkClamdIsLocal">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Label" translatable="yes">Clamd is local?</property>
|
||||
<property name="DrawIndicator">True</property>
|
||||
<property name="HasLabel">True</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="GtkLabel7">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes"><b>clamd</b></property>
|
||||
<property name="UseMarkup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnDatabase">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-open Menu</property>
|
||||
<property name="Label" translatable="yes">Choose</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnDatabaseClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
@@ -1030,215 +1456,6 @@ QNX/QNX/20090229/source.zip</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox25">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblRepository">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Repository folder</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtRepository">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnRepository">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-open Menu</property>
|
||||
<property name="Label" translatable="yes">Choose</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnRepositoryClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox24">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblTmp">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Temporary folder</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtTmp">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnTmp">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-open Menu</property>
|
||||
<property name="Label" translatable="yes">Choose</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnTmpClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox23">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblUnar">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Path to unar</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="txtUnar">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="btnUnar">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-open Menu</property>
|
||||
<property name="Label" translatable="yes">Choose</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnBtnUnarClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblUnarVersion">
|
||||
<property name="MemberName" />
|
||||
<property name="Visible">False</property>
|
||||
<property name="LabelProp" translatable="yes">label1</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">4</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox1">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="lblCompAlg">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Compression algorithm</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.ComboBox" id="cmbCompAlg">
|
||||
<property name="MemberName" />
|
||||
<property name="IsTextCombo">True</property>
|
||||
<property name="Items" translatable="yes" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">5</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox18">
|
||||
<property name="MemberName" />
|
||||
@@ -1280,7 +1497,7 @@ QNX/QNX/20090229/source.zip</property>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">6</property>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
|
||||
@@ -4,6 +4,10 @@ namespace osrepodbmgr
|
||||
{
|
||||
public partial class dlgSettings
|
||||
{
|
||||
private global::Gtk.HBox hbox2;
|
||||
|
||||
private global::Gtk.VBox vbox3;
|
||||
|
||||
private global::Gtk.HBox hbox26;
|
||||
|
||||
private global::Gtk.Label lblDatabase;
|
||||
@@ -44,6 +48,36 @@ namespace osrepodbmgr
|
||||
|
||||
private global::Gtk.ComboBox cmbCompAlg;
|
||||
|
||||
private global::Gtk.VBox vbox4;
|
||||
|
||||
private global::Gtk.CheckButton chkAntivirus;
|
||||
|
||||
private global::Gtk.Frame frmClamd;
|
||||
|
||||
private global::Gtk.Alignment GtkAlignment6;
|
||||
|
||||
private global::Gtk.VBox vbox6;
|
||||
|
||||
private global::Gtk.CheckButton chkClamd;
|
||||
|
||||
private global::Gtk.HBox hbox3;
|
||||
|
||||
private global::Gtk.Label lblClamdHost;
|
||||
|
||||
private global::Gtk.Entry txtClamdHost;
|
||||
|
||||
private global::Gtk.Label lblClamdPort;
|
||||
|
||||
private global::Gtk.SpinButton spClamdPort;
|
||||
|
||||
private global::Gtk.Button btnClamdTest;
|
||||
|
||||
private global::Gtk.Label lblClamdVersion;
|
||||
|
||||
private global::Gtk.CheckButton chkClamdIsLocal;
|
||||
|
||||
private global::Gtk.Label GtkLabel7;
|
||||
|
||||
private global::Gtk.HBox hbox18;
|
||||
|
||||
private global::Gtk.Button btnCancel;
|
||||
@@ -64,6 +98,14 @@ namespace osrepodbmgr
|
||||
w1.Name = "vbox5";
|
||||
w1.Spacing = 6;
|
||||
// Container child vbox5.Gtk.Box+BoxChild
|
||||
this.hbox2 = new global::Gtk.HBox();
|
||||
this.hbox2.Name = "hbox2";
|
||||
this.hbox2.Spacing = 6;
|
||||
// Container child hbox2.Gtk.Box+BoxChild
|
||||
this.vbox3 = new global::Gtk.VBox();
|
||||
this.vbox3.Name = "vbox3";
|
||||
this.vbox3.Spacing = 6;
|
||||
// Container child vbox3.Gtk.Box+BoxChild
|
||||
this.hbox26 = new global::Gtk.HBox();
|
||||
this.hbox26.Name = "hbox26";
|
||||
this.hbox26.Spacing = 6;
|
||||
@@ -99,12 +141,12 @@ namespace osrepodbmgr
|
||||
w5.Position = 2;
|
||||
w5.Expand = false;
|
||||
w5.Fill = false;
|
||||
w1.Add(this.hbox26);
|
||||
global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1[this.hbox26]));
|
||||
this.vbox3.Add(this.hbox26);
|
||||
global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox26]));
|
||||
w6.Position = 0;
|
||||
w6.Expand = false;
|
||||
w6.Fill = false;
|
||||
// Container child vbox5.Gtk.Box+BoxChild
|
||||
// Container child vbox3.Gtk.Box+BoxChild
|
||||
this.hbox25 = new global::Gtk.HBox();
|
||||
this.hbox25.Name = "hbox25";
|
||||
this.hbox25.Spacing = 6;
|
||||
@@ -140,12 +182,12 @@ namespace osrepodbmgr
|
||||
w10.Position = 2;
|
||||
w10.Expand = false;
|
||||
w10.Fill = false;
|
||||
w1.Add(this.hbox25);
|
||||
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(w1[this.hbox25]));
|
||||
this.vbox3.Add(this.hbox25);
|
||||
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox25]));
|
||||
w11.Position = 1;
|
||||
w11.Expand = false;
|
||||
w11.Fill = false;
|
||||
// Container child vbox5.Gtk.Box+BoxChild
|
||||
// Container child vbox3.Gtk.Box+BoxChild
|
||||
this.hbox24 = new global::Gtk.HBox();
|
||||
this.hbox24.Name = "hbox24";
|
||||
this.hbox24.Spacing = 6;
|
||||
@@ -181,12 +223,12 @@ namespace osrepodbmgr
|
||||
w15.Position = 2;
|
||||
w15.Expand = false;
|
||||
w15.Fill = false;
|
||||
w1.Add(this.hbox24);
|
||||
global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(w1[this.hbox24]));
|
||||
this.vbox3.Add(this.hbox24);
|
||||
global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox24]));
|
||||
w16.Position = 2;
|
||||
w16.Expand = false;
|
||||
w16.Fill = false;
|
||||
// Container child vbox5.Gtk.Box+BoxChild
|
||||
// Container child vbox3.Gtk.Box+BoxChild
|
||||
this.hbox23 = new global::Gtk.HBox();
|
||||
this.hbox23.Name = "hbox23";
|
||||
this.hbox23.Spacing = 6;
|
||||
@@ -222,21 +264,21 @@ namespace osrepodbmgr
|
||||
w20.Position = 2;
|
||||
w20.Expand = false;
|
||||
w20.Fill = false;
|
||||
w1.Add(this.hbox23);
|
||||
global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(w1[this.hbox23]));
|
||||
this.vbox3.Add(this.hbox23);
|
||||
global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox23]));
|
||||
w21.Position = 3;
|
||||
w21.Expand = false;
|
||||
w21.Fill = false;
|
||||
// Container child vbox5.Gtk.Box+BoxChild
|
||||
// Container child vbox3.Gtk.Box+BoxChild
|
||||
this.lblUnarVersion = new global::Gtk.Label();
|
||||
this.lblUnarVersion.Name = "lblUnarVersion";
|
||||
this.lblUnarVersion.LabelProp = global::Mono.Unix.Catalog.GetString("label1");
|
||||
w1.Add(this.lblUnarVersion);
|
||||
global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(w1[this.lblUnarVersion]));
|
||||
this.vbox3.Add(this.lblUnarVersion);
|
||||
global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.lblUnarVersion]));
|
||||
w22.Position = 4;
|
||||
w22.Expand = false;
|
||||
w22.Fill = false;
|
||||
// Container child vbox5.Gtk.Box+BoxChild
|
||||
// Container child vbox3.Gtk.Box+BoxChild
|
||||
this.hbox1 = new global::Gtk.HBox();
|
||||
this.hbox1.Name = "hbox1";
|
||||
this.hbox1.Spacing = 6;
|
||||
@@ -257,11 +299,159 @@ namespace osrepodbmgr
|
||||
w24.Position = 1;
|
||||
w24.Expand = false;
|
||||
w24.Fill = false;
|
||||
w1.Add(this.hbox1);
|
||||
global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(w1[this.hbox1]));
|
||||
this.vbox3.Add(this.hbox1);
|
||||
global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox1]));
|
||||
w25.Position = 5;
|
||||
w25.Expand = false;
|
||||
w25.Fill = false;
|
||||
this.hbox2.Add(this.vbox3);
|
||||
global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.vbox3]));
|
||||
w26.Position = 0;
|
||||
w26.Expand = false;
|
||||
w26.Fill = false;
|
||||
// Container child hbox2.Gtk.Box+BoxChild
|
||||
this.vbox4 = new global::Gtk.VBox();
|
||||
this.vbox4.Name = "vbox4";
|
||||
this.vbox4.Spacing = 6;
|
||||
// Container child vbox4.Gtk.Box+BoxChild
|
||||
this.chkAntivirus = new global::Gtk.CheckButton();
|
||||
this.chkAntivirus.CanFocus = true;
|
||||
this.chkAntivirus.Name = "chkAntivirus";
|
||||
this.chkAntivirus.Label = global::Mono.Unix.Catalog.GetString("Use antivirus?");
|
||||
this.chkAntivirus.DrawIndicator = true;
|
||||
this.chkAntivirus.UseUnderline = true;
|
||||
this.vbox4.Add(this.chkAntivirus);
|
||||
global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.chkAntivirus]));
|
||||
w27.Position = 0;
|
||||
w27.Expand = false;
|
||||
w27.Fill = false;
|
||||
// Container child vbox4.Gtk.Box+BoxChild
|
||||
this.frmClamd = new global::Gtk.Frame();
|
||||
this.frmClamd.Name = "frmClamd";
|
||||
this.frmClamd.ShadowType = ((global::Gtk.ShadowType)(0));
|
||||
// Container child frmClamd.Gtk.Container+ContainerChild
|
||||
this.GtkAlignment6 = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
|
||||
this.GtkAlignment6.Name = "GtkAlignment6";
|
||||
this.GtkAlignment6.LeftPadding = ((uint)(12));
|
||||
// Container child GtkAlignment6.Gtk.Container+ContainerChild
|
||||
this.vbox6 = new global::Gtk.VBox();
|
||||
this.vbox6.Name = "vbox6";
|
||||
this.vbox6.Spacing = 6;
|
||||
// Container child vbox6.Gtk.Box+BoxChild
|
||||
this.chkClamd = new global::Gtk.CheckButton();
|
||||
this.chkClamd.CanFocus = true;
|
||||
this.chkClamd.Name = "chkClamd";
|
||||
this.chkClamd.Label = global::Mono.Unix.Catalog.GetString("Use clamd?");
|
||||
this.chkClamd.DrawIndicator = true;
|
||||
this.chkClamd.UseUnderline = true;
|
||||
this.vbox6.Add(this.chkClamd);
|
||||
global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.chkClamd]));
|
||||
w28.Position = 0;
|
||||
w28.Expand = false;
|
||||
w28.Fill = false;
|
||||
// Container child vbox6.Gtk.Box+BoxChild
|
||||
this.hbox3 = new global::Gtk.HBox();
|
||||
this.hbox3.Name = "hbox3";
|
||||
this.hbox3.Spacing = 6;
|
||||
// Container child hbox3.Gtk.Box+BoxChild
|
||||
this.lblClamdHost = new global::Gtk.Label();
|
||||
this.lblClamdHost.Name = "lblClamdHost";
|
||||
this.lblClamdHost.LabelProp = global::Mono.Unix.Catalog.GetString("Host");
|
||||
this.hbox3.Add(this.lblClamdHost);
|
||||
global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.lblClamdHost]));
|
||||
w29.Position = 0;
|
||||
w29.Expand = false;
|
||||
w29.Fill = false;
|
||||
// Container child hbox3.Gtk.Box+BoxChild
|
||||
this.txtClamdHost = new global::Gtk.Entry();
|
||||
this.txtClamdHost.CanFocus = true;
|
||||
this.txtClamdHost.Name = "txtClamdHost";
|
||||
this.txtClamdHost.IsEditable = true;
|
||||
this.txtClamdHost.InvisibleChar = '●';
|
||||
this.hbox3.Add(this.txtClamdHost);
|
||||
global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.txtClamdHost]));
|
||||
w30.Position = 1;
|
||||
// Container child hbox3.Gtk.Box+BoxChild
|
||||
this.lblClamdPort = new global::Gtk.Label();
|
||||
this.lblClamdPort.Name = "lblClamdPort";
|
||||
this.lblClamdPort.LabelProp = global::Mono.Unix.Catalog.GetString("port");
|
||||
this.hbox3.Add(this.lblClamdPort);
|
||||
global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.lblClamdPort]));
|
||||
w31.Position = 2;
|
||||
w31.Expand = false;
|
||||
w31.Fill = false;
|
||||
// Container child hbox3.Gtk.Box+BoxChild
|
||||
this.spClamdPort = new global::Gtk.SpinButton(1, 65535, 1);
|
||||
this.spClamdPort.CanFocus = true;
|
||||
this.spClamdPort.Name = "spClamdPort";
|
||||
this.spClamdPort.Adjustment.PageIncrement = 10;
|
||||
this.spClamdPort.ClimbRate = 1;
|
||||
this.spClamdPort.Numeric = true;
|
||||
this.spClamdPort.Value = 3310;
|
||||
this.hbox3.Add(this.spClamdPort);
|
||||
global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.spClamdPort]));
|
||||
w32.Position = 3;
|
||||
w32.Expand = false;
|
||||
w32.Fill = false;
|
||||
// Container child hbox3.Gtk.Box+BoxChild
|
||||
this.btnClamdTest = new global::Gtk.Button();
|
||||
this.btnClamdTest.CanFocus = true;
|
||||
this.btnClamdTest.Name = "btnClamdTest";
|
||||
this.btnClamdTest.UseUnderline = true;
|
||||
this.btnClamdTest.Label = global::Mono.Unix.Catalog.GetString("Test");
|
||||
this.hbox3.Add(this.btnClamdTest);
|
||||
global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnClamdTest]));
|
||||
w33.Position = 4;
|
||||
w33.Expand = false;
|
||||
w33.Fill = false;
|
||||
this.vbox6.Add(this.hbox3);
|
||||
global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.hbox3]));
|
||||
w34.Position = 1;
|
||||
w34.Expand = false;
|
||||
w34.Fill = false;
|
||||
// Container child vbox6.Gtk.Box+BoxChild
|
||||
this.lblClamdVersion = new global::Gtk.Label();
|
||||
this.lblClamdVersion.Name = "lblClamdVersion";
|
||||
this.lblClamdVersion.LabelProp = global::Mono.Unix.Catalog.GetString("label4");
|
||||
this.vbox6.Add(this.lblClamdVersion);
|
||||
global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.lblClamdVersion]));
|
||||
w35.Position = 2;
|
||||
w35.Expand = false;
|
||||
w35.Fill = false;
|
||||
// Container child vbox6.Gtk.Box+BoxChild
|
||||
this.chkClamdIsLocal = new global::Gtk.CheckButton();
|
||||
this.chkClamdIsLocal.CanFocus = true;
|
||||
this.chkClamdIsLocal.Name = "chkClamdIsLocal";
|
||||
this.chkClamdIsLocal.Label = global::Mono.Unix.Catalog.GetString("Clamd is local?");
|
||||
this.chkClamdIsLocal.DrawIndicator = true;
|
||||
this.chkClamdIsLocal.UseUnderline = true;
|
||||
this.vbox6.Add(this.chkClamdIsLocal);
|
||||
global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.chkClamdIsLocal]));
|
||||
w36.Position = 3;
|
||||
w36.Expand = false;
|
||||
w36.Fill = false;
|
||||
this.GtkAlignment6.Add(this.vbox6);
|
||||
this.frmClamd.Add(this.GtkAlignment6);
|
||||
this.GtkLabel7 = new global::Gtk.Label();
|
||||
this.GtkLabel7.Name = "GtkLabel7";
|
||||
this.GtkLabel7.LabelProp = global::Mono.Unix.Catalog.GetString("<b>clamd</b>");
|
||||
this.GtkLabel7.UseMarkup = true;
|
||||
this.frmClamd.LabelWidget = this.GtkLabel7;
|
||||
this.vbox4.Add(this.frmClamd);
|
||||
global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.frmClamd]));
|
||||
w39.Position = 1;
|
||||
w39.Expand = false;
|
||||
w39.Fill = false;
|
||||
this.hbox2.Add(this.vbox4);
|
||||
global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.vbox4]));
|
||||
w40.Position = 1;
|
||||
w40.Expand = false;
|
||||
w40.Fill = false;
|
||||
w1.Add(this.hbox2);
|
||||
global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(w1[this.hbox2]));
|
||||
w41.Position = 0;
|
||||
w41.Expand = false;
|
||||
w41.Fill = false;
|
||||
// Container child vbox5.Gtk.Box+BoxChild
|
||||
this.hbox18 = new global::Gtk.HBox();
|
||||
this.hbox18.Name = "hbox18";
|
||||
@@ -274,10 +464,10 @@ namespace osrepodbmgr
|
||||
this.btnCancel.UseUnderline = true;
|
||||
this.btnCancel.Label = "gtk-cancel";
|
||||
this.hbox18.Add(this.btnCancel);
|
||||
global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox18[this.btnCancel]));
|
||||
w26.Position = 0;
|
||||
w26.Expand = false;
|
||||
w26.Fill = false;
|
||||
global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.hbox18[this.btnCancel]));
|
||||
w42.Position = 0;
|
||||
w42.Expand = false;
|
||||
w42.Fill = false;
|
||||
// Container child hbox18.Gtk.Box+BoxChild
|
||||
this.btnApply = new global::Gtk.Button();
|
||||
this.btnApply.CanFocus = true;
|
||||
@@ -286,19 +476,19 @@ namespace osrepodbmgr
|
||||
this.btnApply.UseUnderline = true;
|
||||
this.btnApply.Label = "gtk-apply";
|
||||
this.hbox18.Add(this.btnApply);
|
||||
global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.hbox18[this.btnApply]));
|
||||
w27.PackType = ((global::Gtk.PackType)(1));
|
||||
w27.Position = 1;
|
||||
w27.Expand = false;
|
||||
w27.Fill = false;
|
||||
global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(this.hbox18[this.btnApply]));
|
||||
w43.PackType = ((global::Gtk.PackType)(1));
|
||||
w43.Position = 1;
|
||||
w43.Expand = false;
|
||||
w43.Fill = false;
|
||||
w1.Add(this.hbox18);
|
||||
global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(w1[this.hbox18]));
|
||||
w28.Position = 6;
|
||||
w28.Expand = false;
|
||||
w28.Fill = false;
|
||||
global::Gtk.Box.BoxChild w44 = ((global::Gtk.Box.BoxChild)(w1[this.hbox18]));
|
||||
w44.Position = 1;
|
||||
w44.Expand = false;
|
||||
w44.Fill = false;
|
||||
// Internal child osrepodbmgr.dlgSettings.ActionArea
|
||||
global::Gtk.HButtonBox w29 = this.ActionArea;
|
||||
w29.Name = "__gtksharp_108_Stetic_TopLevelDialog_ActionArea";
|
||||
global::Gtk.HButtonBox w45 = this.ActionArea;
|
||||
w45.Name = "__gtksharp_108_Stetic_TopLevelDialog_ActionArea";
|
||||
// Container child __gtksharp_108_Stetic_TopLevelDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
|
||||
this.btnDialog = new global::Gtk.Button();
|
||||
this.btnDialog.CanFocus = true;
|
||||
@@ -306,22 +496,25 @@ namespace osrepodbmgr
|
||||
this.btnDialog.UseUnderline = true;
|
||||
this.btnDialog.Label = global::Mono.Unix.Catalog.GetString("GtkButton");
|
||||
this.AddActionWidget(this.btnDialog, 0);
|
||||
global::Gtk.ButtonBox.ButtonBoxChild w30 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w29[this.btnDialog]));
|
||||
w30.Expand = false;
|
||||
w30.Fill = false;
|
||||
global::Gtk.ButtonBox.ButtonBoxChild w46 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w45[this.btnDialog]));
|
||||
w46.Expand = false;
|
||||
w46.Fill = false;
|
||||
if((this.Child != null))
|
||||
{
|
||||
this.Child.ShowAll();
|
||||
}
|
||||
this.DefaultWidth = 400;
|
||||
this.DefaultWidth = 680;
|
||||
this.DefaultHeight = 250;
|
||||
this.lblUnarVersion.Hide();
|
||||
w29.Hide();
|
||||
w45.Hide();
|
||||
this.Show();
|
||||
this.btnDatabase.Clicked += new global::System.EventHandler(this.OnBtnDatabaseClicked);
|
||||
this.btnRepository.Clicked += new global::System.EventHandler(this.OnBtnRepositoryClicked);
|
||||
this.btnTmp.Clicked += new global::System.EventHandler(this.OnBtnTmpClicked);
|
||||
this.btnUnar.Clicked += new global::System.EventHandler(this.OnBtnUnarClicked);
|
||||
this.chkAntivirus.Toggled += new global::System.EventHandler(this.OnChkAntivirusToggled);
|
||||
this.chkClamd.Toggled += new global::System.EventHandler(this.OnChkClamdToggled);
|
||||
this.btnClamdTest.Clicked += new global::System.EventHandler(this.OnBtnClamdTestClicked);
|
||||
this.btnCancel.Clicked += new global::System.EventHandler(this.OnBtnCancelClicked);
|
||||
this.btnApply.Clicked += new global::System.EventHandler(this.OnBtnApplyClicked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user