Permalink
Browse files

2008-03-02 Ivan N. Zlatev <contact@i-nz.net>

	* Enable Undo, Redo, Cut, Copy, Paste, Delete as I've already implmented
	those in System.Design.
	* Much better code for the PropertyGrid
	* Makefile: Fixes and improvements.
	* Program.cs: Fix spacing.
	* DesignTime/CodeProviderDesignerLoader.cs: Report errors only if 
	we weren't successful.
	* DesignTime/UndoRedoEngine.cs: Fix multi undo/redo operations.


svn path=/trunk/mwf-designer/; revision=97142
  • Loading branch information...
1 parent 3676be3 commit e76f609195715a43e46a6881d89fb1a484d2447a @ivanz ivanz committed Mar 2, 2008
View
@@ -1,3 +1,14 @@
+2008-03-02 Ivan N. Zlatev <contact@i-nz.net>
+
+ * Enable Undo, Redo, Cut, Copy, Paste, Delete as I've already implmented
+ those in System.Design.
+ * Much better code for the PropertyGrid
+ * Makefile: Fixes and improvements.
+ * Program.cs: Fix spacing.
+ * DesignTime/CodeProviderDesignerLoader.cs: Report errors only if
+ we weren't successful.
+ * DesignTime/UndoRedoEngine.cs: Fix multi undo/redo operations.
+
2008-01-07 Ivan N. Zlatev <contact@i-nz.net>
* UI/ToolBoxList/ToolBoxList.cs:
View
@@ -3,22 +3,22 @@ BUILD_DIR=build
MD_BUILD_DIR=../build
DEPS_DIR = deps
DEPS = ${DEPS_DIR}/*
-DIST_DIR = ${BUILD_DIR}/mwf-designer
+DIST_DIR = ${BUILD_DIR}/mwf-designer-dist
MD_DIST_DIR = ${MD_BUILD_DIR}/mwf-designer
ASSEMBLY=mwf-designer.exe
-REFERENCES=System.Design,System.Windows.Forms,System.Drawing,System.Data,${BUILD_DIR}/ICSharpCode.NRefactory.dll
+REFERENCES=System.Design,System.Windows.Forms,System.Drawing,System.Data,${DEPS_DIR}/ICSharpCode.NRefactory.dll
MD_REFERENCES=System.Design,System.Windows.Forms,System.Drawing,System.Data,${MD_BUILD_DIR}/ICSharpCode.NRefactory.dll
all:
mkdir -p ${BUILD_DIR}
cp ${DEPS_DIR}/ICSharpCode.NRefactory.dll ${BUILD_DIR}
- gmcs -debug -r:${REFERENCES} -out:${BUILD_DIR}/${ASSEMBLY} ${SOURCES}
+ export MCS_COLORS=disable;gmcs -debug -r:${REFERENCES} -out:${BUILD_DIR}/${ASSEMBLY} ${SOURCES}
run:
cd ${BUILD_DIR};mono --debug mwf-designer.exe
msnet:
- csc -debug -d:NET_2_0 -t:library -r:System.Design.dll,System.Windows.Forms.dll,System.Drawing.dll,System.Data.dll,..\build\Mono.Design.dll,..\build\ICSharpCode.NRefactory.dll -out:build\mwf-designer.exe src\*.cs src\*\*.cs
+ csc -debug -d:NET_2_0 -t:library -r:System.Design.dll,System.Windows.Forms.dll,System.Drawing.dll,System.Data.dll,..\build\Mono.Design.dll,..\build\ICSharpCode.NRefactory.dll -out:build\mwf-designer.exe src\\*.cs src\\*\\*.cs
dist:
mkdir -p ${DIST_DIR}
@@ -30,7 +30,7 @@ dist:
mono-design:
mkdir -p ${MD_BUILD_DIR}
cp ${DEPS} ${MD_BUILD_DIR}
- gmcs -d:WITH_MONO_DESIGN -debug -r:${MD_REFERENCES} -r:${MD_BUILD_DIR}/Mono.Design.dll -out:${MD_BUILD_DIR}/${ASSEMBLY} ${SOURCES}
+ export MCS_COLORS=disable;gmcs -d:WITH_MONO_DESIGN -debug -r:${MD_REFERENCES} -r:${MD_BUILD_DIR}/Mono.Design.dll -out:${MD_BUILD_DIR}/${ASSEMBLY} ${SOURCES}
mono-design-run:
cd ${MD_BUILD_DIR};mono --debug mwf-designer.exe
View
@@ -38,7 +38,6 @@
</Target>
</Menu>
<Includes>
- <Include Dir="&lt;double click here to add another entry&gt;"/>
</Includes>
<Dependencies Name="Release">
<Dependency Project="../Mono.Design/Mono.Design.vpj"/>
@@ -55,7 +54,9 @@
<F N="src/DesignTime/CodeProvider.cs"/>
<F N="src/DesignTime/CodeProviderDesignerLoader.cs"/>
<F N="src/DesignTime/CodeProviderEventBindingService.cs"/>
+ <F N="src/DesignTime/ToolboxFiller.cs"/>
<F N="src/DesignTime/TypeResolutionService.cs"/>
+ <F N="src/DesignTime/UndoRedoEngine.cs"/>
</Folder>
<Folder Name="Project">
<F N="src/Project/Document.cs"/>
@@ -70,6 +71,9 @@
<F N="src/UI/ToolBoxList/ToolBoxList.cs"/>
<F N="src/UI/ToolBoxList/ToolBoxListItem.cs"/>
</Folder>
+ <F N="src/UI/ErrorList.cs"/>
+ <F N="src/UI/ErrorList.Designer.cs"/>
+ <F N="src/UI/ErrorListTabPage.cs"/>
<F N="src/UI/MainView.cs"/>
<F N="src/UI/MainView.Designer.cs"/>
<F N="src/UI/NewFileDialog.cs"/>
@@ -78,8 +82,6 @@
<F N="src/UI/PropertyGrid.Designer.cs"/>
<F N="src/UI/ReferencesDialog.cs"/>
<F N="src/UI/ReferencesDialog.Designer.cs"/>
- <F N="src/UI/Toolbox.cs"/>
- <F N="src/UI/Toolbox.Designer.cs"/>
</Folder>
<F N="src/AssemblyInfo.cs"/>
<F N="src/Program.cs"/>
@@ -75,8 +75,7 @@ protected override void Write (CodeCompileUnit unit)
protected override void OnEndLoad (bool successful, ICollection errors)
{
- if (!successful)
- ReportErrors (errors);
+ ReportErrors (errors);
base.OnEndLoad (successful, errors);
}
@@ -52,10 +52,12 @@ public UndoRedoEngine (IServiceProvider provider) : base (provider)
protected override void AddUndoUnit (UndoEngine.UndoUnit unit)
{
_undoUnits.Push (unit);
+ _redoUnits.Clear ();
}
protected override void DiscardUndoUnit (UndoEngine.UndoUnit unit)
{
+ base.DiscardUndoUnit (unit);
if (_undoUnits.Count > 0 && Object.ReferenceEquals (unit, _undoUnits.Peek ()))
_undoUnits.Pop ();
}
@@ -68,10 +70,10 @@ public void Undo ()
public void Undo (int actionsCount)
{
if (actionsCount <= 0 || actionsCount > _undoUnits.Count)
- throw new ArgumentOutOfRangeException ("actionsCount");
-
+ return;
for (; actionsCount != 0; actionsCount--) {
UndoUnit unit = _undoUnits.Pop ();
+ // Console.WriteLine ("undo: " + unit.Name);
unit.Undo ();
_redoUnits.Push (unit);
}
@@ -85,10 +87,11 @@ public void Redo ()
public void Redo (int actionsCount)
{
if (actionsCount <= 0 || actionsCount > _redoUnits.Count)
- throw new ArgumentOutOfRangeException ("actionsCount");
+ return;
for (; actionsCount != 0; actionsCount--) {
UndoUnit unit = _redoUnits.Pop ();
+ // Console.WriteLine ("redo: " + unit.Name);
unit.Undo ();
_undoUnits.Push (unit);
}
View
@@ -12,26 +12,27 @@ static class Program
[STAThread]
static void Main()
{
- AppDomain.CurrentDomain.UnhandledException += delegate (object sender, UnhandledExceptionEventArgs args) {
- if (args.ExceptionObject is Exception)
- OnException ((Exception)args.ExceptionObject);
- };
+ AppDomain.CurrentDomain.UnhandledException += delegate (object sender, UnhandledExceptionEventArgs args) {
+ System.Windows.Forms.MessageBox.Show (args.ExceptionObject.GetType ().Name);
+ if (args.ExceptionObject is Exception)
+ OnException ((Exception)args.ExceptionObject);
+ };
- try {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new MainView());
- } catch (Exception e) {
- OnException (e);
- System.Windows.Forms.Application.Exit ();
- }
+ try {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new MainView());
+ } catch (Exception e) {
+ OnException (e);
+ System.Windows.Forms.Application.Exit ();
+ }
}
- private static void OnException (Exception e)
- {
- MessageBox.Show ("A fatal error occured. Please file a bug report with the following details (Ctrl-C to copy to clipboard):" +
- System.Environment.NewLine + System.Environment.NewLine +
- e.ToString (), "Fatal Error");
- }
+ private static void OnException (Exception e)
+ {
+ MessageBox.Show ("A fatal error occured. Please file a bug report with the following details (Ctrl-C to copy to clipboard):" +
+ System.Environment.NewLine + System.Environment.NewLine +
+ e.ToString (), "Fatal Error");
+ }
}
}
View
@@ -34,7 +34,6 @@
#if WITH_MONO_DESIGN
using Mono.Design;
using DesignSurface = Mono.Design.DesignSurface;
-using UndoEngine = Mono.Design.UndoEngine;
#endif
namespace mwf_designer
View
@@ -32,10 +32,6 @@
using System.Reflection;
using System.Drawing.Design;
-#if WITH_MONO_DESIGN
-using Mono.Design;
-#endif
-
namespace mwf_designer
{
internal class Workspace
View
@@ -77,7 +77,7 @@ public ErrorList ()
private void saveButton_Click (object sender, EventArgs e)
{
SaveFileDialog dialog = new SaveFileDialog();
- dialog.OverwritePrompt = true;
+ dialog.OverwritePrompt = true;
if (dialog.ShowDialog() == DialogResult.OK)
WriteErrorsToFile (dialog.FileName);
}
@@ -69,7 +69,6 @@ void IUIService.ShowError (Exception exception)
if (exception.Data["Details"] != null)
details = (string)exception.Data["Details"] + System.Environment.NewLine + System.Environment.NewLine + details;
-
_errorList.AddError (exception.Message, details);
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit e76f609

Please sign in to comment.