diff --git a/Ookii.Dialogs.Wpf.Sample/App.xaml b/Ookii.Dialogs.Wpf.Sample/App.xaml
deleted file mode 100644
index 9193831..0000000
--- a/Ookii.Dialogs.Wpf.Sample/App.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/Ookii.Dialogs.Wpf.Sample/App.xaml.cs b/Ookii.Dialogs.Wpf.Sample/App.xaml.cs
deleted file mode 100644
index d6c58ad..0000000
--- a/Ookii.Dialogs.Wpf.Sample/App.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Windows;
-
-namespace Ookii.Dialogs.Wpf.Sample
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/Ookii.Dialogs.Wpf.Sample/MainWindow.xaml b/Ookii.Dialogs.Wpf.Sample/MainWindow.xaml
deleted file mode 100644
index 84fdc7a..0000000
--- a/Ookii.Dialogs.Wpf.Sample/MainWindow.xaml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Task Dialog
- Task Dialog with command links
- Progress Dialog
- Credential Dialog
- Vista-style Folder Browser Dialog
- Vista-style Open File Dialog
- Vista-style Save File Dialog
-
-
-
-
-
diff --git a/Ookii.Dialogs.Wpf.Sample/MainWindow.xaml.cs b/Ookii.Dialogs.Wpf.Sample/MainWindow.xaml.cs
deleted file mode 100644
index b6f4e92..0000000
--- a/Ookii.Dialogs.Wpf.Sample/MainWindow.xaml.cs
+++ /dev/null
@@ -1,215 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Threading;
-using System.ComponentModel;
-
-namespace Ookii.Dialogs.Wpf.Sample
-{
- ///
- /// Interaction logic for Window1.xaml
- ///
- public partial class MainWindow : Window
- {
- private ProgressDialog _sampleProgressDialog = new ProgressDialog()
- {
- WindowTitle = "Progress dialog sample",
- Text = "This is a sample progress dialog...",
- Description = "Processing...",
- ShowTimeRemaining = true,
- };
-
- public MainWindow()
- {
- InitializeComponent();
-
- _sampleProgressDialog.DoWork += new System.ComponentModel.DoWorkEventHandler(_sampleProgressDialog_DoWork);
- }
-
-
- private void _showDialogButton_Click(object sender, RoutedEventArgs e)
- {
- switch( _dialogComboBox.SelectedIndex )
- {
- case 0:
- ShowTaskDialog();
- break;
- case 1:
- ShowTaskDialogWithCommandLinks();
- break;
- case 2:
- ShowProgressDialog();
- break;
- case 3:
- ShowCredentialDialog();
- break;
- case 4:
- ShowFolderBrowserDialog();
- break;
- case 5:
- ShowOpenFileDialog();
- break;
- case 6:
- ShowSaveFileDialog();
- break;
- }
- }
-
- private void ShowTaskDialog()
- {
- if( TaskDialog.OSSupportsTaskDialogs )
- {
- using( TaskDialog dialog = new TaskDialog() )
- {
- dialog.WindowTitle = "Task dialog sample";
- dialog.MainInstruction = "This is an example task dialog.";
- dialog.Content = "Task dialogs are a more flexible type of message box. Among other things, task dialogs support custom buttons, command links, scroll bars, expandable sections, radio buttons, a check box (useful for e.g. \"don't show this again\"), custom icons, and a footer. Some of those things are demonstrated here.";
- dialog.ExpandedInformation = "Ookii.org's Task Dialog doesn't just provide a wrapper for the native Task Dialog API; it is designed to provide a programming interface that is natural to .Net developers.";
- dialog.Footer = "Task Dialogs support footers and can even include hyperlinks.";
- dialog.FooterIcon = TaskDialogIcon.Information;
- dialog.EnableHyperlinks = true;
- TaskDialogButton customButton = new TaskDialogButton("A custom button");
- TaskDialogButton okButton = new TaskDialogButton(ButtonType.Ok);
- TaskDialogButton cancelButton = new TaskDialogButton(ButtonType.Cancel);
- dialog.Buttons.Add(customButton);
- dialog.Buttons.Add(okButton);
- dialog.Buttons.Add(cancelButton);
- dialog.HyperlinkClicked += new EventHandler(TaskDialog_HyperLinkClicked);
- TaskDialogButton button = dialog.ShowDialog(this);
- if( button == customButton )
- MessageBox.Show(this, "You clicked the custom button", "Task Dialog Sample");
- else if( button == okButton )
- MessageBox.Show(this, "You clicked the OK button.", "Task Dialog Sample");
- }
- }
- else
- {
- MessageBox.Show(this, "This operating system does not support task dialogs.", "Task Dialog Sample");
- }
- }
-
- private void ShowTaskDialogWithCommandLinks()
- {
- if( TaskDialog.OSSupportsTaskDialogs )
- {
- using( TaskDialog dialog = new TaskDialog() )
- {
- dialog.WindowTitle = "Task dialog sample";
- dialog.MainInstruction = "This is a sample task dialog with command links.";
- dialog.Content = "Besides regular buttons, task dialogs also support command links. Only custom buttons are shown as command links; standard buttons remain regular buttons.";
- dialog.ButtonStyle = TaskDialogButtonStyle.CommandLinks;
- TaskDialogButton elevatedButton = new TaskDialogButton("An action requiring elevation");
- elevatedButton.CommandLinkNote = "Both regular buttons and command links can show the shield icon to indicate that the action they perform requires elevation. It is up to the application to actually perform the elevation.";
- elevatedButton.ElevationRequired = true;
- TaskDialogButton otherButton = new TaskDialogButton("Some other action");
- TaskDialogButton cancelButton = new TaskDialogButton(ButtonType.Cancel);
- dialog.Buttons.Add(elevatedButton);
- dialog.Buttons.Add(otherButton);
- dialog.Buttons.Add(cancelButton);
- dialog.ShowDialog(this);
- }
- }
- else
- {
- MessageBox.Show(this, "This operating system does not support task dialogs.", "Task Dialog Sample");
- }
- }
-
- private void ShowProgressDialog()
- {
- if( _sampleProgressDialog.IsBusy )
- MessageBox.Show(this, "The progress dialog is already displayed.", "Progress dialog sample");
- else
- _sampleProgressDialog.Show(); // Show a modeless dialog; this is the recommended mode of operation for a progress dialog.
- }
-
- private void ShowCredentialDialog()
- {
- using( CredentialDialog dialog = new CredentialDialog() )
- {
- // The window title will not be used on Vista and later; there the title will always be "Windows Security".
- dialog.WindowTitle = "Credential dialog sample";
- dialog.MainInstruction = "Please enter your username and password.";
- dialog.Content = "Since this is a sample the credentials won't be used for anything, so you can enter anything you like.";
- dialog.ShowSaveCheckBox = true;
- dialog.ShowUIForSavedCredentials = true;
- // The target is the key under which the credentials will be stored.
- // It is recommended to set the target to something following the "Company_Application_Server" pattern.
- // Targets are per user, not per application, so using such a pattern will ensure uniqueness.
- dialog.Target = "Ookii_DialogsWpfSample_www.example.com";
- if( dialog.ShowDialog(this) )
- {
- MessageBox.Show(this, string.Format("You entered the following information:\nUser name: {0}\nPassword: {1}", dialog.Credentials.UserName, dialog.Credentials.Password), "Credential dialog sample");
- // Normally, you should verify if the credentials are correct before calling ConfirmCredentials.
- // ConfirmCredentials will save the credentials if and only if the user checked the save checkbox.
- dialog.ConfirmCredentials(true);
- }
- }
- }
-
- private void ShowFolderBrowserDialog()
- {
- VistaFolderBrowserDialog dialog = new VistaFolderBrowserDialog();
- dialog.Description = "Please select a folder.";
- dialog.UseDescriptionForTitle = true; // This applies to the Vista style dialog only, not the old dialog.
- if( !VistaFolderBrowserDialog.IsVistaFolderDialogSupported )
- MessageBox.Show(this, "Because you are not using Windows Vista or later, the regular folder browser dialog will be used. Please use Windows Vista to see the new dialog.", "Sample folder browser dialog");
- if( (bool)dialog.ShowDialog(this) )
- MessageBox.Show(this, "The selected folder was: " + dialog.SelectedPath, "Sample folder browser dialog");
- }
-
- private void ShowOpenFileDialog()
- {
- // As of .Net 3.5 SP1, WPF's Microsoft.Win32.OpenFileDialog class still uses the old style
- VistaOpenFileDialog dialog = new VistaOpenFileDialog();
- dialog.Filter = "All files (*.*)|*.*";
- if( !VistaFileDialog.IsVistaFileDialogSupported )
- MessageBox.Show(this, "Because you are not using Windows Vista or later, the regular open file dialog will be used. Please use Windows Vista to see the new dialog.", "Sample open file dialog");
- if( (bool)dialog.ShowDialog(this) )
- MessageBox.Show(this, "The selected file was: " + dialog.FileName, "Sample open file dialog");
- }
-
- private void ShowSaveFileDialog()
- {
- VistaSaveFileDialog dialog = new VistaSaveFileDialog();
- dialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
- dialog.DefaultExt = "txt";
- // As of .Net 3.5 SP1, WPF's Microsoft.Win32.SaveFileDialog class still uses the old style
- if( !VistaFileDialog.IsVistaFileDialogSupported )
- MessageBox.Show(this, "Because you are not using Windows Vista or later, the regular save file dialog will be used. Please use Windows Vista to see the new dialog.", "Sample save file dialog");
- if( (bool)dialog.ShowDialog(this) )
- MessageBox.Show(this, "The selected file was: " + dialog.FileName, "Sample save file dialog");
- }
-
- private void TaskDialog_HyperLinkClicked(object sender, HyperlinkClickedEventArgs e)
- {
- System.Diagnostics.Process.Start(e.Href);
- }
-
- private void _sampleProgressDialog_DoWork(object sender, DoWorkEventArgs e)
- {
- // Implement the operation that the progress bar is showing progress of here, same as you would do with a background worker.
- for( int x = 0; x <= 100; ++x )
- {
- Thread.Sleep(500);
- // Periodically check CancellationPending and abort the operation if required.
- if( _sampleProgressDialog.CancellationPending )
- return;
- // ReportProgress can also modify the main text and description; pass null to leave them unchanged.
- // If _sampleProgressDialog.ShowTimeRemaining is set to true, the time will automatically be calculated based on
- // the frequency of the calls to ReportProgress.
- _sampleProgressDialog.ReportProgress(x, null, string.Format(System.Globalization.CultureInfo.CurrentCulture, "Processing: {0}%", x));
- }
- }
- }
-}
diff --git a/Ookii.Dialogs.Wpf.Sample/Ookii.Dialogs.Wpf.Sample.csproj b/Ookii.Dialogs.Wpf.Sample/Ookii.Dialogs.Wpf.Sample.csproj
deleted file mode 100644
index d5fc290..0000000
--- a/Ookii.Dialogs.Wpf.Sample/Ookii.Dialogs.Wpf.Sample.csproj
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {E38181B2-E8E5-466D-9099-33FE75B4CFA1}
- WinExe
- Properties
- Ookii.Dialogs.Wpf.Sample
- Ookii.Dialogs.Wpf.Sample
- v3.5
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- app.manifest
- ookii.ico
- true
- ookii.snk
-
-
-
-
- 3.5
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
- 3.5
-
-
- 3.5
-
-
- 3.5
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
- {D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}
- Ookii.Dialogs.Wpf
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Ookii.Dialogs.Wpf.Sample/Properties/AssemblyInfo.cs b/Ookii.Dialogs.Wpf.Sample/Properties/AssemblyInfo.cs
deleted file mode 100644
index 52bd532..0000000
--- a/Ookii.Dialogs.Wpf.Sample/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Ookii.Dialogs.Wpf.Sample")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Ookii.org")]
-[assembly: AssemblyProduct("Ookii.Dialogs")]
-[assembly: AssemblyCopyright("Copyright © Sven Groot (Ookii.org) 2009")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: System.CLSCompliant(true)]
-[assembly: System.Resources.NeutralResourcesLanguage("en-US")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Ookii.Dialogs.Wpf.Sample/Properties/Resources.Designer.cs b/Ookii.Dialogs.Wpf.Sample/Properties/Resources.Designer.cs
deleted file mode 100644
index 2fbeaeb..0000000
--- a/Ookii.Dialogs.Wpf.Sample/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Ookii.Dialogs.Wpf.Sample.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ookii.Dialogs.Wpf.Sample.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/Ookii.Dialogs.Wpf.Sample/Properties/Resources.resx b/Ookii.Dialogs.Wpf.Sample/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/Ookii.Dialogs.Wpf.Sample/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/Ookii.Dialogs.Wpf.Sample/Properties/Settings.Designer.cs b/Ookii.Dialogs.Wpf.Sample/Properties/Settings.Designer.cs
deleted file mode 100644
index 897008a..0000000
--- a/Ookii.Dialogs.Wpf.Sample/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Ookii.Dialogs.Wpf.Sample.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.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;
- }
- }
- }
-}
diff --git a/Ookii.Dialogs.Wpf.Sample/Properties/Settings.settings b/Ookii.Dialogs.Wpf.Sample/Properties/Settings.settings
deleted file mode 100644
index 033d7a5..0000000
--- a/Ookii.Dialogs.Wpf.Sample/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Ookii.Dialogs.Wpf.Sample/app.manifest b/Ookii.Dialogs.Wpf.Sample/app.manifest
deleted file mode 100644
index bcfcfe3..0000000
--- a/Ookii.Dialogs.Wpf.Sample/app.manifest
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Ookii.Dialogs.Wpf.Sample/ookii.ico b/Ookii.Dialogs.Wpf.Sample/ookii.ico
deleted file mode 100644
index 872f8a4..0000000
Binary files a/Ookii.Dialogs.Wpf.Sample/ookii.ico and /dev/null differ
diff --git a/Ookii.Dialogs.Wpf.Sample/ookii.snk b/Ookii.Dialogs.Wpf.Sample/ookii.snk
deleted file mode 100644
index 1befa13..0000000
Binary files a/Ookii.Dialogs.Wpf.Sample/ookii.snk and /dev/null differ
diff --git a/PianoKeyboardDemo/App.config b/PianoKeyboardDemo/App.config
deleted file mode 100644
index 8e15646..0000000
--- a/PianoKeyboardDemo/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/PianoKeyboardDemo/Form1.Designer.cs b/PianoKeyboardDemo/Form1.Designer.cs
deleted file mode 100644
index 80d6e6f..0000000
--- a/PianoKeyboardDemo/Form1.Designer.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-namespace PianoKeyboardDemo
-{
- partial class Form1
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.pianoControl1 = new Sanford.Multimedia.Midi.UI.PianoControl();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.SuspendLayout();
- //
- // pianoControl1
- //
- this.pianoControl1.HighNoteID = 109;
- this.pianoControl1.Location = new System.Drawing.Point(12, 63);
- this.pianoControl1.LowNoteID = 21;
- this.pianoControl1.Name = "pianoControl1";
- this.pianoControl1.NoteOnColor = System.Drawing.Color.SkyBlue;
- this.pianoControl1.Size = new System.Drawing.Size(717, 55);
- this.pianoControl1.TabIndex = 0;
- this.pianoControl1.Text = "pianoControl1";
- this.pianoControl1.PianoKeyDown += new System.EventHandler(this.pianoControl1_PianoKeyDown);
- this.pianoControl1.PianoKeyUp += new System.EventHandler(this.pianoControl1_PianoKeyUp);
- //
- // textBox1
- //
- this.textBox1.Location = new System.Drawing.Point(143, 27);
- this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(184, 20);
- this.textBox1.TabIndex = 1;
- //
- // Form1
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(750, 327);
- this.Controls.Add(this.textBox1);
- this.Controls.Add(this.pianoControl1);
- this.Name = "Form1";
- this.Text = "Form1";
- this.Load += new System.EventHandler(this.Form1_Load);
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private Sanford.Multimedia.Midi.UI.PianoControl pianoControl1;
- private System.Windows.Forms.TextBox textBox1;
- }
-}
-
diff --git a/PianoKeyboardDemo/Form1.cs b/PianoKeyboardDemo/Form1.cs
deleted file mode 100644
index c747290..0000000
--- a/PianoKeyboardDemo/Form1.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using Sanford.Multimedia.Midi;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace PianoKeyboardDemo
-{
- public partial class Form1 : Form
- {
- private OutputDevice outDevice;
- private int outDeviceID = 0;
-
- public Form1()
- {
- InitializeComponent();
- }
-
- private void pianoControl1_PianoKeyDown(object sender, Sanford.Multimedia.Midi.UI.PianoKeyEventArgs e)
- {
- textBox1.Text = e.NoteID.ToString();
- outDevice.Send(new ChannelMessage(ChannelCommand.NoteOn, 0, e.NoteID, 127));
- }
-
- private void pianoControl1_PianoKeyUp(object sender, Sanford.Multimedia.Midi.UI.PianoKeyEventArgs e)
- {
- outDevice.Send(new ChannelMessage(ChannelCommand.NoteOff, 0, e.NoteID, 0));
- }
-
- private void Form1_Load(object sender, EventArgs e)
- {
- outDevice = new OutputDevice(outDeviceID);
- }
-
- protected override void OnClosed(EventArgs e)
- {
- if (outDevice != null)
- {
- outDevice.Dispose();
- }
-
- base.OnClosed(e);
- }
- }
-}
diff --git a/PianoKeyboardDemo/Form1.resx b/PianoKeyboardDemo/Form1.resx
deleted file mode 100644
index 1af7de1..0000000
--- a/PianoKeyboardDemo/Form1.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/PianoKeyboardDemo/PianoKeyboardDemo.csproj b/PianoKeyboardDemo/PianoKeyboardDemo.csproj
deleted file mode 100644
index a7b939b..0000000
--- a/PianoKeyboardDemo/PianoKeyboardDemo.csproj
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {16939739-CF95-4638-B0CF-B5F6DC42D588}
- WinExe
- Properties
- PianoKeyboardDemo
- PianoKeyboardDemo
- v4.5
- 512
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- False
- ..\Sanford.Multimedia.Midi\Sanford.Collections.dll
-
-
- False
- ..\Sanford.Multimedia.Midi\Sanford.Multimedia.dll
-
-
- False
- ..\Sanford.Multimedia.Midi\Sanford.Multimedia.Timers.dll
-
-
- False
- ..\Sanford.Multimedia.Midi\Sanford.Threading.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Form
-
-
- Form1.cs
-
-
-
-
- Form1.cs
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
- Designer
-
-
- True
- Resources.resx
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
- True
- Settings.settings
- True
-
-
-
-
-
-
-
- {4269c72a-8d3a-4737-8f89-72eaa33ea9e1}
- Sanford.Multimedia.Midi
-
-
-
-
-
\ No newline at end of file
diff --git a/PianoKeyboardDemo/Program.cs b/PianoKeyboardDemo/Program.cs
deleted file mode 100644
index bb2e8f0..0000000
--- a/PianoKeyboardDemo/Program.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace PianoKeyboardDemo
-{
- static class Program
- {
- ///
- /// The main entry point for the application.
- ///
- [STAThread]
- static void Main()
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Form1());
- }
- }
-}
diff --git a/PianoKeyboardDemo/Properties/AssemblyInfo.cs b/PianoKeyboardDemo/Properties/AssemblyInfo.cs
deleted file mode 100644
index 35c30f8..0000000
--- a/PianoKeyboardDemo/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("PianoKeyboardDemo")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("PianoKeyboardDemo")]
-[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("f68c6d04-4fe0-48f7-bab7-76b1e72a360c")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/PianoKeyboardDemo/Properties/Resources.Designer.cs b/PianoKeyboardDemo/Properties/Resources.Designer.cs
deleted file mode 100644
index 3b9dffb..0000000
--- a/PianoKeyboardDemo/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.34014
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace PianoKeyboardDemo.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PianoKeyboardDemo.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/PianoKeyboardDemo/Properties/Resources.resx b/PianoKeyboardDemo/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/PianoKeyboardDemo/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/PianoKeyboardDemo/Properties/Settings.Designer.cs b/PianoKeyboardDemo/Properties/Settings.Designer.cs
deleted file mode 100644
index 0e3c53c..0000000
--- a/PianoKeyboardDemo/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.34014
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace PianoKeyboardDemo.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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;
- }
- }
- }
-}
diff --git a/PianoKeyboardDemo/Properties/Settings.settings b/PianoKeyboardDemo/Properties/Settings.settings
deleted file mode 100644
index 3964565..0000000
--- a/PianoKeyboardDemo/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/README.md b/README.md
index c8edd0b..e05dbe5 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,12 @@ Author: USC CSCI-577 Team07 in Spring 2015
See `releases` tab for executable files.
+## Contact Us
+
+csci-577a-team07-developers@googlegroups.com
+
+https://groups.google.com/d/forum/csci-577a-team07-developers
+
## Links of Project
### Team Website
diff --git a/TempChen/App.config b/TempChen/App.config
deleted file mode 100644
index 8e15646..0000000
--- a/TempChen/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TempChen/App.xaml b/TempChen/App.xaml
deleted file mode 100644
index bcaacf2..0000000
--- a/TempChen/App.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/TempChen/App.xaml.cs b/TempChen/App.xaml.cs
deleted file mode 100644
index 6919442..0000000
--- a/TempChen/App.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace TempChen
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/TempChen/MainWindow.xaml b/TempChen/MainWindow.xaml
deleted file mode 100644
index 3e3d87c..0000000
--- a/TempChen/MainWindow.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/TempChen/MainWindow.xaml.cs b/TempChen/MainWindow.xaml.cs
deleted file mode 100644
index 443d2e8..0000000
--- a/TempChen/MainWindow.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace TempChen
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/TempChen/Properties/AssemblyInfo.cs b/TempChen/Properties/AssemblyInfo.cs
deleted file mode 100644
index 178ed25..0000000
--- a/TempChen/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TempChen")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("TempChen")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TempChen/Properties/Resources.Designer.cs b/TempChen/Properties/Resources.Designer.cs
deleted file mode 100644
index 604e9ea..0000000
--- a/TempChen/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace TempChen.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TempChen.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/TempChen/Properties/Resources.resx b/TempChen/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/TempChen/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/TempChen/Properties/Settings.Designer.cs b/TempChen/Properties/Settings.Designer.cs
deleted file mode 100644
index bd1675b..0000000
--- a/TempChen/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace TempChen.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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;
- }
- }
- }
-}
diff --git a/TempChen/Properties/Settings.settings b/TempChen/Properties/Settings.settings
deleted file mode 100644
index 033d7a5..0000000
--- a/TempChen/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TempChen/TestChen.csproj b/TempChen/TestChen.csproj
deleted file mode 100644
index 8f89ba7..0000000
--- a/TempChen/TestChen.csproj
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {47F13A95-5158-46BA-B2C5-29D8773A304E}
- WinExe
- Properties
- TempChen
- TempChen
- v4.5
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TempJiashuo/App.config b/TempJiashuo/App.config
deleted file mode 100644
index 8e15646..0000000
--- a/TempJiashuo/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TempJiashuo/App.xaml b/TempJiashuo/App.xaml
deleted file mode 100644
index fb26d83..0000000
--- a/TempJiashuo/App.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/TempJiashuo/App.xaml.cs b/TempJiashuo/App.xaml.cs
deleted file mode 100644
index 1c9ad12..0000000
--- a/TempJiashuo/App.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace TempJiashuo
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/TempJiashuo/MainWindow.xaml b/TempJiashuo/MainWindow.xaml
deleted file mode 100644
index 8bf815c..0000000
--- a/TempJiashuo/MainWindow.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/TempJiashuo/MainWindow.xaml.cs b/TempJiashuo/MainWindow.xaml.cs
deleted file mode 100644
index a361c79..0000000
--- a/TempJiashuo/MainWindow.xaml.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-using iRobotGUI;
-using iRobotGUI.Util;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace TempJiashuo
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- static string loopTestString =
-@"LOOP 0, 1, 1
- // Read the sensor again
- READ_SENSOR
- DELAY 100
-END_LOOP";
-
- static string ifTestString =
-@"IF 0,0,0
- IF 0,0,0
- IF 0,0,0
- ELSE
- END_IF
- ELSE
- END_IF
- IF 0,0,0
- ELSE
- END_IF
-ELSE
-END_IF
-";
-
- public MainWindow()
- {
- InitializeComponent();
-
-
-
-
- }
-
- private void Window_Loaded(object sender, RoutedEventArgs e)
- {
- try
- {
- openIfWindow();
- }
- catch (Exception ex)
- {
-
- Console.WriteLine(ex.ToString());
- }
-
-
- /*
- try
- {
- HLProgram pro = new HLProgram(File.ReadAllText("find_if_endif.igp"));
- int elseIndex = pro.FindElse(0);
- //MessageBox.Show(elseIndex.ToString());
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- }
- openIfWindow();
- */
- }
-
- private void openLoopWindow()
- {
- LoopWindow lw = new LoopWindow();
- //lw.Owner = this;
- lw.SubProgram = new HLProgram(loopTestString);
- lw.ShowDialog();
-
- MessageBox.Show(lw.SubProgram.ToString());
- }
-
- private void openSongWindow()
- {
-
- //SongWindow lw = new SongWindow();
- ////lw.Owner = this;
- //lw.Ins = new Instruction("SONG_DEF 3,60,32,62,32,64,32");
- //lw.ShowDialog();
- DialogInvoker.ShowDialog(new Instruction("SONG 60,32,62,32,64,32"), this);
-
- }
-
- private void openIfWindow()
- {
- IfWindow lw = new IfWindow();
- //lw.Owner = this;
- lw.SubProgram = new HLProgram(ifTestString);
- lw.ShowDialog();
-
- MessageBox.Show(lw.SubProgram.ToString());
- }
- }
-}
diff --git a/TempJiashuo/Properties/AssemblyInfo.cs b/TempJiashuo/Properties/AssemblyInfo.cs
deleted file mode 100644
index ad996a0..0000000
--- a/TempJiashuo/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TempJiashuo")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("TempJiashuo")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TempJiashuo/Properties/Resources.Designer.cs b/TempJiashuo/Properties/Resources.Designer.cs
deleted file mode 100644
index b4c87b9..0000000
--- a/TempJiashuo/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace TempJiashuo.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TempJiashuo.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/TempJiashuo/Properties/Resources.resx b/TempJiashuo/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/TempJiashuo/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/TempJiashuo/Properties/Settings.Designer.cs b/TempJiashuo/Properties/Settings.Designer.cs
deleted file mode 100644
index c6aeb6f..0000000
--- a/TempJiashuo/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace TempJiashuo.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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;
- }
- }
- }
-}
diff --git a/TempJiashuo/Properties/Settings.settings b/TempJiashuo/Properties/Settings.settings
deleted file mode 100644
index 033d7a5..0000000
--- a/TempJiashuo/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TempJiashuo/TestJiashuo.csproj b/TempJiashuo/TestJiashuo.csproj
deleted file mode 100644
index 4c3ddd9..0000000
--- a/TempJiashuo/TestJiashuo.csproj
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {D75EED5C-428B-4C4C-8542-CF183FAB624E}
- WinExe
- Properties
- TempJiashuo
- TempJiashuo
- v4.5
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
- {05b8eacd-5eb2-420e-9f99-7a76be66c52c}
- HighLevelProgram
-
-
- {3bcf10e0-ca38-42fd-acbc-ddcdc4d00437}
- UI
-
-
-
-
-
\ No newline at end of file
diff --git a/TempSergey/App.config b/TempSergey/App.config
deleted file mode 100644
index 8e15646..0000000
--- a/TempSergey/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TempSergey/App.xaml b/TempSergey/App.xaml
deleted file mode 100644
index 86978c1..0000000
--- a/TempSergey/App.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/TempSergey/App.xaml.cs b/TempSergey/App.xaml.cs
deleted file mode 100644
index 09c69d8..0000000
--- a/TempSergey/App.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace TempSergey
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/TempSergey/MainWindow.xaml b/TempSergey/MainWindow.xaml
deleted file mode 100644
index c5a1e27..0000000
--- a/TempSergey/MainWindow.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
diff --git a/TempSergey/MainWindow.xaml.cs b/TempSergey/MainWindow.xaml.cs
deleted file mode 100644
index 2b0d48f..0000000
--- a/TempSergey/MainWindow.xaml.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using iRobotGUI;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace TempSergey
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
-
- private void ShowDemoDialog(Instruction ins)
- {
- DemoWindow dlg = new DemoWindow();
- dlg.Owner = Window.GetWindow(this);
- dlg.Ins = ins;
- dlg.ShowDialog();
- }
-
-
-
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- var newIns = new Instruction("DEMO" + " 0");
- ShowDemoDialog(newIns);
- }
- }
-}
diff --git a/TempSergey/Properties/AssemblyInfo.cs b/TempSergey/Properties/AssemblyInfo.cs
deleted file mode 100644
index fc845a5..0000000
--- a/TempSergey/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TempSergey")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("TempSergey")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TempSergey/Properties/Resources.Designer.cs b/TempSergey/Properties/Resources.Designer.cs
deleted file mode 100644
index 507d9e4..0000000
--- a/TempSergey/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace TempSergey.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TempSergey.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/TempSergey/Properties/Resources.resx b/TempSergey/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/TempSergey/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/TempSergey/Properties/Settings.Designer.cs b/TempSergey/Properties/Settings.Designer.cs
deleted file mode 100644
index f9e9279..0000000
--- a/TempSergey/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace TempSergey.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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;
- }
- }
- }
-}
diff --git a/TempSergey/Properties/Settings.settings b/TempSergey/Properties/Settings.settings
deleted file mode 100644
index 033d7a5..0000000
--- a/TempSergey/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TempSergey/TestSergey.csproj b/TempSergey/TestSergey.csproj
deleted file mode 100644
index 300eef2..0000000
--- a/TempSergey/TestSergey.csproj
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {4DA530A0-650E-4261-B216-6F1F8EB2B46D}
- WinExe
- Properties
- TempSergey
- TempSergey
- v4.5
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
- {05b8eacd-5eb2-420e-9f99-7a76be66c52c}
- HighLevelProgram
-
-
- {3bcf10e0-ca38-42fd-acbc-ddcdc4d00437}
- UI
-
-
-
-
-
\ No newline at end of file
diff --git a/TestJiashuoConsole/App.config b/TestJiashuoConsole/App.config
deleted file mode 100644
index 8e15646..0000000
--- a/TestJiashuoConsole/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestJiashuoConsole/Program.cs b/TestJiashuoConsole/Program.cs
deleted file mode 100644
index 194dc5d..0000000
--- a/TestJiashuoConsole/Program.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using iRobotGUI;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-
-namespace TestJiashuoConsole
-{
- class Program
- {
- static void Main(string[] args)
- {
- /*
- Instruction ins1 = new Instruction("MOVE 100, 2");
- Instruction ins2 = new Instruction("MOVE -100, 2");
- Instruction ins3 = new Instruction("MOVE 0, 2");
-
- Console.WriteLine(TextDescription.GetTextDescription(ins1));
- Console.WriteLine(TextDescription.GetTextDescription(ins2));
- Console.WriteLine(TextDescription.GetTextDescription(ins3));
-
- Console.WriteLine(ins1.ToString(true));
- Console.WriteLine(ins2.ToString(true));
- Console.WriteLine(ins3.ToString(true));
-
- string commentPattern = "//.*";
- Regex rgx = new Regex(commentPattern);
- var result = rgx.Replace("aa /// dsfsdf","");
-
- Console.WriteLine(result);
-
- string input = File.ReadAllText("demo_forward_until_bump.igp");
- HLProgram pro = new HLProgram(input);
- File.WriteAllText("demo_forward_until_bump_with_description.igp", pro.ToString(true));
- */
-
- string[] ports = System.IO.Ports.SerialPort.GetPortNames();
-
- }
- }
-}
diff --git a/TestJiashuoConsole/Properties/AssemblyInfo.cs b/TestJiashuoConsole/Properties/AssemblyInfo.cs
deleted file mode 100644
index ca62651..0000000
--- a/TestJiashuoConsole/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TestJiashuoConsole")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("TestJiashuoConsole")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3888c121-d783-4e2c-8fb0-0d97c494cbd9")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TestJiashuoConsole/TestJiashuoConsole.csproj b/TestJiashuoConsole/TestJiashuoConsole.csproj
deleted file mode 100644
index 4b6a1e1..0000000
--- a/TestJiashuoConsole/TestJiashuoConsole.csproj
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {1923D0CB-0BED-4C32-A80E-ED18B49B3796}
- Exe
- Properties
- TestJiashuoConsole
- TestJiashuoConsole
- v4.5
- 512
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {05b8eacd-5eb2-420e-9f99-7a76be66c52c}
- HighLevelProgram
-
-
-
-
-
\ No newline at end of file
diff --git a/TestYun/App.config b/TestYun/App.config
deleted file mode 100644
index 8e15646..0000000
--- a/TestYun/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestYun/App.xaml b/TestYun/App.xaml
deleted file mode 100644
index d726e71..0000000
--- a/TestYun/App.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/TestYun/App.xaml.cs b/TestYun/App.xaml.cs
deleted file mode 100644
index dface38..0000000
--- a/TestYun/App.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace TestYun
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff --git a/TestYun/MainWindow.xaml b/TestYun/MainWindow.xaml
deleted file mode 100644
index 65754ce..0000000
--- a/TestYun/MainWindow.xaml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/TestYun/MainWindow.xaml.cs b/TestYun/MainWindow.xaml.cs
deleted file mode 100644
index f25cd72..0000000
--- a/TestYun/MainWindow.xaml.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace TestYun
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/TestYun/Properties/AssemblyInfo.cs b/TestYun/Properties/AssemblyInfo.cs
deleted file mode 100644
index 94ef124..0000000
--- a/TestYun/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TestYun")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("TestYun")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TestYun/Properties/Resources.Designer.cs b/TestYun/Properties/Resources.Designer.cs
deleted file mode 100644
index b2e169a..0000000
--- a/TestYun/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace TestYun.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TestYun.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/TestYun/Properties/Resources.resx b/TestYun/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/TestYun/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/TestYun/Properties/Settings.Designer.cs b/TestYun/Properties/Settings.Designer.cs
deleted file mode 100644
index 8a33f2a..0000000
--- a/TestYun/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace TestYun.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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;
- }
- }
- }
-}
diff --git a/TestYun/Properties/Settings.settings b/TestYun/Properties/Settings.settings
deleted file mode 100644
index 033d7a5..0000000
--- a/TestYun/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestYun/TestYun.csproj b/TestYun/TestYun.csproj
deleted file mode 100644
index 162bcef..0000000
--- a/TestYun/TestYun.csproj
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {BA59B7C4-50E7-4EB5-8885-19AE88276E03}
- WinExe
- Properties
- TestYun
- TestYun
- v4.5
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestYunConsole/App.config b/TestYunConsole/App.config
deleted file mode 100644
index 8e15646..0000000
--- a/TestYunConsole/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestYunConsole/Program.cs b/TestYunConsole/Program.cs
deleted file mode 100644
index 060fb00..0000000
--- a/TestYunConsole/Program.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using iRobotGUI;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace TestYunConsole
-{
- // used to test validator
- class Program
- {
- static void Main(string[] args)
- {
- string proIf = @"IF 0,0,0
-ELSE
- DELAY 1000
-END_IF
-ELSE";
-
- string proLoop = @"LOOP 0,0,0
-LOOP 0,6,0
- DELAY 1000
-END_LOOP
-";
- string proLength = @"LOOP 5
-LOOP 5 5 5
-END_LOOP";
-
- string proRange = @"SONG_DEF 11,41,222,69,222,80,222,49,252
-SONG 41,222,69,222,80,222,49,252, 31
-LOOP 0,0,0
-LOOP 0,5,0
- DELAY 1000
-END_LOOP
-END_LOOP
-";
-
- try
- {
- Validator.ValidateProgram(new HLProgram(proRange));
- Console.WriteLine("Ture");
- }
- catch (IfUnmatchedException ex)
- {
- Console.WriteLine("If unmatched at {0}: {1}", ex.Line, ex.InsStr);
- }
- catch (LoopUnmatchedException ex)
- {
- Console.WriteLine("Loop unmatched at {0}: {1}", ex.Line, ex.InsStr);
- }
- catch (ParameterCountInvalidException ex)
- {
- Console.WriteLine("Parameter Length Unmatched at {0}: {1}", ex.Line, ex.InsStr);
- }
- catch (ParameterRangeInvalidException ex)
- {
- Console.WriteLine("Parameter Range Unmatched at {0}: {1}", ex.Line, ex.InsStr);
- }
-
-/*
- if (Validator.ValidateInstruction(proRange))
- Console.WriteLine("True");
- else
- Console.WriteLine("False");
-*/
- Console.Read();
-
- }
- }
-}
diff --git a/TestYunConsole/Properties/AssemblyInfo.cs b/TestYunConsole/Properties/AssemblyInfo.cs
deleted file mode 100644
index 8b68d2f..0000000
--- a/TestYunConsole/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TestYunConsole")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("TestYunConsole")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("ce4ca615-0ec8-42a0-8867-97cdef70545c")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TestYunConsole/TestYunConsole.csproj b/TestYunConsole/TestYunConsole.csproj
deleted file mode 100644
index e370253..0000000
--- a/TestYunConsole/TestYunConsole.csproj
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {4E69C6E1-2420-4A24-97C1-A83AFE334E5B}
- Exe
- Properties
- TestYunConsole
- TestYunConsole
- v4.5
- 512
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {05b8eacd-5eb2-420e-9f99-7a76be66c52c}
- HighLevelProgram
-
-
-
-
-
\ No newline at end of file
diff --git a/UI/App.config b/UI/App.config
index 8892a24..1d24f2e 100644
--- a/UI/App.config
+++ b/UI/App.config
@@ -19,8 +19,14 @@
True
-
- 0
+
+
+
+
+
+
+
+
diff --git a/UI/Connector/EmulatorConnector.cs b/UI/Connector/EmulatorConnector.cs
new file mode 100644
index 0000000..c846089
--- /dev/null
+++ b/UI/Connector/EmulatorConnector.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace iRobotGUI
+{
+ public class EmulatorConnector
+ {
+ public const string EmulatorTemplate = "em_t.c";
+ public const string EmulatorOutputFile = "em_o.c";
+
+ public const string MainTemplate = "main_t.c";
+ public const string MainOutput = "main.c";
+
+ public static void TranslateToC(HLProgram program)
+ {
+ // Program file
+ string emulatorPath = Properties.Settings.Default.EmulatorPath;
+
+ string cCode = Translator.Translate(program);
+ string templateFullPath = System.IO.Path.Combine(emulatorPath, "MCEmulator", EmulatorTemplate);
+ string outputFullPath = System.IO.Path.Combine(emulatorPath, "MCEmulator", EmulatorOutputFile);
+
+ CodeGenerator.GenerateCSource(templateFullPath, outputFullPath, cCode);
+
+ // Main file and COM Port
+ if (Properties.Settings.Default.EmulatorComPort == "")
+ throw new ComPortException();
+ else
+ {
+ string mainTemplateFullPath = System.IO.Path.Combine(emulatorPath, "MCEmulator", MainTemplate);
+ string mainOutputFullPath = System.IO.Path.Combine(emulatorPath, "MCEmulator", MainOutput);
+ string mainStr = File.ReadAllText(mainTemplateFullPath);
+ mainStr = mainStr.Replace("/**change_com_port**/", (Properties.Settings.Default.EmulatorComPort[3] - '0' - 1).ToString());
+ File.WriteAllText(mainOutputFullPath, mainStr);
+ }
+ }
+
+ public static void Build()
+ {
+ string emulatorPath = Properties.Settings.Default.EmulatorPath;
+ string buildBatName = "MSMake.bat";
+ string buildBatFullPath = System.IO.Path.Combine(emulatorPath, buildBatName);
+
+ Process process = Process.Start(buildBatFullPath);
+ process.WaitForExit();
+ }
+
+ public static void Run()
+ {
+ string emulatorPath = Properties.Settings.Default.EmulatorPath;
+ string exeName = @"Debug\MCEmulator.exe";
+ string exeFullPath = System.IO.Path.Combine(emulatorPath, exeName);
+
+ Process process = Process.Start(exeFullPath);
+ process.WaitForExit();
+ }
+ }
+}
diff --git a/UI/Connector/WinAvrConnector.cs b/UI/Connector/WinAvrConnector.cs
new file mode 100644
index 0000000..a27af30
--- /dev/null
+++ b/UI/Connector/WinAvrConnector.cs
@@ -0,0 +1,98 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.IO;
+using System.Diagnostics;
+using iRobotGUI.Properties;
+
+namespace iRobotGUI.WinAvr
+{
+ ///
+ /// This class is the information for WinAVR compilation and loading routine.
+ ///
+ internal class WinAvrConfiguation
+ {
+ public string comPort = "COM1"; // com1
+ public string firmwareVersion = STK500V1; // stk500v1
+
+ public const string STK500 = "stk500";
+ public const string STK500V1 = "stk500v1";
+ public const string STK500V2 = "stk500v2";
+
+
+ public override string ToString()
+ {
+ return string.Format("COM Port: {0}\nFirmware Version: {1}", comPort, firmwareVersion);
+ }
+ }
+
+ public class WinAvrConnector
+ {
+ public const string MicrocontrollerTemplate = "mc_t.c";
+ public const string MicrocontrollerOutputFile = "mc_o.c";
+ public const string MakefileTemplate = "makefile_template";
+ public const string MakefileOutput = "makefile";
+
+ ///
+ /// Customize makefile so that WinAVR can work properly. The COM port and Firmware will be
+ /// changed according to the settings.
+ ///
+ public static void CustomizeMakefile()
+ {
+ WinAvrConfiguation config = new WinAvrConfiguation();
+
+ if (Settings.Default.MicrocontrollerComPort == "")
+ throw new ComPortException();
+ else config.comPort = Settings.Default.MicrocontrollerComPort;
+
+ if (Settings.Default.FirmwareVersion == "")
+ config.firmwareVersion = WinAvrConfiguation.STK500V1;
+ else config.firmwareVersion = Settings.Default.FirmwareVersion;
+
+
+ string makefileStr = File.ReadAllText(MakefileTemplate);
+ makefileStr = makefileStr.Replace("{COM}", config.comPort);
+ makefileStr = makefileStr.Replace("{FIRMWARE_VERSION}", config.firmwareVersion);
+ File.WriteAllText(MakefileOutput, makefileStr);
+ }
+
+ public static void TranslateToC(HLProgram program)
+ {
+ string cCode = Translator.Translate(program);
+ CodeGenerator.GenerateCSource(MicrocontrollerTemplate, MicrocontrollerOutputFile, cCode);
+ }
+
+ ///
+ /// Call "make all" to compile C.
+ ///
+ public static void Make()
+ {
+ CustomizeMakefile();
+ Process winAvrProcess = Process.Start("make.exe", "all");
+ winAvrProcess.WaitForExit();
+ }
+
+ ///
+ /// Call "make program" to load to Microcontroller.
+ ///
+ public static void Load()
+ {
+ //string d = Directory.GetCurrentDirectory();
+
+ CustomizeMakefile();
+ Process winAvrProcess = System.Diagnostics.Process.Start("make.exe", "program");
+ winAvrProcess.WaitForExit();
+ }
+
+ ///
+ /// Call "make clean" to clean all generated file.
+ ///
+ public static void Clean()
+ {
+ Process winAvrProcess = System.Diagnostics.Process.Start("make.exe", "clean");
+ winAvrProcess.WaitForExit();
+ }
+ }
+}
diff --git a/UI/Exception/ComPortException.cs b/UI/Exception/ComPortException.cs
new file mode 100644
index 0000000..e253058
--- /dev/null
+++ b/UI/Exception/ComPortException.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace iRobotGUI
+{
+ public class ComPortException : Exception
+ {
+
+ }
+}
diff --git a/UI/MainWindow.xaml b/UI/MainWindow.xaml
index 13a3767..2617248 100644
--- a/UI/MainWindow.xaml
+++ b/UI/MainWindow.xaml
@@ -61,9 +61,31 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UI/MainWindow.xaml.cs b/UI/MainWindow.xaml.cs
index 56dd389..9e29e83 100644
--- a/UI/MainWindow.xaml.cs
+++ b/UI/MainWindow.xaml.cs
@@ -16,6 +16,7 @@
using System.Text.RegularExpressions;
using iRobotGUI.WinAvr;
using System.Diagnostics;
+using iRobotGUI.Properties;
namespace iRobotGUI
{
@@ -47,7 +48,7 @@ public partial class MainWindow : Window
public static RoutedCommand OpenSourceCmd = new RoutedUICommand("Open Source File", "srcfile", typeof(Window),
new InputGestureCollection { new KeyGesture(Key.O, ModifierKeys.Control | ModifierKeys.Shift) });
- public static RoutedCommand SettingCmd = new RoutedUICommand("Setting", "Setting", typeof(Window),
+ public static RoutedCommand SettingCmd = new RoutedUICommand("Preferences and Emulator", "Setting", typeof(Window),
new InputGestureCollection { new KeyGesture(Key.S, ModifierKeys.Control | ModifierKeys.Shift) });
public static RoutedCommand WinAvrConfigCmd = new RoutedUICommand("WinAVR Configuation", "avrconfig", typeof(Window),
new InputGestureCollection { new KeyGesture(Key.C, ModifierKeys.Control | ModifierKeys.Shift) });
@@ -58,10 +59,7 @@ public partial class MainWindow : Window
new InputGestureCollection { new KeyGesture(Key.R, ModifierKeys.Control | ModifierKeys.Shift) });
- public const string MicrocontrollerTemplate = "mc_t.c";
- public const string MicrocontrollerOutputFile = "mc_o.c";
- public const string EmulatorTemplate = "em_t.c";
- public const string EmulatorOutputFile = "em_o.c";
+
private string igpFile = "";
@@ -94,6 +92,7 @@ public MainWindow()
SettingsWindow.SetDefaultEmulatorPath();
}
+
if (!Directory.Exists(@"cprogram\"))
{
MessageBox.Show("The C template is missing, try re-install the program.", "Program Broken", MessageBoxButton.OK, MessageBoxImage.Error);
@@ -108,7 +107,10 @@ public MainWindow()
programList.Program = new HLProgram();
+ // Status bar
textBlockStatus.Text = Directory.GetCurrentDirectory();
+
+ UpdateStatusBarComPort();
}
@@ -118,11 +120,9 @@ public MainWindow()
private void TranslateToMicrocontrollerCCmdExecuted(object sender, ExecutedRoutedEventArgs e)
{
- string cCode = Translator.Translate(programList.Program);
-
- CodeGenerator.GenerateCSource(MicrocontrollerTemplate, MicrocontrollerOutputFile, cCode);
+ WinAvrConnector.TranslateToC(programList.Program);
- if (Properties.Settings.Default.OpenCCode) Process.Start(MicrocontrollerOutputFile);
+ if (Properties.Settings.Default.OpenCCode) Process.Start(WinAvrConnector.MicrocontrollerOutputFile);
}
// Create(New), Save and Load. Traceability: WC_3305: As an ESS, I can create, save and load program files.
@@ -132,7 +132,11 @@ private void BuildCmdExecuted(object sender, ExecutedRoutedEventArgs e)
{
WinAvrConnector.Make();
}
- catch (Exception ex)
+ catch (ComPortException)
+ {
+ MessageBox.Show("COM port is not selected. Unable to build.", "Failed", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ catch (Exception)
{
ShowWinAvrError();
}
@@ -169,39 +173,23 @@ private void CleanCmdExecuted(object sender, ExecutedRoutedEventArgs e)
private void TranslateToEmulatorCCmdExecuted(object sender, ExecutedRoutedEventArgs e)
{
- string emulatorPath = Properties.Settings.Default.EmulatorPath;
-
try
{
- string cCode = Translator.Translate(programList.Program);
- string templateFullPath = System.IO.Path.Combine(emulatorPath, "MCEmulator", EmulatorTemplate);
- string outputFullPath = System.IO.Path.Combine(emulatorPath, "MCEmulator", EmulatorOutputFile);
-
- CodeGenerator.GenerateCSource(templateFullPath, outputFullPath, cCode);
+ EmulatorConnector.TranslateToC(programList.Program);
}
catch (Exception)
{
- MessageBox.Show("Emulator path not invalid. Use Build -> Setting to select the correct path.",
- "Invalid Emulator Path", MessageBoxButton.OK, MessageBoxImage.Error);
-
+ MessageBox.Show("Emulator path or COM Port invalid. Use Build -> Preferences and Emulator to select the correct path or COM Port.",
+ "Invalid Parameters", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
private void BuildEmulatorCmdExecuted(object sender, ExecutedRoutedEventArgs e)
{
- string emulatorPath = Properties.Settings.Default.EmulatorPath;
- string buildBatName = "MSMake.bat";
- string buildBatFullPath = System.IO.Path.Combine(emulatorPath, buildBatName);
- // string solutionName = "MCEmulator.sln";
- // string solutionFullName = System.IO.Path.Combine(emulatorPath, solutionName);
-
- //Process.Start(@"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe", solutionFullName);
-
try
{
- Process process = Process.Start(buildBatFullPath);
- process.WaitForExit();
+ EmulatorConnector.Build();
}
catch (Exception ex)
{
@@ -213,18 +201,9 @@ private void BuildEmulatorCmdExecuted(object sender, ExecutedRoutedEventArgs e)
private void RunEmulatorCmdExecuted(object sender, ExecutedRoutedEventArgs e)
{
- string emulatorPath = Properties.Settings.Default.EmulatorPath;
- string exeName = @"Debug\MCEmulator.exe";
- string exeFullPath = System.IO.Path.Combine(emulatorPath, exeName);
- // string solutionName = "MCEmulator.sln";
- // string solutionFullName = System.IO.Path.Combine(emulatorPath, solutionName);
-
- //Process.Start(@"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe", solutionFullName);
-
try
{
- Process process = Process.Start(exeFullPath);
- process.WaitForExit();
+ EmulatorConnector.Run();
}
catch (Exception ex)
{
@@ -370,7 +349,10 @@ private void SettingCmdExecuted(object sender, ExecutedRoutedEventArgs e)
sw.Owner = this;
sw.ShowDialog();
+
+ UpdateStatusBarComPort();
}
+
///
/// Show Configuration Window
///
@@ -382,14 +364,12 @@ private void WinAvrConfigCmdExecuted(object sender, ExecutedRoutedEventArgs e)
// Configure the dialog box
dlg.Owner = this;
- dlg.Config = WinAvrConnector.config;
// Open the dialog box modally
dlg.ShowDialog();
if (dlg.DialogResult == true)
{
- // MessageBox.Show(WinAvrConnector.config.ToString());
-
+ UpdateStatusBarComPort();
}
}
#endregion
@@ -441,7 +421,23 @@ private void SaveProgram(string filePath)
private void ShowWinAvrError()
{
- MessageBox.Show("Fail to execute. Check if WinAVR is installed correctly.", "Fail", MessageBoxButton.OK, MessageBoxImage.Error);
+ MessageBox.Show("Fail to execute. Check if WinAVR is installed correctly.", "Failed", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+
+ private void UpdateStatusBarComPort()
+ {
+ // Microcontroller
+ string mcCom;
+ if (Properties.Settings.Default.MicrocontrollerComPort == "") mcCom = "NA";
+ else mcCom = Settings.Default.MicrocontrollerComPort;
+ textBlockMicrocontrollerComPort.Text = "Microcontroller COM Port: " + mcCom;
+
+ // Emulator
+ string emCom;
+ if (Properties.Settings.Default.EmulatorComPort == "") emCom = "NA";
+ else emCom = Settings.Default.EmulatorComPort;
+ textBlockEmulatorComPort.Text = "Emulator COM Port: " + emCom;
+
}
#endregion
@@ -482,7 +478,7 @@ private void MenuItemAbout_Click(object sender, RoutedEventArgs e)
private void MenuItemShowCCode_Click(object sender, RoutedEventArgs e)
{
- System.Diagnostics.Process.Start(MicrocontrollerOutputFile);
+ System.Diagnostics.Process.Start(WinAvrConnector.MicrocontrollerOutputFile);
}
private void MenuItemShowDebugPanel_Checked(object sender, RoutedEventArgs e)
@@ -516,7 +512,7 @@ private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs
{
// No file is open
if (string.IsNullOrEmpty(igpFile))
- {
+ {
if (programList.Program.ToString() == "") return;
}
else
@@ -541,7 +537,7 @@ private void InstructionPanel_AddNewInstruction(string opcode)
{
programList.AddNewInstruction(opcode);
}
-
+
// For debugging
private void programList_ProgramChanged()
{
@@ -559,5 +555,15 @@ private void programList_SelectedInstructionChanged(string insString)
textBoxSelectedInstruction.Text = insString;
}
#endregion
+
+ private void StatusBarItemMC_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ WinAvrConfigCmd.Execute(null, this);
+ }
+
+ private void StatusBarItemEM_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ SettingCmd.Execute(null, this);
+ }
}
}
\ No newline at end of file
diff --git a/UI/Controls/BaseParamControl.cs b/UI/ParamControl/BaseParamControl.cs
similarity index 100%
rename from UI/Controls/BaseParamControl.cs
rename to UI/ParamControl/BaseParamControl.cs
diff --git a/UI/Controls/ConditionPanel.xaml b/UI/ParamControl/ConditionPanel.xaml
similarity index 100%
rename from UI/Controls/ConditionPanel.xaml
rename to UI/ParamControl/ConditionPanel.xaml
diff --git a/UI/Controls/ConditionPanel.xaml.cs b/UI/ParamControl/ConditionPanel.xaml.cs
similarity index 100%
rename from UI/Controls/ConditionPanel.xaml.cs
rename to UI/ParamControl/ConditionPanel.xaml.cs
diff --git a/UI/Controls/Controls.cd b/UI/ParamControl/Controls.cd
similarity index 100%
rename from UI/Controls/Controls.cd
rename to UI/ParamControl/Controls.cd
diff --git a/UI/Controls/DelayParam.xaml b/UI/ParamControl/DelayParam.xaml
similarity index 100%
rename from UI/Controls/DelayParam.xaml
rename to UI/ParamControl/DelayParam.xaml
diff --git a/UI/Controls/DelayParam.xaml.cs b/UI/ParamControl/DelayParam.xaml.cs
similarity index 100%
rename from UI/Controls/DelayParam.xaml.cs
rename to UI/ParamControl/DelayParam.xaml.cs
diff --git a/UI/Controls/DemoParam.xaml b/UI/ParamControl/DemoParam.xaml
similarity index 100%
rename from UI/Controls/DemoParam.xaml
rename to UI/ParamControl/DemoParam.xaml
diff --git a/UI/Controls/DemoParam.xaml.cs b/UI/ParamControl/DemoParam.xaml.cs
similarity index 100%
rename from UI/Controls/DemoParam.xaml.cs
rename to UI/ParamControl/DemoParam.xaml.cs
diff --git a/UI/Controls/DragAdorner.cs b/UI/ParamControl/DragAdorner.cs
similarity index 100%
rename from UI/Controls/DragAdorner.cs
rename to UI/ParamControl/DragAdorner.cs
diff --git a/UI/Controls/DriveParam.xaml b/UI/ParamControl/DriveParam.xaml
similarity index 100%
rename from UI/Controls/DriveParam.xaml
rename to UI/ParamControl/DriveParam.xaml
diff --git a/UI/Controls/DriveParam.xaml.cs b/UI/ParamControl/DriveParam.xaml.cs
similarity index 100%
rename from UI/Controls/DriveParam.xaml.cs
rename to UI/ParamControl/DriveParam.xaml.cs
diff --git a/UI/Controls/InstructionPanel.xaml b/UI/ParamControl/InstructionPanel.xaml
similarity index 100%
rename from UI/Controls/InstructionPanel.xaml
rename to UI/ParamControl/InstructionPanel.xaml
diff --git a/UI/Controls/InstructionPanel.xaml.cs b/UI/ParamControl/InstructionPanel.xaml.cs
similarity index 100%
rename from UI/Controls/InstructionPanel.xaml.cs
rename to UI/ParamControl/InstructionPanel.xaml.cs
diff --git a/UI/Controls/LedParam.xaml b/UI/ParamControl/LedParam.xaml
similarity index 100%
rename from UI/Controls/LedParam.xaml
rename to UI/ParamControl/LedParam.xaml
diff --git a/UI/Controls/LedParam.xaml.cs b/UI/ParamControl/LedParam.xaml.cs
similarity index 100%
rename from UI/Controls/LedParam.xaml.cs
rename to UI/ParamControl/LedParam.xaml.cs
diff --git a/UI/Controls/ListViewDragDropManager.cs b/UI/ParamControl/ListViewDragDropManager.cs
similarity index 100%
rename from UI/Controls/ListViewDragDropManager.cs
rename to UI/ParamControl/ListViewDragDropManager.cs
diff --git a/UI/Controls/MouseUtilities.cs b/UI/ParamControl/MouseUtilities.cs
similarity index 100%
rename from UI/Controls/MouseUtilities.cs
rename to UI/ParamControl/MouseUtilities.cs
diff --git a/UI/Controls/MoveParam.xaml b/UI/ParamControl/MoveParam.xaml
similarity index 100%
rename from UI/Controls/MoveParam.xaml
rename to UI/ParamControl/MoveParam.xaml
diff --git a/UI/Controls/MoveParam.xaml.cs b/UI/ParamControl/MoveParam.xaml.cs
similarity index 100%
rename from UI/Controls/MoveParam.xaml.cs
rename to UI/ParamControl/MoveParam.xaml.cs
diff --git a/UI/Controls/ProgramList.xaml b/UI/ParamControl/ProgramList.xaml
similarity index 100%
rename from UI/Controls/ProgramList.xaml
rename to UI/ParamControl/ProgramList.xaml
diff --git a/UI/Controls/ProgramList.xaml.cs b/UI/ParamControl/ProgramList.xaml.cs
similarity index 100%
rename from UI/Controls/ProgramList.xaml.cs
rename to UI/ParamControl/ProgramList.xaml.cs
diff --git a/UI/Controls/RotateParam.xaml b/UI/ParamControl/RotateParam.xaml
similarity index 100%
rename from UI/Controls/RotateParam.xaml
rename to UI/ParamControl/RotateParam.xaml
diff --git a/UI/Controls/RotateParam.xaml.cs b/UI/ParamControl/RotateParam.xaml.cs
similarity index 100%
rename from UI/Controls/RotateParam.xaml.cs
rename to UI/ParamControl/RotateParam.xaml.cs
diff --git a/UI/Controls/SensorSelector.xaml b/UI/ParamControl/SensorSelector.xaml
similarity index 100%
rename from UI/Controls/SensorSelector.xaml
rename to UI/ParamControl/SensorSelector.xaml
diff --git a/UI/Controls/SensorSelector.xaml.cs b/UI/ParamControl/SensorSelector.xaml.cs
similarity index 100%
rename from UI/Controls/SensorSelector.xaml.cs
rename to UI/ParamControl/SensorSelector.xaml.cs
diff --git a/UI/Controls/SteeringParam.xaml b/UI/ParamControl/SteeringParam.xaml
similarity index 100%
rename from UI/Controls/SteeringParam.xaml
rename to UI/ParamControl/SteeringParam.xaml
diff --git a/UI/Controls/SteeringParam.xaml.cs b/UI/ParamControl/SteeringParam.xaml.cs
similarity index 100%
rename from UI/Controls/SteeringParam.xaml.cs
rename to UI/ParamControl/SteeringParam.xaml.cs
diff --git a/UI/Properties/Settings.Designer.cs b/UI/Properties/Settings.Designer.cs
index bed34ce..d201610 100644
--- a/UI/Properties/Settings.Designer.cs
+++ b/UI/Properties/Settings.Designer.cs
@@ -61,13 +61,37 @@ public bool PopupWindowForNewIns {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public int ComPortListIndex {
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string MicrocontrollerComPort {
+ get {
+ return ((string)(this["MicrocontrollerComPort"]));
+ }
+ set {
+ this["MicrocontrollerComPort"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string EmulatorComPort {
+ get {
+ return ((string)(this["EmulatorComPort"]));
+ }
+ set {
+ this["EmulatorComPort"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("")]
+ public string FirmwareVersion {
get {
- return ((int)(this["ComPortListIndex"]));
+ return ((string)(this["FirmwareVersion"]));
}
set {
- this["ComPortListIndex"] = value;
+ this["FirmwareVersion"] = value;
}
}
}
diff --git a/UI/Properties/Settings.settings b/UI/Properties/Settings.settings
index 624918c..1b6a7ee 100644
--- a/UI/Properties/Settings.settings
+++ b/UI/Properties/Settings.settings
@@ -11,8 +11,14 @@
True
-
- 0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UI/UI.csproj b/UI/UI.csproj
index e593459..bc2c942 100644
--- a/UI/UI.csproj
+++ b/UI/UI.csproj
@@ -104,35 +104,39 @@
MSBuild:Compile
Designer
-
+
+
SensorSelector.xaml
-
+
DelayParam.xaml
-
+
DriveParam.xaml
-
+
SteeringParam.xaml
+
+
+ ComPortSelector.xaml
+
-
+
MoveParam.xaml
-
+
RotateParam.xaml
-
ConfigurationWindow.xaml
-
+
ConditionPanel.xaml
-
+
DemoParam.xaml
@@ -150,15 +154,15 @@
LoopWindow.xaml
-
-
-
+
+
+
InstructionPanel.xaml
-
-
+
+
-
+
ProgramList.xaml
@@ -167,7 +171,7 @@
LedWindow.xaml
-
+
LedParam.xaml
@@ -182,29 +186,33 @@
SongWindow.xaml
-
+
-
+
MSBuild:Compile
Designer
-
+
+ Designer
+ MSBuild:Compile
+
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
@@ -212,19 +220,19 @@
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
MSBuild:Compile
Designer
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
@@ -252,7 +260,7 @@
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
@@ -309,7 +317,7 @@
-
+
SettingsSingleFileGenerator
Settings.Designer.cs
@@ -399,6 +407,7 @@
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UI/Windows/ConfigurationWindow.xaml.cs b/UI/Windows/ConfigurationWindow.xaml.cs
index 881fdd1..a11856e 100644
--- a/UI/Windows/ConfigurationWindow.xaml.cs
+++ b/UI/Windows/ConfigurationWindow.xaml.cs
@@ -21,84 +21,50 @@ namespace iRobotGUI
///
public partial class ConfigurationWindow : Window
{
- private WinAvrConfiguation _config;
public static string[] ports;
- public WinAvrConfiguation Config
- {
- set
- {
- _config = value;
-
- switch (value.firmwareVersion)
- {
- case WinAvrConfiguation.STK500:
- radio0.IsChecked = true;
- break;
- case WinAvrConfiguation.STK500V1:
- radio1.IsChecked = true;
- break;
- case WinAvrConfiguation.STK500V2:
- radio2.IsChecked = true;
- break;
- }
- }
- get
- {
- return _config;
- }
- }
-
public ConfigurationWindow()
{
- ports = System.IO.Ports.SerialPort.GetPortNames();
-
InitializeComponent();
- // https://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.selector.selectedindex(v=vs.110).aspx
- // If you set SelectedIndex to a value equal or greater than the number of child elements, the value is ignored.
- // Try to select the first one.
- if (comboBoxCom.SelectedIndex == -1) comboBoxCom.SelectedIndex = 0;
+ // COM Port
+ comMC.ComPort = Settings.Default.MicrocontrollerComPort;
+ // Firmware
+ switch (Settings.Default.FirmwareVersion)
+ {
+ case WinAvrConfiguation.STK500:
+ radio0.IsChecked = true;
+ break;
+ case WinAvrConfiguation.STK500V1:
+ radio1.IsChecked = true;
+ break;
+ case WinAvrConfiguation.STK500V2:
+ radio2.IsChecked = true;
+ break;
+ default:
+ radio1.IsChecked = true;
+ break;
+ }
}
private void buttonOk_Click(object sender, RoutedEventArgs e)
{
- _config.comPort = comboBoxCom.Text;
+ // COM Port
+ Settings.Default.MicrocontrollerComPort = comMC.ComPort;
+ // Firmware
if (radio0.IsChecked ?? false)
- _config.firmwareVersion = radio0.Content.ToString();
+ Settings.Default.FirmwareVersion = WinAvrConfiguation.STK500;
else if (radio1.IsChecked ?? false)
- _config.firmwareVersion = radio1.Content.ToString();
+ Settings.Default.FirmwareVersion = WinAvrConfiguation.STK500V1;
else if (radio2.IsChecked ?? false)
- _config.firmwareVersion = radio2.Content.ToString();
-
- WinAvrConnector.CustomizeMakefile();
- DialogResult = true;
- }
-
- private void ButtonDeviceManager_Click(object sender, RoutedEventArgs e)
- {
- System.Diagnostics.Process.Start("devmgmt.msc");
- }
+ Settings.Default.FirmwareVersion = WinAvrConfiguation.STK500V2;
- protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
- {
Settings.Default.Save();
- base.OnClosing(e);
- }
-
- private void ButtonRefresh_Click(object sender, RoutedEventArgs e)
- {
- ports = System.IO.Ports.SerialPort.GetPortNames();
- int previousIndex = comboBoxCom.SelectedIndex;
- comboBoxCom.ItemsSource = ports;
-
- // Select the previously selected item again.
- if (previousIndex < 0) comboBoxCom.SelectedIndex = 0;
- else if (previousIndex < ports.Length) comboBoxCom.SelectedIndex = previousIndex;
- else comboBoxCom.SelectedIndex = ports.Length - 1;
+ DialogResult = true;
}
+
}
}
diff --git a/UI/Windows/SettingsWindow.xaml b/UI/Windows/SettingsWindow.xaml
index 945475a..e4f392f 100644
--- a/UI/Windows/SettingsWindow.xaml
+++ b/UI/Windows/SettingsWindow.xaml
@@ -1,8 +1,10 @@
-
@@ -12,17 +14,22 @@
+ IsChecked="{Binding PopupWindowForNewIns, Mode=TwoWay, Source={x:Static p:Settings.Default}, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,0,10" />
+ IsChecked="{Binding OpenCCode, Mode=TwoWay, Source={x:Static p:Settings.Default}, UpdateSourceTrigger=PropertyChanged}" />
+ Text="{Binding EmulatorPath, Mode=TwoWay, Source={x:Static p:Settings.Default}, UpdateSourceTrigger=PropertyChanged}" />
+
+
+
+
+
diff --git a/UI/Windows/SettingsWindow.xaml.cs b/UI/Windows/SettingsWindow.xaml.cs
index afd4d95..6b189a1 100644
--- a/UI/Windows/SettingsWindow.xaml.cs
+++ b/UI/Windows/SettingsWindow.xaml.cs
@@ -31,12 +31,13 @@ public partial class SettingsWindow : Window
public SettingsWindow()
{
InitializeComponent();
-
- textBoxEmulatorPath.Text = Settings.Default.EmulatorPath;
+
+ emulatorCom.ComPort = Settings.Default.EmulatorComPort;
}
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
+ Settings.Default.EmulatorComPort = emulatorCom.ComPort;
Settings.Default.Save();
base.OnClosing(e);
}
@@ -63,7 +64,7 @@ private void buttonShowInExplorer_Click(object sender, RoutedEventArgs e)
///
/// Set the default emualtor path. Since the emualtor is shipped with the release package,
- /// this method gets the directory where the exe file locates and combine it with MCEmulator.
+ /// this method gets the directory where the exe file locates and combines it with MCEmulator.
///
public static void SetDefaultEmulatorPath()
{
diff --git a/cprogram/makefile b/cprogram/makefile
index b84a400..3c390fe 100644
--- a/cprogram/makefile
+++ b/cprogram/makefile
@@ -201,7 +201,7 @@ LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
AVRDUDE_PROGRAMMER = stk500v1
# com1 = serial port. Use lpt1 to connect to parallel port.
-AVRDUDE_PORT = 22 # programmer connected to serial device
+AVRDUDE_PORT = COM6 # programmer connected to serial device
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
@@ -245,7 +245,7 @@ DEBUG_BACKEND = avarice
GDBINIT_FILE = __avr_gdbinit
# When using avarice settings for the JTAG
-JTAG_DEV = /dev/22
+JTAG_DEV = /dev/COM6
# Debugging port used to communicate between GDB / avarice / simulavr.
DEBUG_PORT = 4242
diff --git a/iRobotGUI.sln b/iRobotGUI.sln
index 0394b02..f2ba74d 100644
--- a/iRobotGUI.sln
+++ b/iRobotGUI.sln
@@ -7,8 +7,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranslatorLib", "Translator
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranslatorConsole", "TranslatorConsole\TranslatorConsole.csproj", "{EAF10494-A84D-4BB4-9672-624FF1C93B0E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PianoKeyboardDemo", "PianoKeyboardDemo\PianoKeyboardDemo.csproj", "{16939739-CF95-4638-B0CF-B5F6DC42D588}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sanford.Multimedia.Midi", "Sanford.Multimedia.Midi\Sanford.Multimedia.Midi.csproj", "{4269C72A-8D3A-4737-8F89-72EAA33EA9E1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighLevelProgram", "HighLevelProgram\HighLevelProgram.csproj", "{05B8EACD-5EB2-420E-9F99-7A76BE66C52C}"
@@ -17,22 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI", "UI\UI.csproj", "{3BCF
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{1F575FE5-FD5B-41FB-BDB2-C35D76E53CA2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestJiashuo", "TempJiashuo\TestJiashuo.csproj", "{D75EED5C-428B-4C4C-8542-CF183FAB624E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestSergey", "TempSergey\TestSergey.csproj", "{4DA530A0-650E-4261-B216-6F1F8EB2B46D}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestChen", "TempChen\TestChen.csproj", "{47F13A95-5158-46BA-B2C5-29D8773A304E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestYun", "TestYun\TestYun.csproj", "{BA59B7C4-50E7-4EB5-8885-19AE88276E03}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestYunConsole", "TestYunConsole\TestYunConsole.csproj", "{4E69C6E1-2420-4A24-97C1-A83AFE334E5B}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs.Wpf", "Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj", "{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs.Wpf.Sample", "Ookii.Dialogs.Wpf.Sample\Ookii.Dialogs.Wpf.Sample.csproj", "{E38181B2-E8E5-466D-9099-33FE75B4CFA1}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestJiashuoConsole", "TestJiashuoConsole\TestJiashuoConsole.csproj", "{1923D0CB-0BED-4C32-A80E-ED18B49B3796}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestHLProgram", "UnitTestHLProgram\UnitTestHLProgram.csproj", "{653C05F1-8C97-4F27-A931-DAB4A8C12DDF}"
EndProject
Global
@@ -49,10 +33,6 @@ Global
{EAF10494-A84D-4BB4-9672-624FF1C93B0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAF10494-A84D-4BB4-9672-624FF1C93B0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAF10494-A84D-4BB4-9672-624FF1C93B0E}.Release|Any CPU.Build.0 = Release|Any CPU
- {16939739-CF95-4638-B0CF-B5F6DC42D588}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {16939739-CF95-4638-B0CF-B5F6DC42D588}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {16939739-CF95-4638-B0CF-B5F6DC42D588}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {16939739-CF95-4638-B0CF-B5F6DC42D588}.Release|Any CPU.Build.0 = Release|Any CPU
{4269C72A-8D3A-4737-8F89-72EAA33EA9E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4269C72A-8D3A-4737-8F89-72EAA33EA9E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4269C72A-8D3A-4737-8F89-72EAA33EA9E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -69,38 +49,10 @@ Global
{1F575FE5-FD5B-41FB-BDB2-C35D76E53CA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F575FE5-FD5B-41FB-BDB2-C35D76E53CA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F575FE5-FD5B-41FB-BDB2-C35D76E53CA2}.Release|Any CPU.Build.0 = Release|Any CPU
- {D75EED5C-428B-4C4C-8542-CF183FAB624E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D75EED5C-428B-4C4C-8542-CF183FAB624E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D75EED5C-428B-4C4C-8542-CF183FAB624E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D75EED5C-428B-4C4C-8542-CF183FAB624E}.Release|Any CPU.Build.0 = Release|Any CPU
- {4DA530A0-650E-4261-B216-6F1F8EB2B46D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4DA530A0-650E-4261-B216-6F1F8EB2B46D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4DA530A0-650E-4261-B216-6F1F8EB2B46D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4DA530A0-650E-4261-B216-6F1F8EB2B46D}.Release|Any CPU.Build.0 = Release|Any CPU
- {47F13A95-5158-46BA-B2C5-29D8773A304E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {47F13A95-5158-46BA-B2C5-29D8773A304E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {47F13A95-5158-46BA-B2C5-29D8773A304E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {47F13A95-5158-46BA-B2C5-29D8773A304E}.Release|Any CPU.Build.0 = Release|Any CPU
- {BA59B7C4-50E7-4EB5-8885-19AE88276E03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BA59B7C4-50E7-4EB5-8885-19AE88276E03}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BA59B7C4-50E7-4EB5-8885-19AE88276E03}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BA59B7C4-50E7-4EB5-8885-19AE88276E03}.Release|Any CPU.Build.0 = Release|Any CPU
- {4E69C6E1-2420-4A24-97C1-A83AFE334E5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4E69C6E1-2420-4A24-97C1-A83AFE334E5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4E69C6E1-2420-4A24-97C1-A83AFE334E5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4E69C6E1-2420-4A24-97C1-A83AFE334E5B}.Release|Any CPU.Build.0 = Release|Any CPU
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}.Release|Any CPU.Build.0 = Release|Any CPU
- {E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E38181B2-E8E5-466D-9099-33FE75B4CFA1}.Release|Any CPU.Build.0 = Release|Any CPU
- {1923D0CB-0BED-4C32-A80E-ED18B49B3796}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1923D0CB-0BED-4C32-A80E-ED18B49B3796}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1923D0CB-0BED-4C32-A80E-ED18B49B3796}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1923D0CB-0BED-4C32-A80E-ED18B49B3796}.Release|Any CPU.Build.0 = Release|Any CPU
{653C05F1-8C97-4F27-A931-DAB4A8C12DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{653C05F1-8C97-4F27-A931-DAB4A8C12DDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{653C05F1-8C97-4F27-A931-DAB4A8C12DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU