From: <br...@us...> - 2008-11-06 09:54:03
|
Revision: 430 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=430&view=rev Author: brus07 Date: 2008-11-06 09:53:57 +0000 (Thu, 06 Nov 2008) Log Message: ----------- Added name of main form to Config. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/LibraryExtention/Configuration.cs ACMServer/trunk/ACMServer/Mediator/Config.ini ACMServer/trunk/ACMServer/Mediator/Form1.cs ACMServer/trunk/ACMServer/Mediator/TesterConfig.ini Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/Configuration.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/Configuration.cs 2008-11-04 18:20:49 UTC (rev 429) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/Configuration.cs 2008-11-06 09:53:57 UTC (rev 430) @@ -32,6 +32,21 @@ public static string PluginLeftDirectory; public static string PluginRightDirectory; + private static string mainFormName; + public static string MainFormName + { + get + { + if (String.IsNullOrEmpty(mainFormName) == true) + return "MainForm"; + return mainFormName; + } + private set + { + mainFormName = value; + } + } + private static string LoadStringFromDifferentFile(string sectionName, string keyName) { string defaultString = "#$%^$343@#$"; @@ -53,6 +68,7 @@ { PluginLeftDirectory = LoadStringFromDifferentFile("Plugin", "LeftDirectory"); PluginRightDirectory = LoadStringFromDifferentFile("Plugin", "RightDirectory"); + MainFormName = LoadStringFromDifferentFile("MainForm", "MainFormName"); } } } Modified: ACMServer/trunk/ACMServer/Mediator/Config.ini =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Config.ini 2008-11-04 18:20:49 UTC (rev 429) +++ ACMServer/trunk/ACMServer/Mediator/Config.ini 2008-11-06 09:53:57 UTC (rev 430) @@ -1,3 +1,6 @@ +[MainForm] +MainFormName=Mediator + [Plugin] LeftDirectory=Dll_Web RightDirectory=Dll_Tester \ No newline at end of file Modified: ACMServer/trunk/ACMServer/Mediator/Form1.cs =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Form1.cs 2008-11-04 18:20:49 UTC (rev 429) +++ ACMServer/trunk/ACMServer/Mediator/Form1.cs 2008-11-06 09:53:57 UTC (rev 430) @@ -24,6 +24,7 @@ InitializeComponent(); string s = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName())[0].ToString(); textBox2.Text = s; + this.Text = Configuration.MainFormName; } Modified: ACMServer/trunk/ACMServer/Mediator/TesterConfig.ini =================================================================== --- ACMServer/trunk/ACMServer/Mediator/TesterConfig.ini 2008-11-04 18:20:49 UTC (rev 429) +++ ACMServer/trunk/ACMServer/Mediator/TesterConfig.ini 2008-11-06 09:53:57 UTC (rev 430) @@ -1,3 +1,6 @@ +[MainForm] +MainFormName=Tester + [Plugin] LeftDirectory=Dll_Web1 RightDirectory=Dll_Tester1 \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2008-11-07 00:21:30
|
Revision: 432 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=432&view=rev Author: brus07 Date: 2008-11-07 00:21:23 +0000 (Fri, 07 Nov 2008) Log Message: ----------- Added new Plugin. In this plugin can submit source code from application, without web interface (this need for easy testing). Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln Added Paths: ----------- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/Properties/ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/Properties/AssemblyInfo.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.csproj ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.resx Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2008-11-06 11:48:11 UTC (rev 431) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2008-11-07 00:21:23 UTC (rev 432) @@ -31,6 +31,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SocketClientGatePlugin", "Plugins\TesterPlugins\SocketClientGatePlugin\SocketClientGatePlugin.csproj", "{79EB24DD-AF0D-40D0-974E-198F4D8C92BC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubmitterGUIPlugin", "Plugins\TesterPlugins\SubmitterGUIPlugin\SubmitterGUIPlugin.csproj", "{E255910C-499D-48E2-9846-7EB24DE32C4A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -81,6 +83,10 @@ {79EB24DD-AF0D-40D0-974E-198F4D8C92BC}.Debug|Any CPU.Build.0 = Debug|Any CPU {79EB24DD-AF0D-40D0-974E-198F4D8C92BC}.Release|Any CPU.ActiveCfg = Release|Any CPU {79EB24DD-AF0D-40D0-974E-198F4D8C92BC}.Release|Any CPU.Build.0 = Release|Any CPU + {E255910C-499D-48E2-9846-7EB24DE32C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E255910C-499D-48E2-9846-7EB24DE32C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E255910C-499D-48E2-9846-7EB24DE32C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E255910C-499D-48E2-9846-7EB24DE32C4A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -97,5 +103,6 @@ {9462E3BD-67AD-4887-BF4C-8B6A25048941} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} {8F305004-8FB7-4F85-8063-3A7041DB840F} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {79EB24DD-AF0D-40D0-974E-198F4D8C92BC} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} + {E255910C-499D-48E2-9846-7EB24DE32C4A} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} EndGlobalSection EndGlobal Property changes on: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin ___________________________________________________________________ Added: svn:ignore + bin obj Added: tsvn:logminsize + 5 Property changes on: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/Properties/AssemblyInfo.cs 2008-11-07 00:21:23 UTC (rev 432) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SubmitterGUIPlugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Home")] +[assembly: AssemblyProduct("SubmitterGUIPlugin")] +[assembly: AssemblyCopyright("Copyright © Home 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("60412f5e-1284-4eb5-b14c-b659440dd84a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs 2008-11-07 00:21:23 UTC (rev 432) @@ -0,0 +1,52 @@ +using System; +using AcmContester.Plugins.PluginsFramework; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; + +namespace AcmContester.Plugins.TesterPlugins.SubmitterGUIPlugin +{ + public class SubmitterGUIPlugin : BaseMediatorPlugin + { + private int submitID = 0; + + public SubmitterGUIPlugin() + { + base.Control = new SubmitterGUIUserControl(); + ((SubmitterGUIUserControl)base.Control).SetPlugin(this); + } + + public bool SendSubmit(string sourceCode, int language) + { + Submit submit = new Submit(); + submitID++; + submit.id = submitID; + submit.sourceCode = sourceCode; + submit.language = language; + + SystemMessage message = new SystemMessage(submit.ToString(), "TestingSubmit"); + base.DataArrived(message); + + + string text = submit.id.ToString() + + Environment.NewLine + + submit.sourceCode; + ((SubmitterGUIUserControl)base.Control).AddText("Send", text); + + return true; + } + + public override void Send(SystemMessage message) + { + if (message.IsType("TestingResult") == true) + { + // ce pryjshow rezult testuvannja + Result result = Result.CreateFromXml(message.Message); + string text = result.Submit.id.ToString() + ": " + result.res + + Environment.NewLine + + "usedMemory:" + result.usedMemory.ToString() + " " + + "usedTime:" + result.usedTime.ToString(); + ((SubmitterGUIUserControl)base.Control).AddText("Receive", text); + } + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.csproj =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.csproj 2008-11-07 00:21:23 UTC (rev 432) @@ -0,0 +1,79 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{E255910C-499D-48E2-9846-7EB24DE32C4A}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>SubmitterGUIPlugin</RootNamespace> + <AssemblyName>SubmitterGUIPlugin</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="LogDataGridView, Version=1.1.3198.29045, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\Resource\LogDataGridView.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="SubmitterGUIPlugin.cs" /> + <Compile Include="SubmitterGUIUserControl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="SubmitterGUIUserControl.Designer.cs"> + <DependentUpon>SubmitterGUIUserControl.cs</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\Library\Data\Data.csproj"> + <Project>{30C0EFA3-36A8-4C6F-8FEC-28F771D4933F}</Project> + <Name>Data</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Library\LibraryExtention\LibraryExtention.csproj"> + <Project>{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}</Project> + <Name>LibraryExtention</Name> + </ProjectReference> + <ProjectReference Include="..\..\PluginsFramework\PluginsFramework.csproj"> + <Project>{69FB4176-F298-4AF7-B714-B6758AA9A58E}</Project> + <Name>PluginsFramework</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="SubmitterGUIUserControl.resx"> + <SubType>Designer</SubType> + <DependentUpon>SubmitterGUIUserControl.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs 2008-11-07 00:21:23 UTC (rev 432) @@ -0,0 +1,113 @@ +namespace AcmContester.Plugins.TesterPlugins.SubmitterGUIPlugin +{ + partial class SubmitterGUIUserControl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.sourceTextBox = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.languageTextBox = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.Location = new System.Drawing.Point(3, 168); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(387, 164); + this.panel1.TabIndex = 0; + // + // sourceTextBox + // + this.sourceTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.sourceTextBox.Location = new System.Drawing.Point(3, 29); + this.sourceTextBox.Multiline = true; + this.sourceTextBox.Name = "sourceTextBox"; + this.sourceTextBox.Size = new System.Drawing.Size(387, 100); + this.sourceTextBox.TabIndex = 1; + this.sourceTextBox.Text = "begin\r\nend."; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(3, 135); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(387, 23); + this.button1.TabIndex = 2; + this.button1.Text = "Submit"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // languageTextBox + // + this.languageTextBox.Enabled = false; + this.languageTextBox.Location = new System.Drawing.Point(64, 3); + this.languageTextBox.Name = "languageTextBox"; + this.languageTextBox.Size = new System.Drawing.Size(100, 20); + this.languageTextBox.TabIndex = 3; + this.languageTextBox.Text = "2"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 6); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(55, 13); + this.label1.TabIndex = 4; + this.label1.Text = "Language"; + // + // SubmitterGUIUserControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label1); + this.Controls.Add(this.languageTextBox); + this.Controls.Add(this.button1); + this.Controls.Add(this.sourceTextBox); + this.Controls.Add(this.panel1); + this.Name = "SubmitterGUIUserControl"; + this.Size = new System.Drawing.Size(393, 335); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.TextBox sourceTextBox; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TextBox languageTextBox; + private System.Windows.Forms.Label label1; + } +} Added: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs 2008-11-07 00:21:23 UTC (rev 432) @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +namespace AcmContester.Plugins.TesterPlugins.SubmitterGUIPlugin +{ + public partial class SubmitterGUIUserControl : UserControl + { + SubmitterGUIPlugin plugin; + + public SubmitterGUIUserControl() + { + InitializeComponent(); + initGridSe(); + } + + LogDataGridView.LogDataGridView view = new LogDataGridView.LogDataGridView(); + private void initGridSe() + { + view.Dock = DockStyle.Fill; + panel1.Controls.Add(view); + } + + public void SetPlugin(SubmitterGUIPlugin pl) + { + plugin = pl; + } + + + public void AddText(string type, string text) + { + view.AddRow(new LogDataGridView.SystemMessage(text, type)); + } + + private void button1_Click(object sender, EventArgs e) + { + int lang = Int32.Parse(languageTextBox.Text); + plugin.SendSubmit(sourceTextBox.Text, lang); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.resx =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.resx (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.resx 2008-11-07 00:21:23 UTC (rev 432) @@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2008-12-09 20:36:26
|
Revision: 440 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=440&view=rev Author: brus07 Date: 2008-12-09 20:36:22 +0000 (Tue, 09 Dec 2008) Log Message: ----------- Added LanguageID and ProblemID to Submit structure. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Data/Submit.cs ACMServer/trunk/ACMServer/Library/testData/data.xsd ACMServer/trunk/ACMServer/Library/testData/data.xsx ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs ACMServer/trunk/ACMServer/Runner/Class1.cs Modified: ACMServer/trunk/ACMServer/Library/Data/Submit.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/Submit.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Library/Data/Submit.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -11,6 +11,8 @@ { [XmlElement("id", typeof(int))] public int id; + [XmlElement("problem", typeof(int))] + public int pbolemID; [XmlElement("sourceCode", typeof(string))] public string sourceCode; [XmlElement("language", typeof(int))] Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsd =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsd 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsd 2008-12-09 20:36:22 UTC (rev 440) @@ -4,6 +4,7 @@ <xs:sequence maxOccurs="1"> <!-- потрібно щоб ці записи могли слідувати у довільному порядку --> <xs:element name="id" type="xs:positiveInteger" /> + <xs:element name="problem" type="xs:positiveInteger" /> <xs:element name="sourceCode" type="xs:string" /> <xs:element name="language"> <!-- обмеження для ID мови програмування --> Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsx =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsx 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsx 2008-12-09 20:36:22 UTC (rev 440) @@ -14,16 +14,16 @@ </_x0028_group1_x0029__XmlSequence> </submitList_XmlElement> <resultType_XmlComplexType left="1317" top="7932" width="5292" height="2831" selected="0" zOrder="19" index="2" expanded="1"> - <submit_XmlElement left="7243" top="7932" width="5292" height="2831" selected="0" zOrder="21" index="0" expanded="1"> + <submit_XmlElement left="7243" top="7932" width="5292" height="2831" selected="0" zOrder="21" index="4" expanded="1"> <language_XmlElement left="13169" top="8990" width="5292" height="714" selected="0" zOrder="24" index="2" expanded="0" /> </submit_XmlElement> </resultType_XmlComplexType> <result_XmlElement left="1317" top="11271" width="5292" height="2831" selected="0" zOrder="27" index="3" expanded="1"> - <submit_XmlElement left="7243" top="11271" width="5292" height="2831" selected="0" zOrder="29" index="0" expanded="1"> + <submit_XmlElement left="7243" top="11271" width="5292" height="2831" selected="0" zOrder="29" index="4" expanded="1"> <language_XmlElement left="13169" top="12329" width="5292" height="714" selected="0" zOrder="32" index="2" expanded="0" /> </submit_XmlElement> </result_XmlElement> <submit_XmlElement left="2910" top="14393" width="5292" height="2831" selected="0" zOrder="35" index="4" expanded="1"> - <language_XmlElement left="8836" top="15385" width="5292" height="714" selected="0" zOrder="37" index="2" expanded="0" /> + <language_XmlElement left="8836" top="15451" width="5292" height="714" selected="0" zOrder="37" index="2" expanded="0" /> </submit_XmlElement> </XSDDesignerLayout> \ No newline at end of file Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -15,11 +15,12 @@ ((SubmitterGUIUserControl)base.Control).SetPlugin(this); } - public bool SendSubmit(string sourceCode, int language) + public bool SendSubmit(string sourceCode, int language, int problem) { Submit submit = new Submit(); submitID++; submit.id = submitID; + submit.pbolemID = problem; submit.sourceCode = sourceCode; submit.language = language; Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -33,6 +33,8 @@ this.button1 = new System.Windows.Forms.Button(); this.languageTextBox = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.problemTextBox = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // panel1 @@ -75,7 +77,7 @@ this.languageTextBox.Name = "languageTextBox"; this.languageTextBox.Size = new System.Drawing.Size(100, 20); this.languageTextBox.TabIndex = 3; - this.languageTextBox.Text = "2"; + this.languageTextBox.Text = "1"; // // label1 // @@ -86,10 +88,29 @@ this.label1.TabIndex = 4; this.label1.Text = "Language"; // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(170, 6); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(45, 13); + this.label2.TabIndex = 6; + this.label2.Text = "Problem"; + // + // problemTextBox + // + this.problemTextBox.Location = new System.Drawing.Point(221, 3); + this.problemTextBox.Name = "problemTextBox"; + this.problemTextBox.Size = new System.Drawing.Size(100, 20); + this.problemTextBox.TabIndex = 5; + this.problemTextBox.Text = "1"; + // // SubmitterGUIUserControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label2); + this.Controls.Add(this.problemTextBox); this.Controls.Add(this.label1); this.Controls.Add(this.languageTextBox); this.Controls.Add(this.button1); @@ -109,5 +130,7 @@ private System.Windows.Forms.Button button1; private System.Windows.Forms.TextBox languageTextBox; private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox problemTextBox; } } Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -39,7 +39,8 @@ private void button1_Click(object sender, EventArgs e) { int lang = Int32.Parse(languageTextBox.Text); - plugin.SendSubmit(sourceTextBox.Text, lang); + int problem = Int32.Parse(problemTextBox.Text); + plugin.SendSubmit(sourceTextBox.Text, lang, problem); } } } Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -38,14 +38,13 @@ string code = submit.sourceCode; code = HtmlEntityDecode(code); string id = submit.id.ToString(); - Result result = new Result(submit); try { //Console.SetOut(File.CreateText("logout.txt")); string[] data = File.ReadAllLines("InData.txt"); - + data[2] = data[2] + submit.pbolemID.ToString() + "\\"; string src = code; TestEnv test = new TestEnv(src, data[0], data[1], data[2]); test.Compile(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Di...@us...> - 2009-01-17 10:52:40
|
Revision: 457 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=457&view=rev Author: DixonD Date: 2009-01-17 10:52:35 +0000 (Sat, 17 Jan 2009) Log Message: ----------- Some refactoring was done. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Connector/Getter/WebGetterOld.cs ACMServer/trunk/ACMServer/Library/Connector/SocketClient.cs ACMServer/trunk/ACMServer/Library/Connector/SocketClientTask.cs ACMServer/trunk/ACMServer/Library/Connector/SocketServer.cs ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs ACMServer/trunk/ACMServer/Library/Connector/WebConnector.cs ACMServer/trunk/ACMServer/Library/Data/DataMediator.cs ACMServer/trunk/ACMServer/Library/Data/Result.cs ACMServer/trunk/ACMServer/Library/Data/Submit.cs ACMServer/trunk/ACMServer/Library/Data/SubmitList.cs ACMServer/trunk/ACMServer/Library/LibraryExtention/Configuration.cs ACMServer/trunk/ACMServer/Library/LibraryExtention/IniFile.cs ACMServer/trunk/ACMServer/Library/LibraryExtention/Log.cs ACMServer/trunk/ACMServer/Library/LibraryExtention/Reader.cs ACMServer/trunk/ACMServer/Library/LibraryExtention/SystemMessage.cs ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlHelper.cs ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlSerializer.cs ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlValidator.cs ACMServer/trunk/ACMServer/Plugins/PluginsFramework/BaseMediatorPlugin.cs ACMServer/trunk/ACMServer/Plugins/PluginsFramework/MediatorKernel.cs ACMServer/trunk/ACMServer/Plugins/PluginsFramework/MediatorKernelGUI.cs ACMServer/trunk/ACMServer/Plugins/PluginsFramework/PluginsLoader.cs ACMServer/trunk/ACMServer/Runner/Class1.cs ACMServer/trunk/ACMServer/Tester/Form1.cs ACMServer/trunk/ACMServer/Tester/Library/SocketClientGate.cs ACMServer/trunk/ACMServer/Tester/Library/WorkMediator.cs ACMServer/trunk/ACMServer/Tester/Library/WorkRunner.cs ACMServer/trunk/ACMServer/Tester/Program.cs Modified: ACMServer/trunk/ACMServer/Library/Connector/Getter/WebGetterOld.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/Getter/WebGetterOld.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Connector/Getter/WebGetterOld.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,10 +1,4 @@ using System; -using System.Threading; -using System.Windows.Forms; -using System.Net; -using System.IO; -using System.Text; -using AcmContester.Library.LibraryExtention.Data; using AcmContester.Library.LibraryExtention; namespace AcmContester.Library.Connector.Getter Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketClient.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/SocketClient.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Connector/SocketClient.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,4 +1,3 @@ -using System; using JadBenAutho.EasySocket; using AcmContester.Library.LibraryExtention; @@ -6,14 +5,14 @@ { public class SocketClient: AbstractConnector { - string ip = "127.0.0.1"; - int port = 4120; + readonly string ip = "127.0.0.1"; + readonly int port = 4120; EasyClient client; void init() { - client = new EasyClient(new ServerInfo(this.ip, this.port, true)); + client = new EasyClient(new ServerInfo(ip, port, true)); client.DataArrived += DataArrived; } @@ -23,13 +22,13 @@ } public SocketClient(string IP) { - this.ip = IP; + ip = IP; init(); } public SocketClient(string IP, int Port) { - this.ip = IP; - this.port = Port; + ip = IP; + port = Port; init(); } @@ -37,7 +36,7 @@ { if (client == null) { - client = new EasyClient(new ServerInfo(this.ip, this.port, true)); + client = new EasyClient(new ServerInfo(ip, port, true)); } if (client.IsConnected == false) client.ConnectToServerAsync(); @@ -46,7 +45,7 @@ { if (client != null) { - if (client.IsConnected == true) + if (client.IsConnected) client.DisconnectFromServer(); client.Dispose(); client = null; Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketClientTask.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/SocketClientTask.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Connector/SocketClientTask.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,24 +1,23 @@ -using System; using AcmContester.Library.LibraryExtention; namespace AcmContester.Library.Connector { public class SocketClientTask: AbstractConnector { - SocketClient client; + readonly SocketClient client; private string descriptionMessage = ""; public SocketClientTask(string IP) { client = new SocketClient(IP); - client.onDataArrived +=new SocketClient.DataArrivedDelegate(SocketClientGate_onDataArrived); + client.onDataArrived +=SocketClientGate_onDataArrived; } void SocketClientGate_onDataArrived(SystemMessage message) { - if (message.IsType("SystemTestBusyMessage") == true) + if (message.IsType("SystemTestBusyMessage")) { - if (SystemMessageX(message) == true) + if (SystemMessageX(message)) return; } @@ -38,21 +37,13 @@ if (mes[0] == "test") { OnAddLogText("SystemReceive", message); - string result = ""; - if (IsBusy() == true) - { - result = "busy"; - } - else - { - result = "free"; - } + string result = IsBusy() ? "busy" : "free"; for (int i = 1; i < mes.Length; i++) { result += " " + mes[i]; } OnAddLogText("SystemSend", result); - this.Send(new SystemMessage(result, _message.Type, _message.Description)); + Send(new SystemMessage(result, _message.Type, _message.Description)); return true; } return false; Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketServer.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/SocketServer.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Connector/SocketServer.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -6,7 +6,7 @@ { public class SocketServer: AbstractConnector { - int port = 4120; + readonly int port = 4120; EasyServer server; private void init() @@ -21,7 +21,7 @@ } public SocketServer(int Port) { - this.port = Port; + port = Port; init(); } Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -6,13 +6,13 @@ { public class SocketServerTask: AbstractConnector { - SocketServer server; + readonly SocketServer server; //val: //free - vilnyj //busy - zajnjatyj //unknown - nevidomyj - Dictionary<int, string> cleintStatus = new Dictionary<int, string>(); + readonly Dictionary<int, string> clientStatus = new Dictionary<int, string>(); public SocketServerTask() @@ -49,23 +49,23 @@ { //TODO: dlja cjogo bulo potribno pidkljuchyty EasySocket // potim ne zabuty jogo vidjednaty vid chogo proektu - cleintStatus[server.ClientsList[clientIndex].GetHashCode()] = "busy"; + clientStatus[server.ClientsList[clientIndex].GetHashCode()] = "busy"; message.Description = server.ClientsList[clientIndex].GetHashCode().ToString(); ServerSend(message, clientIndex); } private void DataArrived(SystemMessage sysMes) { - if (sysMes.IsType("SystemTestBusyMessage") == true) + if (sysMes.IsType("SystemTestBusyMessage")) { - if (SystemMessageX(sysMes) == true) + if (SystemMessageX(sysMes)) return; } DataArriver(sysMes); } protected virtual void DataArriver(SystemMessage message) { - cleintStatus[Int32.Parse(message.Description)] = "free"; + clientStatus[Int32.Parse(message.Description)] = "free"; OnDataArrived(message); } @@ -75,7 +75,7 @@ } - Queue<string> q = new Queue<string>(); + readonly Queue<string> q = new Queue<string>(); /// <summary> /// \xCF\xEE\xE2\xE5\xF0\xF2\xE0\xBA \xF1\xEF\xE8\xF1\xEE\xEA \xE2\xB3\xEB\xFC\xED\xE8\xF5 \xF2\xE5\xF1\xF2\xE5\xF0\xB3\xE2. @@ -97,14 +97,14 @@ string curHashCode = DateTime.Now.GetHashCode().ToString(); for (int i = 0; i < server.CountClients; i++) { - if (cleintStatus.ContainsKey(server.ClientsList[i].GetHashCode()) == false) + if (clientStatus.ContainsKey(server.ClientsList[i].GetHashCode()) == false) { - cleintStatus[server.ClientsList[i].GetHashCode()] = "unknown"; + clientStatus[server.ClientsList[i].GetHashCode()] = "unknown"; } - if (cleintStatus[server.ClientsList[i].GetHashCode()] == "unknown") + if (clientStatus[server.ClientsList[i].GetHashCode()] == "unknown") { string message = "test"; - message += " " + server.ClientsList[i].GetHashCode().ToString(); + message += " " + server.ClientsList[i].GetHashCode(); message += " " + curHashCode; SystemMessage mes = new SystemMessage(message, "SystemTestBusyMessage"); ServerSend(mes, i); @@ -115,7 +115,7 @@ Dictionary<string, int> preResult = new Dictionary<string, int>(); while (server != null && preResult.Count < server.CountClients) { - if (((TimeSpan)(DateTime.Now - start)).TotalSeconds > 1.0) + if ((DateTime.Now - start).TotalSeconds > 1.0) { break; } @@ -129,14 +129,14 @@ string[] mes = curStr.Split(chars); if (mes[0] == "free" && curHashCode == mes[2]) { - cleintStatus[Int32.Parse(mes[1])] = "free"; + clientStatus[Int32.Parse(mes[1])] = "free"; preResult.Add(mes[1], 0); } else { if (mes[0] == "busy") { - cleintStatus[Int32.Parse(mes[1])] = "busy"; + clientStatus[Int32.Parse(mes[1])] = "busy"; } } } @@ -147,9 +147,9 @@ List<int> result = new List<int>(); for (int i = 0; i < server.CountClients; i++) { - if (cleintStatus.ContainsKey(server.ClientsList[i].GetHashCode()) == false) - cleintStatus[server.ClientsList[i].GetHashCode()] = "unknown"; - if (cleintStatus[server.ClientsList[i].GetHashCode()] == "free") + if (clientStatus.ContainsKey(server.ClientsList[i].GetHashCode()) == false) + clientStatus[server.ClientsList[i].GetHashCode()] = "unknown"; + if (clientStatus[server.ClientsList[i].GetHashCode()] == "free") result.Add(i); //string hashCode = server.ClientsList[i].GetHashCode().ToString(); //if (preResult.ContainsKey(hashCode) == true) Modified: ACMServer/trunk/ACMServer/Library/Connector/WebConnector.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/WebConnector.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Connector/WebConnector.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -7,12 +7,12 @@ { public class WebConnector: AbstractConnector { - Timer timer = new Timer(); + readonly Timer timer = new Timer(); public event EventHandler onChecking; public event EventHandler onChecked; - private IGetter getter = new WebGetterOld(); + private readonly IGetter getter = new WebGetterOld(); private WebConnector() { @@ -29,17 +29,15 @@ private void InitTimer() { timer.Interval = 10 * 1000; - timer.Elapsed += new ElapsedEventHandler(OnTimedEvent); + timer.Elapsed += OnTimedEvent; timer.Enabled = true; } public string Address { - //TODO: get { - return getter.PathToSource; } set Modified: ACMServer/trunk/ACMServer/Library/Data/DataMediator.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/DataMediator.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Data/DataMediator.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -8,7 +8,7 @@ { private int secondToLive = 60; - private Dictionary<int, DateTime> d = new Dictionary<int, DateTime>(); + private readonly Dictionary<int, DateTime> d = new Dictionary<int, DateTime>(); public int SecondToLive { @@ -74,7 +74,7 @@ public void Return(Result data) { DeleteOld(); - if (Contains(data.Submit.GetHashCode()) == true) + if (Contains(data.Submit.GetHashCode())) { d.Remove(data.Submit.GetHashCode()); } Modified: ACMServer/trunk/ACMServer/Library/Data/Result.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/Result.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Data/Result.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,4 +1,3 @@ -using System; using System.Xml.Serialization; using AcmContester.AcmLibraryExtention.XML; @@ -29,16 +28,13 @@ [XmlElement("usedMemory", typeof(int))] public int usedMemory; - string temp; + readonly string temp; - private Result() - { - } - public Result(Submit ssubmit) { submit = ssubmit; } + public Result(string message) { //TODO @@ -58,8 +54,7 @@ } public string ToStringX() { - string result = XmlSerializer<Result>.Serialization(this); - return result; + return XmlSerializer<Result>.Serialization(this); } } } Modified: ACMServer/trunk/ACMServer/Library/Data/Submit.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/Submit.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Data/Submit.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,7 +1,5 @@ using System; using AcmContester.AcmLibraryExtention.XML; -using System.IO; -using System.Xml; using System.Xml.Serialization; namespace AcmContester.Library.LibraryExtention.Data Modified: ACMServer/trunk/ACMServer/Library/Data/SubmitList.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/SubmitList.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/Data/SubmitList.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -8,7 +8,7 @@ [XmlRoot("submitList")] public class SubmitList { - ArrayList listSubmits; + readonly ArrayList listSubmits; public SubmitList() { @@ -37,7 +37,7 @@ set { if (value == null) return; - Submit[] submits = (Submit[])value; + Submit[] submits = value; listSubmits.Clear(); foreach (Submit item in submits) listSubmits.Add(item); Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/Configuration.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/Configuration.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/Configuration.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -6,7 +6,7 @@ { public static string ExecutablePath; - static readonly string defaultConfigFileName = "config.ini"; + private const string defaultConfigFileName = "config.ini"; static public string DefaultConfigFileName { get @@ -37,7 +37,7 @@ { get { - if (String.IsNullOrEmpty(mainFormName) == true) + if (String.IsNullOrEmpty(mainFormName)) return "MainForm"; return mainFormName; } @@ -49,7 +49,7 @@ private static string LoadStringFromDifferentFile(string sectionName, string keyName) { - string defaultString = "#$%^$343@#$"; + const string defaultString = "#$%^$343@#$"; string result = defaultString; if (concreteConfigFileName != null) { Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/IniFile.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/IniFile.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/IniFile.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -26,7 +26,7 @@ public const int MaxSectionSize = 32767; // 32 KB //The path of the file we are operating on. - private string m_path; + private readonly string m_path; #region P/Invoke declares @@ -132,7 +132,7 @@ private string[] GetArreyKeys(string sectionName, string keyName) { - string[] allKeys = this.GetKeyNames(sectionName); + string[] allKeys = GetKeyNames(sectionName); List<string> list = new List<string>(); for (int i = 0; i < allKeys.Length; i++) { @@ -172,13 +172,13 @@ if (keyName == null) throw new ArgumentNullException("keyName"); - StringBuilder retval = new StringBuilder(IniFile.MaxSectionSize); + StringBuilder retval = new StringBuilder(MaxSectionSize); NativeMethods.GetPrivateProfileString(sectionName, keyName, defaultValue, retval, - IniFile.MaxSectionSize, + MaxSectionSize, m_path); return retval.ToString(); @@ -252,7 +252,7 @@ { string retval = GetString(sectionName, keyName, ""); - if (retval == null || retval.Length == 0) + if (string.IsNullOrEmpty(retval)) { return defaultValue; } @@ -296,23 +296,20 @@ /// </exception> public List<KeyValuePair<string, string>> GetSectionValuesAsList(string sectionName) { - List<KeyValuePair<string, string>> retval; string[] keyValuePairs; - string key, value; - int equalSignPos; if (sectionName == null) throw new ArgumentNullException("sectionName"); //Allocate a buffer for the returned section names. - IntPtr ptr = Marshal.AllocCoTaskMem(IniFile.MaxSectionSize); + IntPtr ptr = Marshal.AllocCoTaskMem(MaxSectionSize); try { //Get the section key/value pairs into the buffer. int len = NativeMethods.GetPrivateProfileSection(sectionName, ptr, - IniFile.MaxSectionSize, + MaxSectionSize, m_path); keyValuePairs = ConvertNullSeperatedStringToStringArray(ptr, len); @@ -324,17 +321,17 @@ } //Parse keyValue pairs and add them to the list. - retval = new List<KeyValuePair<string, string>>(keyValuePairs.Length); + List<KeyValuePair<string, string>> retval = new List<KeyValuePair<string, string>>(keyValuePairs.Length); for (int i = 0; i < keyValuePairs.Length; ++i) { //Parse the "key=value" string into its constituent parts - equalSignPos = keyValuePairs[i].IndexOf('='); + int equalSignPos = keyValuePairs[i].IndexOf('='); - key = keyValuePairs[i].Substring(0, equalSignPos); + string key = keyValuePairs[i].Substring(0, equalSignPos); - value = keyValuePairs[i].Substring(equalSignPos + 1, - keyValuePairs[i].Length - equalSignPos - 1); + string value = keyValuePairs[i].Substring(equalSignPos + 1, + keyValuePairs[i].Length - equalSignPos - 1); retval.Add(new KeyValuePair<string, string>(key, value)); } @@ -363,13 +360,10 @@ /// </exception> public Dictionary<string, string> GetSectionValues(string sectionName) { - List<KeyValuePair<string, string>> keyValuePairs; - Dictionary<string, string> retval; + List<KeyValuePair<string, string>> keyValuePairs = GetSectionValuesAsList(sectionName); - keyValuePairs = GetSectionValuesAsList(sectionName); - //Convert list into a dictionary. - retval = new Dictionary<string, string>(keyValuePairs.Count); + Dictionary<string, string> retval = new Dictionary<string, string>(keyValuePairs.Count); foreach (KeyValuePair<string, string> keyValuePair in keyValuePairs) { @@ -403,24 +397,23 @@ /// </exception> public string[] GetKeyNames(string sectionName) { - int len; string[] retval; if (sectionName == null) throw new ArgumentNullException("sectionName"); //Allocate a buffer for the returned section names. - IntPtr ptr = Marshal.AllocCoTaskMem(IniFile.MaxSectionSize); + IntPtr ptr = Marshal.AllocCoTaskMem(MaxSectionSize); try { //Get the section names into the buffer. - len = NativeMethods.GetPrivateProfileString(sectionName, - null, - null, - ptr, - IniFile.MaxSectionSize, - m_path); + int len = NativeMethods.GetPrivateProfileString(sectionName, + null, + null, + ptr, + MaxSectionSize, + m_path); retval = ConvertNullSeperatedStringToStringArray(ptr, len); } @@ -444,16 +437,15 @@ public string[] GetSectionNames() { string[] retval; - int len; //Allocate a buffer for the returned section names. - IntPtr ptr = Marshal.AllocCoTaskMem(IniFile.MaxSectionSize); + IntPtr ptr = Marshal.AllocCoTaskMem(MaxSectionSize); try { //Get the section names into the buffer. - len = NativeMethods.GetPrivateProfileSectionNames(ptr, - IniFile.MaxSectionSize, m_path); + int len = NativeMethods.GetPrivateProfileSectionNames(ptr, + MaxSectionSize, m_path); retval = ConvertNullSeperatedStringToStringArray(ptr, len); } @@ -627,7 +619,7 @@ //Write new element into INI file for (int i = 0; i < values.Length; i++) { - string newKey = keyName + "." + i.ToString(); + string newKey = keyName + "." + i; WriteValue(sectionName, newKey, values[i]); } Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/Log.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/Log.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/Log.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -8,7 +8,7 @@ /// </summary> public class Log { - private static Log instance = new Log(); + private static readonly Log instance = new Log(); private StreamWriter writer; Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/Reader.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/Reader.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/Reader.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -6,17 +6,17 @@ { public class Reader { - static Dictionary<string, string> strings = new Dictionary<string, string>(); + static readonly Dictionary<string, string> strings = new Dictionary<string, string>(); public static string ReadString(string fileName, bool cash) { string text = null; if (cash == false || strings.ContainsKey(fileName) == false) { text = ReadString(fileName); - if (cash == true) + if (cash) strings[fileName] = text; } - if (cash == true) + if (cash) { text = strings[fileName]; } Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/SystemMessage.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/SystemMessage.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/SystemMessage.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -8,7 +8,7 @@ [Serializable] public class SystemMessage { - string type = ""; + readonly string type = ""; public string Type { @@ -18,7 +18,7 @@ } } - string message = ""; + readonly string message = ""; public string Message { @@ -43,9 +43,9 @@ public SystemMessage(SystemMessage sysMes) { - this.message = sysMes.Message; - this.type = sysMes.Type; - this.description = sysMes.Description; + message = sysMes.Message; + type = sysMes.Type; + description = sysMes.Description; } public SystemMessage(string message) Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlHelper.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlHelper.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlHelper.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Xml; using AcmContester.Library.LibraryExtention; @@ -45,24 +44,19 @@ /// <exception cref="ArgumentException"></exception> public static T GetObject<T>(string fullXml, string xmlPath, string pathToSchemaFile) where T: class { - if (fullXml == null) - throw new ArgumentNullException("Can't be null", "fullXml"); - if (fullXml == null) - throw new ArgumentException("Can't be empty", "fullXml"); - if (xmlPath == null) - throw new ArgumentNullException("Can't be null", "xmlPath"); - if (xmlPath == null) - throw new ArgumentException("Can't be empty", "xmlPath"); - if (pathToSchemaFile == null) - throw new ArgumentNullException("Can't be null. You can use other method without this parameter", "pathToSchemaFile"); - if (pathToSchemaFile == null) - throw new ArgumentException("Can't be null. You can use other method without this parameter", "pathToSchemaFile"); + + if (String.IsNullOrEmpty(fullXml)) + throw new ArgumentNullException("fullXml", "Can't be null or empty string."); + if (String.IsNullOrEmpty(xmlPath)) + throw new ArgumentNullException("xmlPath", "Can't be null or empty string."); + if (String.IsNullOrEmpty(pathToSchemaFile)) + throw new ArgumentNullException("pathToSchemaFile", "Can't be null or empty string."); - fullXml = XmlHelper.GetOuterXmlOfSingleNodeFromXpath(fullXml, xmlPath); - if (fullXml == null || fullXml == "") + fullXml = GetOuterXmlOfSingleNodeFromXpath(fullXml, xmlPath); + if (string.IsNullOrEmpty(fullXml)) return null; string schema = Reader.ReadString(pathToSchemaFile); - if (XmlHelper.ValidateXmlWithSchema(fullXml, schema) == false) + if (ValidateXmlWithSchema(fullXml, schema) == false) return null; T result = XmlSerializer<T>.Load(fullXml); @@ -80,17 +74,13 @@ /// <exception cref="ArgumentException"></exception> public static T GetObject<T>(string fullXml, string xmlPath) where T : class { - if (fullXml == null) - throw new ArgumentNullException("fullXml", "Can't be null"); - if (fullXml == null) - throw new ArgumentException("fullXml", "Can't be empty"); - if (xmlPath == null) - throw new ArgumentNullException("xmlPath", "Can't be null"); - if (xmlPath == null) - throw new ArgumentException("xmlPath", "Can't be empty"); + if (String.IsNullOrEmpty(fullXml)) + throw new ArgumentNullException("fullXml", "Can't be null or empty string."); + if (String.IsNullOrEmpty(xmlPath)) + throw new ArgumentNullException("xmlPath", "Can't be null or empty string."); - fullXml = XmlHelper.GetOuterXmlOfSingleNodeFromXpath(fullXml, xmlPath); - if (fullXml == null || fullXml == "") + fullXml = GetOuterXmlOfSingleNodeFromXpath(fullXml, xmlPath); + if (string.IsNullOrEmpty(fullXml)) return null; T result = XmlSerializer<T>.Load(fullXml); Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlSerializer.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlSerializer.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlSerializer.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Text; using System.IO; @@ -21,10 +20,9 @@ public static T Load(string message) { // Deserialization - T result; TextReader r = new StringReader(message); System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(T)); - result = (T)serializer.Deserialize(r); + T result = (T)serializer.Deserialize(r); r.Close(); return result; } Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlValidator.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlValidator.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/XML/XmlValidator.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -7,7 +7,7 @@ { class XmlValidator { - string xmlDocument; + readonly string xmlDocument; bool validity; @@ -19,10 +19,8 @@ public bool Validate(string xmlSchema) { - XmlSchema schema = new XmlSchema(); - schema = XmlSchema.Read(new StringReader(xmlSchema), ValidationXmlSchemaCallBack); + XmlSchema schema = XmlSchema.Read(new StringReader(xmlSchema), ValidationXmlSchemaCallBack); - // Create the XmlSchemaSet class. XmlSchemaSet schemas = new XmlSchemaSet(); @@ -33,7 +31,7 @@ XmlReaderSettings settings = new XmlReaderSettings(); settings.ValidationType = ValidationType.Schema; settings.Schemas = schemas; - settings.ValidationEventHandler += new ValidationEventHandler(ValidationXmlCallBack); + settings.ValidationEventHandler += ValidationXmlCallBack; // Create the XmlReader object. XmlReader reader = XmlReader.Create(new StringReader(xmlDocument), settings); @@ -41,13 +39,15 @@ validity = true; // Parse the file. - while (reader.Read() && validity) ; + while (reader.Read() && validity) + { + } return validity; } // Happen validation errors when read XmlSchema - private void ValidationXmlSchemaCallBack(object sender, ValidationEventArgs e) + private static void ValidationXmlSchemaCallBack(object sender, ValidationEventArgs e) { throw new XmlSchemaException(e.Message); } Modified: ACMServer/trunk/ACMServer/Plugins/PluginsFramework/BaseMediatorPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/PluginsFramework/BaseMediatorPlugin.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Plugins/PluginsFramework/BaseMediatorPlugin.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -14,7 +14,7 @@ public abstract void Send(SystemMessage message); - private UserControl control = null; + private UserControl control; public UserControl Control { Modified: ACMServer/trunk/ACMServer/Plugins/PluginsFramework/MediatorKernel.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/PluginsFramework/MediatorKernel.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Plugins/PluginsFramework/MediatorKernel.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,6 +1,4 @@ using System; -using System.Collections; -using AcmContester.Plugins.PluginsFramework; using System.Collections.Generic; using System.Windows.Forms; using AcmContester.Library.LibraryExtention; @@ -14,8 +12,8 @@ public sealed class ControlEventArgs : EventArgs { - Control control; - string name; + readonly Control control; + readonly string name; public ControlEventArgs(Control in_Control, string in_Name) { control = in_Control; @@ -54,7 +52,7 @@ plugin.onDataArrived += DataArrivedFromTesterList; if (plugin.Control != null) { - this.OnAddControl(new ControlEventArgs(plugin.Control, plugin.GetType().Name)); + OnAddControl(new ControlEventArgs(plugin.Control, plugin.GetType().Name)); } } } @@ -66,7 +64,7 @@ plugin.onDataArrived += DataArrivedFromClientList; if (plugin.Control != null) { - this.OnAddControl(new ControlEventArgs(plugin.Control, plugin.GetType().Name)); + OnAddControl(new ControlEventArgs(plugin.Control, plugin.GetType().Name)); } } } @@ -84,7 +82,7 @@ { for (int index = 0; index < testerSideList.Count; index++) { - ((BaseMediatorPlugin)testerSideList[index]).Send(message); + testerSideList[index].Send(message); } } } @@ -94,7 +92,7 @@ { for (int index = 0; index < clientSideList.Count; index++) { - ((BaseMediatorPlugin)clientSideList[index]).Send(message); + clientSideList[index].Send(message); } } } Modified: ACMServer/trunk/ACMServer/Plugins/PluginsFramework/MediatorKernelGUI.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/PluginsFramework/MediatorKernelGUI.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Plugins/PluginsFramework/MediatorKernelGUI.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,18 +1,13 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; using System.Windows.Forms; -using AcmContester.Plugins.PluginsFramework; using AcmContester.Library.LibraryExtention; namespace AcmContester.Plugins.PluginsFramework { public partial class MediatorKernelGUI : UserControl { - MediatorKernel mediator = new MediatorKernel(); + readonly MediatorKernel mediator = new MediatorKernel(); private MediatorKernelGUI() { @@ -43,17 +38,17 @@ string testerFolderPath = list[0]; string clientFolderPath = list[1]; - mediator.AddControl += new EventHandler<MediatorKernel.ControlEventArgs>(mediator_AddControl); + mediator.AddControl += mediator_AddControl; mediator.LoadLists(testerFolderPath, clientFolderPath); } private delegate void AddControlCallback(object sender, MediatorKernel.ControlEventArgs e); private void mediator_AddControl(object sender, MediatorKernel.ControlEventArgs e) { - if (this.tabControl1.InvokeRequired) + if (tabControl1.InvokeRequired) { - AddControlCallback d = new AddControlCallback(mediator_AddControl); - this.Invoke(d, new object[] { sender, e }); + AddControlCallback d = mediator_AddControl; + Invoke(d, new object[] { sender, e }); } else { Modified: ACMServer/trunk/ACMServer/Plugins/PluginsFramework/PluginsLoader.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/PluginsFramework/PluginsLoader.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Plugins/PluginsFramework/PluginsLoader.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -57,7 +57,6 @@ /// add them to provided list.</para> /// </summary> /// <param name="filename">Which file to scan.</param> - /// <param name="lst">Where to add found objects.</param> public static List<T> ScanAndLoad(string filename) { List<T> lst = new List<T>(); @@ -86,15 +85,15 @@ if (t.GetInterface(typeof(T).FullName) != null || t.IsSubclassOf(typeof(T))) lst.Add((T)Activator.CreateInstance(t)); } - catch (System.Reflection.TargetInvocationException) + catch (TargetInvocationException) { //throw ex; } - catch (System.MissingMethodException) + catch (MissingMethodException) { //throw ex; } - catch (System.InvalidCastException) + catch (InvalidCastException) { //throw ex; } Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Text; using System.IO; using AcmContester.Library.LibraryExtention; using AcmContester.Library.LibraryExtention.Data; @@ -38,14 +37,13 @@ string code = submit.sourceCode; code = HtmlEntityDecode(code); int language = submit.language; - string id = submit.id.ToString(); Result result = new Result(submit); try { //Console.SetOut(File.CreateText("logout.txt")); string[] data = File.ReadAllLines("InData.txt"); - data[2] = data[2] + submit.pbolemID.ToString() + "\\"; + data[2] = data[2] + submit.pbolemID + "\\"; string src = code; TestEnv test = new TestEnv(src, language, data[1], data[2]); test.Compile(); @@ -59,13 +57,13 @@ log.Loging("-------------------END SOURCE---------------------------", Log.Priority.INFO); Console.WriteLine("-------------------END SOURCE---------------------------"); - log.Loging(String.Format("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result.ToString(), test.comp.Details, test.comp.UsedTime), Log.Priority.INFO); - Console.WriteLine("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result.ToString(), test.comp.Details, test.comp.UsedTime); + log.Loging(String.Format("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result, test.comp.Details, test.comp.UsedTime), Log.Priority.INFO); + Console.WriteLine("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result, test.comp.Details, test.comp.UsedTime); log.Loging(String.Format("Comp Output: {0}", test.comp.CompilerOutput), Log.Priority.INFO); Console.WriteLine("Comp Output: {0}", test.comp.CompilerOutput); - if (test.comp.Result == Test.CompRes.OK) + if (test.comp.Result == CompRes.OK) { SecureType secureType = SecureType.Double; try @@ -91,7 +89,7 @@ //TODO: result.res = test.comp.Result.ToString(); - if (test.comp.Result == Test.CompRes.OK) + if (test.comp.Result == CompRes.OK) { int usedTime = -1; int usedMemory = -1; @@ -117,7 +115,7 @@ } catch (Exception tex) { - log.Loging("Runner:GetResult - Exception (" + tex.ToString() + ": " + tex.Message, Log.Priority.INFO); + log.Loging("Runner:GetResult - Exception (" + tex + ": " + tex.Message, Log.Priority.INFO); log.Loging(tex.StackTrace, Log.Priority.INFO); result.res = "Exception"; } Modified: ACMServer/trunk/ACMServer/Tester/Form1.cs =================================================================== --- ACMServer/trunk/ACMServer/Tester/Form1.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Tester/Form1.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Data; using System.Drawing; -using System.Text; using System.Windows.Forms; using System.IO; using AcmContester.Tester.Library; @@ -35,7 +32,7 @@ tabPage3.Controls.Add(view); } - DataTable tableLog = new DataTable(); + readonly DataTable tableLog = new DataTable(); private void initGrid() { tableLog.Columns.Add(new DataColumn("Time")); @@ -66,7 +63,7 @@ Disconnect(); } - private void Disconnect() + private static void Disconnect() { if (socket != null) { @@ -83,14 +80,14 @@ delegate void AddTextCallback(string text); public void AddText(string text) { - if (this.textBox1.InvokeRequired) + if (textBox1.InvokeRequired) { - AddTextCallback d = new AddTextCallback(AddText); - this.Invoke(d, new object[] { text }); + AddTextCallback d = AddText; + Invoke(d, new object[] { text }); } else { - string timeStr = DateTime.Now.ToLongTimeString() + "." + DateTime.Now.Millisecond.ToString(); + string timeStr = DateTime.Now.ToLongTimeString() + "." + DateTime.Now.Millisecond; textBox1.Text += timeStr + " " + text + Environment.NewLine; //if (autoScrollCheckBox.Checked) { @@ -115,7 +112,7 @@ type = _type; } - string text; + readonly string text; public string Text { get @@ -124,7 +121,7 @@ } } - string type; + readonly string type; public string Type { get @@ -152,7 +149,7 @@ { get { - return DateTime.Now.ToLongTimeString() + "." + DateTime.Now.Millisecond.ToString(); + return DateTime.Now.ToLongTimeString() + "." + DateTime.Now.Millisecond; } } } @@ -160,10 +157,10 @@ delegate void AddTextToGridLogCallback(LogMessage text); public void AddTextToGridLog(LogMessage text) { - if (this.dataGridViewLog.InvokeRequired) + if (dataGridViewLog.InvokeRequired) { - AddTextToGridLogCallback d = new AddTextToGridLogCallback(AddTextToGridLog); - this.Invoke(d, new object[] { text }); + AddTextToGridLogCallback d = AddTextToGridLog; + Invoke(d, new object[] { text }); } else { @@ -174,8 +171,7 @@ //table.Rows.Add(row); tableLog.Rows.InsertAt(row, 0); - int c = tableLog.Rows.Count - 1; - c = 0; + const int c = 0; dataGridViewLog.Rows[c].DefaultCellStyle.BackColor = text.Color; dataGridViewLog.Update(); @@ -199,10 +195,7 @@ { if (socket != null) { - if (socket.IsConnected() == true) - toolStripStatusLabel1.Text = "CONNECTED"; - else - toolStripStatusLabel1.Text = "not connected"; + toolStripStatusLabel1.Text = socket.IsConnected() ? "CONNECTED" : "not connected"; } else toolStripStatusLabel1.Text = "null"; Modified: ACMServer/trunk/ACMServer/Tester/Library/SocketClientGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Tester/Library/SocketClientGate.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Tester/Library/SocketClientGate.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,4 +1,3 @@ -using System; using AcmContester.Library.LibraryExtention; using AcmContester.Library.LibraryExtention.Data; using AcmContester.Library.Connector; @@ -9,12 +8,12 @@ { ISocketMediator mediator; - SocketClientTask client; + readonly SocketClientTask client; public SocketClientGate(string IP) { client = new SocketClientTask(IP); - client.onDataArrived +=new SocketClient.DataArrivedDelegate(SocketClientGate_onDataArrived); + client.onDataArrived += SocketClientGate_onDataArrived; client.onAddLogText += OnAddLogText; client.isBusy += IsBusy; } @@ -36,7 +35,7 @@ { OnAddLogText("Receive", message.Message); - if (message.IsType("TestingSubmit") == true) + if (message.IsType("TestingSubmit")) { OnDataArrived(message); } @@ -46,7 +45,7 @@ { message = new SystemMessage(message); - if (message.IsType("TestingResult") == true) + if (message.IsType("TestingResult")) { Result res = Result.CreateFromXml(message.Message); OnAddLogText("Send", "ID " + res.Submit.id + " result - " + res.res); Modified: ACMServer/trunk/ACMServer/Tester/Library/WorkMediator.cs =================================================================== --- ACMServer/trunk/ACMServer/Tester/Library/WorkMediator.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Tester/Library/WorkMediator.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -5,7 +5,7 @@ { sealed class WorkMediator: ISocketMediator, IWorkerMediator { - private static WorkMediator instance = new WorkMediator(); + private static readonly WorkMediator instance = new WorkMediator(); WorkRunner runner; SocketClientGate socketClient; @@ -21,11 +21,11 @@ this.runner.onDataArrived += ((IWorkerMediator)this).Arrived; } - if (this.socketClient == null) + if (socketClient == null) { - this.socketClient = client; - this.socketClient.Mediator = (ISocketMediator)this; - this.socketClient.onDataArrived += SocketArrived; + socketClient = client; + socketClient.Mediator = this; + socketClient.onDataArrived += SocketArrived; } } public static WorkMediator GetInstance(WorkRunner runner, SocketClientGate client) @@ -39,12 +39,12 @@ } - public bool Send(SystemMessage message) + public static bool Send(SystemMessage message) { throw new Exception("The method or operation is not implemented."); } - public bool Arrived(SystemMessage message) + public static bool Arrived(SystemMessage message) { throw new Exception("The method or operation is not implemented."); } @@ -78,7 +78,7 @@ bool IWorkerMediator.Send(SystemMessage message) { - if (message.IsType("TestingSubmit") == true) + if (message.IsType("TestingSubmit")) return runner.AddWork(message.Message); return true; } Modified: ACMServer/trunk/ACMServer/Tester/Library/WorkRunner.cs =================================================================== --- ACMServer/trunk/ACMServer/Tester/Library/WorkRunner.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Tester/Library/WorkRunner.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,7 +1,6 @@ using System; using AcmContester.Library.LibraryExtention; using System.Threading; -using AcmContester.Library.LibraryExtention.Data; namespace AcmContester.Tester.Library { @@ -13,7 +12,7 @@ string source = ""; object working = 0; - Thread thread = new Thread(new ParameterizedThreadStart(Go)); + Thread thread = new Thread(Go); internal bool IsBusy() { @@ -29,7 +28,7 @@ internal bool AddWork(string message) { - if (IsBusy() == true) + if (IsBusy()) { return false; } @@ -42,7 +41,7 @@ //TODO: potribno jakos obnulyty status thread, // tak shob ne potribno bulo stvorjuvaty novyj - thread = new Thread(new ParameterizedThreadStart(Go)); + thread = new Thread(Go); thread.Start(this); return true; } @@ -86,14 +85,14 @@ //TODO: ne znaju chy tut potriben lock lock (this) { - this.Send(new SystemMessage(result, "TestingResult")); + Send(new SystemMessage(result, "TestingResult")); } } private bool Send(SystemMessage systemMessage) { if (onDataArrived != null) - return this.onDataArrived(systemMessage); + return onDataArrived(systemMessage); return true; } Modified: ACMServer/trunk/ACMServer/Tester/Program.cs =================================================================== --- ACMServer/trunk/ACMServer/Tester/Program.cs 2009-01-17 09:16:35 UTC (rev 456) +++ ACMServer/trunk/ACMServer/Tester/Program.cs 2009-01-17 10:52:35 UTC (rev 457) @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Windows.Forms; namespace Tester This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-01-24 22:39:01
|
Revision: 462 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=462&view=rev Author: brus07 Date: 2009-01-24 22:38:57 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Added new project for doing concrete connection to Web and can modification of this project to easy using other type and style of connection. Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs Added Paths: ----------- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/ ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/Properties/ ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/Properties/AssemblyInfo.cs ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/SampleWebConnector.cs ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/SampleWebConnector.csproj Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2009-01-17 21:05:36 UTC (rev 461) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2009-01-24 22:38:57 UTC (rev 462) @@ -33,6 +33,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubmitterGUIPlugin", "Plugins\TesterPlugins\SubmitterGUIPlugin\SubmitterGUIPlugin.csproj", "{E255910C-499D-48E2-9846-7EB24DE32C4A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ConcreteConnector", "ConcreteConnector", "{4E42F296-7321-4193-9E35-9B7202005229}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleWebConnector", "Library\ConcreteConnector\SampleWebConnector\SampleWebConnector.csproj", "{45B4D72E-CD81-42A7-AD46-3471380A290F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -87,6 +91,10 @@ {E255910C-499D-48E2-9846-7EB24DE32C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU {E255910C-499D-48E2-9846-7EB24DE32C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU {E255910C-499D-48E2-9846-7EB24DE32C4A}.Release|Any CPU.Build.0 = Release|Any CPU + {45B4D72E-CD81-42A7-AD46-3471380A290F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45B4D72E-CD81-42A7-AD46-3471380A290F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45B4D72E-CD81-42A7-AD46-3471380A290F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45B4D72E-CD81-42A7-AD46-3471380A290F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -96,6 +104,7 @@ {A8135069-F8BA-4E5D-835F-3FF3F350AA5D} = {9AC82C0B-F256-41DD-9B4A-A59EC7EB4890} {30C0EFA3-36A8-4C6F-8FEC-28F771D4933F} = {9AC82C0B-F256-41DD-9B4A-A59EC7EB4890} {4EB54D66-105B-4CFD-8883-CBE7CA70AFA5} = {9AC82C0B-F256-41DD-9B4A-A59EC7EB4890} + {4E42F296-7321-4193-9E35-9B7202005229} = {9AC82C0B-F256-41DD-9B4A-A59EC7EB4890} {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {69FB4176-F298-4AF7-B714-B6758AA9A58E} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} @@ -104,5 +113,6 @@ {8F305004-8FB7-4F85-8063-3A7041DB840F} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {79EB24DD-AF0D-40D0-974E-198F4D8C92BC} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {E255910C-499D-48E2-9846-7EB24DE32C4A} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} + {45B4D72E-CD81-42A7-AD46-3471380A290F} = {4E42F296-7321-4193-9E35-9B7202005229} EndGlobalSection EndGlobal Property changes on: ACMServer/trunk/ACMServer/Library/ConcreteConnector ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector ___________________________________________________________________ Added: svn:ignore + bin obj SampleWebConnector.csproj.user Added: tsvn:logminsize + 5 Property changes on: ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/Properties/AssemblyInfo.cs 2009-01-24 22:38:57 UTC (rev 462) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SampleWebConnector")] +[assembly: AssemblyDescription("http://acm.lviv.ua")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("AcmContester")] +[assembly: AssemblyProduct("SampleWebConnector")] +[assembly: AssemblyCopyright("Copyright © AcmContester 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b7266d48-2a23-40f7-85a8-e1f06ce11ce7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/SampleWebConnector.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/SampleWebConnector.cs (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/SampleWebConnector.cs 2009-01-24 22:38:57 UTC (rev 462) @@ -0,0 +1,98 @@ +using System; +using AcmContester.Library.Connector.Getter; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; +using System.Net; +using System.IO; + +namespace AcmContester.Library.ConcreateConnector.SampleWebConnector +{ + public class SampleWebConnector : IGetter + { + //"http://127.0.0.1/d"; + string fullPathToWebPages = ""; + + #region IGetter Members + + public string PathToSource + { + get + { + return fullPathToWebPages; + } + set + { + fullPathToWebPages = value; + } + } + + public SystemMessage GetData() + { + return new SystemMessage(GetFullInfoFromSite()); + } + + public void Send(SystemMessage message) + { + if (message.IsType("TestingResult") == true) + { + SendTestingResultToSite(message.Message); + } + } + + #endregion + + + void SendTestingResultToSite(string message) + { + string res = ""; + string id = ""; + string usedMemory = ""; + string usedTime = ""; + + //TODO: + Result result = Result.CreateFromXml(message); + res = result.res; + id = result.Submit.id.ToString(); + usedMemory = result.usedMemory.ToString(); + usedTime = result.usedTime.ToString(); + + string fullURL = fullPathToWebPages + "/set.php?"; + fullURL += "res=" + res; + fullURL += "&id=" + id; + fullURL += "&usedMemory=" + usedMemory; + fullURL += "&usedTime=" + usedTime; + HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(fullURL); + myRequest.Method = "GET"; + WebResponse myResponse = myRequest.GetResponse(); + myResponse.Close(); + } + + + + string GetFullInfoFromSite() + { + string result = null; + try + { + HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(fullPathToWebPages + "/get.php"); + myRequest.Method = "GET"; + //myRequest.Timeout = 100000; + WebResponse myResponse = myRequest.GetResponse(); + StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8); + result = sr.ReadToEnd(); + sr.Close(); + myResponse.Close(); + if (result.Length == 0) + return null; + } + catch (WebException wex) + { + if (wex.Status == WebExceptionStatus.Timeout) + { + return "SystemResult: Timeout"; + } + } + return result; + } + } +} Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/SampleWebConnector.csproj =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/SampleWebConnector.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/SampleWebConnector/SampleWebConnector.csproj 2009-01-24 22:38:57 UTC (rev 462) @@ -0,0 +1,61 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{45B4D72E-CD81-42A7-AD46-3471380A290F}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>SampleWebConnector</RootNamespace> + <AssemblyName>SampleWebConnector</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="SampleWebConnector.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Connector\Connector.csproj"> + <Project>{211DD6A5-2D73-439E-8722-ED2C89ED1DDB}</Project> + <Name>Connector</Name> + </ProjectReference> + <ProjectReference Include="..\..\Data\Data.csproj"> + <Project>{30C0EFA3-36A8-4C6F-8FEC-28F771D4933F}</Project> + <Name>Data</Name> + </ProjectReference> + <ProjectReference Include="..\..\LibraryExtention\LibraryExtention.csproj"> + <Project>{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}</Project> + <Name>LibraryExtention</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs 2009-01-17 21:05:36 UTC (rev 461) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs 2009-01-24 22:38:57 UTC (rev 462) @@ -6,6 +6,7 @@ using AcmContester.Library.LibraryExtention.Data; using System.Net; using System.Collections.Generic; +using AcmContester.Library.ConcreateConnector.SampleWebConnector; namespace AcmContester.Plugins.MediatorPlugins.WebGatePlugin { @@ -14,6 +15,8 @@ //"http://127.0.0.1/d"; string fullPathToWebPages = ""; + IGetter getter = new SampleWebConnector(); + DataMediator container = new DataMediator(); public WebGetter() @@ -26,11 +29,13 @@ get { checkAddress(); + getter.PathToSource = fullPathToWebPages; return fullPathToWebPages; } set { fullPathToWebPages = value; + getter.PathToSource = value; } } @@ -39,7 +44,7 @@ if (fullPathToWebPages == "") { StreamReader s = new StreamReader("InDataW.txt", Encoding.Default); - fullPathToWebPages = s.ReadLine(); + PathToSource = s.ReadLine(); s.Close(); } } @@ -55,7 +60,11 @@ public void Send(SystemMessage message) { if (message.IsType("TestingResult") == true) - SendTestingResultToSite(message.Message); + { + Send(message); + Result result = Result.CreateFromXml(message.Message); + container.Return(result); + } //jaksho inakshyj typ, todi potribno bude inakshu funkciju vyklykaty } @@ -63,46 +72,22 @@ { get { + getter.PathToSource = fullPathToWebPages; return fullPathToWebPages; } set { fullPathToWebPages = value; + getter.PathToSource = fullPathToWebPages; } } #endregion - void SendTestingResultToSite(string message) - { - string res = ""; - string id = ""; - string usedMemory = ""; - string usedTime = ""; - //TODO: - Result result = Result.CreateFromXml(message); - res = result.res; - id = result.Submit.id.ToString(); - usedMemory = result.usedMemory.ToString(); - usedTime = result.usedTime.ToString(); - - string fullURL = fullPathToWebPages + "/set.php?"; - fullURL += "res=" + res; - fullURL += "&id=" + id; - fullURL += "&usedMemory=" + usedMemory; - fullURL += "&usedTime=" + usedTime; - HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(fullURL); - myRequest.Method = "GET"; - WebResponse myResponse = myRequest.GetResponse(); - myResponse.Close(); - - container.Return(result); - } - SystemMessage GetMessageFromSite() { - string getAll = GetFullInfoFromSite(); + string getAll = getter.GetData().Message; if (String.IsNullOrEmpty(getAll) == true) return new SystemMessage("", "Empty"); if (getAll.Contains("submitList") == true) @@ -138,31 +123,5 @@ resultList.Items = result.ToArray(); return new SystemMessage(resultList.ToString(), "TestingSubmitList"); } - - string GetFullInfoFromSite() - { - string result = null; - try - { - HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(fullPathToWebPages + "/get.php"); - myRequest.Method = "GET"; - //myRequest.Timeout = 100000; - WebResponse myResponse = myRequest.GetResponse(); - StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8); - result = sr.ReadToEnd(); - sr.Close(); - myResponse.Close(); - if (result.Length == 0) - return null; - } - catch (WebException wex) - { - if (wex.Status == WebExceptionStatus.Timeout) - { - return "SystemResult: Timeout"; - } - } - return result; - } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-01 22:53:40
|
Revision: 470 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=470&view=rev Author: brus07 Date: 2009-02-01 22:53:36 +0000 (Sun, 01 Feb 2009) Log Message: ----------- Added new Plugin for work with information of Ioi result. At this time this plugin is empty. Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln Added Paths: ----------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.resx ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.csproj ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/Properties/ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/Properties/AssemblyInfo.cs Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-01 22:46:13 UTC (rev 469) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-01 22:53:36 UTC (rev 470) @@ -39,6 +39,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EmptyPlugin", "Plugins\EmptyPlugin\EmptyPlugin.csproj", "{74FB3B7A-5D91-46B3-9F15-F38136725AED}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IoiPlugin", "IoiPlugin", "{4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IoiInformerPlugin", "Plugins\IoiPlugin\IoiInformerPlugin\IoiInformerPlugin.csproj", "{F36370C3-E1EB-47E8-AFAC-F4840953D60B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -101,6 +105,10 @@ {74FB3B7A-5D91-46B3-9F15-F38136725AED}.Debug|Any CPU.Build.0 = Debug|Any CPU {74FB3B7A-5D91-46B3-9F15-F38136725AED}.Release|Any CPU.ActiveCfg = Release|Any CPU {74FB3B7A-5D91-46B3-9F15-F38136725AED}.Release|Any CPU.Build.0 = Release|Any CPU + {F36370C3-E1EB-47E8-AFAC-F4840953D60B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F36370C3-E1EB-47E8-AFAC-F4840953D60B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F36370C3-E1EB-47E8-AFAC-F4840953D60B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F36370C3-E1EB-47E8-AFAC-F4840953D60B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -115,11 +123,13 @@ {69FB4176-F298-4AF7-B714-B6758AA9A58E} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {74FB3B7A-5D91-46B3-9F15-F38136725AED} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} + {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {20B192BC-FD4D-4ED5-90F5-B5994F995238} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} {9462E3BD-67AD-4887-BF4C-8B6A25048941} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} {8F305004-8FB7-4F85-8063-3A7041DB840F} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {79EB24DD-AF0D-40D0-974E-198F4D8C92BC} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {E255910C-499D-48E2-9846-7EB24DE32C4A} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {45B4D72E-CD81-42A7-AD46-3471380A290F} = {4E42F296-7321-4193-9E35-9B7202005229} + {F36370C3-E1EB-47E8-AFAC-F4840953D60B} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} EndGlobalSection EndGlobal Property changes on: ACMServer/trunk/ACMServer/Plugins/IoiPlugin ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin ___________________________________________________________________ Added: svn:ignore + bin obj Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-01 22:53:36 UTC (rev 470) @@ -0,0 +1,45 @@ +namespace AcmContester.Plugins.IoiPlugins.IoiInformerPlugin +{ + partial class IoiInformerControl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.SuspendLayout(); + // + // IoiInformerControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Name = "IoiInformerControl"; + this.Size = new System.Drawing.Size(396, 383); + this.ResumeLayout(false); + + } + + #endregion + } +} Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-01 22:53:36 UTC (rev 470) @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +namespace AcmContester.Plugins.IoiPlugins.IoiInformerPlugin +{ + public partial class IoiInformerControl : UserControl + { + public IoiInformerControl() + { + InitializeComponent(); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.resx =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.resx (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.resx 2009-02-01 22:53:36 UTC (rev 470) @@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-01 22:53:36 UTC (rev 470) @@ -0,0 +1,24 @@ +using System; +using AcmContester.Plugins.PluginsFramework; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; + +namespace AcmContester.Plugins.IoiPlugins.IoiInformerPlugin +{ + public class IoiInformerPlugin : BaseMediatorPlugin + { + public IoiInformerPlugin() + { + base.Control = new IoiInformerControl(); + } + + public override void Send(SystemMessage message) + { + if (message.IsType("TestingResultIoi") == true) + { + ResultIoi result = ResultIoi.CreateFromXml(message.Message); + //\xF2\xF3\xF2 \xEE\xE1\xF0\xEE\xE1\xEA\xE0 \xEF\xEE\xE2\xB3\xE4\xEE\xEC\xEB\xE5\xED\xED\xFF + } + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.csproj =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.csproj 2009-02-01 22:53:36 UTC (rev 470) @@ -0,0 +1,75 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{F36370C3-E1EB-47E8-AFAC-F4840953D60B}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AcmContester.Plugins.IoiPlugins.IoiInformerPlugin</RootNamespace> + <AssemblyName>IoiInformerPlugin</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="IoiInformerControl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="IoiInformerControl.Designer.cs"> + <DependentUpon>IoiInformerControl.cs</DependentUpon> + </Compile> + <Compile Include="IoiInformerPlugin.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\Library\Data\Data.csproj"> + <Project>{30C0EFA3-36A8-4C6F-8FEC-28F771D4933F}</Project> + <Name>Data</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Library\LibraryExtention\LibraryExtention.csproj"> + <Project>{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}</Project> + <Name>LibraryExtention</Name> + </ProjectReference> + <ProjectReference Include="..\..\PluginsFramework\PluginsFramework.csproj"> + <Project>{69FB4176-F298-4AF7-B714-B6758AA9A58E}</Project> + <Name>PluginsFramework</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="IoiInformerControl.resx"> + <SubType>Designer</SubType> + <DependentUpon>IoiInformerControl.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Property changes on: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/Properties/AssemblyInfo.cs 2009-02-01 22:53:36 UTC (rev 470) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("IoiInformerPlugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Home")] +[assembly: AssemblyProduct("IoiInformerPlugin")] +[assembly: AssemblyCopyright("Copyright © Home 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8f0e4814-384c-4709-87ff-71c0204829fb")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-02 01:04:06
|
Revision: 471 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=471&view=rev Author: brus07 Date: 2009-02-02 01:04:03 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Continue modify SubmitList and SubmitIoi Update XSD file. Change call property of SubmitList. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/testData/data.xsd ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsd =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-01 22:53:36 UTC (rev 470) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-02 01:04:03 UTC (rev 471) @@ -18,8 +18,9 @@ </xs:complexType> <xs:complexType name="submitIOIType"> <xs:sequence> + <xs:element name="submit" type="submitType" /> <xs:element name="name" type="xs:string" /> - <xs:element name="submit" type="submitType" /> + <xs:element name="form" type="xs:positiveInteger" /> </xs:sequence> </xs:complexType> <xs:element name="submitList"> Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs 2009-02-01 22:53:36 UTC (rev 470) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs 2009-02-02 01:04:03 UTC (rev 471) @@ -50,9 +50,9 @@ { string message = "Get submits" + Environment.NewLine; string ids = ""; - for (int i = 0; i < submitList.Items.Length; i++) + for (int i = 0; i < submitList.SubmitItems.Length; i++) { - ids += " " + submitList.Items[i].id.ToString(); + ids += " " + submitList.SubmitItems[i].id.ToString(); } message += " ID: " + ids; OnLogMessage("Receive", message); @@ -66,17 +66,17 @@ GenerateLogMessageWirhIDs(submitList); - for (int index = 0; index < submitList.Items.Length; index++) + for (int index = 0; index < submitList.SubmitItems.Length; index++) { - if (dataContainer.Add(submitList.Items[index]) == true) + if (dataContainer.Add(submitList.SubmitItems[index]) == true) { - SystemMessage sysMes = new SystemMessage(submitList.Items[index].ToString(), "TestingSubmit"); - OnLogMessage("SystemSend", submitList.Items[index].id + " to Pool"); + SystemMessage sysMes = new SystemMessage(submitList.SubmitItems[index].ToString(), "TestingSubmit"); + OnLogMessage("SystemSend", submitList.SubmitItems[index].id + " to Pool"); pool.Send(sysMes); } else { - OnLogMessage("SystemReceive", submitList.Items[index].id + "is in queue"); + OnLogMessage("SystemReceive", submitList.SubmitItems[index].id + "is in queue"); } } return true; Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs 2009-02-01 22:53:36 UTC (rev 470) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs 2009-02-02 01:04:03 UTC (rev 471) @@ -107,20 +107,20 @@ { SubmitList list = SubmitList.CreateFromXml(info); List<Submit> result = new List<Submit>(); - for (int i = 0; i < list.Items.Length; i++) + for (int i = 0; i < list.SubmitItems.Length; i++) { - if (container.Contains(list.Items[i]) == false) + if (container.Contains(list.SubmitItems[i]) == false) { - result.Add(list.Items[i]); + result.Add(list.SubmitItems[i]); //TODO: \xEF\xEE\xF2\xF0\xB3\xE1\xED\xEE \xE4\xEE\xE1\xE0\xE2\xEB\xFF\xF2\xE8 \xF2\xB3\xEB\xFC\xEA\xE8 \xF2\xEE\xE4\xB3 \xEA\xEE\xEB\xE8 \xF6\xE5\xE9 \xF1\xE0\xE1\xEC\xB3\xF2 \xE2\xB3\xE4\xEF\xF0\xE0\xE2\xEB\xE5\xED\xE8\xE9 \xED\xE0 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF - container.Add(list.Items[i]); + container.Add(list.SubmitItems[i]); } } if (result.Count == 0) return new SystemMessage("Web checked: All submits in queue (queue size " + container.Count.ToString() + ")", "SystemResult"); SubmitList resultList = new SubmitList(); - resultList.Items = result.ToArray(); + resultList.SubmitItems = result.ToArray(); return new SystemMessage(resultList.ToString(), "TestingSubmitList"); } } Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs 2009-02-01 22:53:36 UTC (rev 470) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs 2009-02-02 01:04:03 UTC (rev 471) @@ -96,12 +96,12 @@ SendMessageToControl("TestingSubmitList", "Receive"); SubmitList list = SubmitList.CreateFromXml(message.Message); - for (int i = 0; i < list.Items.Length; i++) + for (int i = 0; i < list.SubmitItems.Length; i++) { while (runner.IsBusy() == true) System.Threading.Thread.Sleep(50); - SendSubmitToControl(list.Items[i].ToString(), "Receive"); - runner.AddWork(list.Items[i].ToString()); + SendSubmitToControl(list.SubmitItems[i].ToString(), "Receive"); + runner.AddWork(list.SubmitItems[i].ToString()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-02 01:10:52
|
Revision: 473 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=473&view=rev Author: brus07 Date: 2009-02-02 01:10:49 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Added new plugin IoiSubmitGuiPlugin. Plugin for submit from application, without web. Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln Added Paths: ----------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.csproj ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/Properties/ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/Properties/AssemblyInfo.cs Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-02 01:07:17 UTC (rev 472) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-02 01:10:49 UTC (rev 473) @@ -43,6 +43,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IoiInformerPlugin", "Plugins\IoiPlugin\IoiInformerPlugin\IoiInformerPlugin.csproj", "{F36370C3-E1EB-47E8-AFAC-F4840953D60B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IoiSubmitGuiPlugin", "Plugins\IoiPlugin\IoiSubmitGuiPlugin\IoiSubmitGuiPlugin.csproj", "{96664041-18B2-42BD-941F-117B54E2AE64}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -109,6 +111,10 @@ {F36370C3-E1EB-47E8-AFAC-F4840953D60B}.Debug|Any CPU.Build.0 = Debug|Any CPU {F36370C3-E1EB-47E8-AFAC-F4840953D60B}.Release|Any CPU.ActiveCfg = Release|Any CPU {F36370C3-E1EB-47E8-AFAC-F4840953D60B}.Release|Any CPU.Build.0 = Release|Any CPU + {96664041-18B2-42BD-941F-117B54E2AE64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96664041-18B2-42BD-941F-117B54E2AE64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96664041-18B2-42BD-941F-117B54E2AE64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96664041-18B2-42BD-941F-117B54E2AE64}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -131,5 +137,6 @@ {E255910C-499D-48E2-9846-7EB24DE32C4A} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {45B4D72E-CD81-42A7-AD46-3471380A290F} = {4E42F296-7321-4193-9E35-9B7202005229} {F36370C3-E1EB-47E8-AFAC-F4840953D60B} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} + {96664041-18B2-42BD-941F-117B54E2AE64} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} EndGlobalSection EndGlobal Property changes on: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin ___________________________________________________________________ Added: svn:ignore + obj bin Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-02 01:10:49 UTC (rev 473) @@ -0,0 +1,210 @@ +namespace AcmContester.Plugins.IoiPlugins.IoiSubmitGuiPlugin +{ + partial class IoiSubmitGuiControl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.nameTextBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.formComboBox = new System.Windows.Forms.ComboBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.label3 = new System.Windows.Forms.Label(); + this.problemTextBox = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.languageTextBox = new System.Windows.Forms.TextBox(); + this.submitButton = new System.Windows.Forms.Button(); + this.sourceTextBox = new System.Windows.Forms.TextBox(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 6); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(38, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Name:"; + // + // nameTextBox + // + this.nameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.nameTextBox.Location = new System.Drawing.Point(47, 3); + this.nameTextBox.Name = "nameTextBox"; + this.nameTextBox.Size = new System.Drawing.Size(409, 20); + this.nameTextBox.TabIndex = 1; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(3, 32); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(33, 13); + this.label2.TabIndex = 2; + this.label2.Text = "Form:"; + // + // formComboBox + // + this.formComboBox.FormattingEnabled = true; + this.formComboBox.Items.AddRange(new object[] { + "9", + "10", + "11"}); + this.formComboBox.Location = new System.Drawing.Point(47, 29); + this.formComboBox.Name = "formComboBox"; + this.formComboBox.Size = new System.Drawing.Size(121, 21); + this.formComboBox.TabIndex = 4; + this.formComboBox.Text = "9"; + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.comboBox1); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.problemTextBox); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.languageTextBox); + this.groupBox1.Controls.Add(this.submitButton); + this.groupBox1.Controls.Add(this.sourceTextBox); + this.groupBox1.Location = new System.Drawing.Point(6, 56); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(450, 343); + this.groupBox1.TabIndex = 5; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "\xD4\xEE\xF0\xEC\xE0 \xE2\xB3\xEF\xF0\xE0\xE2\xEA\xE8 \xF0\xEE\xE7\xE2\'\xFF\xE7\xEA\xF3"; + // + // comboBox1 + // + this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "1 (Pascal)", + "2 (C++)"}); + this.comboBox1.Location = new System.Drawing.Point(100, 13); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(67, 21); + this.comboBox1.TabIndex = 14; + this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(173, 16); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(45, 13); + this.label3.TabIndex = 13; + this.label3.Text = "Problem"; + // + // problemTextBox + // + this.problemTextBox.Location = new System.Drawing.Point(224, 13); + this.problemTextBox.Name = "problemTextBox"; + this.problemTextBox.Size = new System.Drawing.Size(100, 20); + this.problemTextBox.TabIndex = 12; + this.problemTextBox.Text = "1"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 16); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(55, 13); + this.label4.TabIndex = 11; + this.label4.Text = "Language"; + // + // languageTextBox + // + this.languageTextBox.Enabled = false; + this.languageTextBox.Location = new System.Drawing.Point(67, 13); + this.languageTextBox.Name = "languageTextBox"; + this.languageTextBox.Size = new System.Drawing.Size(27, 20); + this.languageTextBox.TabIndex = 10; + this.languageTextBox.Text = "1"; + // + // submitButton + // + this.submitButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.submitButton.Location = new System.Drawing.Point(6, 314); + this.submitButton.Name = "submitButton"; + this.submitButton.Size = new System.Drawing.Size(438, 23); + this.submitButton.TabIndex = 9; + this.submitButton.Text = "Submit"; + this.submitButton.UseVisualStyleBackColor = true; + this.submitButton.Click += new System.EventHandler(this.submitButton_Click); + // + // sourceTextBox + // + this.sourceTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.sourceTextBox.Location = new System.Drawing.Point(6, 39); + this.sourceTextBox.Multiline = true; + this.sourceTextBox.Name = "sourceTextBox"; + this.sourceTextBox.Size = new System.Drawing.Size(438, 269); + this.sourceTextBox.TabIndex = 8; + this.sourceTextBox.Text = "begin\r\nend."; + // + // IoiSubmitGuiControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.formComboBox); + this.Controls.Add(this.label2); + this.Controls.Add(this.nameTextBox); + this.Controls.Add(this.label1); + this.Name = "IoiSubmitGuiControl"; + this.Size = new System.Drawing.Size(459, 402); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox nameTextBox; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox formComboBox; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox problemTextBox; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox languageTextBox; + private System.Windows.Forms.Button submitButton; + private System.Windows.Forms.TextBox sourceTextBox; + } +} Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-02 01:10:49 UTC (rev 473) @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +namespace AcmContester.Plugins.IoiPlugins.IoiSubmitGuiPlugin +{ + public partial class IoiSubmitGuiControl : UserControl + { + IoiSubmitGuiPlugin plugin; + + public IoiSubmitGuiControl() + { + InitializeComponent(); + } + + internal void SetPlugin(IoiSubmitGuiPlugin ioiSubmitGuiPlugin) + { + plugin = ioiSubmitGuiPlugin; + } + + private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) + { + languageTextBox.Text = "" + comboBox1.Text[0]; + } + + private void submitButton_Click(object sender, EventArgs e) + { + string contestantName = nameTextBox.Text; + int form = Int32.Parse(formComboBox.Text); + + int lang = Int32.Parse(languageTextBox.Text); + int problem = Int32.Parse(problemTextBox.Text); + string soucreCode = sourceTextBox.Text; + plugin.SendSubmit(contestantName, form, soucreCode, lang, problem); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx 2009-02-02 01:10:49 UTC (rev 473) @@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-02 01:10:49 UTC (rev 473) @@ -0,0 +1,35 @@ +using System; +using AcmContester.Plugins.PluginsFramework; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; + +namespace AcmContester.Plugins.IoiPlugins.IoiSubmitGuiPlugin +{ + public class IoiSubmitGuiPlugin : BaseMediatorPlugin + { + public IoiSubmitGuiPlugin() + { + base.Control = new IoiSubmitGuiControl(); + ((IoiSubmitGuiControl)base.Control).SetPlugin(this); + } + + public override void Send(SystemMessage message) + { + } + + internal void SendSubmit(string contestantName, int form, string soucreCode, int lang, int problem) + { + SubmitIoi submit = new SubmitIoi(); + submit.name = contestantName; + submit.form = form; + submit.submit = new Submit(); + submit.submit.id = Guid.NewGuid().GetHashCode(); + submit.submit.language = lang; + submit.submit.pbolemID = problem; + submit.submit.sourceCode = soucreCode; + + SystemMessage message = new SystemMessage(submit.ToString(), "TestingSubmitIoi"); + base.DataArrived(message); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.csproj =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.csproj 2009-02-02 01:10:49 UTC (rev 473) @@ -0,0 +1,75 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{96664041-18B2-42BD-941F-117B54E2AE64}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AcmContester.Plugins.IoiPlugins.IoiSubmitGuiPlugin</RootNamespace> + <AssemblyName>IoiSubmitGuiPlugin</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="IoiSubmitGuiControl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="IoiSubmitGuiControl.Designer.cs"> + <DependentUpon>IoiSubmitGuiControl.cs</DependentUpon> + </Compile> + <Compile Include="IoiSubmitGuiPlugin.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\Library\Data\Data.csproj"> + <Project>{30C0EFA3-36A8-4C6F-8FEC-28F771D4933F}</Project> + <Name>Data</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Library\LibraryExtention\LibraryExtention.csproj"> + <Project>{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}</Project> + <Name>LibraryExtention</Name> + </ProjectReference> + <ProjectReference Include="..\..\PluginsFramework\PluginsFramework.csproj"> + <Project>{69FB4176-F298-4AF7-B714-B6758AA9A58E}</Project> + <Name>PluginsFramework</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="IoiSubmitGuiControl.resx"> + <SubType>Designer</SubType> + <DependentUpon>IoiSubmitGuiControl.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Property changes on: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/Properties/AssemblyInfo.cs 2009-02-02 01:10:49 UTC (rev 473) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("IoiSubmitGuiPlugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Home")] +[assembly: AssemblyProduct("IoiSubmitGuiPlugin")] +[assembly: AssemblyCopyright("Copyright © Home 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a2aba821-d39d-4e8d-8ba2-b0fd604236d3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-02 01:54:45
|
Revision: 475 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=475&view=rev Author: brus07 Date: 2009-02-02 01:54:43 +0000 (Mon, 02 Feb 2009) Log Message: ----------- TesterRunner understand about TestingSubmitIoi type of SystemMessage. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/WorkRunner.cs ACMServer/trunk/ACMServer/Runner/Class1.cs Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs 2009-02-02 01:50:51 UTC (rev 474) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs 2009-02-02 01:54:43 UTC (rev 475) @@ -91,6 +91,12 @@ runner.AddWork(message.Message); } + if (message.IsType("TestingSubmitIoi") == true) + { + SendSubmitToControl(message.Message, "Receive"); + runner.AddWork(message.Message); + } + if (message.IsType("TestingSubmitList") == true) { SendMessageToControl("TestingSubmitList", "Receive"); Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/WorkRunner.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/WorkRunner.cs 2009-02-02 01:50:51 UTC (rev 474) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/WorkRunner.cs 2009-02-02 01:54:43 UTC (rev 475) @@ -2,6 +2,7 @@ using System.Threading; using AcmContester.Library.LibraryExtention; using System.IO; +using AcmContester.Library.LibraryExtention.Data; namespace AcmContester.Plugins.TesterPlugins.TestRunnerPlugin { @@ -86,7 +87,11 @@ string result; try { - result = Checker.Checker.GetResult(message); + //HACK: \xEF\xEE\xF2\xF0\xB3\xE1\xED\xEE \xF2\xF3\xF2 \xEF\xE5\xF0\xE5\xE4\xE0\xE2\xE0\xF2\xE8 SystemMessage + if (message.IndexOf("submitioi") != -1) + result = Checker.Checker.GetResultIoi(message); + else + result = Checker.Checker.GetResult(message); } catch (Exception ex) { @@ -99,7 +104,11 @@ //TODO: ne znaju chy tut potriben lock lock (this) { - this.Send(new SystemMessage(result, "TestingResult")); + if (message.IndexOf("submitioi") != -1) + this.Send(new SystemMessage(result, "TestingResult")); + //this.Send(new SystemMessage(result, "TestingResultIoi")); + else + this.Send(new SystemMessage(result, "TestingResult")); } } Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-02 01:50:51 UTC (rev 474) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-02 01:54:43 UTC (rev 475) @@ -137,5 +137,11 @@ { htmlEntityList.Add(new KeyValuePair<string, string>(p, p_2)); } + + public static string GetResultIoi(string message) + { + SubmitIoi submit = SubmitIoi.CreateFromXml(message); + return GetResult(submit.submit.ToString()); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-02 01:54:52
|
Revision: 474 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=474&view=rev Author: brus07 Date: 2009-02-02 01:50:51 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Bug fixed Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Data/Result.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs Modified: ACMServer/trunk/ACMServer/Library/Data/Result.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/Result.cs 2009-02-02 01:10:49 UTC (rev 473) +++ ACMServer/trunk/ACMServer/Library/Data/Result.cs 2009-02-02 01:50:51 UTC (rev 474) @@ -30,6 +30,10 @@ readonly string temp; + public Result() + { + } + public Result(Submit ssubmit) { submit = ssubmit; Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-02 01:10:49 UTC (rev 473) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-02 01:50:51 UTC (rev 474) @@ -24,6 +24,8 @@ submit.form = form; submit.submit = new Submit(); submit.submit.id = Guid.NewGuid().GetHashCode(); + if (submit.submit.id < 0) + submit.submit.id = -submit.submit.id + 1; submit.submit.language = lang; submit.submit.pbolemID = problem; submit.submit.sourceCode = soucreCode; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-02 16:04:25
|
Revision: 478 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=478&view=rev Author: brus07 Date: 2009-02-02 16:04:20 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Now Tester plugins and Runner can work with ResultIoi type message. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/WorkRunner.cs ACMServer/trunk/ACMServer/Runner/Class1.cs ACMServer/trunk/ACMServer/Runner/Runner.csproj ACMServer/trunk/ACMServer/Runner/Test.dll Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs 2009-02-02 15:59:55 UTC (rev 477) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs 2009-02-02 16:04:20 UTC (rev 478) @@ -23,6 +23,14 @@ base.DataArrived(message); return true; } + if (message.IsType("TestingResultIoi") == true) + { + ResultIoi res = ResultIoi.CreateFromXml(message.Message); + Result result = res.ToResult(); + SendResultToControl(result.ToStringX(), "Send"); + base.DataArrived(message); + return true; + } throw new Exception(); } private void SendResultType(string text) Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/WorkRunner.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/WorkRunner.cs 2009-02-02 15:59:55 UTC (rev 477) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/WorkRunner.cs 2009-02-02 16:04:20 UTC (rev 478) @@ -105,8 +105,10 @@ lock (this) { if (message.IndexOf("submitioi") != -1) - this.Send(new SystemMessage(result, "TestingResult")); + { //this.Send(new SystemMessage(result, "TestingResultIoi")); + this.Send(new SystemMessage(result, "TestingResultIoi")); + } else this.Send(new SystemMessage(result, "TestingResult")); } Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-02 15:59:55 UTC (rev 477) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-02 16:04:20 UTC (rev 478) @@ -5,6 +5,7 @@ using AcmContester.Library.LibraryExtention.Data; using Main; using Test; +using Load; namespace Checker { @@ -140,8 +141,104 @@ public static string GetResultIoi(string message) { + Log log = Log.GetLog(); + log.Loging(DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString(), Log.Priority.INFO); + log.Loging(message, Log.Priority.INFO); + log.Loging("", Log.Priority.INFO); + + IniFile iniFile = new IniFile("RealTesterConfig.ini"); + string secureLever = iniFile.GetString("MainConfig", "SecureLevel", "Double"); + SubmitIoi submit = SubmitIoi.CreateFromXml(message); - return GetResult(submit.submit.ToString()); + + //TODO: + string code = submit.submit.sourceCode; + code = HtmlEntityDecode(code); + int language = submit.submit.language; + ResultIoi result = new ResultIoi(submit); + try + { + //Console.SetOut(File.CreateText("logout.txt")); + string[] data = File.ReadAllLines("InData.txt"); + data[2] = data[2] + submit.submit.pbolemID + "\\"; + string src = code; + TestEnv test = new TestEnv(src, language, data[1], data[2]); + test.Compile(); + + log.Loging("------------------BEGIN SOURCE--------------------------", Log.Priority.INFO); + Console.WriteLine("------------------BEGIN SOURCE--------------------------"); + + log.Loging(src, Log.Priority.INFO); + Console.WriteLine(src); + + log.Loging("-------------------END SOURCE---------------------------", Log.Priority.INFO); + Console.WriteLine("-------------------END SOURCE---------------------------"); + + log.Loging(String.Format("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result, test.comp.Details, test.comp.UsedTime), Log.Priority.INFO); + Console.WriteLine("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result, test.comp.Details, test.comp.UsedTime); + + log.Loging(String.Format("Comp Output: {0}", test.comp.CompilerOutput), Log.Priority.INFO); + Console.WriteLine("Comp Output: {0}", test.comp.CompilerOutput); + + if (test.comp.Result == CompRes.OK) + { + SecureType secureType = SecureType.Double; + try + { + secureType = (SecureType)Enum.Parse(typeof(SecureType), secureLever, true); + } + catch (ArgumentException) + { + } + if (secureLever == "None") + secureType = SecureType.None; + test.RunAllTests(secureType); + + for (int i = 0; i < test.run.results.Length; i++) + { + log.Loging(String.Format("Test #{0} result: {1}, details: {2}, usedtime:{3}, usedRealTime: {4}, usedmemory: {5}", i + 1, + test.run.results[i].res, test.run.results[i].Details, test.run.results[i].UsedTime, test.run.results[i].UsedRealTime, test.run.results[i].UsedMemory), Log.Priority.INFO); + Console.WriteLine("Test #{0} result: {1}, details: {2}, usedtime:{3}, usedRealTime: {4}, usedmemory: {5}", i + 1, + test.run.results[i].res, test.run.results[i].Details, test.run.results[i].UsedTime, test.run.results[i].UsedRealTime, test.run.results[i].UsedMemory); + } + } + + + //TODO: + result.res = test.comp.Result.ToString(); + if (test.comp.Result == CompRes.OK) + { + int usedTime = -1; + int usedMemory = -1; + result.testResults = new TestResIoi[test.run.results.Length]; + for (int i = 0; i < test.run.results.Length; i++) + { + result.testResults[i] = new TestResIoi(); + + usedTime = Math.Max(usedTime, test.run.results[i].UsedTime); + usedMemory = Math.Max(usedMemory, test.run.results[i].UsedMemory); + result.res = test.run.results[i].res.ToString(); + + result.testResults[i].input = test.run.test.tests[i].input; + result.testResults[i].output = test.run.test.tests[i].output; + result.testResults[i].points = test.run.test.tests[i].points; + result.testResults[i].contestantOutput = test.run.results[i].UserOutput; + result.testResults[i].usedMemory = test.run.results[i].UsedMemory; + result.testResults[i].usedTime = test.run.results[i].UsedTime; + result.testResults[i].id = i; + result.testResults[i].res = test.run.results[i].res.ToString(); + } + result.usedMemory = usedTime; + result.usedTime = usedMemory; + } + } + catch (Exception tex) + { + log.Loging("Runner:GetResult - Exception (" + tex + ": " + tex.Message, Log.Priority.INFO); + log.Loging(tex.StackTrace, Log.Priority.INFO); + result.res = "Exception"; + } + return result.ToStringX(); } } } Modified: ACMServer/trunk/ACMServer/Runner/Runner.csproj =================================================================== --- ACMServer/trunk/ACMServer/Runner/Runner.csproj 2009-02-02 15:59:55 UTC (rev 477) +++ ACMServer/trunk/ACMServer/Runner/Runner.csproj 2009-02-02 16:04:20 UTC (rev 478) @@ -28,11 +28,12 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="Load, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> <Reference Include="Main, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> - <Reference Include="Test, Version=1.0.3267.427, Culture=neutral, processorArchitecture=x86" /> + <Reference Include="Test, Version=1.0.3320.28735, Culture=neutral, processorArchitecture=x86" /> </ItemGroup> <ItemGroup> <Compile Include="Class1.cs" /> Modified: ACMServer/trunk/ACMServer/Runner/Test.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-02 22:23:50
|
Revision: 481 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=481&view=rev Author: brus07 Date: 2009-02-02 21:53:07 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Added TextBox for set Port for SocketServer. SocketServer and SocketClient can configure different Port number. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Connector/SocketClientTask.cs ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePluginUserControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePluginUserControl.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketClientTask.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/SocketClientTask.cs 2009-02-02 16:55:04 UTC (rev 480) +++ ACMServer/trunk/ACMServer/Library/Connector/SocketClientTask.cs 2009-02-02 21:53:07 UTC (rev 481) @@ -13,6 +13,12 @@ client.onDataArrived +=SocketClientGate_onDataArrived; } + public SocketClientTask(string IP, int port) + { + client = new SocketClient(IP, port); + client.onDataArrived += SocketClientGate_onDataArrived; + } + void SocketClientGate_onDataArrived(SystemMessage message) { if (message.IsType("SystemTestBusyMessage")) Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs 2009-02-02 16:55:04 UTC (rev 480) +++ ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs 2009-02-02 21:53:07 UTC (rev 481) @@ -6,7 +6,7 @@ { public class SocketServerTask: AbstractConnector { - readonly SocketServer server; + SocketServer server; //val: //free - vilnyj @@ -177,5 +177,12 @@ } return false; } + + public void Start(int p) + { + server = new SocketServer(p); + server.onDataArrived += DataArrived; + this.Start(); + } } } Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePluginUserControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePluginUserControl.Designer.cs 2009-02-02 16:55:04 UTC (rev 480) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePluginUserControl.Designer.cs 2009-02-02 21:53:07 UTC (rev 481) @@ -37,6 +37,8 @@ this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.portTextBox = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); this.socketGateStatusStrip.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -92,10 +94,10 @@ | System.Windows.Forms.AnchorStyles.Right))); this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Location = new System.Drawing.Point(3, 26); + this.tabControl1.Location = new System.Drawing.Point(3, 58); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(211, 130); + this.tabControl1.Size = new System.Drawing.Size(211, 98); this.tabControl1.TabIndex = 5; // // tabPage1 @@ -103,7 +105,7 @@ this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(203, 104); + this.tabPage1.Size = new System.Drawing.Size(203, 72); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "tabPage1"; this.tabPage1.UseVisualStyleBackColor = true; @@ -119,10 +121,32 @@ this.tabPage2.Text = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // + // portTextBox + // + this.portTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.portTextBox.Location = new System.Drawing.Point(114, 3); + this.portTextBox.Name = "portTextBox"; + this.portTextBox.Size = new System.Drawing.Size(100, 20); + this.portTextBox.TabIndex = 6; + this.portTextBox.Text = "4120"; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(114, 29); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(100, 23); + this.button1.TabIndex = 7; + this.button1.Text = "Recreate"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // // SocketServerGatePluginUserControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button1); + this.Controls.Add(this.portTextBox); this.Controls.Add(this.tabControl1); this.Controls.Add(this.autoScrollCheckBox); this.Controls.Add(this.socketGateStatusStrip); @@ -149,5 +173,7 @@ private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TextBox portTextBox; + private System.Windows.Forms.Button button1; } } Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePluginUserControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePluginUserControl.cs 2009-02-02 16:55:04 UTC (rev 480) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePluginUserControl.cs 2009-02-02 21:53:07 UTC (rev 481) @@ -76,5 +76,12 @@ { clientCountTimer.Enabled = true; } + + private void button1_Click(object sender, EventArgs e) + { + SocketServerGate gate = SocketServerGate.GetInstance(); + gate.Stop(); + gate.Start(Int32.Parse(portTextBox.Text)); + } } } Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs 2009-02-02 16:55:04 UTC (rev 480) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs 2009-02-02 21:53:07 UTC (rev 481) @@ -28,6 +28,14 @@ client.isBusy += IsBusy; } + public void CreateClient(string ip, int port) + { + client = new SocketClientTask(ip, port); + client.onDataArrived += new SocketClient.DataArrivedDelegate(SocketClientGate_onDataArrived); + client.onAddLogText += OnAddLogText; + client.isBusy += IsBusy; + } + System.Threading.Mutex mutex = new System.Threading.Mutex(); bool busyState = false; bool IsBusy() Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs 2009-02-02 16:55:04 UTC (rev 480) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs 2009-02-02 21:53:07 UTC (rev 481) @@ -30,6 +30,7 @@ { this.components = new System.ComponentModel.Container(); this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); @@ -38,7 +39,9 @@ this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.timer1 = new System.Windows.Forms.Timer(this.components); - this.tabPage2 = new System.Windows.Forms.TabPage(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.portTextBox = new System.Windows.Forms.TextBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.statusStrip1.SuspendLayout(); @@ -57,6 +60,16 @@ this.tabControl1.Size = new System.Drawing.Size(238, 161); this.tabControl1.TabIndex = 0; // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(230, 135); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // // tabPage1 // this.tabPage1.Controls.Add(this.textBox1); @@ -125,20 +138,39 @@ this.timer1.Enabled = true; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // - // tabPage2 + // label1 // - this.tabPage2.Location = new System.Drawing.Point(4, 22); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(230, 135); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "tabPage2"; - this.tabPage2.UseVisualStyleBackColor = true; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(115, 6); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(20, 13); + this.label1.TabIndex = 5; + this.label1.Text = "IP:"; // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(106, 32); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(29, 13); + this.label2.TabIndex = 7; + this.label2.Text = "Port:"; + // + // portTextBox + // + this.portTextBox.Location = new System.Drawing.Point(141, 29); + this.portTextBox.Name = "portTextBox"; + this.portTextBox.Size = new System.Drawing.Size(100, 20); + this.portTextBox.TabIndex = 6; + this.portTextBox.Text = "4120"; + // // SocketClientGatePluginUserControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label2); + this.Controls.Add(this.portTextBox); + this.Controls.Add(this.label1); this.Controls.Add(this.statusStrip1); this.Controls.Add(this.button2); this.Controls.Add(this.button1); @@ -168,5 +200,8 @@ private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; private System.Windows.Forms.Timer timer1; private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox portTextBox; } } Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs 2009-02-02 16:55:04 UTC (rev 480) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs 2009-02-02 21:53:07 UTC (rev 481) @@ -58,7 +58,7 @@ private void button1_Click(object sender, EventArgs e) { SocketClientGate gate = SocketClientGate.GetInstance(); - gate.CreateClient(textBox2.Text); + gate.CreateClient(textBox2.Text, Int32.Parse(portTextBox.Text)); gate.Connect(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-03 12:22:23
|
Revision: 482 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=482&view=rev Author: brus07 Date: 2009-02-03 11:33:16 +0000 (Tue, 03 Feb 2009) Log Message: ----------- Now SocketServer and -Client can work in opposite direction. Submits come from Client and go to Server, Result from Server to Client. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.csproj ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/WorkingPool.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs Added Paths: ----------- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/WorkingPoolArrived.cs Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs 2009-02-02 21:53:07 UTC (rev 481) +++ ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs 2009-02-03 11:33:16 UTC (rev 482) @@ -36,6 +36,11 @@ } public override bool Send(SystemMessage message) { + if (message.Description.IndexOf("not check busy") != -1) + { + DataSender(message, 0); + return true; + } List<int> freeTesters = GetFreeTesters(); if (freeTesters.Count != 0) { Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs 2009-02-02 21:53:07 UTC (rev 481) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs 2009-02-03 11:33:16 UTC (rev 482) @@ -20,12 +20,14 @@ DataMediator dataContainer = new DataMediator(); WorkingPool pool = new WorkingPool(); + WorkingPoolArrived poolArrived = new WorkingPoolArrived(); private SocketServerGate() { base.Start(); base.onDataArrived += DataArrived; pool.onSendData += base.Send; + poolArrived.onSendData += DataArrived; } public static SocketServerGate GetInstance() { @@ -82,19 +84,80 @@ return true; } + if (message.IsType("TestingResult")) + { + Result result = Result.CreateFromXml(message.Message); + + string mes = "result " + result.Submit.id; + mes += " " + result.res; + OnLogMessage("Receive", mes); + + message.Description = "not check busy"; + base.Send(message); + dataContainer.Return(result); + } + if (message.IsType("TestingResultIoi")) + { + ResultIoi result = ResultIoi.CreateFromXml(message.Message); + + string mes = "result " + result.Submit.submit.id; + mes += " " + result.res; + OnLogMessage("Receive", mes); + + message.Description = "not check busy"; + base.Send(message); + dataContainer.Return(result.ToResult()); + } + if (message.IsType("CheckStateResult")) + { + poolArrived.Send(message); + } + return false; } protected override void DataArriver(SystemMessage message) { - Result result = Result.CreateFromXml(message.Message); + if (message.IsType("TestingResult")) + { + Result result = Result.CreateFromXml(message.Message); - string mes = "result " + result.Submit.id; - mes += " " + result.res; - OnLogMessage("Receive", mes); + string mes = "result " + result.Submit.id; + mes += " " + result.res; + OnLogMessage("Receive", mes); - base.DataArriver(message); - dataContainer.Return(result); + base.DataArriver(message); + dataContainer.Return(result); + } + + if (message.IsType("TestingSubmit")) + { + Submit submit = Submit.CreateFromXml(message.Message); + + if (dataContainer.Add(submit)) + { + OnLogMessage("SystemSend", submit.id + " to Pool"); + poolArrived.Send(message); + } + else + { + OnLogMessage("SystemReceive", submit.id + "is in queue"); + } + } + if (message.IsType("TestingSubmitIoi")) + { + SubmitIoi submit = SubmitIoi.CreateFromXml(message.Message); + + if (dataContainer.Add(submit.submit)) + { + OnLogMessage("SystemSend", submit.submit.id + " to Pool"); + poolArrived.Send(message); + } + else + { + OnLogMessage("SystemReceive", submit.submit.id + "is in queue"); + } + } } private void DataArrived(SystemMessage message) { Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.csproj =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.csproj 2009-02-02 21:53:07 UTC (rev 481) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGatePlugin.csproj 2009-02-03 11:33:16 UTC (rev 482) @@ -39,6 +39,7 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> + <Compile Include="WorkingPoolArrived.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SocketServerGate.cs" /> <Compile Include="SocketServerGatePlugin.cs" /> Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/WorkingPool.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/WorkingPool.cs 2009-02-02 21:53:07 UTC (rev 481) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/WorkingPool.cs 2009-02-03 11:33:16 UTC (rev 482) @@ -13,8 +13,16 @@ private bool OnSendData(SystemMessage sysMes) { - if (onSendData != null) - return onSendData(sysMes); + if (sysMes.IsType("TestingSubmit") == true) + { + if (onSendData != null) + return onSendData(sysMes); + } + if (sysMes.IsType("TestingSubmitIoi") == true) + { + if (onSendData != null) + return onSendData(sysMes); + } //TODO: ne znaju sho same maje povertatysja u takomu vypadku return false; } Added: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/WorkingPoolArrived.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/WorkingPoolArrived.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/WorkingPoolArrived.cs 2009-02-03 11:33:16 UTC (rev 482) @@ -0,0 +1,158 @@ +using System; +using AcmContester.Library.LibraryExtention; +using System.Collections.Generic; +using System.Threading; +using AcmContester.Library.LibraryExtention.Data; + +namespace AcmContester.Plugins.MediatorPlugins.SocketServerGatePlugin +{ + class WorkingPoolArrived + { + internal delegate void SendDataDelegate(SystemMessage s); + internal event SendDataDelegate onSendData; + + private bool OnSendData(SystemMessage sysMes) + { + if (sysMes.IsType("TestingSubmit")) + { + if (onSendData != null) + onSendData(sysMes); + } + if (sysMes.IsType("TestingSubmitIoi")) + { + if (onSendData != null) + onSendData(sysMes); + } + if (sysMes.IsType("CheckState")) + { + if (onSendData != null) + onSendData(sysMes); + } + return true; + } + + private bool OnSendData2(SystemMessage sysMes) + { + if (IsFreeTester()) + return OnSendData(sysMes); + return false; + } + + private Dictionary<int, SystemMessage> poolWork = new Dictionary<int, SystemMessage>(); + private bool poolWorking = false; + + private void runPool() + { + if (poolWorking == true) + return; + poolWorking = true; + while (true) + { + Thread.Sleep(2000); + lock (poolWork) + { + if (poolWork.Count == 0) + break; + foreach (int key in poolWork.Keys) + { + SystemMessage sysMes = poolWork[key]; + //TODO: potribno zrobyty, shob pry posylci "poolWork" ne buv zalokanyj + if (OnSendData2(sysMes) == true) + { + poolWork.Remove(key); + break; + } + } + } + } + poolWorking = false; + } + private static void StartPool(Object ob) + { + WorkingPoolArrived ssg = (WorkingPoolArrived)ob; + ssg.runPool(); + } + private void startPool() + { + if (poolWorking == false) + { + ThreadPool.QueueUserWorkItem(StartPool, this); + } + } + + internal void Send(SystemMessage sysMes) + { + if (sysMes.IsType("CheckStateResult")) + { + if (SystemMessageX(sysMes)) + return; + } + + lock (poolWork) + { + if (sysMes.IsType("TestingSubmit")) + { + //TODO: \xEF\xEE\xF2\xF0\xB3\xE1\xED\xEE \xE1\xF3\xE4\xE5 \xF6\xE5 \xE7\xE2\xB3\xE4\xF1\xE8 \xE7\xE0\xE1\xF0\xE0\xF2\xE8 + Submit submit = Submit.CreateFromXml(sysMes.Message); + if (poolWork.ContainsKey(submit.id) == false) + poolWork.Add(submit.id, sysMes); + } + if (sysMes.IsType("TestingSubmitIoi")) + { + //TODO: \xEF\xEE\xF2\xF0\xB3\xE1\xED\xEE \xE1\xF3\xE4\xE5 \xF6\xE5 \xE7\xE2\xB3\xE4\xF1\xE8 \xE7\xE0\xE1\xF0\xE0\xF2\xE8 + SubmitIoi submit = SubmitIoi.CreateFromXml(sysMes.Message); + if (poolWork.ContainsKey(submit.submit.id) == false) + poolWork.Add(submit.submit.id, sysMes); + } + } + startPool(); + } + + + readonly Queue<string> q = new Queue<string>(); + + private bool IsFreeTester() + { + q.Clear(); + SystemMessage mesa = new SystemMessage("isbusy", "CheckState"); + OnSendData(mesa); + + DateTime start = DateTime.Now; + while (true) + { + if ((DateTime.Now - start).TotalSeconds > 1.0) + { + break; + } + lock (q) + { + while (q.Count != 0) + { + string curStr = q.Dequeue(); + if (curStr == "free") + { + return true; + } + else + { + return false; + } + } + } + System.Threading.Thread.Sleep(50); + } + return false; + } + + private bool SystemMessageX(SystemMessage message) + { + if (message.Message == "busy" || message.Message == "free") + { + lock (q) + q.Enqueue(message.Message); + return true; + } + return false; + } + } +} Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs 2009-02-02 21:53:07 UTC (rev 481) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs 2009-02-03 11:33:16 UTC (rev 482) @@ -57,6 +57,19 @@ { OnDataArrived(message); } + + if (message.IsType("TestingResult")) + { + Result res = Result.CreateFromXml(message.Message); + OnAddLogText("Receive", "ID " + res.Submit.id + " result - " + res.res); + OnDataArrived(message); + } + if (message.IsType("TestingResultIoi")) + { + ResultIoi res = ResultIoi.CreateFromXml(message.Message); + OnAddLogText("Receive", "ID " + res.Submit.submit.id + " result - " + res.res); + OnDataArrived(message); + } } public override bool Send(SystemMessage message) @@ -76,6 +89,15 @@ OnAddLogText("Send", "ID " + res.Submit.id + " result - " + res.res); } + if (message.IsType("TestingSubmit")) + { + OnAddLogText("Send", message.Message); + } + if (message.IsType("TestingSubmitIoi")) + { + OnAddLogText("Send", message.Message); + } + if (client == null) return true; Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs 2009-02-02 21:53:07 UTC (rev 481) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/TestRunnerPlugin/TestRunnerPlugin.cs 2009-02-03 11:33:16 UTC (rev 482) @@ -17,13 +17,13 @@ private bool runner_onDataArrived(SystemMessage message) { - if (message.IsType("TestingResult") == true) + if (message.IsType("TestingResult")) { SendResultToControl(message.Message, "Send"); base.DataArrived(message); return true; } - if (message.IsType("TestingResultIoi") == true) + if (message.IsType("TestingResultIoi")) { ResultIoi res = ResultIoi.CreateFromXml(message.Message); Result result = res.ToResult(); @@ -31,6 +31,11 @@ base.DataArrived(message); return true; } + if (message.IsType("CheckStateResult")) + { + base.DataArrived(message); + return true; + } throw new Exception(); } private void SendResultType(string text) @@ -88,7 +93,7 @@ mes = new SystemMessage("free", "CheckStateResult"); } SendMessageToControl(mes.Message, "SystemSend"); - Send(mes); + runner_onDataArrived(mes); return; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-04 13:56:57
|
Revision: 487 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=487&view=rev Author: brus07 Date: 2009-02-04 13:56:55 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Now can work with many client. (bug this type of work very bad) Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs 2009-02-04 13:54:23 UTC (rev 486) +++ ACMServer/trunk/ACMServer/Library/Connector/SocketServerTask.cs 2009-02-04 13:56:55 UTC (rev 487) @@ -38,7 +38,17 @@ { if (message.Description.IndexOf("not check busy") != -1) { - DataSender(message, 0); + for (int index = 0; index < this.CountClients(); index++) + { + try + { + ServerSend(message, index); + //DataSender(message, 0); + } + catch (Exception) + { + } + } return true; } List<int> freeTesters = GetFreeTesters(); @@ -50,6 +60,7 @@ } return false; } + protected virtual void DataSender(SystemMessage message, int clientIndex) { //TODO: dlja cjogo bulo potribno pidkljuchyty EasySocket Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs 2009-02-04 13:54:23 UTC (rev 486) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/SocketServerGatePlugin/SocketServerGate.cs 2009-02-04 13:56:55 UTC (rev 487) @@ -92,7 +92,7 @@ mes += " " + result.res; OnLogMessage("Receive", mes); - message.Description = "not check busy"; + message.Description += " not check busy"; base.Send(message); dataContainer.Return(result); } @@ -104,7 +104,7 @@ mes += " " + result.res; OnLogMessage("Receive", mes); - message.Description = "not check busy"; + message.Description += " not check busy"; base.Send(message); dataContainer.Return(result.ToResult()); } Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs 2009-02-04 13:54:23 UTC (rev 486) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs 2009-02-04 13:56:55 UTC (rev 487) @@ -2,6 +2,7 @@ using AcmContester.Library.LibraryExtention; using AcmContester.Library.Connector; using AcmContester.Library.LibraryExtention.Data; +using System.Collections.Generic; namespace AcmContester.Plugins.TesterPlugins.SocketClientGatePlugin { @@ -11,6 +12,9 @@ SocketClientTask client; + + Dictionary<int, bool> colectSubmitId = new Dictionary<int, bool>(); + private SocketClientGate() { } @@ -41,7 +45,7 @@ bool IsBusy() { OnDataArrived(new SystemMessage("isbusy", "CheckState")); - if (mutex.WaitOne(200, false) == true) + if (mutex.WaitOne(2000, false) == true) { return busyState; } @@ -51,6 +55,7 @@ void SocketClientGate_onDataArrived(SystemMessage message) { + OnAddLogText("Receive", message.Message); if (message.IsType("TestingSubmit") == true) @@ -67,8 +72,12 @@ if (message.IsType("TestingResultIoi")) { ResultIoi res = ResultIoi.CreateFromXml(message.Message); - OnAddLogText("Receive", "ID " + res.Submit.submit.id + " result - " + res.res); - OnDataArrived(message); + if (colectSubmitId.ContainsKey(res.Submit.submit.id) == true) + { + colectSubmitId.Remove(res.Submit.submit.id); + OnAddLogText("Receive", "ID " + res.Submit.submit.id + " result - " + res.res); + OnDataArrived(message); + } } } @@ -95,6 +104,8 @@ } if (message.IsType("TestingSubmitIoi")) { + SubmitIoi submit = SubmitIoi.CreateFromXml(message.Message); + colectSubmitId.Add(submit.submit.id, true); OnAddLogText("Send", message.Message); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-04 16:57:38
|
Revision: 488 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=488&view=rev Author: brus07 Date: 2009-02-04 16:57:31 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Clean Main form and added Logo to Main form. Modified Paths: -------------- ACMServer/trunk/ACMServer/Mediator/Form1.Designer.cs ACMServer/trunk/ACMServer/Mediator/Form1.resx ACMServer/trunk/ACMServer/Mediator/Mediator.csproj ACMServer/trunk/ACMServer/Mediator/Properties/Resources.Designer.cs ACMServer/trunk/ACMServer/Mediator/Properties/Resources.resx Added Paths: ----------- ACMServer/trunk/ACMServer/Resource/ACMLogo.gif Modified: ACMServer/trunk/ACMServer/Mediator/Form1.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Form1.Designer.cs 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Form1.Designer.cs 2009-02-04 16:57:31 UTC (rev 488) @@ -28,86 +28,77 @@ /// </summary> private void InitializeComponent() { - this.button2 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); - this.textBox2 = new System.Windows.Forms.TextBox(); this.panel1 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // - // button2 + // statusStrip1 // - this.button2.Enabled = false; - this.button2.Location = new System.Drawing.Point(12, 12); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 2; - this.button2.Text = "Start"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); + this.statusStrip1.Location = new System.Drawing.Point(0, 432); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(525, 22); + this.statusStrip1.TabIndex = 9; + this.statusStrip1.Text = "statusStrip1"; // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.Location = new System.Drawing.Point(12, 109); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(513, 320); + this.panel1.TabIndex = 12; + // // label1 // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(122, 17); + this.label1.Location = new System.Drawing.Point(374, 15); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(23, 13); this.label1.TabIndex = 3; this.label1.Text = "IP: "; // - // button3 - // - this.button3.Enabled = false; - this.button3.Location = new System.Drawing.Point(12, 41); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(75, 23); - this.button3.TabIndex = 4; - this.button3.Text = "Stop"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.button3_Click); - // - // statusStrip1 - // - this.statusStrip1.Location = new System.Drawing.Point(0, 295); - this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(369, 22); - this.statusStrip1.TabIndex = 9; - this.statusStrip1.Text = "statusStrip1"; - // // textBox2 // - this.textBox2.Location = new System.Drawing.Point(151, 14); + this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.textBox2.Location = new System.Drawing.Point(403, 12); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; this.textBox2.Size = new System.Drawing.Size(110, 20); this.textBox2.TabIndex = 11; // - // panel1 + // pictureBox1 // - this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel1.Location = new System.Drawing.Point(12, 70); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(357, 222); - this.panel1.TabIndex = 12; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(12, 12); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(330, 91); + this.pictureBox1.TabIndex = 13; + this.pictureBox1.TabStop = false; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(369, 317); + this.ClientSize = new System.Drawing.Size(525, 454); + this.Controls.Add(this.pictureBox1); this.Controls.Add(this.textBox2); this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.button3); this.Controls.Add(this.label1); - this.Controls.Add(this.button2); this.Controls.Add(this.panel1); this.Name = "Form1"; this.Text = "Gate"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); this.Load += new System.EventHandler(this.Form1_Load); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -115,12 +106,11 @@ #endregion - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button button3; private System.Windows.Forms.StatusStrip statusStrip1; - private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.PictureBox pictureBox1; } } Modified: ACMServer/trunk/ACMServer/Mediator/Form1.resx =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Form1.resx 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Form1.resx 2009-02-04 16:57:31 UTC (rev 488) @@ -120,4 +120,184 @@ <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + R0lGODlhRQFYAPcAAAQOtASCRLwCVISGZCxOdEyChJQ2LMQKDKTWLESiXDx6bEQC/MQqHNTSBCSOTGSi + fLw2HOQCBBwmtHROPIxWNKzaJHxmPGyGdEQi3GSybERinCyaVMTiHDwepBSOTIQCpEySVNTuFBwStIym + NLQ6JMQWFOQSDHS2bFSmZKy2DERGxMQORDxqfNweFLziHGx2REQ2zOzuBAQC5BSKTJwqJHQCvDSWVPQG + DIRmPHy+dLS6HAyKTFyKhJRGNNwCBCSWVDw+pLTaJDyaXEySdHy6bExStFxmrHR+bOz6BLQeHBwOtAyG + REyiXEQW7NQiFCQqtGxaRJxSNEQu1FRirMzqHByOTLQCbLRCXFyuZAwG1FyClJw6LMwKBMTGFOTmBCSS + TGSuZNw6ROwOBCQizJRWNHyaRGyybExerDSaVMTmHJwWbBQW/KxCJPwSFHS6bFyqZLyuFExGxOwyNHR+ + TEw+zPQKBLy+FLTaNEyabFRynPz+BKQqJEymXHxiPBySTAwOxASGRGRyhHQepFx6RGSWfIweVKSyJJwC + jNwaFExunESeXBQevNQKNOwiJEQO9LQmHDRSjMwmNOwGHLSyJIw+NHRiPMzODPQaHNzaBGR+RKy6NNwK + DEQe5AQC/Ewm5NzyDPwCBJxKPCQitLzeLPTyBIxiPPT+BFSCjEw21FSSfFRSvEwu3OQ6PKzaNCyWVHR+ + fFyOfMwODExipKxGLExKvFR2lFSqZLTeJDyeXNQmFJRaNGy2bMTiJHy6dAyGTCSSVGSubDSaXHS6dEym + ZBySVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + ACwAAAAARQFYAAAI/wADBAA0UGBBgwQRGhSYsCDBhgwdHjz4MGLCihQVWlw4sSHEjhs5QvQYkaNIjSUl + jpx40qRCkiUxpsRIM+NFlyFrLrx5cydInzNtpjQpkyTMlTmFDn2J8+dQpD1ZSgwa0qnKpDGvwpz6sarW + jRWRWtWJkiXUq0CzblWKsmhZs2ClrpW6tOzHrnTRwrXbEuTdtn3FNn3bdC3elb5w4mVKdWhioDV5Dk66 + +KzPuZi9Krbq9zHDx54D+GqY2CNog6ddega0ujXC0K5RT/S8evZr2QlHP2a983Ru0bIFlv48sHZojLSF + K4eYnPjyiM2VB3c+PLR057Z77l5ofLru6cWfW/8HLpz39YeJR4sGxH69eODqRxMEPb+++/TzgfNWv0Q/ + fvjKxVeeff39J2B1B6lXkHr71YfeQO0dGJ6AASzBG4EA2hdfhAO6V+CCDuGn4X0kVphffib+B1996a23 + 3335baifezSOSCKKFqqooH3r5cgeIBay9p1urBUpX5Gs+UhkkuzJd+SSThrJXpCj+YgkkS4SCWWTUkq5 + xHdKAonklWFqeeGYUaZ5oZpVksmlmG2ymSOERFrJZpdfchmllVe+iaaUT75ZJ28+lulml3H2WKSSXzbq + y6N5OrpEo5H6ImmVlmJa6aWcZppjp0laKmmnk+omqqehTupoqJ626mimqbb/CqSrtM6aJ62Uwooqrrfm + ummtnq66aqaaakoqrrLCeqyvtBZrq7PMkiptqZfu8KW1y1qLbKPaSgtppt2Cey23loY7rqq+hFvuua5O + am6w1I5K7BI7BLstruG+K6+j75prLr3V+iowstbqe6+75AL8rcLY1uuuqNG2++2/Dov7aLdLzODwDNyO + qnGjHFsa8pcjf0yrtuLWGzLKIG/brbUjZ1wxyJxunPDLnmos8rozjwzzwjOITLMvHM9sbsk7Zyxp0JLC + 3DHTSS+dNNMyZyz0qU+TivS+Lovq8KQfM13yz0rXjLW6Vtdbb7qPBn0x24+2/TbbUKsdd9Buu0303nHf + /y033Cr7DbfedvcddOF5A/734HIXvrbehwvO9g56K7722ulCPvflcE/+Jd3lGh534fTuXbrnb2OOstqJ + p54456DjvXfgsjOe+ui4q5473Z8H3ja9OssuvNzCU0407XwPj7fKtD++9/LPR1+89NRrbL30yA+PffXR + J9+98twvX3vw4ZevvPPgp2/+9sZPr/7sxAeeffjtrw/+8+1Trr/1+/N/ffHWC+D+BjgDARqQgMfzHwEp + d0AFim+BDuwfASPovwYyEIIYNCAFEUjBBF6wgAXMIAQ96D8S9o+CD6wgAzW4wg9OsH4ONGEIVfg/ENrw + hjjMoQ53yMMe+vCHQAyiEP+HSMQiGvGISEziEFeoxCb20AM7hKITCwhFKebQilN0IhZvKMUtZlGIXvQi + FZMoRiOKsYpFLCMRq2BDNhbQjSCEIwiJ8UYeylGOO8TjHXMIRy/qsY1xBGQdBcnHG+JxkHacIyEF6cY9 + SvGQbDzkDNT4x0HS0YamyOQMJIlJTU4ykIgEIygtGcpBchKShtzkDOjYSFMiko0eaOUqVUnLWaoyknVs + ZStjmUtasrKXrbykLOGIS1zScpi3LOAvj+nKYtaylsR0JSMB6UZhjrEKHrAmFY0ZzWhCcZiZNIUuTemB + cH5zkrtMJjHGyc1B8lKOvGSmNKvZy0A20ortdGYk35n/TGbi8p381Kc/+2lMV/4yn8ncpz2BOVBnqvKX + 1kSoQPfJxoM+dJP8nCVFI0lMjlZBoR7lZSwnGstyZvKbJaXoGwN6z2JaEaDoxGgxP5rQmgrUoi7N6Ud3 + WgVWrvOnm8TmT3ca1Fiu86NGFSpPsYnUnio1m0o9KlNH2tSjWpWjRt3kVaHK1avScag9XaVT1ynWkSbV + qUHlaVfDutV1QpWpWAVrJH2q1p2GM5M7ZWUV7srTcO4Vr9j0a1PhKljB/lWch/2oYQUr1cTaFbCK5etZ + kepWsH41qlrNbF6XytnOOtWzoA2taEdL2tKa9rSoTa1qO3tXwx6Wr5FtrThb69nC/0LWtohdLGT7ulvd + 0na1om3sRx1wWuLy9KqobawDpKrcnS73s8b1LHGFWwXjRte6oI1uZ6Pb3M1KVbvV5Sx4w0vdzTqXs729 + LWD9SgzYuhey6yQubh+b2/Vm8qh+Ba9rbftZ1wp3vOcd7lLB61ViPNfAVfBDFX7xUQVbdbrVJcYXqnAA + LlBiwgtOcBUgIYNOdEICH2UwT43LYK8K+Kq/GKqI47vOEjf4s5bNcIZRrOKPtjjEn1WwiHHs1BV/1sU9 + tnGEZ2zj6R5YyCt+Ll8dwNi94hev6wzncpmM1x1HGa8ThvJflZxJEVf5ryamsji5bAq5vva5O/UxioVM + 47HieP/KCCbuL/wA5ykv2MB4zvBzoXADUPj5BgZIsAP8AAkPG3oROpawHwwRAz3ogRQjWC6DJ91TSotY + zj2FM3knbOkIT5nON0YwpcNbYk0bGc/PnfSNS51hShvY1abONKrj2+oZ21m2ZU4speXsVwaz97CzXm44 + 8exX9oo5w8XuchU4jexMprrXC8Z1q4nR6TqL2tO0Xi6zV71gP1C71qW+trUd8IUI+PncoNjCoBVg6Haz + gMEOcEAXHE3vGFR33HX2w5wZ/AVKf0HCr651sAdOblTrW9/L9jfAHdDpXcOb4Bn+N8L73Wp9G/jfn953 + rZn9i7t23NkfN8WnFx7OSUv5FyH/H7eUr2yKkJvc2QYO5xegHe5hM/ywGL9re5UNb1kPWuEZj/jCr93v + X/T76EZPetGXjnKkLz0J6EY3Db4AgHYbOgtf6LcX6M31ETi96Upv+tGX/nWmlx3sZ0972MOudrYn/e1m + dzvS1450hidd5kYv+cy7XPaT773lXxCz20t+d5HzPe+ZRHqXuyx3mWv75HoXvNvpDvdf2H3uWae82jP/ + dbZ/AepR/3MgrG5oGaB861yndwPATvm3o5z1Ra983M/u+rijvfWdz/3t1y733sd+7C5HOeEJL/zX693l + /cb764V/+JAnvvAth/7zY298xjM/+sRX/uYnn3ncL//74A+///hLEHo/16EDpDf0FwyReq57ofKs773s + We8K6otf96+3f/55v3/X894Vdhd/4nd/KOcKyzd82cd4CBh9wRd8C3iAHld9DOh8E7iA2PeAzrd8BjiA + 3/cFP7CBvxd/GziCv7CBBViCKJiCKLiBsVB+oHAJIpB+HvYKpNB+9GYJv/ADX+AKP5CCJkiCK3iCJbiD + b2eAJDiCPWiEJ3iES9iETceEBUiEJ9iDPiiEQFiFWBiEuNZyBohrGxhORkh4rvCAY5hJJAiGJ4iGBSiG + 1/eFW7iGuKaCVQiESqiBVuiEdRiEQciESugDLigHWSCDa2AHNkhvXQCFSpiIKviDdgiFe/8IdvXnhIu4 + gkSoiHdoiXnIh5Ooh3LYhQrIeJ4Iig2ohmiIgWHYZUrIhi6XiqhYgndVhqZggiUHi3jYiE2oiHVohB/o + CjzIi764i73Ii8AojMR4AOV3A2HQYelHCzVYiHowjCX4i9JIjL5YjdZIjcEojdF4jdPIjR+4jdUIjtiY + jeRojdE4jObIjdU4jOzoi+D4gehYjsAYj9QIjNsYj+3Ii+Joj92IjehIj/o4jbs4j+uojgZ5kL7YAy6Y + jDI4AM6oB5jAjRWQSXpgCnqAkL5Yka+Ikbz4CXelBy7Akb6IAJn0CQhJkhYZiyK5kizZki75kjAZkzIp + kjZgkDWJkTf/uZDKaHVrMAkPqQPVSAXhpJGthZAUmZKucJPXeJM1mZIaGZLXuAFL6QooaZJR6Qq3MJRm + mJQ4OZO+qJQcCZYtKZW8qJRi6ZVhaZNqWY1MeZA3SZa+KJVvGZdlKZUbUJN2yYvmFnoMSXpjgHqFyIto + EAQpWZgVeZgW6QJKSZZSWZglGZeLyYtk+ZGmEJJkaQNwSZe8WJV5qZRZSZQWmZmucJeSqZlcKZqkWZqj + +ZWqWZp4OZdcuZrBoJqYOZpziZdXSZtw+ZrVKJeriZvViAZ1aZutKZmRaZqruZpwiZqnyZqYaQOziZfC + WZPBUJO8+ZxlyYs0UH6ssJPtJgqNVoia/3CXHnmUWxhOVOAK05malBmL0Tma0UmaNiCUjqmYp2mdd+mb + wokAFfkJ1mmbd6mR/kmcz5ma8pma15mfpxmfbbkBDPqeqTmd9zmh10mgBKqg1MmV78mbrjCbEIqfXJmh + SembCYqd8Dmi2ImZDBqiBwqdFHqXwjmbcpmaHeqLwokGvKmgs4kG5XcJSpB+QOCMXqCeHkmUCHCXBWoD + RZpJt1CTMdqhjmmR6/mf+YmZ5lmRIfmkmHmjKNqhVZmkSbmk2OmhxFmdNfqkaBCfZ9qlTnqm71mjMwqm + O1qlUjmb6lmjtWmnMSqdeEqaT5qfDIqhpCmjeVqlarqjdyqcg0qlY//Koq/poGsql2S6AYpanTAaDDiK + qZiapmiQptBJqdDJqaGKo3sQem2AfqQnCs2YeqTQqVkZThxQnVuKo5mKBkfZqdXZqTbQnp/gqZ2Kqzag + qxT5CU/pq7panZsaqjbAmbS6qeFkrLQaqpZ6rMFqpsBaq9jqq9a6qbWaq8GqrLIarbmKqcHqqbnqqZSa + qeV6rpZarTZQruqarMnqq+9Kqx0qqriqrqJKqZoqrfC6qeQKnd+KrGmqntSqqb/KqQkLsAn7qwzLqcHA + BaF3Bd7pYU+QAu3nBb9amBWgsPkaDAgbTr36sYeJBEigkQ6br5waAuHkAhTpAhCrsAjLrRNpCv7/ibBo + 4LIVmbIPy60M+7AxC7IfK7NDO7Q9W7Qq67PKGrNMi7NEK7ROG7VIO7NDK7Aea7RJ67HcyrML26m4QLRC + wLBCwKlhm7Jju6m4sJfn1giB2G4yAAtoEJ6O1gWYKgRpAKu/+rVl27BosKRUe1coaQpUiwZjm6YUiQQu + UKwqS7QKy5+mgAQPq5EIMLiYiguburdb+7WVy7dM67WLq7kpC7GDS7g/26mFa7rcerpXiwZf27kJW7ap + O7qnC7Svm7pay7hFa7mk67G6Gwxny7oxO7agO7zB0LqcCrqbgG4+cAF/cHUEkKZzAAeWoANlULjBcKu+ + +7Gau722mkmEC7y4/3BXQpCSnzC8aVq4KekCLpuYwJumrfu+eVuV7RsMdyulwLu5xnu268uk2TuzZxu+ + 3vu9p/u1KUm2GnnA5nlXHdu/3+u4FZkG5+u+EVy85xsMS0oF/Qu6rYXAWqkHCFC4vSsEJHmYEJzBEWyr + FXm24xtOv8u6dYur8Pu1liu84Ou5NNy6wkvB8DsBj1ACPWACfSAEkAAAhXAEwssAleC53xtOaSDD2SvD + wDvA7au3wUCUwYAEBUzDNEyfpoALHJC+Y0vDUWy6wOu4nwDCKFyZYVzDqBu+iImYggvFUJzG8Pu9rMvC + wGuYV+qUpoAAY4wLWAyaFDnHhOy4HRzH3+vGev+sleHkx+0rBIG8wV08xaQbTsV7yGocw4+sxayrtzIs + BGGst6wLyqMMvkKAC8J7yqxrAhQAyhTAALjwtU4wCLE8yrhAmCksyqqcyoSLyqhMuLt8xxaJBCIcTr5c + wwCsB8S8vxwgw5/syaqMylXpy0JQnqZQw2F8yqd8t4J8lHpwC6HcyyvcxdF8yr+ckr88zpIsWxUgvKgM + mnCcSU1MytqMC/UbpcZcvGO7hXCske0MyqjsmIKsB/PszuNbkYosyWdMynqrzZ0cy7FszhA90RMt0RR9 + 0RQtBE5AArHcAhYQy2KA0SybSRgd0Rld0rFMlCmdSUhg0ib9lLigs5UJ0fX/XNJCUAH9CdFcjNIQ/aok + TdF3VdKHydPGbNM128VEXdQTPdLfjNHh1NITnZJQjdE3rdRCbdWxPNKmcAs0HcuMTNFLGgI8PdZkXdYX + zQCwjAshjQt1gNGRbNZjrQhBjQtLOtGKEMv0qQex/MWZ1MxwHbh8rNe4cNeD7dQ5jdHW7NQ/XdLojNIT + idAUTdiAnElUgNIaedHkq9hIXdKPvdlunUlizdiQHdUaOdUTvdNxHcsJEMuSLdmFjQurDdGE7dqyzdoQ + zQaIgAuzQAKKAAq2zdpPDdGxTdixrdpjXZiFfdmYXZFQnbiJ+dq0/dqD3dmgGd2/jQtaXdKrnZJpUNwr + /+3Zri3Xiw3bv33U0g3Uj0vRxZ0A9dvExa3Urk2fUD3bEG3e1g3Apk3ehN3e5O3V8E3RJ2sKoW3dw23c + /a3fv73aBf7aCp7gsE0GJjAIJmABa/3b5LvaxP3bdx3bGG7chD3XyYwEDQ7bsDrY+5sGGU7eI07YR53A + CHDXG97f2w3ZHQ7jsVyzgt3hFJni743QHc7gOE7fKo7FXRzjte3Vo60IRN7d/U3cxrzgqx3kDp4ARF7Y + 3t3fQ23c6cvgDG7MPC7jKt7kDT7mXN7gNk7mhW0BdUACdSAGZEACEAABZDDYwV3gHV7jYK7icq2RGE7k + Rc7aWo3hX4ylYY7nZl6zn/9w15+ZSRWQ5xgeTopA5mZ+2TGuCJRe2JUO6WCO4ThN0mae3BZp5gkQ6Rie + AJo+40id4Z8e44d+2auOC3yu36OeAKV+6iSeSZKu34dJ5jCuCL7+68D+64Md7L8+675u7MYO7MiuCC9w + bi2QCZGeC5Hu58G+7NYe6di+4XeF7aZekdyu5MOM7c5tCihO7N9+7Irw2J8w6pF+lOxO7N1uCu9u7qYe + 6tke77Se79yO7+eO7Tie7NzenoHNx8YO6d8+7wf/7Z2d7ehe70QZz3ws78KekuZe7I0M76Se7xq/8Rzf + 8bS+7xmv7x8/6k5QB6AQCbM+CxaQACxbkR7v8Qev8YX/Oev1/rg0n5IhMOv3zAEvH/KjjugaD9ge3+nr + /vK0Hk4VEPKUCc9D2fMLT/MyH8/dfFdRL+9GD/M/H05Qr/EPL8nwvPEUefVFWgEvzwQeb/YJgPZnf/Ua + r/a0rgERIAk3wAhOAAIJQAa6kPZan/ZsT+tu7/c1b/W07ud+zwt7T+uDbgo83/e0TvTDoPHlqQef8Pgb + D/RXf5hkz/X43M+4nu9/f9Qvz/R7PPNor/V/z/gJ0Nkvn8AcnMBtn5KA3/HlmflXT/mnb/uev/Fqj/a4 + r/E4EAoCIAAfYAWHEAoQEAVOgANH/8D53vt8nwCUnwAa6fak7/f+PPh7b/b3nAbO/8/7sQ/0Zo/2RJn7 + jW+RRf/83l/zFbD7sjX1nX/6TKD6aM/+mTT/uk/++Q77+G//6O/5hInrAMEkwUCBCYbpMWVqWIKCDAkO + dBgxQUJTDR8S/GRKTwWJBQV+dChw4cKCJEMaHMjH4ciHIg3O0iVowYIPahKUioIDJRKKLk+CFMiHpykk + KydSRLmQIhKBGk2FcJnGaZqBJl1eTVAB4SeIIJ0yRfmx58mWExEmHei0LMuEesIazYpQIcqTak+axLsS + KUiTCVRidVnBad6CbbvSdUnYrCmjQI8y5huRCUuVwwizxMxwJEnOfg0CVTGzxgqWIrUmDEGyMsrVTBDI + rVDaaf/FsBkRMjk9d6TUhByYTDaYGfgw3Ak/TR7OZKip2J8Nqm3NBzgTPnKvMqFIfORV65hJFk8YFrjK + nps1hyXslHrYysoTukjKOQhSy43LT+6smGT2j8LVt0dPOuSI+20Y6bT7bUDkFiyQQAUNHHCmmaxIsMDf + KNqowQERHAbDAwukSKEKO0yoguWoS1AqhNJAMUEHGRxmPj0++RBBp/RwUTqKENhwQD4E0+jDydQjTkAC + D9LIxRGZuEO9Amsc6pMXF9SOjyPdM4WKHrVzUsDJpGvFyS8X5GlGL8es0schEUIgzTQpqtFIK6380kA7 + 6bxzzjsts4zOOfHkI1AD+cBAQk7/+EBB0EB/lCtLy7Yc0qnYFO1QLj2tXIqiEBC1kzdTOOjzThT2FFSw + Ge2kzs4QNKV01SCLPNDKSp/qc044SRU0u0sHHQZIPXgFdD6NcOXVqUQNzA1W5KyUy8BRKRVWjz+BFVah + aZcl0RRBIyUq1QeHogLPOv88ltxAE51zVHTL/a0AXidD17JnLTvDUPzsPNY2ilwYRl15lzPlk2PLDdFZ + QVdFKGFS00g4DUp3RXTOJgMu12AkEeLzXKek5PPRYTJKaF07Fd712GbP1TPRaue1cl25fu24X8uipLSt + EEaNmaJwSVVZ13kJbrZjWVFAYqtBE70xNXwtQ1hbZ49O10Bb//iY+tlnbZE6akRtYUIFRxZQ4epAq140 + URQkXICTYaaO2ODlEg6xra8s5nQ2q6WOG4l+qUbU0zT2TnRqrNvmVEYp+WYZSKLMNtAFu2VGIUynXOC0 + bYqsJhyFtmSOeN7Tfu18bAMRwNAFf4ch3SmqDU59Rn9ReDnwzu38nHOxUWjdFNMhTz3kyrM17vXlBkeX + +L2xlnltyOW1zBackW8C7QUSQVR2s0OXQkINOMV61O4/bvTG2Yz73l9bCn7eMrn1SA3nUVU0JY3Xmfce + ciAFLh/y5dqU2RZP4cZQ/PiENQIOxn3KG1V2vlc+xSmvecwbxsTiBkCF9E9mVAgRBSuIM/8E9quB80te + teD2soQwr4AIaRoAEUKF5HWvcyhAgfNgKEPn2aKGM+zXDGEoha9JSApDqFoQYxjDfqGNEzLU4RCHKLe4 + OaUV/arhDTV3OSTC0FUJqaLz/EbEIdqwi0q8xVa4GMUhwi2JMAwfAJNYxbbE8IY3lAsMx+jGWxhLiUik + YQAb5TopKvE140sIEqRIwxnWESF3RGQMwxe3TwwShpfrHRMT+cYu2tCLg8RkFIdQAOktQIeUdB4dpGdJ + S1bSjTH8xAgRUEpMKtJYpKyhGVmJAgyu8JJ3BKWwGknJU4IsS25kJQb39cUoWpIiNKRkW0j5RRSs7I3L + vKEITTFDMiL/s4ap1MjNrPnMZl4OmMCkZBBGSE1wxtApXszNLstZTVi20522eMM7eyghFZyBlTZMRPak + V4R39tOf/wRoQAU6UIIW1KAHFWg84YlQhjJUocbEYkNtGM+HVtSSD50oRW0hi9CgzREooCgKYNBJCTVh + oRO9KDw1elKULtSiJ9WoRV+q0JimdKYoXalLUwpTneJ0pzTtaVCBqlOZ/tSnRW0pRlu6U6EyFalOZelN + l7pTpyj1qTcFqkaxYIutKrSr7sRDJ+HpNZKOcqU5TelXa6rTrS60rW09q1tR+lafsnWuNoQrT+OZV7r2 + VKt35Wpd/yrXwPqVsHvFq2ADC1S12jWu/39tLGIdq1e58vWoCz3mZLN62DdsFQt7pWhNP6vSN3S2tJ99 + wxBGKqF5dpIT+lwALbja1a6W9rSIDe1idTva0ea2s3IFLVdjStGvFje4vi2uW4+rUngmN7i9Ze5vcStc + 6iIXuNSFbmmbe13t8ja3tI0udn3L3e1Kl7neDS9uuwveN1SVvec9LnFJa1osfNa+na0vfU2r38/WoqNl + bQItUvEG2DrCtvfVL33va9/8Ivi2DVbwgm2rYP5CGLUPlnB9JXxg/FZ4wxj2cIJBvGALT5jBCUZwhimc + YRWzWMX83W+LO/zhBVOExCiecYw1nOITjxjCM46e9ByhglPsF22J0P9whPHL4w5jeMc6bnKEk4zaBl+Y + wU+mco+l/OMqc3jHXNbylad82jAvecwztnCXc5xjJqM5yic+c5XhXGYxxzhhYF4ylKf8ZT7XFxh9BnR9 + aSHkPq92AbIIdKD/vONFY6HRfH60ozUcaUZ/udGUnrSlMw3oSF9a0Zr286crHWpOg1rSXzZzqBUc6VQ/ + +s+L7jSfKwzrRGvYxpCu9alP/WcwYKHXi+61r4X96voG+9dYSEUqOlkASff6vwso9qmPDexoV5vUzZa2 + hoN9bV5n29q67ja1v+3pYwt73Jku97a3De5hW3vdnia2rt+NbnMbm97aLnavgy3uPnc71PqWdKz/hQ1w + gPvaxgVXN7bj7WheAzwDGn64w3cMBonbmw6Foue00UaLiA984hXHQscp7nGPd1zkBI92r00+cJSXXNgn + JznIYY7wl9dc3y2XOctjbvOQ6zzdPQfDU4gCjAqkQeWfaAUYkEBxMHyi53/Wmb7j9mtXjQILo/hERkIg + 7BAg5BZSz6a9Ve7xba+87NJueMhVznSmZ2DtbFd73Nnu9lrsExhuxwJsz0BxvLvd7SPv+835vnZft53w + cz+84eWueLwjfvGDfzwYAl94yDee8YKXfOIrj/nJO97ym6d85n2dAVOMAgxUoELQmW4KimM9AyEIwcgp + rgfJ6wEBFGc97t3+/4nUq54XSHD70pvee1O43fW3+MTfJ6/8zH8+80ynvNqbP32/U1/y1Wc+9iXfyTxk + vl4zcYT1/a598lNf++I3//TRj/3zl5/96nd/89u//uvDn/4ZOP/9yx90v7N+FFTIgE8IAb/LiN6rvhDJ + vOJzu9zTgyAIAeADg1EQPtQjvTt4QKa7hdTDuvWLvw4cPA90OzOwP78TwfI7hUHzobsDA7SRguebvxBE + vxL8QMmTQe2TQeqrwem7QezLwerbwebrwcz7QRKMQRcEwiLMPhpEwhnMADMgvQTEv+IrPr7jiVHAv+ZT + wBBIvicEAzNQwIBxQslDPvxDvaBbOvzDvxAIAv8zcD0dvD/x88Hrwz8nbMI5RMM7tMM6xEM6xMMM4AFU + kB63gy1VuEM6NMQ+5ENEzMNC7EM0PMQ9bMQ8TMRFVEQ9ZMRIfMRLbMRMdMRI1MNJtMRKBMUsBMAMGIUZ + QUMksEI96EQvTEPgIz00ZEXSK0UqGAUJxD9Y1INatEIFdIHkA0VQ7ERMFEVJrEMnREZjTMZlPMYM4AS0 + KQIzqLuZUIFktMRDZMZsVMZm1MZP5MZvfERt7EZsBMdm9EZxNEdyRMdwLEdmPMcm3JhjVEAzUMU61IND + pIhRQMbic0Lg68feMEWdocOh4AUvjBtesMN1bMdybEJkdMh2dMJd4MZ1nAL/tAkwtFlGh4zIiYTIDJDI + jOzIjzzGddxIkBTHkhzJkOTIk/TIlQRHlHxIlhTJfTSDZZTAXajJljTJl9TJlDQDx9lJJ+THJqSCNMhG + llRIiWxIM8BJnGTKp2zKmoRKqXzKqYzKmmxKQiirBYgDrJTKq/RKq6zKqfxKr4xKpyTLsDzLsQTLqlxL + tGxLp3zLskRLtxRLs6RKubzLtLTLtcTLsGRKU8BLJGgFwOzLtARLuHzKU8zLsTzMxHRMvYTMuuRLv8RL + v7TMu4wD2EIbT5DMu8zMufzMuhTNy2zMudxLsbzK0FRN06RL0KzM1kxN2YxKPaBM24TNtqRNsrwDJGjN + /9E8zdxkS7Vky10wzqZETuM8AeRkyqZczuZsTuVkTuU0A5I6TuOETuzchefUzuPkzun8zujczul0TvKU + zuwsT/Q8z+5kyvC8TvdMz+5cT/A0z/FEz/asT/jET/W0T/bsz+T8z+yEz/kU0Pwkz/3szuX0zuM0AwVd + zgddUAgdz/GUUAelUOm8UONsrZlQBQu9UA+FUBDNUAutUOks0Q/F0BBN0RE10QklURdtURE9URWF0Rll + URStURjF0ReVUR2lUR5dURsVUh+d0CBdUQpV0BFN0gpdUhd9US2oyJlYhTxg0ghVziZ1UCy9UivdTi3t + Ui49AS8NUzAV0zIl0zNt0f8vTdMxXVMzbVM0VVI4rdI3pdM4pVMVfVEnDdMHFYYxPYE+5dMxdYM93U5A + LVQ/7dNdGNQTeABPMIIHMNQ/RVRBJVRJDdRLVdRKjdRNpdRJxVRLzVRPPVRMXdRP5dTlLNVRVVVQTVVQ + dVVDbdVTVdVYFVVW1dRahdVbNdVO3VVSvdUuFYYuJdRSXVRABVRJPdZkDVNALdU+VdZlhdYTaFZLpVZj + DdNpfVZLZdY9dVZu9VZLxdZv1dZr9dZstVZpLVdxPddwjdZxRVdoNddoZddqldd0bdd1tVd6Bdd8fdZt + hVd1rdd//dZzldRFHdRjfdduLVaBJVdkTViGfdg+XVj/h93ThZXYaO3Wiv3Xic3YhlVYjKXWiH1YivXY + ggVZhLXYke1YkeXYkE3ZlkXZjT3ZPWXZmdVYh4VZmn1Zm0XXc71YN+gFaRUGInCDPu0FNwDaolXaEzha + pkXapT3aoVVaYRjUpj1apKVap5Vaqs1aq33ari1aouXaqiVbrCXbrYXask1btAVbpzVbrRXbtHXbtY3b + tr1aup1asp1bsGVbvb1bvq1bv/3asw1cp91bws1bw/1bxB1bxR1cuE1cr33bqI1bpP1TNyCCPyUCrt3c + sJXWzj3azc3coaXaozXdzy1dzB1azU3d01XdpBVd1k1a1wVd1R3d2qXd1I1d0p1d/6BFXdhdXd41Xd99 + 3dANXtwl3trdXeQN2uK1Xdkd3uZV3uNt3eTVXertXem93tutXu0FXu7N3t81XvCNXvF9XuGdXfM93drF + 3F4gAveF3xx43/mFXyKQ3/qt3/ul3/nVX/y13/3NXwDmXwF23/7dXwMOYP8tYAL+XwVuYAFG4AF24Ahe + 4AlmYAp+YP/F4A2+4A624A+GYA8OYRDWYCKg316oYBNGYQZOYBV24BJ23/d94QOeXxlmYQl24RtOYRue + 4R1e4R5+YB6+Yf0V4hkm4h8e4hpGYiNWYiD2YScO4iUW4SKeYikG4AW23xXOgV6Q3xzw4izuYi7O4gIW + Yy8O48wzHmMwtt8v3mI03mIy7mI2LuM5huM1dmM6VmMzzmM8bmM73uMwrmM97uNB1uIyluM7DuRD3uNE + vmNAzmNFJmRG/uM0HmRI5mNDbmRKxuRJfuMy/l8O7uJPzmAaDuVS7mBTDmULRuVRDuBVBmVRTuUQduVT + hmVWHuBZVuVafuVVzmVelmVdpmVfLmFcvmJgNuNjRmZk5uJkZmZlbuZn9uJlhmZmluZpdmZrTuZqxuZo + 3uZr7mZu/mZwDmdt3mZyxmZztmZ0nmZ1hmZ0DggAOw== +</value> + </data> </root> \ No newline at end of file Modified: ACMServer/trunk/ACMServer/Mediator/Mediator.csproj =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Mediator.csproj 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Mediator.csproj 2009-02-04 16:57:31 UTC (rev 488) @@ -99,4 +99,4 @@ <Target Name="AfterBuild"> </Target> --> -</Project> +</Project> \ No newline at end of file Modified: ACMServer/trunk/ACMServer/Mediator/Properties/Resources.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Properties/Resources.Designer.cs 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Properties/Resources.Designer.cs 2009-02-04 16:57:31 UTC (rev 488) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.42 +// Runtime Version:2.0.50727.3053 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -59,5 +59,12 @@ resourceCulture = value; } } + + internal static System.Drawing.Bitmap ACMLogo { + get { + object obj = ResourceManager.GetObject("ACMLogo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } Modified: ACMServer/trunk/ACMServer/Mediator/Properties/Resources.resx =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Properties/Resources.resx 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Properties/Resources.resx 2009-02-04 16:57:31 UTC (rev 488) @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : 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"> @@ -68,9 +69,10 @@ <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" /> + <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"> @@ -85,9 +87,10 @@ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="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"> @@ -114,4 +117,8 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="ACMLogo" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\..\Resource\ACMLogo.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root> \ No newline at end of file Added: ACMServer/trunk/ACMServer/Resource/ACMLogo.gif =================================================================== (Binary files differ) Property changes on: ACMServer/trunk/ACMServer/Resource/ACMLogo.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Or...@us...> - 2009-02-04 18:49:23
|
Revision: 490 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=490&view=rev Author: Oracle_ Date: 2009-02-04 18:49:19 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Fixed bug with HTML results. Fixed bug with ResultIoi. Fixed bug with CE result. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs ACMServer/trunk/ACMServer/Runner/Class1.cs Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs 2009-02-04 17:28:44 UTC (rev 489) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs 2009-02-04 18:49:19 UTC (rev 490) @@ -8,7 +8,8 @@ { private string title; private string body; - private string bgcolor; + private string bgcolor="White"; + private string meta; public string Title { @@ -22,6 +23,18 @@ } } + public string Meta + { + get + { + return meta; + } + set + { + meta = value; + } + } + public string BackgroundColor { get @@ -38,15 +51,16 @@ { get { - string res = "<html>\n<head>\n\t<title>" + title + "</title>\n</head>"; - res = res + "<body bgcolor=\"" + bgcolor + ">\n" + body + "</body>\n</html>"; + string res = "<html>\n<head>\n\t<meta " + meta + "/>\n\t"; + res+="<title>" + title + "</title>\n</head>"; + res = res + "<body bgcolor=\"" + bgcolor + "\">\n" + body + "</body>\n</html>"; return res; } } - public void AddTable(string[,] data,string[] header,string caption) + public void AddTable(string[,] data,string[] header,string caption,int borderwidth,int cellspacing,int cellpadding) { - body += "<table>\n"; + body += "<table border=\""+borderwidth.ToString()+"\" cellspacing=\""+cellspacing.ToString()+"\" cellpadding=\""+cellpadding.ToString()+"\">\n"; if (caption!="") body+="<caption>" + caption + "</caption>\n"; if (header.Length>0) @@ -71,9 +85,9 @@ body += "<a href=\"" + URL + "\">" + text + "</a> "; } - public void AddReference(string URL, string text, string align) + public void AddPre(string data) { - body += "<a align=\""+align+"\" href=\"" + URL + "\">" + text + "</a> "; + body += "<pre>" + data + "</pre>"; } public void AddParagraph(string data, string align, string color) Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-04 17:28:44 UTC (rev 489) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-04 18:49:19 UTC (rev 490) @@ -13,6 +13,19 @@ base.Control = new IoiInformerControl(); } + public string GetLanguage(int id) + { + StreamReader r = File.OpenText("Comps.txt"); + while (!r.EndOfStream) + { + string[] s = r.ReadLine().Split(' '); + if (s[0] == id.ToString()) + return s[1]; + } + r.Close(); + return id.ToString(); + } + public override void Send(SystemMessage message) { if (message.IsType("TestingResultIoi") == true) @@ -21,53 +34,76 @@ ((IoiInformerControl)base.Control).UpCount(); HtmlBuilder h=new HtmlBuilder(); - h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF"; + string[,] subdata=new string[5,2]; + + h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + h.Meta="HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\""; h.AddHeader("\xC4\xE0\xED\xB3 \xEF\xF0\xEE \xF1\xE0\xE1\xEC\xB3\xF2:", 4, "left"); - h.AddText("\xD3\xF7\xE0\xF1\xED\xE8\xEA: " + result.Submit.name + "<br>"); - h.AddText("\xCA\xEB\xE0\xF1: " + result.Submit.form + "<br>"); - h.AddText("\xC7\xE0\xE4\xE0\xF7\xE0: " + result.Submit.submit.pbolemID + "<br>"); - h.AddText("\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF: " + result.Submit.submit.language + "<br>"); - h.AddText("\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3: " + result.Submit.submit.id + "<br>"); + subdata[0,0]="\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; + subdata[0,1]=result.Submit.name; + subdata[1,0]="\xCA\xEB\xE0\xF1:"; + subdata[1,1]=result.Submit.form.ToString(); + subdata[2,0]="\xC7\xE0\xE4\xE0\xF7\xE0:"; + subdata[2,1]=result.Submit.submit.pbolemID.ToString(); + subdata[3,0]="\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + subdata[3,1]=GetLanguage(result.Submit.submit.language); + subdata[4,0]="\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + subdata[4,1]=result.Submit.submit.id.ToString(); + h.AddTable(subdata, new string[0], "", 2, 0, 5); + h.AddHorizLine(); h.AddHeader("\xC2\xE8\xF5\xB3\xE4\xED\xE8\xE9 \xEA\xEE\xE4",4,"center"); - h.AddCode(result.Submit.submit.sourceCode); + h.AddPre(result.Submit.submit.sourceCode); h.AddHorizLine(); h.AddHeader("\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xE2\xE8\xEA\xEE\xED\xE0\xED\xED\xFF", 4, "center"); - string[,] data=new string[result.testResults.Length+1,8]; - string[] header = new string[8]; - header[0] = "\xB9"; - header[1] = "\xE2\xF5\xB3\xE4"; - header[2] = "\xEA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xF0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; - header[3] = "\xF0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; - header[4] = "\xE2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xF7\xE0\xF1"; - header[5] = "\xE2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xEF\xE0\xEC\'\xFF\xF2\xFC"; - header[6] = "\xE2\xE5\xF0\xE4\xE8\xEA\xF2 \xF1\xF3\xE4\xE4\xB3"; - header[7] = "\xEA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; - int n = result.testResults.Length; - int sumPoints = 0; - for (int i = 0; i < n; i++) + if (result.testResults != null) { - data[i,0] = result.testResults[i].id.ToString(); - data[i,1] = result.testResults[i].input; - data[i,2] = result.testResults[i].output; - data[i,3] = result.testResults[i].contestantOutput; - data[i,4] = result.testResults[i].usedTime.ToString(); - data[i,5] = result.testResults[i].usedMemory.ToString(); - data[i,6] = result.testResults[i].res; - data[i,7] = result.testResults[i].points.ToString(); - sumPoints += result.testResults[i].points; + string[,] data = new string[result.testResults.Length + 1, 8]; + string[] header = new string[8]; + header[0] = "\xB9"; + header[1] = "\xC2\xF5\xB3\xE4"; + header[2] = "\xCA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; + header[3] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xD3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; + header[4] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xD7\xE0\xF1"; + header[5] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xCF\xE0\xEC\'\xFF\xF2\xFC"; + header[6] = "\xC2\xE5\xF0\xE4\xE8\xEA\xF2 \xD1\xF3\xE4\xE4\xB3"; + header[7] = "\xCA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; + int n = result.testResults.Length; + int allPoints = 0, myPoints = 0; + for (int i = 0; i < n; i++) + { + data[i, 0] = result.testResults[i].id.ToString(); + data[i, 1] = "<pre>"+result.testResults[i].input+"</pre>"; + data[i, 2] = "<pre>"+result.testResults[i].output+"</pre>"; + data[i, 3] = "<pre>"+result.testResults[i].contestantOutput+"</pre>"; + data[i, 4] = result.testResults[i].usedTime.ToString(); + data[i, 5] = result.testResults[i].usedMemory.ToString(); + data[i, 6] = result.testResults[i].res; + int curpoints = (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; + data[i, 7] = curpoints.ToString() + "/" + result.testResults[i].points.ToString(); + myPoints += curpoints; + allPoints += result.testResults[i].points; + } + data[n, 0] = "<b>\xD1\xF3\xEC\xE0\xF0\xED\xB3</b>"; + data[n, 4] = "<b>" + result.usedMemory.ToString() + "</b>"; + data[n, 5] = "<b>" + result.usedTime.ToString() + "</b>"; + data[n, 6] = "<b>" + result.res + "</b>"; + data[n, 7] = "<b>" + myPoints.ToString() + "/" + allPoints.ToString() + "</b>"; + h.AddTable(data, header, "", 2, 0, 5); + h.Title += myPoints.ToString() + "/" + allPoints.ToString(); } - data[n,0] = "\xD1\xF3\xEC\xE0\xF0\xED\xB3"; - data[n,4] = result.usedTime.ToString(); - data[n,5] = result.usedMemory.ToString(); - data[n,6] = result.res; - data[n,7] = sumPoints.ToString(); - h.AddTable(data, header, ""); + else + { + h.Title += "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"; + h.AddParagraph("\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"); + } + h.AddHorizLine(); + h.AddReference("http://acm.lviv.ua","<small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small>"); - h.AddReference("http://acm.lviv.ua","<small><small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small></small>","right"); - - StreamWriter w = File.CreateText(result.Submit.submit.id.ToString() + ".html"); + string dir = "IoiResults\\" + result.Submit.form.ToString() + " form\\" + result.Submit.name; + Directory.CreateDirectory(dir); + StreamWriter w = File.CreateText(dir+"\\"+result.Submit.submit.pbolemID.ToString() + ".html"); w.Write(h.Result); w.Close(); Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-04 17:28:44 UTC (rev 489) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-04 18:49:19 UTC (rev 490) @@ -211,12 +211,14 @@ int usedTime = -1; int usedMemory = -1; result.testResults = new TestResIoi[test.run.results.Length]; + result.res = TestResult.Accepted.ToString(); for (int i = 0; i < test.run.results.Length; i++) { result.testResults[i] = new TestResIoi(); - usedTime = Math.Max(usedTime, test.run.results[i].UsedTime); - usedMemory = Math.Max(usedMemory, test.run.results[i].UsedMemory); + usedTime = Math.Max(usedTime, test.run.results[i].UsedTime); + usedMemory = Math.Max(usedMemory, test.run.results[i].UsedMemory); + if (test.run.results[i].res != TestResult.Accepted) result.res = test.run.results[i].res.ToString(); result.testResults[i].input = test.run.test.tests[i].input; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Or...@us...> - 2009-02-05 20:21:04
|
Revision: 491 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=491&view=rev Author: Oracle_ Date: 2009-02-05 20:20:58 +0000 (Thu, 05 Feb 2009) Log Message: ----------- Change HTML result and update Informer show plugin. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs 2009-02-04 18:49:19 UTC (rev 490) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs 2009-02-05 20:20:58 UTC (rev 491) @@ -9,7 +9,7 @@ private string title; private string body; private string bgcolor="White"; - private string meta; + private string head; public string Title { @@ -23,15 +23,15 @@ } } - public string Meta + public string Head { get { - return meta; + return head; } set { - meta = value; + head = value; } } @@ -51,14 +51,15 @@ { get { - string res = "<html>\n<head>\n\t<meta " + meta + "/>\n\t"; - res+="<title>" + title + "</title>\n</head>"; - res = res + "<body bgcolor=\"" + bgcolor + "\">\n" + body + "</body>\n</html>"; + string res = "<html>\n<head>\n\t"; + res += "<title>" + title + "</title>\n"; + res += head + "</head>"; + res += "<body bgcolor=\"" + bgcolor + "\">\n" + body + "</body>\n</html>"; return res; } } - public void AddTable(string[,] data,string[] header,string caption,int borderwidth,int cellspacing,int cellpadding) + public void AddTable(string[,] data,string[] header,string caption,int borderwidth,int cellspacing,int cellpadding,string cellvalign) { body += "<table border=\""+borderwidth.ToString()+"\" cellspacing=\""+cellspacing.ToString()+"\" cellpadding=\""+cellpadding.ToString()+"\">\n"; if (caption!="") @@ -72,7 +73,7 @@ } for (int i=0;i<data.GetLength(0);i++) { - body += "<tr>"; + body += "<tr valign=\""+cellvalign+"\">"; for (int j = 0; j < data.GetLength(1); j++) body += "<td>" + data[i,j] + "</td>"; body += "</tr>\n"; Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-04 18:49:19 UTC (rev 490) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-05 20:20:58 UTC (rev 491) @@ -29,7 +29,22 @@ private void InitializeComponent() { this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.fileNeed = new System.Windows.Forms.CheckBox(); + this.button1 = new System.Windows.Forms.Button(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.resGrid = new System.Windows.Forms.DataGridView(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.submitGrid = new System.Windows.Forms.DataGridView(); + this.source = new System.Windows.Forms.RichTextBox(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).BeginInit(); this.SuspendLayout(); // // numericUpDown1 @@ -39,20 +54,132 @@ this.numericUpDown1.Size = new System.Drawing.Size(120, 20); this.numericUpDown1.TabIndex = 0; // + // fileNeed + // + this.fileNeed.AutoSize = true; + this.fileNeed.Checked = true; + this.fileNeed.CheckState = System.Windows.Forms.CheckState.Checked; + this.fileNeed.Location = new System.Drawing.Point(129, 6); + this.fileNeed.Name = "fileNeed"; + this.fileNeed.Size = new System.Drawing.Size(86, 17); + this.fileNeed.TabIndex = 5; + this.fileNeed.Text = "Save To File"; + this.fileNeed.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(221, 3); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(103, 20); + this.button1.TabIndex = 6; + this.button1.Text = "Show Html"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.splitContainer1.Location = new System.Drawing.Point(0, 29); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); + this.splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.No; + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.resGrid); + this.splitContainer1.Panel2.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.splitContainer1.Size = new System.Drawing.Size(396, 354); + this.splitContainer1.SplitterDistance = 177; + this.splitContainer1.TabIndex = 7; + // + // resGrid + // + this.resGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.resGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.resGrid.Location = new System.Drawing.Point(0, 0); + this.resGrid.Name = "resGrid"; + this.resGrid.RowHeadersVisible = false; + this.resGrid.Size = new System.Drawing.Size(396, 173); + this.resGrid.TabIndex = 5; + this.resGrid.SizeChanged += new System.EventHandler(this.resGrid_SizeChanged); + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.submitGrid); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.source); + this.splitContainer2.Size = new System.Drawing.Size(396, 177); + this.splitContainer2.SplitterDistance = 132; + this.splitContainer2.TabIndex = 0; + // + // submitGrid + // + this.submitGrid.BackgroundColor = System.Drawing.SystemColors.Window; + this.submitGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.submitGrid.ColumnHeadersVisible = false; + this.submitGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.submitGrid.Location = new System.Drawing.Point(0, 0); + this.submitGrid.Name = "submitGrid"; + this.submitGrid.RowHeadersVisible = false; + this.submitGrid.Size = new System.Drawing.Size(132, 177); + this.submitGrid.TabIndex = 2; + this.submitGrid.SizeChanged += new System.EventHandler(this.submitGrid_SizeChanged); + // + // source + // + this.source.Dock = System.Windows.Forms.DockStyle.Fill; + this.source.Location = new System.Drawing.Point(0, 0); + this.source.Name = "source"; + this.source.Size = new System.Drawing.Size(260, 177); + this.source.TabIndex = 3; + this.source.Text = ""; + // // IoiInformerControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.button1); + this.Controls.Add(this.fileNeed); this.Controls.Add(this.numericUpDown1); this.Name = "IoiInformerControl"; this.Size = new System.Drawing.Size(396, 383); + this.SizeChanged += new System.EventHandler(this.IoiInformerControl_SizeChanged); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).EndInit(); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.CheckBox fileNeed; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.DataGridView submitGrid; + private System.Windows.Forms.RichTextBox source; + private System.Windows.Forms.DataGridView resGrid; } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-04 18:49:19 UTC (rev 490) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-05 20:20:58 UTC (rev 491) @@ -5,14 +5,33 @@ using System.Data; using System.Text; using System.Windows.Forms; +using System.IO; +using System.Diagnostics; +using AcmContester.Library.LibraryExtention.Data; namespace AcmContester.Plugins.IoiPlugins.IoiInformerPlugin { public partial class IoiInformerControl : UserControl { + private string FileName; + + private string GetLanguage(int id) + { + StreamReader r = File.OpenText("Comps.txt"); + while (!r.EndOfStream) + { + string[] s = r.ReadLine().Split(' '); + if (s[0] == id.ToString()) + return s[1]; + } + r.Close(); + return id.ToString(); + } + public IoiInformerControl() { InitializeComponent(); + IoiInformerControl_SizeChanged(null, new EventArgs()); } delegate void UpCountCallback(); @@ -29,9 +48,116 @@ } } - public void LoadURL(Uri URL) + private void IoiInformerControl_SizeChanged(object sender, EventArgs e) { - //browser.Url = URL; + splitContainer1.Height = ClientRectangle.Height - (numericUpDown1.Top + numericUpDown1.Height + 1); } + + public bool NeedToFile() + { + return fileNeed.Checked; + } + + delegate void LoadMessageCallback(ResultIoi message); + + public void LoadMessage(ResultIoi message) + { + if (this.InvokeRequired) + { + LoadMessageCallback d = new LoadMessageCallback(LoadMessage); + + this.Invoke(d, new object[] { message } ); + } + else + { + FileName = "IoiResults\\" + message.Submit.form.ToString() + " form\\" + message.Submit.name + "\\" + message.Submit.submit.pbolemID.ToString() + ".html"; + source.Text = message.Submit.submit.sourceCode; + submitGrid.ColumnCount = 2; + submitGrid.RowCount = 6; + + submitGrid[0, 0].Value = "\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; + submitGrid[1, 0].Value = message.Submit.name; + submitGrid[0, 1].Value = "\xCA\xEB\xE0\xF1:"; + submitGrid[1, 1].Value = message.Submit.form.ToString(); + submitGrid[0, 2].Value = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + submitGrid[1, 2].Value = message.Submit.submit.pbolemID.ToString(); + submitGrid[0, 3].Value = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + submitGrid[1, 3].Value = GetLanguage(message.Submit.submit.language); + submitGrid[0, 4].Value = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + submitGrid[1, 4].Value = message.Submit.submit.id.ToString(); + submitGrid[0, 5].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + int allPoints = 0, myPoints = 0; + if (message.testResults != null) + { + for (int i = 0; i < message.testResults.Length; i++) + { + allPoints += message.testResults[i].points; + myPoints += (message.testResults[i].res == "Accepted") ? message.testResults[i].points : 0; + } + submitGrid[1, 5].Value = myPoints.ToString() + "/" + allPoints.ToString(); + + resGrid.ColumnCount = 8; + resGrid.RowCount = message.testResults.Length + 2; + resGrid[0, 0].Value = "\xB9"; + resGrid[1, 0].Value = "\xC2\xF5\xB3\xE4"; + resGrid[2, 0].Value = "\xCA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; + resGrid[3, 0].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xD3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; + resGrid[4, 0].Value = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xD7\xE0\xF1"; + resGrid[5, 0].Value = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xCF\xE0\xEC\'\xFF\xF2\xFC"; + resGrid[6, 0].Value = "\xC2\xE5\xF0\xE4\xE8\xEA\xF2 \xD1\xF3\xE4\xE4\xB3"; + resGrid[7, 0].Value = "\xCA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; + + int n = message.testResults.Length; + for (int i = 0; i < n; i++) + { + resGrid[0, i+1].Value = i.ToString(); + resGrid[1, i+1].Value = message.testResults[i].input; + resGrid[2, i+1].Value = message.testResults[i].output; + resGrid[3, i+1].Value = message.testResults[i].contestantOutput; + resGrid[4, i+1].Value = message.testResults[i].usedTime.ToString(); + resGrid[5, i+1].Value = message.testResults[i].usedMemory.ToString(); + resGrid[6, i+1].Value = message.testResults[i].res; + resGrid[7, i+1].Value = ((message.testResults[i].res == "Accepted") ? message.testResults[i].points : 0).ToString() + "/" + message.testResults[i].points.ToString(); + } + resGrid[0, n+1].Value = "\xD1\xF3\xEC\xE0\xF0\xED\xB3"; + resGrid[4, n+1].Value = message.usedMemory.ToString(); + resGrid[5, n+1].Value = message.usedTime.ToString(); + resGrid[6, n+1].Value = message.res; + resGrid[7, n+1].Value = myPoints.ToString() + "/" + allPoints.ToString(); + } + else + { + submitGrid[1, 5].Value = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + resGrid.ColumnCount = 1; + resGrid.RowCount = 1; + resGrid[0, 0].Value = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + } + submitGrid_SizeChanged(null, new EventArgs()); + resGrid_SizeChanged(null, new EventArgs()); + } + } + + private void button1_Click(object sender, EventArgs e) + { + if (File.Exists(FileName)) + { + ProcessStartInfo s=new ProcessStartInfo(); + s.FileName = Path.GetFullPath(FileName); + Process.Start(s); + } + } + + private void submitGrid_SizeChanged(object sender, EventArgs e) + { + for (int i = 0; i < submitGrid.ColumnCount; i++) + submitGrid.Columns[i].Width = (submitGrid.Width - submitGrid.ColumnCount * 3) / submitGrid.ColumnCount; + } + + private void resGrid_SizeChanged(object sender, EventArgs e) + { + for (int i = 0; i < resGrid.ColumnCount; i++) + resGrid.Columns[i].Width = (resGrid.Width - resGrid.ColumnCount * 3) / resGrid.ColumnCount; + } + } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-04 18:49:19 UTC (rev 490) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-05 20:20:58 UTC (rev 491) @@ -13,7 +13,7 @@ base.Control = new IoiInformerControl(); } - public string GetLanguage(int id) + private string GetLanguage(int id) { StreamReader r = File.OpenText("Comps.txt"); while (!r.EndOfStream) @@ -33,80 +33,104 @@ ResultIoi result = ResultIoi.CreateFromXml(message.Message); ((IoiInformerControl)base.Control).UpCount(); - HtmlBuilder h=new HtmlBuilder(); - string[,] subdata=new string[5,2]; - - h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; - h.Meta="HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\""; - h.AddHeader("\xC4\xE0\xED\xB3 \xEF\xF0\xEE \xF1\xE0\xE1\xEC\xB3\xF2:", 4, "left"); - subdata[0,0]="\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; - subdata[0,1]=result.Submit.name; - subdata[1,0]="\xCA\xEB\xE0\xF1:"; - subdata[1,1]=result.Submit.form.ToString(); - subdata[2,0]="\xC7\xE0\xE4\xE0\xF7\xE0:"; - subdata[2,1]=result.Submit.submit.pbolemID.ToString(); - subdata[3,0]="\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; - subdata[3,1]=GetLanguage(result.Submit.submit.language); - subdata[4,0]="\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; - subdata[4,1]=result.Submit.submit.id.ToString(); - h.AddTable(subdata, new string[0], "", 2, 0, 5); + ((IoiInformerControl)base.Control).LoadMessage(result); - h.AddHorizLine(); - h.AddHeader("\xC2\xE8\xF5\xB3\xE4\xED\xE8\xE9 \xEA\xEE\xE4",4,"center"); - h.AddPre(result.Submit.submit.sourceCode); - h.AddHorizLine(); - h.AddHeader("\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xE2\xE8\xEA\xEE\xED\xE0\xED\xED\xFF", 4, "center"); + if (((IoiInformerControl)base.Control).NeedToFile()) + { + HtmlBuilder h = new HtmlBuilder(); + string[,] subdata = new string[6, 2]; - if (result.testResults != null) - { - string[,] data = new string[result.testResults.Length + 1, 8]; - string[] header = new string[8]; - header[0] = "\xB9"; - header[1] = "\xC2\xF5\xB3\xE4"; - header[2] = "\xCA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; - header[3] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xD3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; - header[4] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xD7\xE0\xF1"; - header[5] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xCF\xE0\xEC\'\xFF\xF2\xFC"; - header[6] = "\xC2\xE5\xF0\xE4\xE8\xEA\xF2 \xD1\xF3\xE4\xE4\xB3"; - header[7] = "\xCA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; - int n = result.testResults.Length; + h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF"; + h.Head += "<meta HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; + h.Head += "<script type=\"text/javascript\">\n"; + h.Head += "function flipBox(who) {\n"; + h.Head += "if (document.getElementById(who+'_0').style.display == 'block') { \n"; + h.Head += "document.getElementById(who+'_0').style.display = 'none';\n"; + h.Head += "document.getElementById(who+'_1').style.display = 'none';\n"; + h.Head += "document.getElementById(who+'_2').style.display = 'none';\n"; + h.Head += "} else { \n"; + h.Head += "document.getElementById(who+'_0').style.display = 'block';\n"; + h.Head += "document.getElementById(who+'_1').style.display = 'block';\n"; + h.Head += "document.getElementById(who+'_2').style.display = 'block';\n"; + h.Head += "}\n"; + h.Head += "}\n"; + h.Head += "</script>\n"; + + h.AddHeader("\xC4\xE0\xED\xB3 \xEF\xF0\xEE \xF1\xE0\xE1\xEC\xB3\xF2:", 4, "left"); + subdata[0, 0] = "\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; + subdata[0, 1] = result.Submit.name; + subdata[1, 0] = "\xCA\xEB\xE0\xF1:"; + subdata[1, 1] = result.Submit.form.ToString(); + subdata[2, 0] = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + subdata[2, 1] = result.Submit.submit.pbolemID.ToString(); + subdata[3, 0] = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + subdata[3, 1] = GetLanguage(result.Submit.submit.language); + subdata[4, 0] = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + subdata[4, 1] = result.Submit.submit.id.ToString(); + subdata[5, 0] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; int allPoints = 0, myPoints = 0; - for (int i = 0; i < n; i++) + if (result.testResults != null) { - data[i, 0] = result.testResults[i].id.ToString(); - data[i, 1] = "<pre>"+result.testResults[i].input+"</pre>"; - data[i, 2] = "<pre>"+result.testResults[i].output+"</pre>"; - data[i, 3] = "<pre>"+result.testResults[i].contestantOutput+"</pre>"; - data[i, 4] = result.testResults[i].usedTime.ToString(); - data[i, 5] = result.testResults[i].usedMemory.ToString(); - data[i, 6] = result.testResults[i].res; - int curpoints = (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; - data[i, 7] = curpoints.ToString() + "/" + result.testResults[i].points.ToString(); - myPoints += curpoints; - allPoints += result.testResults[i].points; + for (int i = 0; i < result.testResults.Length; i++) + { + allPoints += result.testResults[i].points; + myPoints += (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; + } + subdata[5, 1] = myPoints.ToString() + "/" + allPoints.ToString(); } - data[n, 0] = "<b>\xD1\xF3\xEC\xE0\xF0\xED\xB3</b>"; - data[n, 4] = "<b>" + result.usedMemory.ToString() + "</b>"; - data[n, 5] = "<b>" + result.usedTime.ToString() + "</b>"; - data[n, 6] = "<b>" + result.res + "</b>"; - data[n, 7] = "<b>" + myPoints.ToString() + "/" + allPoints.ToString() + "</b>"; - h.AddTable(data, header, "", 2, 0, 5); - h.Title += myPoints.ToString() + "/" + allPoints.ToString(); - } - else - { - h.Title += "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"; - h.AddParagraph("\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"); - } - h.AddHorizLine(); - h.AddReference("http://acm.lviv.ua","<small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small>"); + else + subdata[5, 1] = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; - string dir = "IoiResults\\" + result.Submit.form.ToString() + " form\\" + result.Submit.name; - Directory.CreateDirectory(dir); - StreamWriter w = File.CreateText(dir+"\\"+result.Submit.submit.pbolemID.ToString() + ".html"); - w.Write(h.Result); - w.Close(); + h.AddTable(subdata, new string[0], "", 2, 0, 5, "center"); + h.AddHorizLine(); + h.AddHeader("\xC2\xE8\xF5\xB3\xE4\xED\xE8\xE9 \xEA\xEE\xE4", 4, "center"); + h.AddPre(result.Submit.submit.sourceCode); + h.AddHorizLine(); + h.AddHeader("\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xE2\xE8\xEA\xEE\xED\xE0\xED\xED\xFF", 4, "center"); + + if (result.testResults != null) + { + string[,] data = new string[result.testResults.Length + 1, 8]; + string[] header = new string[8]; + header[0] = "\xB9"; + header[1] = "\xC2\xF5\xB3\xE4"; + header[2] = "\xCA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; + header[3] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xD3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; + header[4] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xD7\xE0\xF1"; + header[5] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xCF\xE0\xEC\'\xFF\xF2\xFC"; + header[6] = "\xC2\xE5\xF0\xE4\xE8\xEA\xF2 \xD1\xF3\xE4\xE4\xB3"; + header[7] = "\xCA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; + int n = result.testResults.Length; + for (int i = 0; i < n; i++) + { + data[i, 0] = "<a href=\"#\" onclick=\"javascript:flipBox('show" + i.ToString() + "')\">" + i.ToString() + "</a>"; + data[i, 1] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_0\">\n<pre>" + result.testResults[i].input + "</pre></div>"; + data[i, 2] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_1\">\n<pre>" + result.testResults[i].output + "</pre></div>"; + data[i, 3] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_2\">\n<pre>" + result.testResults[i].contestantOutput + "</pre></div>"; + data[i, 4] = result.testResults[i].usedTime.ToString(); + data[i, 5] = result.testResults[i].usedMemory.ToString(); + data[i, 6] = result.testResults[i].res; + data[i, 7] = ((result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0).ToString() + "/" + result.testResults[i].points.ToString(); + } + data[n, 0] = "<b>\xD1\xF3\xEC\xE0\xF0\xED\xB3</b>"; + data[n, 4] = "<b>" + result.usedMemory.ToString() + "</b>"; + data[n, 5] = "<b>" + result.usedTime.ToString() + "</b>"; + data[n, 6] = "<b>" + result.res + "</b>"; + data[n, 7] = "<b>" + myPoints.ToString() + "/" + allPoints.ToString() + "</b>"; + h.AddTable(data, header, "", 2, 0, 5, "top"); + } + else + h.AddParagraph("\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"); + h.AddHorizLine(); + h.AddReference("http://acm.lviv.ua", "<small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small>"); + + string dir = "IoiResults\\" + result.Submit.form.ToString() + " form\\" + result.Submit.name; + Directory.CreateDirectory(dir); + StreamWriter w = File.CreateText(dir + "\\" + result.Submit.submit.pbolemID.ToString() + ".html"); + w.Write(h.Result); + w.Close(); + } //Uri url=new Uri(result.Submit.submit.id.ToString() + ".html"); //((IoiInformerControl)base.Control).LoadURL(url); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Or...@us...> - 2009-02-05 23:17:51
|
Revision: 492 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=492&view=rev Author: Oracle_ Date: 2009-02-05 23:17:46 +0000 (Thu, 05 Feb 2009) Log Message: ----------- Added CompileLog to all result data. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Data/Result.cs ACMServer/trunk/ACMServer/Library/Data/ResultIoi.cs ACMServer/trunk/ACMServer/Library/testData/data.xsd ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs ACMServer/trunk/ACMServer/Runner/Class1.cs Modified: ACMServer/trunk/ACMServer/Library/Data/Result.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/Result.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Library/Data/Result.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -27,6 +27,8 @@ public double usedTime; [XmlElement("usedMemory", typeof(int))] public int usedMemory; + [XmlElement("compOutput", typeof(string))] + public string compOutput; readonly string temp; Modified: ACMServer/trunk/ACMServer/Library/Data/ResultIoi.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/ResultIoi.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Library/Data/ResultIoi.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -27,6 +27,8 @@ public double usedTime; [XmlElement("usedMemory", typeof(int))] public int usedMemory; + [XmlElement("compOutput",typeof(string))] + public string compOutput; [XmlElement("testResults", typeof(TestResIoi[]))] public TestResIoi[] testResults; @@ -70,6 +72,7 @@ result.result = this.result; result.usedMemory = usedMemory; result.usedTime = usedTime; + result.compOutput = compOutput; result.Submit = this.Submit.submit; return result; } Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsd =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-05 23:17:46 UTC (rev 492) @@ -38,6 +38,7 @@ <xs:element name="result" type="xs:int" /> <xs:element name="usedTime" type="xs:double" /> <xs:element name="usedMemory" type="xs:double" /> + <xs:element name="compOutput" type="xs:string" /> <xs:element name="submit" type="submitType" /> </xs:sequence> </xs:complexType> @@ -47,6 +48,7 @@ <xs:element name="result" type="xs:int" /> <xs:element name="usedTime" type="xs:double" /> <xs:element name="usedMemory" type="xs:double" /> + <xs:element name="compOutput" type="xs:string" /> <xs:element name="testResults" type="testResultList" minOccurs="0" /> <xs:element name="submitioi" type="submitIOIType" /> </xs:sequence> Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -129,8 +129,9 @@ { submitGrid[1, 5].Value = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; resGrid.ColumnCount = 1; - resGrid.RowCount = 1; - resGrid[0, 0].Value = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + resGrid.RowCount = 2; + resGrid[0, 0].Value = "\xC2\xE8\xE2\xB3\xE4 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF2\xEE\xF0\xE0:"; + resGrid[0, 1].Value = message.compOutput; } submitGrid_SizeChanged(null, new EventArgs()); resGrid_SizeChanged(null, new EventArgs()); @@ -142,7 +143,8 @@ if (File.Exists(FileName)) { ProcessStartInfo s=new ProcessStartInfo(); - s.FileName = Path.GetFullPath(FileName); + s.FileName="iexplore"; + s.Arguments = Path.GetFullPath(FileName); Process.Start(s); } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -121,7 +121,10 @@ h.AddTable(data, header, "", 2, 0, 5, "top"); } else - h.AddParagraph("\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"); + { + h.AddHeader("\xC2\xE8\xE2\xB3\xE4 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF2\xEE\xF0\xE0:", 4, "center"); + h.AddParagraph(result.compOutput); + } h.AddHorizLine(); h.AddReference("http://acm.lviv.ua", "<small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small>"); @@ -130,6 +133,9 @@ StreamWriter w = File.CreateText(dir + "\\" + result.Submit.submit.pbolemID.ToString() + ".html"); w.Write(h.Result); w.Close(); + StreamWriter dat = File.CreateText(dir+"\\data.dat"); + dat.WriteLine(result.Submit.name + ";" + result.Submit.form + ";"+result.Submit.submit.pbolemID.ToString()+";" + ((result.testResults == null) ? "CE" : myPoints.ToString() + "/" + allPoints.ToString())); + dat.Close(); } //Uri url=new Uri(result.Submit.submit.id.ToString() + ".html"); //((IoiInformerControl)base.Control).LoadURL(url); Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -89,6 +89,7 @@ //TODO: + result.compOutput = test.comp.CompilerOutput; result.res = test.comp.Result.ToString(); if (test.comp.Result == CompRes.OK) { @@ -205,6 +206,7 @@ //TODO: + result.compOutput = test.comp.CompilerOutput; result.res = test.comp.Result.ToString(); if (test.comp.Result == CompRes.OK) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-06 21:06:04
|
Revision: 495 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=495&view=rev Author: brus07 Date: 2009-02-06 21:05:57 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Added "School" to SubmitIoi and to forms and to results. Change ProblemTextBox in SubmitIoiPlugins to numeric. (HardCode). Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs ACMServer/trunk/ACMServer/Library/testData/data.xsd ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs Modified: ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -13,6 +13,8 @@ public string name; [XmlElement("form", typeof(int))] public int form; + [XmlElement("school", typeof(string))] + public string school; public SubmitIoi() { Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsd =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-06 21:05:57 UTC (rev 495) @@ -21,6 +21,7 @@ <xs:element name="submit" type="submitType" /> <xs:element name="name" type="xs:string" /> <xs:element name="form" type="xs:positiveInteger" /> + <xs:element name="school" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> <xs:element name="submitList"> Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -32,24 +32,29 @@ this.fileNeed = new System.Windows.Forms.CheckBox(); this.button1 = new System.Windows.Forms.Button(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.resGrid = new System.Windows.Forms.DataGridView(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.submitGrid = new System.Windows.Forms.DataGridView(); this.source = new System.Windows.Forms.RichTextBox(); + this.resGrid = new System.Windows.Forms.DataGridView(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.resGrid)).BeginInit(); this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).BeginInit(); this.SuspendLayout(); // // numericUpDown1 // this.numericUpDown1.Location = new System.Drawing.Point(3, 3); + this.numericUpDown1.Maximum = new decimal(new int[] { + 1000000, + 0, + 0, + 0}); this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Size = new System.Drawing.Size(120, 20); this.numericUpDown1.TabIndex = 0; @@ -96,17 +101,6 @@ this.splitContainer1.SplitterDistance = 177; this.splitContainer1.TabIndex = 7; // - // resGrid - // - this.resGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.resGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.resGrid.Location = new System.Drawing.Point(0, 0); - this.resGrid.Name = "resGrid"; - this.resGrid.RowHeadersVisible = false; - this.resGrid.Size = new System.Drawing.Size(396, 173); - this.resGrid.TabIndex = 5; - this.resGrid.SizeChanged += new System.EventHandler(this.resGrid_SizeChanged); - // // splitContainer2 // this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; @@ -146,6 +140,17 @@ this.source.TabIndex = 3; this.source.Text = ""; // + // resGrid + // + this.resGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.resGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.resGrid.Location = new System.Drawing.Point(0, 0); + this.resGrid.Name = "resGrid"; + this.resGrid.RowHeadersVisible = false; + this.resGrid.Size = new System.Drawing.Size(396, 173); + this.resGrid.TabIndex = 5; + this.resGrid.SizeChanged += new System.EventHandler(this.resGrid_SizeChanged); + // // IoiInformerControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -161,11 +166,11 @@ this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.resGrid)).EndInit(); this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel2.ResumeLayout(false); this.splitContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -73,19 +73,21 @@ FileName = "IoiResults\\" + message.Submit.form.ToString() + " form\\" + message.Submit.name + "\\" + message.Submit.submit.pbolemID.ToString() + ".html"; source.Text = message.Submit.submit.sourceCode; submitGrid.ColumnCount = 2; - submitGrid.RowCount = 6; + submitGrid.RowCount = 7; submitGrid[0, 0].Value = "\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; submitGrid[1, 0].Value = message.Submit.name; submitGrid[0, 1].Value = "\xCA\xEB\xE0\xF1:"; submitGrid[1, 1].Value = message.Submit.form.ToString(); - submitGrid[0, 2].Value = "\xC7\xE0\xE4\xE0\xF7\xE0:"; - submitGrid[1, 2].Value = message.Submit.submit.pbolemID.ToString(); - submitGrid[0, 3].Value = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; - submitGrid[1, 3].Value = GetLanguage(message.Submit.submit.language); - submitGrid[0, 4].Value = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; - submitGrid[1, 4].Value = message.Submit.submit.id.ToString(); - submitGrid[0, 5].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + submitGrid[0, 2].Value = "\xD8\xEA\xEE\xEB\xE0:"; + submitGrid[1, 2].Value = message.Submit.school; + submitGrid[0, 3].Value = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + submitGrid[1, 3].Value = message.Submit.submit.pbolemID.ToString(); + submitGrid[0, 4].Value = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + submitGrid[1, 4].Value = GetLanguage(message.Submit.submit.language); + submitGrid[0, 5].Value = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + submitGrid[1, 5].Value = message.Submit.submit.id.ToString(); + submitGrid[0, 6].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; int allPoints = 0, myPoints = 0; if (message.testResults != null) { @@ -94,7 +96,7 @@ allPoints += message.testResults[i].points; myPoints += (message.testResults[i].res == "Accepted") ? message.testResults[i].points : 0; } - submitGrid[1, 5].Value = myPoints.ToString() + "/" + allPoints.ToString(); + submitGrid[1, 6].Value = myPoints.ToString() + "/" + allPoints.ToString(); resGrid.ColumnCount = 8; resGrid.RowCount = message.testResults.Length + 2; Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -38,7 +38,7 @@ if (((IoiInformerControl)base.Control).NeedToFile()) { HtmlBuilder h = new HtmlBuilder(); - string[,] subdata = new string[6, 2]; + string[,] subdata = new string[7, 2]; h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF"; h.Head += "<meta HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; @@ -62,13 +62,15 @@ subdata[0, 1] = result.Submit.name; subdata[1, 0] = "\xCA\xEB\xE0\xF1:"; subdata[1, 1] = result.Submit.form.ToString(); - subdata[2, 0] = "\xC7\xE0\xE4\xE0\xF7\xE0:"; - subdata[2, 1] = result.Submit.submit.pbolemID.ToString(); - subdata[3, 0] = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; - subdata[3, 1] = GetLanguage(result.Submit.submit.language); - subdata[4, 0] = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; - subdata[4, 1] = result.Submit.submit.id.ToString(); - subdata[5, 0] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + subdata[2, 0] = "\xD8\xEA\xEE\xEB\xE0:"; + subdata[2, 1] = result.Submit.school; + subdata[3, 0] = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + subdata[3, 1] = result.Submit.submit.pbolemID.ToString(); + subdata[4, 0] = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + subdata[4, 1] = GetLanguage(result.Submit.submit.language); + subdata[5, 0] = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + subdata[5, 1] = result.Submit.submit.id.ToString(); + subdata[6, 0] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; int allPoints = 0, myPoints = 0; if (result.testResults != null) { @@ -77,10 +79,10 @@ allPoints += result.testResults[i].points; myPoints += (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; } - subdata[5, 1] = myPoints.ToString() + "/" + allPoints.ToString(); + subdata[6, 1] = myPoints.ToString() + "/" + allPoints.ToString(); } else - subdata[5, 1] = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + subdata[6, 1] = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; h.AddTable(subdata, new string[0], "", 2, 0, 5, "center"); Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -41,9 +41,13 @@ this.submitButton = new System.Windows.Forms.Button(); this.sourceTextBox = new System.Windows.Forms.TextBox(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.schoolTextBox = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.SuspendLayout(); // // label1 @@ -88,6 +92,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.numericUpDown1); this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.problemTextBox); @@ -98,7 +103,7 @@ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(450, 177); + this.groupBox1.Size = new System.Drawing.Size(450, 163); this.groupBox1.TabIndex = 5; this.groupBox1.TabStop = false; this.groupBox1.Text = "\xD4\xEE\xF0\xEC\xE0 \xE2\xB3\xEF\xF0\xE0\xE2\xEA\xE8 \xF0\xEE\xE7\xE2\'\xFF\xE7\xEA\xF3"; @@ -121,15 +126,16 @@ this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(173, 16); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(45, 13); + this.label3.Size = new System.Drawing.Size(48, 13); this.label3.TabIndex = 13; - this.label3.Text = "Problem"; + this.label3.Text = "Problem:"; // // problemTextBox // - this.problemTextBox.Location = new System.Drawing.Point(224, 13); + this.problemTextBox.Enabled = false; + this.problemTextBox.Location = new System.Drawing.Point(281, 13); this.problemTextBox.Name = "problemTextBox"; - this.problemTextBox.Size = new System.Drawing.Size(100, 20); + this.problemTextBox.Size = new System.Drawing.Size(24, 20); this.problemTextBox.TabIndex = 12; this.problemTextBox.Text = "1"; // @@ -138,9 +144,9 @@ this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(6, 16); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(55, 13); + this.label4.Size = new System.Drawing.Size(58, 13); this.label4.TabIndex = 11; - this.label4.Text = "Language"; + this.label4.Text = "Language:"; // // languageTextBox // @@ -155,7 +161,7 @@ // this.submitButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.submitButton.Location = new System.Drawing.Point(6, 148); + this.submitButton.Location = new System.Drawing.Point(6, 134); this.submitButton.Name = "submitButton"; this.submitButton.Size = new System.Drawing.Size(438, 23); this.submitButton.TabIndex = 9; @@ -171,7 +177,7 @@ this.sourceTextBox.Location = new System.Drawing.Point(6, 39); this.sourceTextBox.Multiline = true; this.sourceTextBox.Name = "sourceTextBox"; - this.sourceTextBox.Size = new System.Drawing.Size(438, 103); + this.sourceTextBox.Size = new System.Drawing.Size(438, 89); this.sourceTextBox.TabIndex = 8; this.sourceTextBox.Text = "begin\r\nend."; // @@ -180,21 +186,64 @@ this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.splitContainer1.Location = new System.Drawing.Point(6, 56); + this.splitContainer1.Location = new System.Drawing.Point(6, 82); this.splitContainer1.Name = "splitContainer1"; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; // // splitContainer1.Panel1 // this.splitContainer1.Panel1.Controls.Add(this.groupBox1); - this.splitContainer1.Size = new System.Drawing.Size(450, 343); - this.splitContainer1.SplitterDistance = 177; + this.splitContainer1.Size = new System.Drawing.Size(450, 317); + this.splitContainer1.SplitterDistance = 163; this.splitContainer1.TabIndex = 6; // + // numericUpDown1 + // + this.numericUpDown1.Location = new System.Drawing.Point(227, 13); + this.numericUpDown1.Maximum = new decimal(new int[] { + 7, + 0, + 0, + 0}); + this.numericUpDown1.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(48, 20); + this.numericUpDown1.TabIndex = 15; + this.numericUpDown1.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); + // + // schoolTextBox + // + this.schoolTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.schoolTextBox.Location = new System.Drawing.Point(47, 56); + this.schoolTextBox.Name = "schoolTextBox"; + this.schoolTextBox.Size = new System.Drawing.Size(409, 20); + this.schoolTextBox.TabIndex = 8; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(3, 59); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(43, 13); + this.label5.TabIndex = 7; + this.label5.Text = "School:"; + // // IoiSubmitGuiControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.schoolTextBox); + this.Controls.Add(this.label5); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.formComboBox); this.Controls.Add(this.label2); @@ -206,6 +255,7 @@ this.groupBox1.PerformLayout(); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -226,5 +276,8 @@ private System.Windows.Forms.Button submitButton; private System.Windows.Forms.TextBox sourceTextBox; private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.TextBox schoolTextBox; + private System.Windows.Forms.Label label5; } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -50,5 +50,10 @@ { view.AddRow(new LogDataGridView.SystemMessage(text, type)); } + + private void numericUpDown1_ValueChanged(object sender, EventArgs e) + { + problemTextBox.Text = numericUpDown1.Value.ToString(); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-13 23:14:23
|
Revision: 503 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=503&view=rev Author: brus07 Date: 2009-02-13 23:14:18 +0000 (Fri, 13 Feb 2009) Log Message: ----------- Added mew concrete web connector. ExtendedWebConnector for connector to website with authorization. (now this is copy of SampleWebConnector) Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln Added Paths: ----------- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ExtendedWebConnector.csproj ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/AssemblyInfo.cs ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/SampleWebConnector.cs Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-12 16:55:36 UTC (rev 502) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-13 23:14:18 UTC (rev 503) @@ -45,6 +45,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IoiSubmitGuiPlugin", "Plugins\IoiPlugin\IoiSubmitGuiPlugin\IoiSubmitGuiPlugin.csproj", "{96664041-18B2-42BD-941F-117B54E2AE64}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedWebConnector", "Library\ConcreteConnector\ExtendedWebConnector\ExtendedWebConnector.csproj", "{28A3AAA0-0938-48CF-B66E-B056C0F865B9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -115,6 +117,10 @@ {96664041-18B2-42BD-941F-117B54E2AE64}.Debug|Any CPU.Build.0 = Debug|Any CPU {96664041-18B2-42BD-941F-117B54E2AE64}.Release|Any CPU.ActiveCfg = Release|Any CPU {96664041-18B2-42BD-941F-117B54E2AE64}.Release|Any CPU.Build.0 = Release|Any CPU + {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -136,6 +142,7 @@ {79EB24DD-AF0D-40D0-974E-198F4D8C92BC} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {E255910C-499D-48E2-9846-7EB24DE32C4A} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {45B4D72E-CD81-42A7-AD46-3471380A290F} = {4E42F296-7321-4193-9E35-9B7202005229} + {28A3AAA0-0938-48CF-B66E-B056C0F865B9} = {4E42F296-7321-4193-9E35-9B7202005229} {F36370C3-E1EB-47E8-AFAC-F4840953D60B} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} {96664041-18B2-42BD-941F-117B54E2AE64} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} EndGlobalSection Property changes on: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector ___________________________________________________________________ Added: svn:ignore + bin obj ExtendedWebConnector.csproj.user Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ExtendedWebConnector.csproj =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ExtendedWebConnector.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ExtendedWebConnector.csproj 2009-02-13 23:14:18 UTC (rev 503) @@ -0,0 +1,61 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{28A3AAA0-0938-48CF-B66E-B056C0F865B9}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AcmContester.Library.ConcreateConnector.SampleWebConnector</RootNamespace> + <AssemblyName>SampleWebConnector</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="SampleWebConnector.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Connector\Connector.csproj"> + <Project>{211DD6A5-2D73-439E-8722-ED2C89ED1DDB}</Project> + <Name>Connector</Name> + </ProjectReference> + <ProjectReference Include="..\..\Data\Data.csproj"> + <Project>{30C0EFA3-36A8-4C6F-8FEC-28F771D4933F}</Project> + <Name>Data</Name> + </ProjectReference> + <ProjectReference Include="..\..\LibraryExtention\LibraryExtention.csproj"> + <Project>{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}</Project> + <Name>LibraryExtention</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Property changes on: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/AssemblyInfo.cs 2009-02-13 23:14:18 UTC (rev 503) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ExtendedWebConnector")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("AcmContester")] +[assembly: AssemblyProduct("ExtendedWebConnector")] +[assembly: AssemblyCopyright("Copyright © Home 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1f472191-9057-4161-bcb1-d5c0000fc10d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/SampleWebConnector.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/SampleWebConnector.cs (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/SampleWebConnector.cs 2009-02-13 23:14:18 UTC (rev 503) @@ -0,0 +1,98 @@ +using System; +using AcmContester.Library.Connector.Getter; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; +using System.Net; +using System.IO; + +namespace AcmContester.Library.ConcreateConnector.SampleWebConnector +{ + public class SampleWebConnector : IGetter + { + //"http://127.0.0.1/d"; + string fullPathToWebPages = ""; + + #region IGetter Members + + public string PathToSource + { + get + { + return fullPathToWebPages; + } + set + { + fullPathToWebPages = value; + } + } + + public SystemMessage GetData() + { + return new SystemMessage(GetFullInfoFromSite()); + } + + public void Send(SystemMessage message) + { + if (message.IsType("TestingResult") == true) + { + SendTestingResultToSite(message.Message); + } + } + + #endregion + + + void SendTestingResultToSite(string message) + { + string res = ""; + string id = ""; + string usedMemory = ""; + string usedTime = ""; + + //TODO: + Result result = Result.CreateFromXml(message); + res = result.res; + id = result.Submit.id.ToString(); + usedMemory = result.usedMemory.ToString(); + usedTime = result.usedTime.ToString(); + + string fullURL = fullPathToWebPages + "/set.php?"; + fullURL += "res=" + res; + fullURL += "&id=" + id; + fullURL += "&usedMemory=" + usedMemory; + fullURL += "&usedTime=" + usedTime; + HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(fullURL); + myRequest.Method = "GET"; + WebResponse myResponse = myRequest.GetResponse(); + myResponse.Close(); + } + + + + string GetFullInfoFromSite() + { + string result = null; + try + { + HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(fullPathToWebPages + "/get.php"); + myRequest.Method = "GET"; + //myRequest.Timeout = 100000; + WebResponse myResponse = myRequest.GetResponse(); + StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8); + result = sr.ReadToEnd(); + sr.Close(); + myResponse.Close(); + if (result.Length == 0) + return null; + } + catch (WebException wex) + { + if (wex.Status == WebExceptionStatus.Timeout) + { + return "SystemResult: Timeout"; + } + } + return result; + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-14 01:29:25
|
Revision: 505 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=505&view=rev Author: brus07 Date: 2009-02-14 01:29:23 +0000 (Sat, 14 Feb 2009) Log Message: ----------- Added new Plugin. This is plugin is for sample generate result of submit without Compiling and Testing. This need for easy testing Web connection. Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln Added Paths: ----------- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/AssemblyInfo.cs ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.cs ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.resx ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.cs ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.csproj Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-14 01:24:48 UTC (rev 504) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-14 01:29:23 UTC (rev 505) @@ -47,6 +47,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedWebConnector", "Library\ConcreteConnector\ExtendedWebConnector\ExtendedWebConnector.csproj", "{28A3AAA0-0938-48CF-B66E-B056C0F865B9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HelperPlugins", "HelperPlugins", "{A42A970E-FB5D-40F8-8F27-04434D792FCE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleGenerateResultPlugin", "Plugins\HelperPlugins\SampleGenerateResultPlugin\SampleGenerateResultPlugin.csproj", "{30873194-24C0-424F-A662-FD0A97223A56}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +125,10 @@ {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Debug|Any CPU.Build.0 = Debug|Any CPU {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Release|Any CPU.Build.0 = Release|Any CPU + {30873194-24C0-424F-A662-FD0A97223A56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30873194-24C0-424F-A662-FD0A97223A56}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30873194-24C0-424F-A662-FD0A97223A56}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30873194-24C0-424F-A662-FD0A97223A56}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -136,6 +144,7 @@ {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {74FB3B7A-5D91-46B3-9F15-F38136725AED} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} + {A42A970E-FB5D-40F8-8F27-04434D792FCE} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {20B192BC-FD4D-4ED5-90F5-B5994F995238} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} {9462E3BD-67AD-4887-BF4C-8B6A25048941} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} {8F305004-8FB7-4F85-8063-3A7041DB840F} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} @@ -145,5 +154,6 @@ {28A3AAA0-0938-48CF-B66E-B056C0F865B9} = {4E42F296-7321-4193-9E35-9B7202005229} {F36370C3-E1EB-47E8-AFAC-F4840953D60B} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} {96664041-18B2-42BD-941F-117B54E2AE64} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} + {30873194-24C0-424F-A662-FD0A97223A56} = {A42A970E-FB5D-40F8-8F27-04434D792FCE} EndGlobalSection EndGlobal Property changes on: ACMServer/trunk/ACMServer/Plugins/HelperPlugins ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin ___________________________________________________________________ Added: svn:ignore + bin obj Added: tsvn:logminsize + 5 Property changes on: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/AssemblyInfo.cs 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SampleGenerateResultPlugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("AcmContester")] +[assembly: AssemblyProduct("SampleGenerateResultPlugin")] +[assembly: AssemblyCopyright("Copyright © Home 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c9eeb202-e3f0-41b7-9dfc-716c914570f8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.Designer.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.Designer.cs 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,84 @@ +namespace AcmContester.Plugins.HelperPlugins.SampleGenerateResultPlugin +{ + partial class SampleGenerateResultControl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.resultButton = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.queueSizeLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // resultButton + // + this.resultButton.Location = new System.Drawing.Point(3, 27); + this.resultButton.Name = "resultButton"; + this.resultButton.Size = new System.Drawing.Size(75, 23); + this.resultButton.TabIndex = 0; + this.resultButton.Text = "Result"; + this.resultButton.UseVisualStyleBackColor = true; + this.resultButton.Click += new System.EventHandler(this.resultButton_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 11); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(52, 13); + this.label1.TabIndex = 1; + this.label1.Text = "In queue:"; + // + // queueSizeLabel + // + this.queueSizeLabel.AutoSize = true; + this.queueSizeLabel.Location = new System.Drawing.Point(61, 11); + this.queueSizeLabel.Name = "queueSizeLabel"; + this.queueSizeLabel.Size = new System.Drawing.Size(13, 13); + this.queueSizeLabel.TabIndex = 2; + this.queueSizeLabel.Text = "0"; + // + // SampleGenerateResultControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.queueSizeLabel); + this.Controls.Add(this.label1); + this.Controls.Add(this.resultButton); + this.Name = "SampleGenerateResultControl"; + this.Size = new System.Drawing.Size(439, 362); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button resultButton; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label queueSizeLabel; + } +} Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.cs 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using AcmContester.Library.LibraryExtention.Data; +using System.Collections; + +namespace AcmContester.Plugins.HelperPlugins.SampleGenerateResultPlugin +{ + public partial class SampleGenerateResultControl : UserControl + { + SampleGenerateResultPlugin plugin; + public SampleGenerateResultControl() + { + InitializeComponent(); + resultButton.Enabled = false; + } + ArrayList list = new ArrayList(); + + + delegate void AddSubmitCallback(Submit submit); + public void AddSubmit(Submit submit) + { + if (this.InvokeRequired) + { + AddSubmitCallback d = new AddSubmitCallback(AddSubmit); + this.Invoke(d, new object[] { submit }); + } + else + { + lock(list) + list.Add(submit); + UpdateQueueLabelStatus(); + resultButton.Enabled = true; + } + } + + internal void SetPlugin(SampleGenerateResultPlugin sampleGenerateResultPlugin) + { + plugin = sampleGenerateResultPlugin; + } + + private void resultButton_Click(object sender, EventArgs e) + { + if (list.Count > 0) + { + Submit submit; + lock (list) + { + submit = (Submit)list[0]; + list.RemoveAt(0); + } + Result result = new Result(submit); + result.res = "Accepted"; + result.result = 1; + result.usedMemory = 0; + result.usedTime = 0; + result.compOutput = ""; + plugin.SendResult(result); + } + if (list.Count == 0) + resultButton.Enabled = false; + UpdateQueueLabelStatus(); + } + + private void UpdateQueueLabelStatus() + { + queueSizeLabel.Text = list.Count.ToString(); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.resx =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.resx (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.resx 2009-02-14 01:29:23 UTC (rev 505) @@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.cs 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,31 @@ +using System; +using AcmContester.Plugins.PluginsFramework; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; + +namespace AcmContester.Plugins.HelperPlugins.SampleGenerateResultPlugin +{ + public class SampleGenerateResultPlugin : BaseMediatorPlugin + { + public SampleGenerateResultPlugin() + { + base.Control = new SampleGenerateResultControl(); + ((SampleGenerateResultControl)base.Control).SetPlugin(this); + } + public override void Send(SystemMessage message) + { + if (message.IsType("TestingSubmitList") == true) + { + SubmitList submitList = SubmitList.CreateFromXml(message.Message); + for (int index = 0; index < submitList.SubmitItems.Length; index++) + ((SampleGenerateResultControl)base.Control).AddSubmit(submitList.SubmitItems[index]); + } + } + + internal void SendResult(Result result) + { + SystemMessage message = new SystemMessage(result.ToStringX(), "TestingResult"); + base.DataArrived(message); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.csproj =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.csproj 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,75 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{30873194-24C0-424F-A662-FD0A97223A56}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AcmContester.Plugins.HelperPlugins.SampleGenerateResultPlugin</RootNamespace> + <AssemblyName>SampleGenerateResultPlugin</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="SampleGenerateResultControl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="SampleGenerateResultControl.Designer.cs"> + <DependentUpon>SampleGenerateResultControl.cs</DependentUpon> + </Compile> + <Compile Include="SampleGenerateResultPlugin.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\Library\Data\Data.csproj"> + <Project>{30C0EFA3-36A8-4C6F-8FEC-28F771D4933F}</Project> + <Name>Data</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Library\LibraryExtention\LibraryExtention.csproj"> + <Project>{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}</Project> + <Name>LibraryExtention</Name> + </ProjectReference> + <ProjectReference Include="..\..\PluginsFramework\PluginsFramework.csproj"> + <Project>{69FB4176-F298-4AF7-B714-B6758AA9A58E}</Project> + <Name>PluginsFramework</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="SampleGenerateResultControl.resx"> + <SubType>Designer</SubType> + <DependentUpon>SampleGenerateResultControl.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |