зеркало из https://github.com/mono/moma.git
12-03-2006 Jonathan Pobst <monkey@jpobst.com>
* Pack all definition files into one zip file, unzip on the fly. * Only load definition files once per application run. * User initiated update and download of definition files. * Add definition version used to scan to submission report. * Allow user to enter optional info and comments to submission report. * Don't let user add same assembly twice to scan list. * Allow multiple select of scan list for easier removal. * Add initobj to list of scanned opcodes. * Remove app.config. * Move web service interaction to Moma.Analyzer.dll. svn path=/trunk/moma/; revision=68929
This commit is contained in:
Родитель
85333ae615
Коммит
6962fd0efe
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
12-03-2006 Jonathan Pobst <monkey@jpobst.com>
|
||||
|
||||
* Pack all definition files into one zip file, unzip on the fly.
|
||||
* Only load definition files once per application run.
|
||||
* User initiated update and download of definition files.
|
||||
* Add definition version used to scan to submission report.
|
||||
* Allow user to enter optional info and comments to submission report.
|
||||
* Don't let user add same assembly twice to scan list.
|
||||
* Allow multiple select of scan list for easier removal.
|
||||
* Add initobj to list of scanned opcodes.
|
||||
* Remove app.config.
|
||||
* Move web service interaction to Moma.Analyzer.dll.
|
||||
|
||||
11-26-2006 Jonathan Pobst <monkey@jpobst.com>
|
||||
|
||||
* Extract missing constructors. This will allow missing types
|
||||
|
|
|
@ -0,0 +1,177 @@
|
|||
namespace MoMA
|
||||
{
|
||||
partial class DefinitionDownloader
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing && (components != null)) {
|
||||
components.Dispose ();
|
||||
}
|
||||
base.Dispose (disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager (typeof (DefinitionDownloader));
|
||||
this.label1 = new System.Windows.Forms.Label ();
|
||||
this.label2 = new System.Windows.Forms.Label ();
|
||||
this.label3 = new System.Windows.Forms.Label ();
|
||||
this.VersionLabel = new System.Windows.Forms.Label ();
|
||||
this.DateLabel = new System.Windows.Forms.Label ();
|
||||
this.DownloadButton = new System.Windows.Forms.Button ();
|
||||
this.CloseButton = new System.Windows.Forms.Button ();
|
||||
this.DownloadSpinner = new System.Windows.Forms.PictureBox ();
|
||||
this.DownloadLabel = new System.Windows.Forms.Label ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.DownloadSpinner)).BeginInit ();
|
||||
this.SuspendLayout ();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.Font = new System.Drawing.Font ("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point (13, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size (418, 17);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "New MoMA definitions are available:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.Font = new System.Drawing.Font ("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point (90, 55);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size (75, 17);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Version:";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label3.Font = new System.Drawing.Font ("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.Location = new System.Drawing.Point (90, 77);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size (75, 17);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Date:";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// VersionLabel
|
||||
//
|
||||
this.VersionLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.VersionLabel.Font = new System.Drawing.Font ("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.VersionLabel.Location = new System.Drawing.Point (171, 56);
|
||||
this.VersionLabel.Name = "VersionLabel";
|
||||
this.VersionLabel.Size = new System.Drawing.Size (164, 17);
|
||||
this.VersionLabel.TabIndex = 3;
|
||||
this.VersionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// DateLabel
|
||||
//
|
||||
this.DateLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.DateLabel.Font = new System.Drawing.Font ("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.DateLabel.Location = new System.Drawing.Point (171, 78);
|
||||
this.DateLabel.Name = "DateLabel";
|
||||
this.DateLabel.Size = new System.Drawing.Size (164, 17);
|
||||
this.DateLabel.TabIndex = 4;
|
||||
this.DateLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// DownloadButton
|
||||
//
|
||||
this.DownloadButton.Location = new System.Drawing.Point (213, 126);
|
||||
this.DownloadButton.Name = "DownloadButton";
|
||||
this.DownloadButton.Size = new System.Drawing.Size (86, 30);
|
||||
this.DownloadButton.TabIndex = 8;
|
||||
this.DownloadButton.Text = "Download";
|
||||
this.DownloadButton.UseVisualStyleBackColor = true;
|
||||
this.DownloadButton.Click += new System.EventHandler (this.DownloadButton_Click);
|
||||
//
|
||||
// CloseButton
|
||||
//
|
||||
this.CloseButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.CloseButton.Location = new System.Drawing.Point (305, 126);
|
||||
this.CloseButton.Name = "CloseButton";
|
||||
this.CloseButton.Size = new System.Drawing.Size (86, 30);
|
||||
this.CloseButton.TabIndex = 9;
|
||||
this.CloseButton.Text = "Close";
|
||||
this.CloseButton.UseVisualStyleBackColor = true;
|
||||
this.CloseButton.Click += new System.EventHandler (this.CloseButton_Click);
|
||||
//
|
||||
// DownloadSpinner
|
||||
//
|
||||
this.DownloadSpinner.Image = global::MoMA.Properties.Resources.spinner;
|
||||
this.DownloadSpinner.Location = new System.Drawing.Point (19, 132);
|
||||
this.DownloadSpinner.Name = "DownloadSpinner";
|
||||
this.DownloadSpinner.Size = new System.Drawing.Size (16, 16);
|
||||
this.DownloadSpinner.TabIndex = 10;
|
||||
this.DownloadSpinner.TabStop = false;
|
||||
this.DownloadSpinner.Visible = false;
|
||||
//
|
||||
// DownloadLabel
|
||||
//
|
||||
this.DownloadLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.DownloadLabel.Font = new System.Drawing.Font ("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.DownloadLabel.Location = new System.Drawing.Point (41, 133);
|
||||
this.DownloadLabel.Name = "DownloadLabel";
|
||||
this.DownloadLabel.Size = new System.Drawing.Size (147, 17);
|
||||
this.DownloadLabel.TabIndex = 11;
|
||||
this.DownloadLabel.Text = "Downloading...";
|
||||
this.DownloadLabel.Visible = false;
|
||||
//
|
||||
// DefinitionDownloader
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF (6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.BackgroundImage = global::MoMA.Properties.Resources.monoback;
|
||||
this.CancelButton = this.CloseButton;
|
||||
this.ClientSize = new System.Drawing.Size (403, 167);
|
||||
this.Controls.Add (this.DownloadLabel);
|
||||
this.Controls.Add (this.DownloadSpinner);
|
||||
this.Controls.Add (this.CloseButton);
|
||||
this.Controls.Add (this.DownloadButton);
|
||||
this.Controls.Add (this.DateLabel);
|
||||
this.Controls.Add (this.VersionLabel);
|
||||
this.Controls.Add (this.label3);
|
||||
this.Controls.Add (this.label2);
|
||||
this.Controls.Add (this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject ("$this.Icon")));
|
||||
this.Name = "DefinitionDownloader";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Download New Definitions?";
|
||||
((System.ComponentModel.ISupportInitialize)(this.DownloadSpinner)).EndInit ();
|
||||
this.ResumeLayout (false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label VersionLabel;
|
||||
private System.Windows.Forms.Label DateLabel;
|
||||
private System.Windows.Forms.Button DownloadButton;
|
||||
private System.Windows.Forms.Button CloseButton;
|
||||
private System.Windows.Forms.PictureBox DownloadSpinner;
|
||||
private System.Windows.Forms.Label DownloadLabel;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using MoMA.Analyzer;
|
||||
using System.IO;
|
||||
|
||||
namespace MoMA
|
||||
{
|
||||
public partial class DefinitionDownloader : Form
|
||||
{
|
||||
private FileDefinition fd;
|
||||
|
||||
public DefinitionDownloader ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
|
||||
public void LoadDefinitionFile (FileDefinition fd)
|
||||
{
|
||||
this.fd = fd;
|
||||
this.VersionLabel.Text = fd.Version;
|
||||
this.DateLabel.Text = fd.Date.ToShortDateString ();
|
||||
}
|
||||
|
||||
private void CloseButton_Click (object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private void DownloadButton_Click (object sender, EventArgs e)
|
||||
{
|
||||
DownloadButton.Enabled = false;
|
||||
DownloadLabel.Visible = true;
|
||||
DownloadSpinner.Visible = true;
|
||||
|
||||
Application.DoEvents ();
|
||||
|
||||
try {
|
||||
string definition_directory = Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "Definitions");
|
||||
|
||||
if (!Directory.Exists (definition_directory))
|
||||
Directory.CreateDirectory (definition_directory);
|
||||
|
||||
string definition_file = Path.Combine (definition_directory, Path.GetFileName (fd.FileName));
|
||||
|
||||
System.Net.WebClient wc = new System.Net.WebClient ();
|
||||
|
||||
// I couldn't get DownloadFileAsync to work on Mono, so my spinner won't spin on Mono.
|
||||
// But I envision my users mainly being .Net, so I want to make sure that it spins for them.
|
||||
// Hence this nasty hack.
|
||||
if (RunningOnMono ()) {
|
||||
wc.DownloadFile (new Uri(fd.FileName), definition_file);
|
||||
this.DialogResult = DialogResult.OK;
|
||||
|
||||
} else {
|
||||
wc.DownloadFileCompleted += new AsyncCompletedEventHandler (wc_DownloadFileCompleted);
|
||||
wc.DownloadFileAsync (new Uri (fd.FileName), definition_file);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
MessageBox.Show (string.Format ("Download failed. Reason:\n{0}", ex.ToString ()));
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
|
||||
void wc_DownloadFileCompleted (object sender, AsyncCompletedEventArgs e)
|
||||
{
|
||||
if (e.Error != null)
|
||||
MessageBox.Show (string.Format ("Download failed. Reason:\n{0}", e.Error.ToString ()));
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private bool RunningOnMono ()
|
||||
{
|
||||
Type t = typeof (int);
|
||||
|
||||
if (t.GetType ().ToString () == "System.MonoType")
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -117,4 +117,27 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAIAEBAQAAAAAAAoAQAAJgAAACAgEAAAAAAA6AIAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAIAA
|
||||
AAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
|
||||
AAAA//8A/wAAAP8A/wD//wAA////AP/3AAAAAHcA//8AAAB4/wD///AAf///cP//+I////dw////////
|
||||
ePD///////j/8P/////////w/////////4D/////////cP////////hwcHeP//////BwB///////8HAP
|
||||
//////9wcAj//////wBwAHd4/4dwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAA
|
||||
AAAAAAAAEAAAABAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD/
|
||||
/wD/AAAA/wD/AP//AAD///8A////////////////////////////////////////////////////////
|
||||
//////////////////////////////////f39/h49/f4eP/////////wgICAcIDwgHCP////////8HBw
|
||||
cIBwcHCAj/////////d3d/cH93f3B4///////////////////////////////3AAAAAAAAAAj///////
|
||||
///3AAAAAHcAAH///////////wAAAHj/AAB////////////wAH///3AAf///////////+I////dwAH//
|
||||
//////////////948AB////////////////4//AAf//////////////////wAH//////////////////
|
||||
gAB//////////////////3AAf/////////////////hwAH////////9wd4//////8AB/////////cAf/
|
||||
//////AAf////////3AP//////9wAH////////9wCP//////AAB/////////cAB3eP+HcAAAf///////
|
||||
/3AAAAAAAAAAAH/////////wAAAAAAAAAACP////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////8AAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
|
@ -57,11 +57,26 @@ namespace MoMA
|
|||
this.ViewReportButton = new System.Windows.Forms.Button ();
|
||||
this.SubmitReportButton = new System.Windows.Forms.Button ();
|
||||
this.label2 = new System.Windows.Forms.Label ();
|
||||
this.MonoVersionCombo = new System.Windows.Forms.ComboBox ();
|
||||
this.MonoVersionLabel = new System.Windows.Forms.Label ();
|
||||
this.CheckUpdateLink = new System.Windows.Forms.LinkLabel ();
|
||||
this.OptionalGroupBox = new System.Windows.Forms.GroupBox ();
|
||||
this.OptionalHomePageBox = new System.Windows.Forms.TextBox ();
|
||||
this.OptionalOrganizationBox = new System.Windows.Forms.TextBox ();
|
||||
this.OptionalCommentsBox = new System.Windows.Forms.TextBox ();
|
||||
this.label7 = new System.Windows.Forms.Label ();
|
||||
this.OptionalEmailBox = new System.Windows.Forms.TextBox ();
|
||||
this.label3 = new System.Windows.Forms.Label ();
|
||||
this.OptionalNameBox = new System.Windows.Forms.TextBox ();
|
||||
this.label4 = new System.Windows.Forms.Label ();
|
||||
this.label6 = new System.Windows.Forms.Label ();
|
||||
this.label5 = new System.Windows.Forms.Label ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.MonoTodoResultsImage)).BeginInit ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NotImplementedResultsImage)).BeginInit ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PInvokesResultsImage)).BeginInit ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.MissingResultsImage)).BeginInit ();
|
||||
this.OptionalGroupBox.SuspendLayout ();
|
||||
this.SuspendLayout ();
|
||||
//
|
||||
// pictureBox1
|
||||
|
@ -110,7 +125,7 @@ namespace MoMA
|
|||
//
|
||||
this.StepLabel.AutoSize = true;
|
||||
this.StepLabel.Font = new System.Drawing.Font ("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.StepLabel.Location = new System.Drawing.Point (12, 414);
|
||||
this.StepLabel.Location = new System.Drawing.Point (284, 429);
|
||||
this.StepLabel.Name = "StepLabel";
|
||||
this.StepLabel.Size = new System.Drawing.Size (60, 14);
|
||||
this.StepLabel.TabIndex = 4;
|
||||
|
@ -160,7 +175,6 @@ namespace MoMA
|
|||
this.columnHeader1});
|
||||
this.AssemblyListView.FullRowSelect = true;
|
||||
this.AssemblyListView.Location = new System.Drawing.Point (173, 123);
|
||||
this.AssemblyListView.MultiSelect = false;
|
||||
this.AssemblyListView.Name = "AssemblyListView";
|
||||
this.AssemblyListView.Size = new System.Drawing.Size (413, 145);
|
||||
this.AssemblyListView.TabIndex = 10;
|
||||
|
@ -174,7 +188,6 @@ namespace MoMA
|
|||
//
|
||||
// MonoTodoResultsImage
|
||||
//
|
||||
this.MonoTodoResultsImage.Image = global::MoMA.Properties.Resources.button_ok;
|
||||
this.MonoTodoResultsImage.Location = new System.Drawing.Point (193, 214);
|
||||
this.MonoTodoResultsImage.Name = "MonoTodoResultsImage";
|
||||
this.MonoTodoResultsImage.Size = new System.Drawing.Size (22, 22);
|
||||
|
@ -210,7 +223,6 @@ namespace MoMA
|
|||
//
|
||||
// NotImplementedResultsImage
|
||||
//
|
||||
this.NotImplementedResultsImage.Image = global::MoMA.Properties.Resources.button_ok;
|
||||
this.NotImplementedResultsImage.Location = new System.Drawing.Point (193, 186);
|
||||
this.NotImplementedResultsImage.Name = "NotImplementedResultsImage";
|
||||
this.NotImplementedResultsImage.Size = new System.Drawing.Size (22, 22);
|
||||
|
@ -228,7 +240,6 @@ namespace MoMA
|
|||
//
|
||||
// PInvokesResultsImage
|
||||
//
|
||||
this.PInvokesResultsImage.Image = global::MoMA.Properties.Resources.button_ok;
|
||||
this.PInvokesResultsImage.Location = new System.Drawing.Point (193, 158);
|
||||
this.PInvokesResultsImage.Name = "PInvokesResultsImage";
|
||||
this.PInvokesResultsImage.Size = new System.Drawing.Size (22, 22);
|
||||
|
@ -257,7 +268,6 @@ namespace MoMA
|
|||
//
|
||||
// MissingResultsImage
|
||||
//
|
||||
this.MissingResultsImage.Image = global::MoMA.Properties.Resources.button_ok;
|
||||
this.MissingResultsImage.Location = new System.Drawing.Point (193, 130);
|
||||
this.MissingResultsImage.Name = "MissingResultsImage";
|
||||
this.MissingResultsImage.Size = new System.Drawing.Size (22, 22);
|
||||
|
@ -289,7 +299,7 @@ namespace MoMA
|
|||
// ProjectLink
|
||||
//
|
||||
this.ProjectLink.Font = new System.Drawing.Font ("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ProjectLink.Location = new System.Drawing.Point (210, 438);
|
||||
this.ProjectLink.Location = new System.Drawing.Point (243, 445);
|
||||
this.ProjectLink.Name = "ProjectLink";
|
||||
this.ProjectLink.Size = new System.Drawing.Size (172, 14);
|
||||
this.ProjectLink.TabIndex = 26;
|
||||
|
@ -300,7 +310,7 @@ namespace MoMA
|
|||
// SubmitLabel
|
||||
//
|
||||
this.SubmitLabel.Font = new System.Drawing.Font ("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubmitLabel.Location = new System.Drawing.Point (173, 98);
|
||||
this.SubmitLabel.Location = new System.Drawing.Point (159, 83);
|
||||
this.SubmitLabel.Name = "SubmitLabel";
|
||||
this.SubmitLabel.Size = new System.Drawing.Size (416, 20);
|
||||
this.SubmitLabel.TabIndex = 27;
|
||||
|
@ -309,18 +319,18 @@ namespace MoMA
|
|||
// SubmitInstructions
|
||||
//
|
||||
this.SubmitInstructions.Font = new System.Drawing.Font ("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubmitInstructions.Location = new System.Drawing.Point (173, 123);
|
||||
this.SubmitInstructions.Location = new System.Drawing.Point (159, 108);
|
||||
this.SubmitInstructions.Name = "SubmitInstructions";
|
||||
this.SubmitInstructions.Size = new System.Drawing.Size (416, 183);
|
||||
this.SubmitInstructions.Size = new System.Drawing.Size (483, 103);
|
||||
this.SubmitInstructions.TabIndex = 28;
|
||||
this.SubmitInstructions.Text = resources.GetString ("SubmitInstructions.Text");
|
||||
//
|
||||
// ViewReportButton
|
||||
//
|
||||
this.ViewReportButton.Location = new System.Drawing.Point (411, 325);
|
||||
this.ViewReportButton.Location = new System.Drawing.Point (463, 382);
|
||||
this.ViewReportButton.Name = "ViewReportButton";
|
||||
this.ViewReportButton.Size = new System.Drawing.Size (86, 30);
|
||||
this.ViewReportButton.TabIndex = 29;
|
||||
this.ViewReportButton.TabIndex = 6;
|
||||
this.ViewReportButton.Text = "View Report";
|
||||
this.ViewReportButton.UseVisualStyleBackColor = true;
|
||||
this.ViewReportButton.Click += new System.EventHandler (this.ViewReportButton_Click);
|
||||
|
@ -328,10 +338,10 @@ namespace MoMA
|
|||
// SubmitReportButton
|
||||
//
|
||||
this.SubmitReportButton.Enabled = false;
|
||||
this.SubmitReportButton.Location = new System.Drawing.Point (503, 325);
|
||||
this.SubmitReportButton.Location = new System.Drawing.Point (555, 382);
|
||||
this.SubmitReportButton.Name = "SubmitReportButton";
|
||||
this.SubmitReportButton.Size = new System.Drawing.Size (86, 30);
|
||||
this.SubmitReportButton.TabIndex = 30;
|
||||
this.SubmitReportButton.TabIndex = 7;
|
||||
this.SubmitReportButton.Text = "Submit Report";
|
||||
this.SubmitReportButton.UseVisualStyleBackColor = true;
|
||||
this.SubmitReportButton.Click += new System.EventHandler (this.SubmitReportButton_Click);
|
||||
|
@ -339,12 +349,143 @@ namespace MoMA
|
|||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.Font = new System.Drawing.Font ("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point (12, 438);
|
||||
this.label2.Location = new System.Drawing.Point (9, 445);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size (63, 14);
|
||||
this.label2.TabIndex = 32;
|
||||
this.label2.Text = "Version 1.0";
|
||||
this.label2.Text = "Version 1.1";
|
||||
//
|
||||
// MonoVersionCombo
|
||||
//
|
||||
this.MonoVersionCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.MonoVersionCombo.FormattingEnabled = true;
|
||||
this.MonoVersionCombo.Location = new System.Drawing.Point (386, 339);
|
||||
this.MonoVersionCombo.Name = "MonoVersionCombo";
|
||||
this.MonoVersionCombo.Size = new System.Drawing.Size (140, 21);
|
||||
this.MonoVersionCombo.TabIndex = 34;
|
||||
//
|
||||
// MonoVersionLabel
|
||||
//
|
||||
this.MonoVersionLabel.AutoSize = true;
|
||||
this.MonoVersionLabel.Font = new System.Drawing.Font ("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MonoVersionLabel.Location = new System.Drawing.Point (211, 340);
|
||||
this.MonoVersionLabel.Name = "MonoVersionLabel";
|
||||
this.MonoVersionLabel.Size = new System.Drawing.Size (169, 16);
|
||||
this.MonoVersionLabel.TabIndex = 35;
|
||||
this.MonoVersionLabel.Text = "Test Against Mono Version:";
|
||||
//
|
||||
// CheckUpdateLink
|
||||
//
|
||||
this.CheckUpdateLink.Font = new System.Drawing.Font ("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.CheckUpdateLink.Location = new System.Drawing.Point (389, 366);
|
||||
this.CheckUpdateLink.Name = "CheckUpdateLink";
|
||||
this.CheckUpdateLink.Size = new System.Drawing.Size (137, 14);
|
||||
this.CheckUpdateLink.TabIndex = 36;
|
||||
this.CheckUpdateLink.TabStop = true;
|
||||
this.CheckUpdateLink.Text = "Check for newer version";
|
||||
this.CheckUpdateLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler (this.CheckUpdateLink_LinkClicked);
|
||||
//
|
||||
// OptionalGroupBox
|
||||
//
|
||||
this.OptionalGroupBox.Controls.Add (this.OptionalHomePageBox);
|
||||
this.OptionalGroupBox.Controls.Add (this.OptionalOrganizationBox);
|
||||
this.OptionalGroupBox.Controls.Add (this.OptionalCommentsBox);
|
||||
this.OptionalGroupBox.Controls.Add (this.label7);
|
||||
this.OptionalGroupBox.Controls.Add (this.OptionalEmailBox);
|
||||
this.OptionalGroupBox.Controls.Add (this.label3);
|
||||
this.OptionalGroupBox.Controls.Add (this.OptionalNameBox);
|
||||
this.OptionalGroupBox.Controls.Add (this.label4);
|
||||
this.OptionalGroupBox.Controls.Add (this.label6);
|
||||
this.OptionalGroupBox.Controls.Add (this.label5);
|
||||
this.OptionalGroupBox.Location = new System.Drawing.Point (161, 211);
|
||||
this.OptionalGroupBox.Name = "OptionalGroupBox";
|
||||
this.OptionalGroupBox.Size = new System.Drawing.Size (479, 165);
|
||||
this.OptionalGroupBox.TabIndex = 37;
|
||||
this.OptionalGroupBox.TabStop = false;
|
||||
this.OptionalGroupBox.Text = "Optional additional information to submit:";
|
||||
//
|
||||
// OptionalHomePageBox
|
||||
//
|
||||
this.OptionalHomePageBox.Location = new System.Drawing.Point (6, 139);
|
||||
this.OptionalHomePageBox.Name = "OptionalHomePageBox";
|
||||
this.OptionalHomePageBox.Size = new System.Drawing.Size (182, 20);
|
||||
this.OptionalHomePageBox.TabIndex = 4;
|
||||
//
|
||||
// OptionalOrganizationBox
|
||||
//
|
||||
this.OptionalOrganizationBox.Location = new System.Drawing.Point (6, 103);
|
||||
this.OptionalOrganizationBox.Name = "OptionalOrganizationBox";
|
||||
this.OptionalOrganizationBox.Size = new System.Drawing.Size (182, 20);
|
||||
this.OptionalOrganizationBox.TabIndex = 3;
|
||||
//
|
||||
// OptionalCommentsBox
|
||||
//
|
||||
this.OptionalCommentsBox.Location = new System.Drawing.Point (208, 29);
|
||||
this.OptionalCommentsBox.Multiline = true;
|
||||
this.OptionalCommentsBox.Name = "OptionalCommentsBox";
|
||||
this.OptionalCommentsBox.Size = new System.Drawing.Size (265, 130);
|
||||
this.OptionalCommentsBox.TabIndex = 5;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point (207, 16);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size (148, 13);
|
||||
this.label7.TabIndex = 8;
|
||||
this.label7.Text = "Comments for the Mono team:";
|
||||
//
|
||||
// OptionalEmailBox
|
||||
//
|
||||
this.OptionalEmailBox.Location = new System.Drawing.Point (6, 65);
|
||||
this.OptionalEmailBox.Name = "OptionalEmailBox";
|
||||
this.OptionalEmailBox.Size = new System.Drawing.Size (182, 20);
|
||||
this.OptionalEmailBox.TabIndex = 2;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point (6, 16);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size (41, 13);
|
||||
this.label3.TabIndex = 1;
|
||||
this.label3.Text = "Name: ";
|
||||
//
|
||||
// OptionalNameBox
|
||||
//
|
||||
this.OptionalNameBox.Location = new System.Drawing.Point (6, 29);
|
||||
this.OptionalNameBox.Name = "OptionalNameBox";
|
||||
this.OptionalNameBox.Size = new System.Drawing.Size (182, 20);
|
||||
this.OptionalNameBox.TabIndex = 1;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point (7, 52);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size (35, 13);
|
||||
this.label4.TabIndex = 9;
|
||||
this.label4.Text = "Email:";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point (6, 126);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size (102, 13);
|
||||
this.label6.TabIndex = 5;
|
||||
this.label6.Text = "Project Home Page:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point (7, 89);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size (69, 13);
|
||||
this.label5.TabIndex = 2;
|
||||
this.label5.Text = "Organization:";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
|
@ -353,6 +494,10 @@ namespace MoMA
|
|||
this.BackColor = System.Drawing.Color.White;
|
||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject ("$this.BackgroundImage")));
|
||||
this.ClientSize = new System.Drawing.Size (719, 471);
|
||||
this.Controls.Add (this.OptionalGroupBox);
|
||||
this.Controls.Add (this.CheckUpdateLink);
|
||||
this.Controls.Add (this.MonoVersionLabel);
|
||||
this.Controls.Add (this.MonoVersionCombo);
|
||||
this.Controls.Add (this.label2);
|
||||
this.Controls.Add (this.SubmitReportButton);
|
||||
this.Controls.Add (this.ViewReportButton);
|
||||
|
@ -382,13 +527,17 @@ namespace MoMA
|
|||
this.Controls.Add (this.pictureBox1);
|
||||
this.Controls.Add (this.AssemblyInstructions);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject ("$this.Icon")));
|
||||
this.Name = "MainForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "MoMA: Mono Migration Analyzer";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.MonoTodoResultsImage)).EndInit ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NotImplementedResultsImage)).EndInit ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PInvokesResultsImage)).EndInit ();
|
||||
((System.ComponentModel.ISupportInitialize)(this.MissingResultsImage)).EndInit ();
|
||||
this.OptionalGroupBox.ResumeLayout (false);
|
||||
this.OptionalGroupBox.PerformLayout ();
|
||||
this.ResumeLayout (false);
|
||||
this.PerformLayout ();
|
||||
|
||||
|
@ -425,5 +574,19 @@ namespace MoMA
|
|||
private System.Windows.Forms.Button ViewReportButton;
|
||||
private System.Windows.Forms.Button SubmitReportButton;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ComboBox MonoVersionCombo;
|
||||
private System.Windows.Forms.Label MonoVersionLabel;
|
||||
private System.Windows.Forms.LinkLabel CheckUpdateLink;
|
||||
private System.Windows.Forms.GroupBox OptionalGroupBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox OptionalNameBox;
|
||||
private System.Windows.Forms.TextBox OptionalEmailBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox OptionalOrganizationBox;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox OptionalHomePageBox;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox OptionalCommentsBox;
|
||||
}
|
||||
}
|
138
MainForm.cs
138
MainForm.cs
|
@ -14,6 +14,8 @@ namespace MoMA
|
|||
public partial class MainForm : Form
|
||||
{
|
||||
private WizardStep current_step;
|
||||
private string loaded_definitions;
|
||||
private AssemblyAnalyzer aa;
|
||||
|
||||
public MainForm ()
|
||||
{
|
||||
|
@ -21,6 +23,8 @@ namespace MoMA
|
|||
|
||||
ResetForm ();
|
||||
SetupForm (WizardStep.Introduction);
|
||||
SetupMonoVersion ();
|
||||
aa = new AssemblyAnalyzer ();
|
||||
}
|
||||
|
||||
private void ResetForm ()
|
||||
|
@ -32,6 +36,9 @@ namespace MoMA
|
|||
AssemblyRemoveButton.Visible = false;
|
||||
AssemblyLabel.Visible = false;
|
||||
AssemblyInstructions.Visible = false;
|
||||
CheckUpdateLink.Visible = false;
|
||||
MonoVersionCombo.Visible = false;
|
||||
MonoVersionLabel.Visible = false;
|
||||
|
||||
AnalysisResultsLabel.Visible = false;
|
||||
MonoTodoResultsImage.Visible = false;
|
||||
|
@ -49,6 +56,7 @@ namespace MoMA
|
|||
SubmitLabel.Visible = false;
|
||||
SubmitReportButton.Visible = false;
|
||||
ViewReportButton.Visible = false;
|
||||
OptionalGroupBox.Visible = false;
|
||||
}
|
||||
|
||||
private void SetupForm (WizardStep step)
|
||||
|
@ -63,6 +71,9 @@ namespace MoMA
|
|||
AssemblyRemoveButton.Visible = true;
|
||||
AssemblyLabel.Visible = true;
|
||||
AssemblyInstructions.Visible = true;
|
||||
CheckUpdateLink.Visible = true;
|
||||
MonoVersionCombo.Visible = true;
|
||||
MonoVersionLabel.Visible = true;
|
||||
break;
|
||||
case WizardStep.ViewResults:
|
||||
AnalysisResultsLabel.Visible = true;
|
||||
|
@ -85,6 +96,8 @@ namespace MoMA
|
|||
SubmitReportButton.Visible = true;
|
||||
ViewReportButton.Visible = true;
|
||||
NextButton.Text = "Close";
|
||||
OptionalGroupBox.Visible = true;
|
||||
OptionalNameBox.Focus ();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -101,11 +114,14 @@ namespace MoMA
|
|||
break;
|
||||
case WizardStep.ChooseAssemblies:
|
||||
VerifyValidAssemblies ();
|
||||
if (AssemblyListView.Items.Count == 0)
|
||||
{
|
||||
if (AssemblyListView.Items.Count == 0) {
|
||||
MessageBox.Show ("Please choose at least one assembly to analyze.");
|
||||
return;
|
||||
}
|
||||
if (MonoVersionCombo.Items.Count == 0) {
|
||||
MessageBox.Show ("No definition files could be found. Please try to download the latest definition file.");
|
||||
return;
|
||||
}
|
||||
AnalyzeAssemblies ();
|
||||
ResetForm ();
|
||||
SetupForm (WizardStep.ViewResults);
|
||||
|
@ -118,10 +134,10 @@ namespace MoMA
|
|||
Application.Exit ();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
BackButton.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
private void BackButton_Click (object sender, EventArgs e)
|
||||
{
|
||||
switch (current_step) {
|
||||
|
@ -153,24 +169,37 @@ namespace MoMA
|
|||
|
||||
if (ofd.ShowDialog () == DialogResult.OK) {
|
||||
foreach (string s in ofd.FileNames) {
|
||||
ListViewItem lvi = new ListViewItem (System.IO.Path.GetFileName (s));
|
||||
lvi.Tag = s;
|
||||
if (!ListContainsAssembly (System.IO.Path.GetFileName (s))) {
|
||||
ListViewItem lvi = new ListViewItem (System.IO.Path.GetFileName (s));
|
||||
lvi.Tag = s;
|
||||
|
||||
AssemblyListView.Items.Add (lvi);
|
||||
AssemblyListView.Items.Add (lvi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool ListContainsAssembly (string file)
|
||||
{
|
||||
foreach (ListViewItem lvi in AssemblyListView.Items)
|
||||
if (lvi.Text == file)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void AssemblyRemoveButton_Click (object sender, EventArgs e)
|
||||
{
|
||||
if (AssemblyListView.SelectedItems.Count > 0)
|
||||
AssemblyListView.Items.Remove (AssemblyListView.SelectedItems[0]);
|
||||
if (AssemblyListView.SelectedItems.Count > 0) {
|
||||
ListView.SelectedListViewItemCollection list = AssemblyListView.SelectedItems;
|
||||
|
||||
foreach (ListViewItem lvi in list)
|
||||
AssemblyListView.Items.Remove (lvi);
|
||||
}
|
||||
}
|
||||
|
||||
private void AnalyzeAssemblies ()
|
||||
{
|
||||
AssemblyAnalyzer aa = new AssemblyAnalyzer ();
|
||||
|
||||
// Keep total counts for all assemblies for summary screen
|
||||
int monotodocount = 0;
|
||||
int notimplementedcount = 0;
|
||||
|
@ -180,52 +209,60 @@ namespace MoMA
|
|||
string todo_defs = Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "monotodo.txt");
|
||||
string nie_defs = Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "exception.txt");
|
||||
string missing_defs = Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "missing.txt");
|
||||
|
||||
|
||||
// Load the definition files
|
||||
aa.LoadDefinitions (todo_defs, nie_defs, missing_defs);
|
||||
|
||||
FileDefinition definitions = (FileDefinition)MonoVersionCombo.SelectedItem;
|
||||
|
||||
if (definitions.FileName != loaded_definitions) {
|
||||
aa.LoadDefinitions (definitions.FileName);
|
||||
loaded_definitions = definitions.FileName;
|
||||
}
|
||||
|
||||
// Scan user's assemblies for P/Invokes
|
||||
foreach (ListViewItem lvi in AssemblyListView.Items)
|
||||
aa.ScanAssemblyForPInvokes ((string)lvi.Tag);
|
||||
|
||||
|
||||
// Start the results reports
|
||||
if (!Directory.Exists (Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "Reports")))
|
||||
Directory.CreateDirectory (Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "Reports"));
|
||||
|
||||
string output_path = Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "Reports");
|
||||
|
||||
string output_path = Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "Reports");
|
||||
XhtmlTextWriter report = aa.BeginHtmlReport (new FileStream (Path.Combine (output_path, "output.html"), FileMode.Create));
|
||||
StreamWriter submit_report = aa.BeginTextReport (new FileStream (Path.Combine (output_path, "submit.txt"), FileMode.Create));
|
||||
|
||||
|
||||
// Scan user's assemblies for issues
|
||||
foreach (ListViewItem lvi in AssemblyListView.Items)
|
||||
{
|
||||
foreach (ListViewItem lvi in AssemblyListView.Items) {
|
||||
aa.AnalyzeAssembly ((string)lvi.Tag);
|
||||
|
||||
report.WriteFullBeginTag ("h2");
|
||||
report.WriteEncodedText (Path.GetFileName ((string)lvi.Tag));
|
||||
report.WriteEndTag ("h2");
|
||||
|
||||
|
||||
aa.AddResultsToHtmlReport (report);
|
||||
aa.AddResultsToTextReport (submit_report);
|
||||
|
||||
|
||||
monotodocount += aa.MonoTodoResults.Count;
|
||||
notimplementedcount += aa.NotImplementedExceptionResults.Count;
|
||||
pinvokecount += aa.PInvokeResults.Count;
|
||||
missingcount += aa.MissingMethodResults.Count;
|
||||
|
||||
|
||||
aa.MissingMethodResults.Clear ();
|
||||
aa.MonoTodoResults.Clear ();
|
||||
aa.NotImplementedExceptionResults.Clear ();
|
||||
aa.NotImplementedExceptionResults.Clear ();
|
||||
aa.PInvokeResults.Clear ();
|
||||
}
|
||||
|
||||
|
||||
// Finish up the reports
|
||||
aa.FinishHtmlReport (report);
|
||||
|
||||
if (monotodocount + notimplementedcount + pinvokecount + missingcount == 0)
|
||||
submit_report.WriteLine ("No Issues Found!");
|
||||
|
||||
aa.FinishTextReport (submit_report);
|
||||
|
||||
// Update the summary screen
|
||||
UpdateResultsSummary (monotodocount, notimplementedcount, pinvokecount, missingcount);
|
||||
|
||||
|
||||
// Enable the report submission button
|
||||
SubmitReportButton.Enabled = true;
|
||||
}
|
||||
|
@ -296,11 +333,22 @@ namespace MoMA
|
|||
SubmitReportButton.Enabled = false;
|
||||
string output_path = Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "Reports");
|
||||
string file = Path.Combine (output_path, "submit.txt");
|
||||
|
||||
OptionalInformation optional = new OptionalInformation (file);
|
||||
optional.ShowDialog ();
|
||||
|
||||
try {
|
||||
using (StreamReader sr = new StreamReader (file)) {
|
||||
string results = sr.ReadToEnd ();
|
||||
|
||||
if (AssemblyAnalyzer.SubmitResults (results, (MonoVersionCombo.Items[0] as FileDefinition).Version, OptionalNameBox.Text, OptionalEmailBox.Text, OptionalOrganizationBox.Text, OptionalHomePageBox.Text, OptionalCommentsBox.Text))
|
||||
MessageBox.Show ("Results successfully submitted. Thanks!");
|
||||
else
|
||||
MessageBox.Show ("Result submission failed. Please try again later.");
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
MessageBox.Show ("Result submission failed (Exception={0}).", ex.GetType ().ToString ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void VerifyValidAssemblies ()
|
||||
{
|
||||
List<ListViewItem> invalid_assemblies = new List<ListViewItem> ();
|
||||
|
@ -311,14 +359,38 @@ namespace MoMA
|
|||
|
||||
string msg = "The following are not valid .Net assemblies and will not be scanned:\n";
|
||||
|
||||
foreach (ListViewItem lvi in invalid_assemblies)
|
||||
{
|
||||
foreach (ListViewItem lvi in invalid_assemblies) {
|
||||
msg += string.Format ("{0}\n", lvi.Text);
|
||||
AssemblyListView.Items.Remove (lvi);
|
||||
}
|
||||
|
||||
|
||||
if (invalid_assemblies.Count > 0)
|
||||
MessageBox.Show (msg);
|
||||
}
|
||||
|
||||
private void SetupMonoVersion ()
|
||||
{
|
||||
MonoVersionCombo.Items.Clear ();
|
||||
|
||||
foreach (FileDefinition fd in DefinitionHandler.FindAvailableVersions (Path.Combine (Path.GetDirectoryName (Application.ExecutablePath), "Definitions")))
|
||||
MonoVersionCombo.Items.Add (fd);
|
||||
|
||||
if (MonoVersionCombo.Items.Count > 0)
|
||||
MonoVersionCombo.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void CheckUpdateLink_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
FileDefinition fd = DefinitionHandler.CheckLatestVersionFromInternet ();
|
||||
|
||||
if (MonoVersionCombo.Items.Count == 0 || fd.Date > (MonoVersionCombo.Items[0] as FileDefinition).Date) {
|
||||
DefinitionDownloader dd = new DefinitionDownloader ();
|
||||
dd.LoadDefinitionFile (fd);
|
||||
if (dd.ShowDialog () == DialogResult.OK)
|
||||
SetupMonoVersion ();
|
||||
}
|
||||
else
|
||||
MessageBox.Show (string.Format("You have the most recent version: {0}", fd.Version));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,9 +129,7 @@ Good luck!</value>
|
|||
<data name="SubmitInstructions.Text" xml:space="preserve">
|
||||
<value>Want to help out the Mono project? Please submit your results to the Mono team so they can prioritize their efforts based on what functionality people need most.
|
||||
|
||||
The following report has been prepared. It doesn't contain any information about your assemblies, just which incomplete methods it calls in Mono and which P/Invokes it uses. (You can view the report before sending as well.)
|
||||
|
||||
This information is invaluable to the Mono team to find which areas are missing that are needed by real-world applications.</value>
|
||||
The following report has been prepared. It doesn't contain any information about your assemblies, just which incomplete methods it calls in Mono and which P/Invokes it uses. (You can view the report before sending as well.)</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
@ -359,6 +357,28 @@ This information is invaluable to the Mono team to find which areas are missing
|
|||
UvkVJ0CAAAECBCoKCFgVp6onAgQIECBAIFVAwErlV5wAAQIECBCoKCBgVZyqnggQIECAAIFUAQErlV9x
|
||||
AgQIECBAoKKAgFVxqnoiQIAAAQIEUgUErFR+xQkQIECAAIGKAgJWxanqiQABAgQIEEgV+H9EU3Emz24k
|
||||
HgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAIAEBAQAAAAAAAoAQAAJgAAACAgEAAAAAAA6AIAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAIAA
|
||||
AAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
|
||||
AAAA//8A/wAAAP8A/wD//wAA////AP/3AAAAAHcA//8AAAB4/wD///AAf///cP//+I////dw////////
|
||||
ePD///////j/8P/////////w/////////4D/////////cP////////hwcHeP//////BwB///////8HAP
|
||||
//////9wcAj//////wBwAHd4/4dwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAA
|
||||
AAAAAAAAEAAAABAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD/
|
||||
/wD/AAAA/wD/AP//AAD///8A////////////////////////////////////////////////////////
|
||||
//////////////////////////////////f39/h49/f4eP/////////wgICAcIDwgHCP////////8HBw
|
||||
cIBwcHCAj/////////d3d/cH93f3B4///////////////////////////////3AAAAAAAAAAj///////
|
||||
///3AAAAAHcAAH///////////wAAAHj/AAB////////////wAH///3AAf///////////+I////dwAH//
|
||||
//////////////948AB////////////////4//AAf//////////////////wAH//////////////////
|
||||
gAB//////////////////3AAf/////////////////hwAH////////9wd4//////8AB/////////cAf/
|
||||
//////AAf////////3AP//////9wAH////////9wCP//////AAB/////////cAB3eP+HcAAAf///////
|
||||
/3AAAAAAAAAAAH/////////wAAAAAAAAAACP////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////8AAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
|
@ -31,9 +31,6 @@ namespace MoMA.Analyzer
|
|||
|
||||
public virtual bool Matches (string method, out Method match)
|
||||
{
|
||||
if (method.Contains ("AddMemoryPressure"))
|
||||
Console.WriteLine (method);
|
||||
|
||||
if (data.ContainsKey (method)) {
|
||||
match = data[method];
|
||||
return true;
|
||||
|
|
|
@ -48,6 +48,21 @@ namespace MoMA.Analyzer
|
|||
pinvoke_results = new List<BaseError> ();
|
||||
}
|
||||
|
||||
public void LoadDefinitions (string definitionBundlePath)
|
||||
{
|
||||
Stream mt;
|
||||
Stream ni;
|
||||
Stream mi;
|
||||
|
||||
DefinitionHandler.GetDefinitionStreamsFromBundle (definitionBundlePath, out mt, out ni, out mi);
|
||||
|
||||
LoadDefinitions (mt, ni, mi);
|
||||
|
||||
mt.Close ();
|
||||
ni.Close ();
|
||||
mi.Close ();
|
||||
}
|
||||
|
||||
public void LoadDefinitions (string monoTodoDefinitions, string notImplementedDefinitions, string missingDefinitions)
|
||||
{
|
||||
Stream mt = new FileStream (monoTodoDefinitions, FileMode.Open);
|
||||
|
@ -91,7 +106,7 @@ namespace MoMA.Analyzer
|
|||
foreach (MethodDefinition method in type.Methods) {
|
||||
if (method.Body != null) {
|
||||
foreach (Instruction i in method.Body.Instructions) {
|
||||
if (i.OpCode == OpCodes.Call || i.OpCode == OpCodes.Callvirt || i.OpCode == OpCodes.Calli || i.OpCode == OpCodes.Ldftn || i.OpCode == OpCodes.Ldvirtftn || i.OpCode == OpCodes.Newobj) {
|
||||
if (i.OpCode == OpCodes.Call || i.OpCode == OpCodes.Callvirt || i.OpCode == OpCodes.Calli || i.OpCode == OpCodes.Ldftn || i.OpCode == OpCodes.Ldvirtftn || i.OpCode == OpCodes.Newobj || i.OpCode == OpCodes.Initobj) {
|
||||
Method match;
|
||||
|
||||
if (mono_todo != null && mono_todo.Matches (i.Operand.ToString (), out match))
|
||||
|
@ -114,7 +129,7 @@ namespace MoMA.Analyzer
|
|||
foreach (MethodDefinition method in type.Constructors) {
|
||||
if (method.Body != null) {
|
||||
foreach (Instruction i in method.Body.Instructions) {
|
||||
if (i.OpCode == OpCodes.Call || i.OpCode == OpCodes.Callvirt || i.OpCode == OpCodes.Calli || i.OpCode == OpCodes.Ldftn || i.OpCode == OpCodes.Ldvirtftn || i.OpCode == OpCodes.Newobj) {
|
||||
if (i.OpCode == OpCodes.Call || i.OpCode == OpCodes.Callvirt || i.OpCode == OpCodes.Calli || i.OpCode == OpCodes.Ldftn || i.OpCode == OpCodes.Ldvirtftn || i.OpCode == OpCodes.Newobj || i.OpCode == OpCodes.Initobj) {
|
||||
Method match;
|
||||
|
||||
if (mono_todo != null && mono_todo.Matches (i.Operand.ToString (), out match))
|
||||
|
@ -193,10 +208,10 @@ namespace MoMA.Analyzer
|
|||
|
||||
public void AddResultsToTextReport (StreamWriter writer)
|
||||
{
|
||||
OutputTextResults (writer, "Methods missing from Mono", missing_results);
|
||||
OutputTextResults (writer, "P/Invokes into native code", pinvoke_results);
|
||||
OutputTextResults (writer, "Methods called that throw NotImplementedException", not_implemented_results);
|
||||
OutputTextResults (writer, "Methods called marked with [MonoTodo]", mono_todo_results);
|
||||
OutputTextResults (writer, "[MISS]", missing_results);
|
||||
OutputTextResults (writer, "[PINV]", pinvoke_results);
|
||||
OutputTextResults (writer, "[NIEX]", not_implemented_results);
|
||||
OutputTextResults (writer, "[TODO]", mono_todo_results);
|
||||
}
|
||||
|
||||
private void OutputHtmlResults (XhtmlTextWriter writer, string heading, List<BaseError> results, params string[] tableHeaders)
|
||||
|
@ -258,10 +273,10 @@ namespace MoMA.Analyzer
|
|||
if (results.Count == 0)
|
||||
return;
|
||||
|
||||
writer.WriteLine ("[{0}]", heading);
|
||||
|
||||
foreach (BaseError be in results)
|
||||
foreach (BaseError be in results) {
|
||||
writer.Write ("{0} ", heading);
|
||||
be.WriteText (writer);
|
||||
}
|
||||
}
|
||||
|
||||
public void FinishHtmlReport (XhtmlTextWriter writer)
|
||||
|
@ -305,9 +320,33 @@ namespace MoMA.Analyzer
|
|||
AssemblyFactory.GetAssembly (assembly);
|
||||
return true;
|
||||
}
|
||||
catch (Mono.Cecil.Binary.ImageFormatException ex) {
|
||||
catch (Mono.Cecil.Binary.ImageFormatException) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// results and version are required, the rest is optional
|
||||
// returns true if the results were successfully submitted, false if they weren't
|
||||
// however you must catch Exceptions for things like network failure, etc.
|
||||
public static bool SubmitResults (string results, string version, string name, string email, string organization, string homepage, string comments)
|
||||
{
|
||||
if (string.IsNullOrEmpty(results) || string.IsNullOrEmpty(version))
|
||||
throw new ArgumentException ("You must fill in results and version");
|
||||
|
||||
MoMAWebService.MoMASubmit ws = new MoMAWebService.MoMASubmit ();
|
||||
|
||||
string extra = String.Format (
|
||||
"@Definitions: {0}\n" +
|
||||
"@Name: {1}\n" +
|
||||
"@Email: {2}\n" +
|
||||
"@Organization: {3}\n" +
|
||||
"@HomePage: {4}\n" +
|
||||
"@Comments: {5}\n{6}", version,
|
||||
name, email, organization, homepage,
|
||||
comments.Replace ('\n', ' ').Replace ('\r', ' '),
|
||||
results);
|
||||
|
||||
return ws.SubmitResults (extra);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,17 +28,26 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files\Mono-1.2\lib\mono\2.0\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil, Version=0.4.3.1, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Cecil\gendarme\console\bin\Release\Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Analysis\BaseChecker.cs" />
|
||||
<Compile Include="AssemblyAnalyzer.cs" />
|
||||
<Compile Include="Definitions\FileDefinition.cs" />
|
||||
<Compile Include="Definitions\DefinitionHandler.cs" />
|
||||
<Compile Include="Results\BaseError.cs" />
|
||||
<Compile Include="Analysis\CheckMonoTodo.cs" />
|
||||
<Compile Include="Analysis\CheckPInvokes.cs" />
|
||||
|
@ -49,6 +58,37 @@
|
|||
<Compile Include="Results\NotImplementedExceptionError.cs" />
|
||||
<Compile Include="Results\PInvokeError.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Web References\MoMAWebService\Reference.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferences Include="Web References\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferenceUrl Include="http://www.go-mono.com/moma/MoMASubmit.asmx">
|
||||
<UrlBehavior>Static</UrlBehavior>
|
||||
<RelPath>Web References\MoMAWebService\</RelPath>
|
||||
<UpdateFromURL>http://www.go-mono.com/moma/MoMASubmit.asmx</UpdateFromURL>
|
||||
<ServiceLocationURL>
|
||||
</ServiceLocationURL>
|
||||
<CachedDynamicPropName>
|
||||
</CachedDynamicPropName>
|
||||
<CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
|
||||
<CachedSettingsPropName>MoMA_Analyzer_MoMAWebService_MoMASubmit</CachedSettingsPropName>
|
||||
</WebReferenceUrl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Web References\MoMAWebService\MoMASubmit.wsdl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Web References\MoMAWebService\MoMASubmit.disco" />
|
||||
<None Include="Web References\MoMAWebService\Reference.map">
|
||||
<Generator>MSDiscoCodeGenerator</Generator>
|
||||
<LastGenOutput>Reference.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
|
|
@ -16,7 +16,18 @@
|
|||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetLatestDefinitionsVersion">
|
||||
<xs:complexType />
|
||||
</xs:element>
|
||||
<xs:element name="GetLatestDefinitionsVersionResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="GetLatestDefinitionsVersionResult" type="xs:string" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="boolean" type="xs:boolean" />
|
||||
<xs:element name="string" type="xs:string" />
|
||||
</s:schema>
|
||||
</types>
|
||||
<message name="SubmitResultsSoapIn">
|
||||
|
@ -25,18 +36,32 @@
|
|||
<message name="SubmitResultsSoapOut">
|
||||
<part name="parameters" element="s0:SubmitResultsResponse" />
|
||||
</message>
|
||||
<message name="GetLatestDefinitionsVersionSoapIn">
|
||||
<part name="parameters" element="s0:GetLatestDefinitionsVersion" />
|
||||
</message>
|
||||
<message name="GetLatestDefinitionsVersionSoapOut">
|
||||
<part name="parameters" element="s0:GetLatestDefinitionsVersionResponse" />
|
||||
</message>
|
||||
<message name="SubmitResultsHttpGetIn">
|
||||
<part name="results" type="s:string" />
|
||||
</message>
|
||||
<message name="SubmitResultsHttpGetOut">
|
||||
<part name="Body" element="s0:boolean" />
|
||||
</message>
|
||||
<message name="GetLatestDefinitionsVersionHttpGetIn" />
|
||||
<message name="GetLatestDefinitionsVersionHttpGetOut">
|
||||
<part name="Body" element="s0:string" />
|
||||
</message>
|
||||
<message name="SubmitResultsHttpPostIn">
|
||||
<part name="results" type="s:string" />
|
||||
</message>
|
||||
<message name="SubmitResultsHttpPostOut">
|
||||
<part name="Body" element="s0:boolean" />
|
||||
</message>
|
||||
<message name="GetLatestDefinitionsVersionHttpPostIn" />
|
||||
<message name="GetLatestDefinitionsVersionHttpPostOut">
|
||||
<part name="Body" element="s0:string" />
|
||||
</message>
|
||||
<portType name="MoMASubmitSoap">
|
||||
<operation name="SubmitResults">
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
|
@ -46,6 +71,14 @@
|
|||
<input message="s0:SubmitResultsSoapIn" />
|
||||
<output message="s0:SubmitResultsSoapOut" />
|
||||
</operation>
|
||||
<operation name="GetLatestDefinitionsVersion">
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
</wsdl:documentation>
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
</wsdl:documentation>
|
||||
<input message="s0:GetLatestDefinitionsVersionSoapIn" />
|
||||
<output message="s0:GetLatestDefinitionsVersionSoapOut" />
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="MoMASubmitHttpGet">
|
||||
<operation name="SubmitResults">
|
||||
|
@ -56,6 +89,14 @@
|
|||
<input message="s0:SubmitResultsHttpGetIn" />
|
||||
<output message="s0:SubmitResultsHttpGetOut" />
|
||||
</operation>
|
||||
<operation name="GetLatestDefinitionsVersion">
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
</wsdl:documentation>
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
</wsdl:documentation>
|
||||
<input message="s0:GetLatestDefinitionsVersionHttpGetIn" />
|
||||
<output message="s0:GetLatestDefinitionsVersionHttpGetOut" />
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="MoMASubmitHttpPost">
|
||||
<operation name="SubmitResults">
|
||||
|
@ -66,6 +107,14 @@
|
|||
<input message="s0:SubmitResultsHttpPostIn" />
|
||||
<output message="s0:SubmitResultsHttpPostOut" />
|
||||
</operation>
|
||||
<operation name="GetLatestDefinitionsVersion">
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
</wsdl:documentation>
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
</wsdl:documentation>
|
||||
<input message="s0:GetLatestDefinitionsVersionHttpPostIn" />
|
||||
<output message="s0:GetLatestDefinitionsVersionHttpPostOut" />
|
||||
</operation>
|
||||
</portType>
|
||||
<binding name="MoMASubmitSoap" type="s0:MoMASubmitSoap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
|
@ -78,6 +127,15 @@
|
|||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="GetLatestDefinitionsVersion">
|
||||
<soap:operation soapAction="http://mono-project.com/MoMASubmit/GetLatestDefinitionsVersion" style="document" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="MoMASubmitHttpGet" type="s0:MoMASubmitHttpGet">
|
||||
<http:binding verb="GET" />
|
||||
|
@ -90,6 +148,15 @@
|
|||
<mime:mimeXml part="Body" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="GetLatestDefinitionsVersion">
|
||||
<http:operation location="/GetLatestDefinitionsVersion" />
|
||||
<input>
|
||||
<http:urlEncoded />
|
||||
</input>
|
||||
<output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="MoMASubmitHttpPost" type="s0:MoMASubmitHttpPost">
|
||||
<http:binding verb="POST" />
|
||||
|
@ -102,6 +169,15 @@
|
|||
<mime:mimeXml part="Body" />
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="GetLatestDefinitionsVersion">
|
||||
<http:operation location="/GetLatestDefinitionsVersion" />
|
||||
<input>
|
||||
<mime:content type="application/x-www-form-urlencoded" />
|
||||
</input>
|
||||
<output>
|
||||
<mime:mimeXml part="Body" />
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="MoMASubmit">
|
||||
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
|
@ -1,150 +1,208 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.42.
|
||||
//
|
||||
#pragma warning disable 1591
|
||||
|
||||
namespace MoMA.MoMAWebServices {
|
||||
using System.Diagnostics;
|
||||
using System.Web.Services;
|
||||
using System.ComponentModel;
|
||||
using System.Web.Services.Protocols;
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Web.Services.WebServiceBindingAttribute(Name="MoMASubmitSoap", Namespace="http://mono-project.com/MoMASubmit/")]
|
||||
public partial class MoMASubmit : System.Web.Services.Protocols.SoapHttpClientProtocol {
|
||||
|
||||
private System.Threading.SendOrPostCallback SubmitResultsOperationCompleted;
|
||||
|
||||
private bool useDefaultCredentialsSetExplicitly;
|
||||
|
||||
/// <remarks/>
|
||||
public MoMASubmit() {
|
||||
this.Url = "http://www.go-mono.com/moma/MoMASubmit.asmx";
|
||||
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
|
||||
this.UseDefaultCredentials = true;
|
||||
this.useDefaultCredentialsSetExplicitly = false;
|
||||
}
|
||||
else {
|
||||
this.useDefaultCredentialsSetExplicitly = true;
|
||||
}
|
||||
}
|
||||
|
||||
public new string Url {
|
||||
get {
|
||||
return base.Url;
|
||||
}
|
||||
set {
|
||||
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
|
||||
&& (this.useDefaultCredentialsSetExplicitly == false))
|
||||
&& (this.IsLocalFileSystemWebService(value) == false))) {
|
||||
base.UseDefaultCredentials = false;
|
||||
}
|
||||
base.Url = value;
|
||||
}
|
||||
}
|
||||
|
||||
public new bool UseDefaultCredentials {
|
||||
get {
|
||||
return base.UseDefaultCredentials;
|
||||
}
|
||||
set {
|
||||
base.UseDefaultCredentials = value;
|
||||
this.useDefaultCredentialsSetExplicitly = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public event SubmitResultsCompletedEventHandler SubmitResultsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://mono-project.com/MoMASubmit/SubmitResults", RequestNamespace="http://mono-project.com/MoMASubmit/", ResponseNamespace="http://mono-project.com/MoMASubmit/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public bool SubmitResults(string results) {
|
||||
object[] results1 = this.Invoke("SubmitResults", new object[] {
|
||||
results});
|
||||
return ((bool)(results1[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SubmitResultsAsync(string results) {
|
||||
this.SubmitResultsAsync(results, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SubmitResultsAsync(string results, object userState) {
|
||||
if ((this.SubmitResultsOperationCompleted == null)) {
|
||||
this.SubmitResultsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSubmitResultsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SubmitResults", new object[] {
|
||||
results}, this.SubmitResultsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSubmitResultsOperationCompleted(object arg) {
|
||||
if ((this.SubmitResultsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SubmitResultsCompleted(this, new SubmitResultsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState) {
|
||||
base.CancelAsync(userState);
|
||||
}
|
||||
|
||||
private bool IsLocalFileSystemWebService(string url) {
|
||||
if (((url == null)
|
||||
|| (url == string.Empty))) {
|
||||
return false;
|
||||
}
|
||||
System.Uri wsUri = new System.Uri(url);
|
||||
if (((wsUri.Port >= 1024)
|
||||
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
|
||||
public delegate void SubmitResultsCompletedEventHandler(object sender, SubmitResultsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SubmitResultsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SubmitResultsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((bool)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.42.
|
||||
//
|
||||
#pragma warning disable 1591
|
||||
|
||||
namespace MoMA.Analyzer.MoMAWebService {
|
||||
using System.Diagnostics;
|
||||
using System.Web.Services;
|
||||
using System.ComponentModel;
|
||||
using System.Web.Services.Protocols;
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Web.Services.WebServiceBindingAttribute(Name="MoMASubmitSoap", Namespace="http://mono-project.com/MoMASubmit/")]
|
||||
public partial class MoMASubmit : System.Web.Services.Protocols.SoapHttpClientProtocol {
|
||||
|
||||
private System.Threading.SendOrPostCallback SubmitResultsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetLatestDefinitionsVersionOperationCompleted;
|
||||
|
||||
private bool useDefaultCredentialsSetExplicitly;
|
||||
|
||||
/// <remarks/>
|
||||
public MoMASubmit() {
|
||||
this.Url = "http://www.go-mono.com/moma/MoMASubmit.asmx";
|
||||
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
|
||||
this.UseDefaultCredentials = true;
|
||||
this.useDefaultCredentialsSetExplicitly = false;
|
||||
}
|
||||
else {
|
||||
this.useDefaultCredentialsSetExplicitly = true;
|
||||
}
|
||||
}
|
||||
|
||||
public new string Url {
|
||||
get {
|
||||
return base.Url;
|
||||
}
|
||||
set {
|
||||
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
|
||||
&& (this.useDefaultCredentialsSetExplicitly == false))
|
||||
&& (this.IsLocalFileSystemWebService(value) == false))) {
|
||||
base.UseDefaultCredentials = false;
|
||||
}
|
||||
base.Url = value;
|
||||
}
|
||||
}
|
||||
|
||||
public new bool UseDefaultCredentials {
|
||||
get {
|
||||
return base.UseDefaultCredentials;
|
||||
}
|
||||
set {
|
||||
base.UseDefaultCredentials = value;
|
||||
this.useDefaultCredentialsSetExplicitly = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public event SubmitResultsCompletedEventHandler SubmitResultsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetLatestDefinitionsVersionCompletedEventHandler GetLatestDefinitionsVersionCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://mono-project.com/MoMASubmit/SubmitResults", RequestNamespace="http://mono-project.com/MoMASubmit/", ResponseNamespace="http://mono-project.com/MoMASubmit/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public bool SubmitResults(string results) {
|
||||
object[] results1 = this.Invoke("SubmitResults", new object[] {
|
||||
results});
|
||||
return ((bool)(results1[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SubmitResultsAsync(string results) {
|
||||
this.SubmitResultsAsync(results, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SubmitResultsAsync(string results, object userState) {
|
||||
if ((this.SubmitResultsOperationCompleted == null)) {
|
||||
this.SubmitResultsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSubmitResultsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SubmitResults", new object[] {
|
||||
results}, this.SubmitResultsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSubmitResultsOperationCompleted(object arg) {
|
||||
if ((this.SubmitResultsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SubmitResultsCompleted(this, new SubmitResultsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://mono-project.com/MoMASubmit/GetLatestDefinitionsVersion", RequestNamespace="http://mono-project.com/MoMASubmit/", ResponseNamespace="http://mono-project.com/MoMASubmit/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public string GetLatestDefinitionsVersion() {
|
||||
object[] results = this.Invoke("GetLatestDefinitionsVersion", new object[0]);
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetLatestDefinitionsVersionAsync() {
|
||||
this.GetLatestDefinitionsVersionAsync(null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetLatestDefinitionsVersionAsync(object userState) {
|
||||
if ((this.GetLatestDefinitionsVersionOperationCompleted == null)) {
|
||||
this.GetLatestDefinitionsVersionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLatestDefinitionsVersionOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetLatestDefinitionsVersion", new object[0], this.GetLatestDefinitionsVersionOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetLatestDefinitionsVersionOperationCompleted(object arg) {
|
||||
if ((this.GetLatestDefinitionsVersionCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetLatestDefinitionsVersionCompleted(this, new GetLatestDefinitionsVersionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState) {
|
||||
base.CancelAsync(userState);
|
||||
}
|
||||
|
||||
private bool IsLocalFileSystemWebService(string url) {
|
||||
if (((url == null)
|
||||
|| (url == string.Empty))) {
|
||||
return false;
|
||||
}
|
||||
System.Uri wsUri = new System.Uri(url);
|
||||
if (((wsUri.Port >= 1024)
|
||||
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
|
||||
public delegate void SubmitResultsCompletedEventHandler(object sender, SubmitResultsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SubmitResultsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SubmitResultsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((bool)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
|
||||
public delegate void GetLatestDefinitionsVersionCompletedEventHandler(object sender, GetLatestDefinitionsVersionCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetLatestDefinitionsVersionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetLatestDefinitionsVersionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((string)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 1591
|
47
MoMA.csproj
47
MoMA.csproj
|
@ -9,6 +9,7 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MoMA</RootNamespace>
|
||||
<AssemblyName>MoMA</AssemblyName>
|
||||
<ApplicationIcon>mono.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -38,6 +39,12 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DefinitionDownloader.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DefinitionDownloader.Designer.cs">
|
||||
<DependentUpon>DefinitionDownloader.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -46,6 +53,10 @@
|
|||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="DefinitionDownloader.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>DefinitionDownloader.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -60,20 +71,6 @@
|
|||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Web References\MoMAWebServices\Reference.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WizardStep.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -93,29 +90,13 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferences Include="Web References\" />
|
||||
<None Include="TODO" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WebReferenceUrl Include="http://www.go-mono.com/moma/MoMASubmit.asmx">
|
||||
<UrlBehavior>Static</UrlBehavior>
|
||||
<RelPath>Web References\MoMAWebServices\</RelPath>
|
||||
<UpdateFromURL>http://www.go-mono.com/moma/MoMASubmit.asmx</UpdateFromURL>
|
||||
<ServiceLocationURL>
|
||||
</ServiceLocationURL>
|
||||
<CachedDynamicPropName>
|
||||
</CachedDynamicPropName>
|
||||
<CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
|
||||
<CachedSettingsPropName>MoMA_MoMAWebServices_MoMASubmit</CachedSettingsPropName>
|
||||
</WebReferenceUrl>
|
||||
<None Include="Resources\spinner.gif" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Web References\MoMAWebServices\MoMASubmit.disco" />
|
||||
<None Include="Web References\MoMAWebServices\MoMASubmit.wsdl" />
|
||||
<None Include="Web References\MoMAWebServices\Reference.map">
|
||||
<Generator>MSDiscoCodeGenerator</Generator>
|
||||
<LastGenOutput>Reference.cs</LastGenOutput>
|
||||
</None>
|
||||
<Content Include="mono.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
|
5
MoMA.sln
5
MoMA.sln
|
@ -7,6 +7,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoMA.Analyzer", "MoMA.Analy
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoMAExtractor", "MoMAExtractor\MoMAExtractor.csproj", "{64DE84A1-C274-4875-84F2-FCA7B24104D8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EFB1C06D-B954-441C-8720-F4AA9E4C33F6}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
MoMASubmitWebService\MoMASubmit.asmx = MoMASubmitWebService\MoMASubmit.asmx
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
Двоичные данные
MoMA.suo
Двоичные данные
MoMA.suo
Двоичный файл не отображается.
|
@ -1,172 +0,0 @@
|
|||
namespace MoMA
|
||||
{
|
||||
partial class OptionalInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.name = new System.Windows.Forms.TextBox();
|
||||
this.organization = new System.Windows.Forms.TextBox();
|
||||
this.homepage = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.comments = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.email = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 42);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(83, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Optional Name: ";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(9, 94);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(111, 13);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Optional Organization:";
|
||||
//
|
||||
// name
|
||||
//
|
||||
this.name.Location = new System.Drawing.Point(159, 39);
|
||||
this.name.Name = "name";
|
||||
this.name.Size = new System.Drawing.Size(256, 20);
|
||||
this.name.TabIndex = 1;
|
||||
//
|
||||
// organization
|
||||
//
|
||||
this.organization.Location = new System.Drawing.Point(159, 91);
|
||||
this.organization.Name = "organization";
|
||||
this.organization.Size = new System.Drawing.Size(256, 20);
|
||||
this.organization.TabIndex = 4;
|
||||
//
|
||||
// homepage
|
||||
//
|
||||
this.homepage.Location = new System.Drawing.Point(159, 117);
|
||||
this.homepage.Name = "homepage";
|
||||
this.homepage.Size = new System.Drawing.Size(256, 20);
|
||||
this.homepage.TabIndex = 6;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(9, 120);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(144, 13);
|
||||
this.label4.TabIndex = 5;
|
||||
this.label4.Text = "Optional Project Home Page:";
|
||||
//
|
||||
// comments
|
||||
//
|
||||
this.comments.Location = new System.Drawing.Point(28, 179);
|
||||
this.comments.Multiline = true;
|
||||
this.comments.Name = "comments";
|
||||
this.comments.Size = new System.Drawing.Size(387, 213);
|
||||
this.comments.TabIndex = 7;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 163);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(148, 13);
|
||||
this.label1.TabIndex = 8;
|
||||
this.label1.Text = "Comments for the Mono team:";
|
||||
//
|
||||
// email
|
||||
//
|
||||
this.email.Location = new System.Drawing.Point(159, 65);
|
||||
this.email.Name = "email";
|
||||
this.email.Size = new System.Drawing.Size(256, 20);
|
||||
this.email.TabIndex = 2;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(9, 68);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(122, 13);
|
||||
this.label5.TabIndex = 9;
|
||||
this.label5.Text = "Optional E-Mail Address:";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(301, 423);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(114, 23);
|
||||
this.button1.TabIndex = 11;
|
||||
this.button1.Text = "Send Feedback";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// OptionalInformation
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(427, 462);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.email);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.comments);
|
||||
this.Controls.Add(this.homepage);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.organization);
|
||||
this.Controls.Add(this.name);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Name = "OptionalInformation";
|
||||
this.Text = "OptionalInformation";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox name;
|
||||
private System.Windows.Forms.TextBox organization;
|
||||
private System.Windows.Forms.TextBox homepage;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox comments;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox email;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
namespace MoMA
|
||||
{
|
||||
public partial class OptionalInformation : Form
|
||||
{
|
||||
string file;
|
||||
|
||||
public OptionalInformation(string file)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (StreamReader sr = new StreamReader (file)){
|
||||
string results = sr.ReadToEnd ();
|
||||
|
||||
MoMAWebServices.MoMASubmit ws = new MoMA.MoMAWebServices.MoMASubmit ();
|
||||
|
||||
try {
|
||||
string extra = String.Format (
|
||||
"@Name: {0}\n" +
|
||||
"@Email: {1}\n" +
|
||||
"@Organization: {2}\n" +
|
||||
"@HomePage: {3}\n" +
|
||||
"@Comments: {4}\n{5}",
|
||||
name.Text, email.Text, organization.Text, homepage.Text,
|
||||
comments.Text.Replace ('\n', ' ').Replace ('\r', ' '),
|
||||
results);
|
||||
|
||||
if (ws.SubmitResults (extra))
|
||||
MessageBox.Show ("Results successfully submitted. Thanks!");
|
||||
else
|
||||
MessageBox.Show ("Result submission failed. Please try again later.");
|
||||
} catch (Exception ex) {
|
||||
MessageBox.Show ("Result submission failed (Exception={0}).", ex.GetType().ToString());
|
||||
}
|
||||
}
|
||||
Close ();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -101,5 +101,12 @@ namespace MoMA.Properties {
|
|||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap spinner {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("spinner", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,6 +118,9 @@
|
|||
<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="monoback" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\monoback.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="monkey" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\monkey.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -133,7 +136,7 @@
|
|||
<data name="list-add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\list-add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="monoback" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\monoback.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="spinner" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\spinner.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,36 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoMA.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("http://jpobst.com/pobst/moma/MoMASubmit.asmx")]
|
||||
public string MoMA_MoMAWebServices_MoMASubmit {
|
||||
get {
|
||||
return ((string)(this["MoMA_MoMAWebServices_MoMASubmit"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="MoMA.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="MoMA_MoMAWebServices_MoMASubmit" Type="(Web Service URL)" Scope="Application">
|
||||
<Value Profile="(Default)">http://jpobst.com/pobst/moma/MoMASubmit.asmx</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 2.0 KiB |
23
TODO
23
TODO
|
@ -1,18 +1,7 @@
|
|||
- If you scan something, go back, and scan again, MoMA will reload
|
||||
all the definition files. This could/should be eliminated.
|
||||
|
||||
- Miguel suggested being able to scan your assembly against a live
|
||||
Mono install, to see how well your app would run against, say,
|
||||
SLED 10.
|
||||
|
||||
- The definition files should be packed into a zip file, with a data
|
||||
file that tells its creation date and the mono version it scans
|
||||
against, like "Mono 1.2" or "Mono SVN Head: 10/15/2006".
|
||||
|
||||
- Once definition files are in zipped bundles, allow the user to have
|
||||
multiple ones installed, and provide a combobox to allow them to
|
||||
choose which one to scan against.
|
||||
|
||||
- Sebastien suggested using the size of the method body to determine
|
||||
if a NotImplementedException is the only thing in the method, or if
|
||||
it only throws occasionally. Something to consider if we get reports
|
||||
|
@ -25,15 +14,5 @@
|
|||
|
||||
- We do not currently handle MonoTODO's list on types, only methods.
|
||||
|
||||
- Add the Mono version we scanned against to the submission report.
|
||||
|
||||
- Optional comment box for submitted results.
|
||||
|
||||
- Don't let them add same assembly twice to scan list.
|
||||
|
||||
- Add initobj to calls.
|
||||
|
||||
- Remove jpobst.com from app.config.
|
||||
|
||||
- Look at ComImportAttribute on classes. COM Interop is obviously a valid
|
||||
"issue".
|
||||
"issue".
|
||||
|
|
15
app.config
15
app.config
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="MoMA.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<applicationSettings>
|
||||
<MoMA.Properties.Settings>
|
||||
<setting name="MoMA_MoMAWebServices_MoMASubmit" serializeAs="String">
|
||||
<value>http://jpobst.com/pobst/moma/MoMASubmit.asmx</value>
|
||||
</setting>
|
||||
</MoMA.Properties.Settings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.1 KiB |
Загрузка…
Ссылка в новой задаче