Browse Source

Update SDR for SD 4.0

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/reports@5793 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
95b60b5d98
  1. 19
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/ICSharpCode.ReportDesigner.addin
  2. 27
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/ICSharpCode.Reports.Addin.csproj
  3. 62
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Commands/EditCommands.cs
  4. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Commands/FormsCommand.cs
  5. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/DesignerBinding/ReportDefinitionDeserializer.cs
  6. 6
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportDesignerView.cs
  7. 4
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportExplorer/ReportExplorerPad.cs
  8. 238
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/AbstractOptionPanel.cs
  9. 140
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/AbstractWizardPanel.cs
  10. 59
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/CurrentPanelPanel.cs
  11. 78
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/DefaultDialogPanelDescriptor.cs
  12. 68
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/DialogPanelDoozer.cs
  13. 50
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/IDialogPanel.cs
  14. 44
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/IDialogPanelDescriptor.cs
  15. 89
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/IWizardPanel.cs
  16. 63
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/StatusPanel.cs
  17. 347
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/WizardDialog.cs
  18. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SecondaryViews/ReportPreview.cs
  19. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SecondaryViews/ReportViewerSecondaryView.cs
  20. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SecondaryViews/XmlView.cs
  21. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Services/DefaultServiceContainer.cs
  22. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Services/TypeDiscoveryService.cs
  23. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Services/UIService.cs
  24. 13
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SharpQuery/GUI/SharpQueryDataView.cs
  25. 12
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SharpQuery/GUI/SharpQueryPad.cs
  26. 4
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/Designer/MockOpenedFile.cs
  27. 19
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/Designer/MockViewContend.cs
  28. 2
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/Designer/ReportDesignerDisplayBindingTestFixture.cs
  29. 5
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/ICSharpCode.Reports.Addin.Test.csproj
  30. 10
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/ICSharpCode.Reports.Core.csproj
  31. 5
      src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/ICSharpCode.Reports.Core.Test.csproj
  32. 4
      src/AddIns/Misc/Reports/SharpDevelop.Reports.sln

19
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/ICSharpCode.ReportDesigner.addin

@ -11,7 +11,9 @@
</Manifest> </Manifest>
<Runtime> <Runtime>
<Import assembly = "ICSharpCode.Reports.Addin.dll"/> <Import assembly = "ICSharpCode.Reports.Addin.dll">
<Doozer name="ReportDialogPanel" class="ICSharpCode.Reports.Addin.ReportWizard.DialogPanelDoozer"/>
</Import>
</Runtime> </Runtime>
<!-- DisplayBinding --> <!-- DisplayBinding -->
@ -68,8 +70,7 @@
<MenuItem id = "Paste" <MenuItem id = "Paste"
label = "${res:XML.MainMenu.EditMenu.Paste}" label = "${res:XML.MainMenu.EditMenu.Paste}"
icon = "Icons.16x16.PasteIcon" icon = "Icons.16x16.PasteIcon"
loadclasslazy = "false" command = "Paste"/>
class = "ICSharpCode.Reports.Addin.Commands.Paste"/>
<MenuItem id = "DesignerVerbsSeparator" type = "Separator"/> <MenuItem id = "DesignerVerbsSeparator" type = "Separator"/>
@ -115,25 +116,21 @@
<MenuItem id = "Cut" <MenuItem id = "Cut"
label = "${res:XML.MainMenu.EditMenu.Cut}" label = "${res:XML.MainMenu.EditMenu.Cut}"
icon = "Icons.16x16.CutIcon" icon = "Icons.16x16.CutIcon"
loadclasslazy = "false" command = "Cut"/>
class = "ICSharpCode.Reports.Addin.Commands.Cut"/>
<MenuItem id = "Copy" <MenuItem id = "Copy"
label = "${res:XML.MainMenu.EditMenu.Copy}" label = "${res:XML.MainMenu.EditMenu.Copy}"
icon = "Icons.16x16.CopyIcon" icon = "Icons.16x16.CopyIcon"
loadclasslazy = "false" command = "Copy"/>
class = "ICSharpCode.Reports.Addin.Commands.Copy"/>
<MenuItem id = "Paste" <MenuItem id = "Paste"
label = "${res:XML.MainMenu.EditMenu.Paste}" label = "${res:XML.MainMenu.EditMenu.Paste}"
icon = "Icons.16x16.PasteIcon" icon = "Icons.16x16.PasteIcon"
loadclasslazy = "false" command = "Paste"/>
class = "ICSharpCode.Reports.Addin.Commands.Paste"/>
<MenuItem id = "Delete" <MenuItem id = "Delete"
label = "${res:XML.MainMenu.EditMenu.Delete}" label = "${res:XML.MainMenu.EditMenu.Delete}"
icon = "Icons.16x16.DeleteIcon" icon = "Icons.16x16.DeleteIcon"
loadclasslazy = "false" command = "Delete"/>
class = "ICSharpCode.Reports.Addin.Commands.Delete"/>
<MenuItem id = "DesignerVerbsSeparator" type = "Separator"/> <MenuItem id = "DesignerVerbsSeparator" type = "Separator"/>

27
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/ICSharpCode.Reports.Addin.csproj

@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.Reports.Addin</RootNamespace> <RootNamespace>ICSharpCode.Reports.Addin</RootNamespace>
@ -16,7 +17,7 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpDevelopReports\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpDevelopReports\</OutputPath>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SourceAnalysisOverrideSettingsFile>"C:\Program Files\SharpDevelop\bin\..\AddIns\AddIns\Misc\SourceAnalysis\Settings.SourceAnalysis"</SourceAnalysisOverrideSettingsFile> <SourceAnalysisOverrideSettingsFile>"C:\Program Files\SharpDevelop\bin\..\AddIns\AddIns\Misc\SourceAnalysis\Settings.SourceAnalysis"</SourceAnalysisOverrideSettingsFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
@ -25,7 +26,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<StartAction>Program</StartAction> <StartAction>Project</StartAction>
<StartProgram>..\..\..\..\..\bin\SharpDevelop.exe</StartProgram> <StartProgram>..\..\..\..\..\bin\SharpDevelop.exe</StartProgram>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
@ -72,7 +73,6 @@
<Compile Include="Project\Designer\RowItemDesigner.cs" /> <Compile Include="Project\Designer\RowItemDesigner.cs" />
<Compile Include="Project\Designer\Ruler.cs" /> <Compile Include="Project\Designer\Ruler.cs" />
<Compile Include="Project\Designer\SectionDesigner.cs" /> <Compile Include="Project\Designer\SectionDesigner.cs" />
<Compile Include="Project\Commands\EditCommands.cs" />
<Compile Include="Project\Commands\FormsCommand.cs" /> <Compile Include="Project\Commands\FormsCommand.cs" />
<Compile Include="Project\Commands\ViewCommands.cs" /> <Compile Include="Project\Commands\ViewCommands.cs" />
<Compile Include="Project\Configuration\AssemblyInfo.cs" /> <Compile Include="Project\Configuration\AssemblyInfo.cs" />
@ -138,6 +138,16 @@
<Compile Include="Project\ReportWizard\WizardPanels\LayoutPanelControl.Designer.cs"> <Compile Include="Project\ReportWizard\WizardPanels\LayoutPanelControl.Designer.cs">
<DependentUpon>LayoutPanelControl.cs</DependentUpon> <DependentUpon>LayoutPanelControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\AbstractOptionPanel.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\AbstractWizardPanel.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\CurrentPanelPanel.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\DefaultDialogPanelDescriptor.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\DialogPanelDoozer.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\IDialogPanel.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\IDialogPanelDescriptor.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\IWizardPanel.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\StatusPanel.cs" />
<Compile Include="Project\ReportWizard\WizardPanels\Wizard\WizardDialog.cs" />
<Compile Include="Project\SecondaryViews\ReportPreview.cs" /> <Compile Include="Project\SecondaryViews\ReportPreview.cs" />
<Compile Include="Project\SecondaryViews\ReportViewerMessages.cs" /> <Compile Include="Project\SecondaryViews\ReportViewerMessages.cs" />
<Compile Include="Project\SecondaryViews\ReportViewerSecondaryView.cs" /> <Compile Include="Project\SecondaryViews\ReportViewerSecondaryView.cs" />
@ -194,8 +204,12 @@
<EmbeddedResource Include="Project\ReportWizard\WizardPanels\PullModelPanel.resx"> <EmbeddedResource Include="Project\ReportWizard\WizardPanels\PullModelPanel.resx">
<DependentUpon>PullModelPanel.cs</DependentUpon> <DependentUpon>PullModelPanel.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Project\ReportWizard\WizardPanels\PushModelPanel.resx" /> <EmbeddedResource Include="Project\ReportWizard\WizardPanels\PushModelPanel.resx">
<EmbeddedResource Include="Project\ReportWizard\WizardPanels\ResultPanel.resx" /> <DependentUpon>PushModelPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Project\ReportWizard\WizardPanels\ResultPanel.resx">
<DependentUpon>ResultPanel.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Project\Configuration" /> <Folder Include="Project\Configuration" />
@ -205,6 +219,7 @@
<Folder Include="Project\DesignerBinding" /> <Folder Include="Project\DesignerBinding" />
<Folder Include="Project\Dialogs" /> <Folder Include="Project\Dialogs" />
<Folder Include="Project\Globals" /> <Folder Include="Project\Globals" />
<Folder Include="Project\ReportWizard\WizardPanels\Wizard" />
<Folder Include="Project\SharpQuery" /> <Folder Include="Project\SharpQuery" />
<Folder Include="Project\ReportExplorer" /> <Folder Include="Project\ReportExplorer" />
<Folder Include="Project\ReportWizard" /> <Folder Include="Project\ReportWizard" />

62
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Commands/EditCommands.cs

@ -1,62 +0,0 @@
/*
* Erstellt mit SharpDevelop.
* Benutzer: Peter Forstmeier
* Datum: 15.10.2007
* Zeit: 11:26
*
* Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using ICSharpCode.SharpDevelop.Commands;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Reports.Addin.Commands
{
public class Cut : AbstractClipboardCommand
{
protected override bool GetEnabled(IClipboardHandler editable) {
return editable.EnableCut;
}
protected override void Run(IClipboardHandler editable) {
editable.Cut();
}
}
public class Copy : AbstractClipboardCommand
{
protected override bool GetEnabled(IClipboardHandler editable) {
return editable.EnableCopy;
}
protected override void Run(IClipboardHandler editable) {
editable.Copy();
}
}
public class Delete : AbstractClipboardCommand
{
protected override bool GetEnabled(IClipboardHandler editable) {
return editable.EnableDelete;
}
protected override void Run(IClipboardHandler editable) {
editable.Delete();
}
}
public class Paste : AbstractClipboardCommand
{
protected override bool GetEnabled(IClipboardHandler editable) {
return editable.EnablePaste;
}
protected override void Run(IClipboardHandler editable) {
editable.Paste();
}
}
}

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Commands/FormsCommand.cs

@ -155,7 +155,7 @@ namespace ICSharpCode.Reports.Addin.Commands
try { try {
verb.Invoke(); verb.Invoke();
} catch (Exception ex) { } catch (Exception ex) {
MessageService.ShowError(ex); MessageService.ShowException(ex);
} }
} }
} }

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/DesignerBinding/ReportDefinitionDeserializer.cs

@ -79,7 +79,7 @@ namespace ICSharpCode.Reports.Addin
// ConvertAbsolut2RelativePath(section,this.reportSettings.FileName); // ConvertAbsolut2RelativePath(section,this.reportSettings.FileName);
host.Container.Add(section); host.Container.Add(section);
} catch (Exception e) { } catch (Exception e) {
MessageService.ShowError(e); MessageService.ShowException(e);
} }
} }
return model; return model;

6
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportDesignerView.cs

@ -608,14 +608,14 @@ namespace ICSharpCode.Reports.Addin
public void SelectAll() public void SelectAll()
{ {
MessageService.ShowError(new NotImplementedException()); throw new NotImplementedException();
} }
#endregion #endregion
#region IToolsHost #region IToolsHost
System.Windows.Forms.Control IToolsHost.ToolsControl { object IToolsHost.ToolsContent {
get { get {
return ReportingSideTabProvider.ReportingSideBar; return ReportingSideTabProvider.ReportingSideBar;
} }
@ -704,7 +704,7 @@ namespace ICSharpCode.Reports.Addin
#region overrides #region overrides
public override Control Control { public override object Control {
get { get {
return panel; return panel;
} }

4
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportExplorer/ReportExplorerPad.cs

@ -91,7 +91,7 @@ namespace ICSharpCode.Reports.Addin
if (abstrNode != null) { if (abstrNode != null) {
if (abstrNode.ContextMenuAddinTreePath.Length > 0) { if (abstrNode.ContextMenuAddinTreePath.Length > 0) {
ContextMenuStrip ctMen = MenuService.CreateContextMenu (this,abstrNode.ContextMenuAddinTreePath); ContextMenuStrip ctMen = MenuService.CreateContextMenu (this,abstrNode.ContextMenuAddinTreePath);
ctMen.Show (this.Control,new Point (e.X,e.Y)); ctMen.Show (this.explorerTree, new Point (e.X,e.Y));
} }
} }
} }
@ -227,7 +227,7 @@ namespace ICSharpCode.Reports.Addin
/// <summary> /// <summary>
/// The <see cref="System.Windows.Forms.Control"/> representing the pad /// The <see cref="System.Windows.Forms.Control"/> representing the pad
/// </summary> /// </summary>
public override Control Control public override object Control
{ {
get { get {
return this.explorerTree; return this.explorerTree;

238
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/AbstractOptionPanel.cs

@ -0,0 +1,238 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui.XmlForms;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
public class AbstractOptionPanel : BaseSharpDevelopUserControl, IDialogPanel
{
bool wasActivated = false;
bool isFinished = true;
object customizationObject;
public Control Control {
get {
return this;
}
}
public bool WasActivated {
get {
return wasActivated;
}
}
public object CustomizationObject {
get {
return customizationObject;
}
set {
customizationObject = value;
OnCustomizationObjectChanged();
}
}
public virtual bool EnableFinish {
get {
return isFinished;
}
set {
if (isFinished != value) {
isFinished = value;
OnEnableFinishChanged();
}
}
}
// public AbstractOptionPanel(string fileName) : base(fileName)
// {
// }
public AbstractOptionPanel()
{
}
public virtual bool ReceiveDialogMessage(DialogMessage message)
{
switch (message) {
case DialogMessage.Activated:
if (!wasActivated) {
LoadPanelContents();
wasActivated = true;
}
break;
case DialogMessage.OK:
if (wasActivated) {
return StorePanelContents();
}
break;
}
return true;
}
public virtual void LoadPanelContents()
{
}
public virtual bool StorePanelContents()
{
return true;
}
protected string baseDirectory;
protected void ConnectBrowseButton(string browseButton, string target, string fileFilter, TextBoxEditMode textBoxEditMode)
{
if (ControlDictionary[browseButton] == null) {
MessageService.ShowError(browseButton + " not found!");
return;
}
if (ControlDictionary[target] == null) {
MessageService.ShowError(target + " not found!");
return;
}
ControlDictionary[browseButton].Click += new EventHandler(new BrowseButtonEvent(this, ControlDictionary[target], fileFilter, textBoxEditMode).Event);
}
protected void ConnectBrowseFolder(string browseButton, string target, TextBoxEditMode textBoxEditMode)
{
ConnectBrowseFolder(browseButton, target, "${res:Dialog.ProjectOptions.SelectFolderTitle}", textBoxEditMode);
}
protected void ConnectBrowseFolder(string browseButton, string target, string description, TextBoxEditMode textBoxEditMode)
{
if (ControlDictionary[browseButton] == null) {
MessageService.ShowError(browseButton + " not found!");
return;
}
if (ControlDictionary[target] == null) {
MessageService.ShowError(target + " not found!");
return;
}
ControlDictionary[browseButton].Click += new EventHandler(new BrowseFolderEvent(this, target, description, textBoxEditMode).Event);
}
protected void BrowseForFile(Control target, string filter, TextBoxEditMode textBoxEditMode)
{
if (target == null) {
throw new ArgumentNullException("target");
}
new BrowseButtonEvent(this, target, filter, textBoxEditMode).Event(null, null);
}
sealed class BrowseButtonEvent
{
AbstractOptionPanel panel;
Control target;
string filter;
TextBoxEditMode textBoxEditMode;
public BrowseButtonEvent(AbstractOptionPanel panel, Control target, string filter, TextBoxEditMode textBoxEditMode)
{
this.panel = panel;
this.filter = filter;
this.target = target;
this.textBoxEditMode = textBoxEditMode;
}
public void Event(object sender, EventArgs e)
{
using (OpenFileDialog fdiag = new OpenFileDialog()) {
fdiag.Filter = StringParser.Parse(filter);
fdiag.Multiselect = false;
try {
string initialDir = System.IO.Path.GetDirectoryName(System.IO.Path.Combine(panel.baseDirectory, target.Text));
if (FileUtility.IsValidPath(initialDir) && System.IO.Directory.Exists(initialDir)) {
fdiag.InitialDirectory = initialDir;
}
} catch {}
if(fdiag.ShowDialog() == DialogResult.OK) {
string file = fdiag.FileName;
if (panel.baseDirectory != null) {
file = FileUtility.GetRelativePath(panel.baseDirectory, file);
}
if (textBoxEditMode == TextBoxEditMode.EditEvaluatedProperty) {
target.Text = file;
} else {
target.Text = MSBuildInternals.Escape(file);
}
}
}
}
}
sealed class BrowseFolderEvent
{
AbstractOptionPanel panel;
string target;
string description;
TextBoxEditMode textBoxEditMode;
internal BrowseFolderEvent(AbstractOptionPanel panel, string target, string description, TextBoxEditMode textBoxEditMode)
{
this.panel = panel;
this.description = description;
this.target = target;
this.textBoxEditMode = textBoxEditMode;
}
public void Event(object sender, EventArgs e)
{
string startLocation = panel.baseDirectory;
if (startLocation != null) {
string text = panel.ControlDictionary[target].Text;
if (textBoxEditMode == TextBoxEditMode.EditRawProperty)
text = MSBuildInternals.Unescape(text);
startLocation = FileUtility.GetAbsolutePath(startLocation, text);
}
using (FolderBrowserDialog fdiag = FileService.CreateFolderBrowserDialog(description, startLocation)) {
if (fdiag.ShowDialog() == DialogResult.OK) {
string path = fdiag.SelectedPath;
if (panel.baseDirectory != null) {
path = FileUtility.GetRelativePath(panel.baseDirectory, path);
}
if (!path.EndsWith("\\") && !path.EndsWith("/"))
path += "\\";
if (textBoxEditMode == TextBoxEditMode.EditEvaluatedProperty) {
panel.ControlDictionary[target].Text = path;
} else {
panel.ControlDictionary[target].Text = MSBuildInternals.Escape(path);
}
}
}
}
}
protected virtual void OnEnableFinishChanged()
{
if (EnableFinishChanged != null) {
EnableFinishChanged(this, null);
}
}
protected virtual void OnCustomizationObjectChanged()
{
if (CustomizationObjectChanged != null) {
CustomizationObjectChanged(this, null);
}
}
public event EventHandler CustomizationObjectChanged;
public event EventHandler EnableFinishChanged;
}
}

140
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/AbstractWizardPanel.cs

@ -0,0 +1,140 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Windows.Forms;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
public abstract class AbstractWizardPanel : AbstractOptionPanel, IWizardPanel
{
string nextWizardPanelID = String.Empty;
bool enablePrevious = true;
bool enableNext = true;
bool isLastPanel = false;
bool enableCancel = true;
public string NextWizardPanelID {
get {
return nextWizardPanelID;
}
set {
if (nextWizardPanelID != value) {
nextWizardPanelID = value;
OnNextWizardPanelIDChanged(EventArgs.Empty);
}
}
}
public bool IsLastPanel {
get {
return isLastPanel;
}
set {
if (isLastPanel != value) {
isLastPanel = value;
OnIsLastPanelChanged(EventArgs.Empty);
}
}
}
public bool EnableNext {
get {
return enableNext;
}
set {
if (enableNext != value) {
enableNext = value;
OnEnableNextChanged(EventArgs.Empty);
}
}
}
public bool EnablePrevious {
get {
return enablePrevious;
}
set {
if (enablePrevious != value) {
enablePrevious = value;
OnEnablePreviousChanged(EventArgs.Empty);
}
}
}
public bool EnableCancel {
get {
return enableCancel;
}
set {
if (enableCancel != value) {
enableCancel = value;
OnEnableCancelChanged(EventArgs.Empty);
}
}
}
// public AbstractWizardPanel(string fileName) : base(fileName)
// {
// }
public AbstractWizardPanel() : base()
{
}
protected virtual void FinishPanel()
{
if (FinishPanelRequested != null) {
FinishPanelRequested(this, EventArgs.Empty);
}
}
protected virtual void OnEnableNextChanged(EventArgs e)
{
if (EnableNextChanged != null) {
EnableNextChanged(this, e);
}
}
protected virtual void OnEnablePreviousChanged(EventArgs e)
{
if (EnablePreviousChanged != null) {
EnablePreviousChanged(this, e);
}
}
protected virtual void OnEnableCancelChanged(EventArgs e)
{
if (EnableCancelChanged != null) {
EnableCancelChanged(this, e);
}
}
protected virtual void OnNextWizardPanelIDChanged(EventArgs e)
{
if (NextWizardPanelIDChanged != null) {
NextWizardPanelIDChanged(this, e);
}
}
protected virtual void OnIsLastPanelChanged(EventArgs e)
{
if (IsLastPanelChanged != null) {
IsLastPanelChanged(this, e);
}
}
public event EventHandler EnablePreviousChanged;
public event EventHandler EnableNextChanged;
public event EventHandler EnableCancelChanged;
public event EventHandler NextWizardPanelIDChanged;
public event EventHandler IsLastPanelChanged;
public event EventHandler FinishPanelRequested;
}
}

59
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/CurrentPanelPanel.cs

@ -0,0 +1,59 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using ICSharpCode.Core.WinForms;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
public class CurrentPanelPanel : UserControl
{
WizardDialog wizard;
Font normalFont;
public CurrentPanelPanel(WizardDialog wizard)
{
normalFont = WinFormsResourceService.LoadFont("SansSerif", 18, GraphicsUnit.World);
this.wizard = wizard;
Size = new Size(wizard.Width - 220, 30);
ResizeRedraw = false;
SetStyle(ControlStyles.UserPaint, true);
}
protected override void OnPaintBackground(PaintEventArgs pe)
{
// base.OnPaintBackground(pe);
Graphics g = pe.Graphics;
// g.FillRectangle(new SolidBrush(SystemColors.Control), pe.ClipRectangle);
using (Brush brush = new LinearGradientBrush(new Point(0, 0), new Point(Width, Height),
Color.White,
SystemColors.Control)) {
g.FillRectangle(brush, new Rectangle(0, 0, Width, Height));
}
}
protected override void OnPaint(PaintEventArgs pe)
{
// base.OnPaint(pe);
Graphics g = pe.Graphics;
g.DrawString(((IDialogPanelDescriptor)wizard.WizardPanels[wizard.ActivePanelNumber]).Label, normalFont, Brushes.Black,
10,
24 - normalFont.Height,
StringFormat.GenericTypographic);
g.DrawLine(Pens.Black, 10, 24, Width - 10, 24);
}
}
}

78
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/DefaultDialogPanelDescriptor.cs

@ -0,0 +1,78 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
public class DefaultDialogPanelDescriptor : IDialogPanelDescriptor
{
string id = String.Empty;
string label = String.Empty;
List<IDialogPanelDescriptor> dialogPanelDescriptors = null;
IDialogPanel dialogPanel = null;
public string ID {
get {
return id;
}
}
public string Label {
get {
return label;
}
set {
label = value;
}
}
public IEnumerable<IDialogPanelDescriptor> ChildDialogPanelDescriptors {
get {
return dialogPanelDescriptors;
}
}
AddIn addin;
string dialogPanelPath;
public IDialogPanel DialogPanel {
get {
if (dialogPanelPath != null) {
if (dialogPanel == null) {
dialogPanel = (IDialogPanel)addin.CreateObject(dialogPanelPath);
}
dialogPanelPath = null;
addin = null;
}
return dialogPanel;
}
set {
dialogPanel = value;
}
}
public DefaultDialogPanelDescriptor(string id, string label)
{
this.id = id;
this.label = label;
}
public DefaultDialogPanelDescriptor(string id, string label, List<IDialogPanelDescriptor> dialogPanelDescriptors) : this(id, label)
{
this.dialogPanelDescriptors = dialogPanelDescriptors;
}
public DefaultDialogPanelDescriptor(string id, string label, AddIn addin, string dialogPanelPath) : this(id, label)
{
this.addin = addin;
this.dialogPanelPath = dialogPanelPath;
}
}
}

68
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/DialogPanelDoozer.cs

@ -0,0 +1,68 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using ICSharpCode.Core;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
/// <summary>
/// Creates DefaultDialogPanelDescriptor objects that are used in option dialogs.
/// </summary>
/// <attribute name="class">
/// Name of the IDialogPanel class. Optional if the page has subpages.
/// </attribute>
/// <attribute name="label" use="required">
/// Caption of the dialog panel.
/// </attribute>
/// <children childTypes="DialogPanel">
/// In the SharpDevelop options, option pages can have subpages by specifying them
/// as children in the AddInTree.
/// </children>
/// <returns>
/// A DefaultDialogPanelDescriptor object.
/// </returns>
public class DialogPanelDoozer : IDoozer
{
/// <summary>
/// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
/// </summary>
public bool HandleConditions {
get {
return false;
}
}
/// <summary>
/// Creates an item with the specified sub items. And the current
/// Condition status for this item.
/// </summary>
public object BuildItem(object caller, Codon codon, ArrayList subItems)
{
string label = codon.Properties["label"];
if (subItems == null || subItems.Count == 0) {
if (codon.Properties.Contains("class")) {
return new DefaultDialogPanelDescriptor(codon.Id, StringParser.Parse(label), codon.AddIn, codon.Properties["class"]);
} else {
return new DefaultDialogPanelDescriptor(codon.Id, StringParser.Parse(label));
}
}
List<IDialogPanelDescriptor> newList = new List<IDialogPanelDescriptor>();
foreach (IDialogPanelDescriptor d in subItems) {
newList.Add(d);
}
return new DefaultDialogPanelDescriptor(codon.Id, StringParser.Parse(label), newList);
}
}
}

50
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/IDialogPanel.cs

@ -0,0 +1,50 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Windows.Forms;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
public enum DialogMessage {
OK,
Cancel,
Help,
Next,
Prev,
Finish,
Activated
}
public interface IDialogPanel
{
/// <summary>
/// Some panels do get an object which they can customize, like
/// Wizard Dialogs. Check the dialog description for more details
/// about this.
/// </summary>
object CustomizationObject {
get;
set;
}
Control Control {
get;
}
bool EnableFinish {
get;
}
/// <returns>
/// true, if the DialogMessage could be executed.
/// </returns>
bool ReceiveDialogMessage(DialogMessage message);
event EventHandler EnableFinishChanged;
}
}

44
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/IDialogPanelDescriptor.cs

@ -0,0 +1,44 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
public interface IDialogPanelDescriptor
{
/// <value>
/// Returns the ID of the dialog panel codon
/// </value>
string ID {
get;
}
/// <value>
/// Returns the label of the dialog panel
/// </value>
string Label {
get;
set;
}
/// <summary>
/// The child dialog panels (e.g. for treeviews)
/// </summary>
IEnumerable<IDialogPanelDescriptor> ChildDialogPanelDescriptors {
get;
}
/// <value>
/// Returns the dialog panel object
/// </value>
IDialogPanel DialogPanel {
get;
}
}
}

89
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/IWizardPanel.cs

@ -0,0 +1,89 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
/// <summary>
/// This interface extends the IDialogPanel interface with wizard specific
/// funcitons.
/// </summary>
public interface IWizardPanel : IDialogPanel
{
/// <remarks>
/// This is used for wizards which has more than one path, this
/// may be null for a standard wizard.
/// </remarks>
/// <value>The ID of the panel that follows this panel</value>
string NextWizardPanelID {
get;
}
/// <value>
/// true, if this panel has no successor and is the last panel in it's path.
/// This is only used for wizard that have no linear endings.
/// </value>
bool IsLastPanel {
get;
}
/// <value>
/// If true, the user can access the next panel.
/// </value>
bool EnableNext {
get;
}
/// <value>
/// If true, the user can access the previous panel.
/// </value>
bool EnablePrevious {
get;
}
/// <value>
/// If true, the user can cancel the wizard
/// </value>
bool EnableCancel {
get;
}
/// <remarks>
/// Is fired when the EnableNext property has changed.
/// </remarks>
event EventHandler EnableNextChanged;
/// <remarks>
/// Is fired when the NextWizardPanelID property has changed.
/// </remarks>
event EventHandler NextWizardPanelIDChanged;
/// <remarks>
/// Is fired when the IsLastPanel property has changed.
/// </remarks>
event EventHandler IsLastPanelChanged;
/// <remarks>
/// Is fired when the EnablePrevious property has changed.
/// </remarks>
event EventHandler EnablePreviousChanged;
/// <remarks>
/// Is fired when the EnableCancel property has changed.
/// </remarks>
event EventHandler EnableCancelChanged;
/// <remarks>
/// Is fired when the panel wants that the wizard goes over
/// to the next panel. This event overrides the EnableNext
/// property. (You can move over to the next with EnableNext
/// == false)
/// </remarks>
event EventHandler FinishPanelRequested;
}
}

63
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/StatusPanel.cs

@ -0,0 +1,63 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Drawing;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.Core.WinForms;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
public class StatusPanel : UserControl
{
WizardDialog wizard;
Font smallFont;
Font normalFont;
Font boldFont;
public StatusPanel(WizardDialog wizard)
{
smallFont = WinFormsResourceService.LoadFont("Tahoma", 14, GraphicsUnit.World);
normalFont = WinFormsResourceService.LoadFont("Tahoma", 14, GraphicsUnit.World);
boldFont = WinFormsResourceService.LoadFont("Tahoma", 14, FontStyle.Bold, GraphicsUnit.World);
this.wizard = wizard;
this.BackgroundImage = WinFormsResourceService.GetBitmap("GeneralWizardBackground");
Size = new Size(198, 400);
ResizeRedraw = false;
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
}
protected override void OnPaint(PaintEventArgs pe)
{
// base.OnPaint(pe);
Graphics g = pe.Graphics;
g.DrawString(ResourceService.GetString("SharpDevelop.Gui.Dialogs.WizardDialog.StepsLabel"),
smallFont,
SystemBrushes.WindowText,
10,
24 - smallFont.Height);
g.DrawLine(SystemPens.WindowText, 10, 24, Width - 10, 24);
int curNumber = 0;
for (int i = 0; i < wizard.WizardPanels.Count; i = wizard.GetSuccessorNumber(i)) {
Font curFont = wizard.ActivePanelNumber == i ? boldFont : normalFont;
IDialogPanelDescriptor descriptor = ((IDialogPanelDescriptor)wizard.WizardPanels[i]);
g.DrawString((1 + curNumber) + ". " + descriptor.Label, curFont, SystemBrushes.WindowText, 10, 40 + curNumber * curFont.Height);
++curNumber;
}
}
}
}

347
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/ReportWizard/WizardPanels/Wizard/WizardDialog.cs

@ -0,0 +1,347 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using ICSharpCode.Core;
namespace ICSharpCode.Reports.Addin.ReportWizard
{
/// <summary>
/// TreeView options are used, when more options will be edited (for something like
/// IDE Options + Plugin Options)
/// </summary>
public class WizardDialog : System.Windows.Forms.Form
{
StatusPanel statusPanel = null;
CurrentPanelPanel curPanel = null;
Panel dialogPanel = new Panel();
/// <remarks>
/// On this stack the indices of the previous active wizard panels. This
/// is used to restore the path the user gone. (for the back button)
/// </remarks>
Stack idStack = new Stack();
ArrayList wizardPanels = new ArrayList();
int activePanelNumber = 0;
EventHandler enableNextChangedHandler;
EventHandler enableCancelChangedHandler;
EventHandler nextWizardPanelIDChangedHandler;
EventHandler finishPanelHandler;
public ArrayList WizardPanels {
get {
return wizardPanels;
}
}
public int ActivePanelNumber {
get {
return activePanelNumber;
}
}
public IWizardPanel CurrentWizardPane {
get {
return (IWizardPanel)((IDialogPanelDescriptor)wizardPanels[activePanelNumber]).DialogPanel;
}
}
int GetPanelNumber(string id)
{
for (int i = 0; i < wizardPanels.Count; ++i) {
IDialogPanelDescriptor descriptor = (IDialogPanelDescriptor)wizardPanels[i];
if (descriptor.ID == id) {
return i;
}
}
return -1;
}
public int GetSuccessorNumber(int curNr)
{
IWizardPanel panel = (IWizardPanel)((IDialogPanelDescriptor)wizardPanels[curNr]).DialogPanel;
if (panel.IsLastPanel) {
return wizardPanels.Count + 1;
}
int nextID = GetPanelNumber(panel.NextWizardPanelID);
if (nextID < 0) {
return curNr + 1;
}
return nextID;
}
/// <value> returns true, if all dialog panels could be finished</value>
bool CanFinish {
get {
int currentNr = 0;
while (currentNr < wizardPanels.Count) {
IDialogPanelDescriptor descriptor = (IDialogPanelDescriptor)wizardPanels[currentNr];
if (!descriptor.DialogPanel.EnableFinish) {
return false;
}
currentNr = GetSuccessorNumber(currentNr);
}
return true;
}
}
Label label1 = new Label();
Button backButton = new Button();
Button nextButton = new Button();
Button finishButton = new Button();
Button cancelButton = new Button();
Button helpButton = new Button();
void CheckFinishedState(object sender, EventArgs e)
{
finishButton.Enabled = CanFinish;
}
void AddNodes(object customizer, IEnumerable<IDialogPanelDescriptor> dialogPanelDescriptors)
{
foreach (IDialogPanelDescriptor descriptor in dialogPanelDescriptors) {
if (descriptor.DialogPanel != null) { // may be null, if it is only a "path"
descriptor.DialogPanel.EnableFinishChanged += new EventHandler(CheckFinishedState);
descriptor.DialogPanel.CustomizationObject = customizer;
wizardPanels.Add(descriptor);
}
if (descriptor.ChildDialogPanelDescriptors != null) {
AddNodes(customizer, descriptor.ChildDialogPanelDescriptors);
}
}
}
void EnableCancelChanged(object sender, EventArgs e)
{
cancelButton.Enabled = CurrentWizardPane.EnableCancel;
}
void EnableNextChanged(object sender, EventArgs e)
{
nextButton.Enabled = CurrentWizardPane.EnableNext && GetSuccessorNumber(activePanelNumber) < wizardPanels.Count;
backButton.Enabled = CurrentWizardPane.EnablePrevious && idStack.Count > 0;
}
void NextWizardPanelIDChanged(object sender, EventArgs e)
{
EnableNextChanged(null, null);
finishButton.Enabled = CanFinish;
statusPanel.Refresh();
}
void ActivatePanel(int number)
{
// take out old event handlers
if (CurrentWizardPane != null) {
CurrentWizardPane.EnableNextChanged -= enableNextChangedHandler;
CurrentWizardPane.EnableCancelChanged -= enableCancelChangedHandler;
CurrentWizardPane.EnablePreviousChanged -= enableNextChangedHandler;
CurrentWizardPane.NextWizardPanelIDChanged -= nextWizardPanelIDChangedHandler;
CurrentWizardPane.IsLastPanelChanged -= nextWizardPanelIDChangedHandler;
CurrentWizardPane.FinishPanelRequested -= finishPanelHandler;
}
// set new active panel
activePanelNumber = number;
// insert new event handlers
if (CurrentWizardPane != null) {
CurrentWizardPane.EnableNextChanged += enableNextChangedHandler;
CurrentWizardPane.EnableCancelChanged += enableCancelChangedHandler;
CurrentWizardPane.EnablePreviousChanged += enableNextChangedHandler;
CurrentWizardPane.NextWizardPanelIDChanged += nextWizardPanelIDChangedHandler;
CurrentWizardPane.IsLastPanelChanged += nextWizardPanelIDChangedHandler;
CurrentWizardPane.FinishPanelRequested += finishPanelHandler;
}
// initialize panel status
EnableNextChanged(null, null);
NextWizardPanelIDChanged(null, null);
EnableCancelChanged(null, null);
// take out panel control & show new one
statusPanel.Refresh();
curPanel.Refresh();
dialogPanel.Controls.Clear();
Control panelControl = CurrentWizardPane.Control;
panelControl.Dock = DockStyle.Fill;
dialogPanel.Controls.Add(panelControl);
}
public WizardDialog(string title, object customizer, string treePath)
{
AddInTreeNode node = AddInTree.GetTreeNode(treePath);
this.Text = title;
if (node != null) {
AddNodes(customizer, node.BuildChildItems<IDialogPanelDescriptor>(this));
}
InitializeComponents();
enableNextChangedHandler = new EventHandler(EnableNextChanged);
nextWizardPanelIDChangedHandler = new EventHandler(NextWizardPanelIDChanged);
enableCancelChangedHandler = new EventHandler(EnableCancelChanged);
finishPanelHandler = new EventHandler(FinishPanelEvent);
ActivatePanel(0);
}
void FinishPanelEvent(object sender, EventArgs e)
{
AbstractWizardPanel panel = (AbstractWizardPanel)CurrentWizardPane;
bool isLast = panel.IsLastPanel;
panel.IsLastPanel = false;
ShowNextPanelEvent(sender, e);
panel.IsLastPanel = isLast;
}
void ShowNextPanelEvent(object sender, EventArgs e)
{
int nextID = GetSuccessorNumber(this.ActivePanelNumber);
System.Diagnostics.Debug.Assert(nextID < wizardPanels.Count && nextID >= 0);
if (!CurrentWizardPane.ReceiveDialogMessage(DialogMessage.Next)) {
return;
}
idStack.Push(activePanelNumber);
ActivatePanel(nextID);
CurrentWizardPane.ReceiveDialogMessage(DialogMessage.Activated);
}
void ShowPrevPanelEvent(object sender, EventArgs e)
{
System.Diagnostics.Debug.Assert(idStack.Count > 0);
if (!CurrentWizardPane.ReceiveDialogMessage(DialogMessage.Prev)) {
return;
}
ActivatePanel((int)idStack.Pop());
}
void FinishEvent(object sender, EventArgs e)
{
foreach (IDialogPanelDescriptor descriptor in wizardPanels) {
if (!descriptor.DialogPanel.ReceiveDialogMessage(DialogMessage.Finish)) {
return;
}
}
DialogResult = DialogResult.OK;
}
void CancelEvent(object sender, EventArgs e)
{
foreach (IDialogPanelDescriptor descriptor in wizardPanels) {
if (!descriptor.DialogPanel.ReceiveDialogMessage(DialogMessage.Cancel)) {
return;
}
}
DialogResult = DialogResult.Cancel;
}
void HelpEvent(object sender, EventArgs e)
{
CurrentWizardPane.ReceiveDialogMessage(DialogMessage.Help);
}
void InitializeComponents()
{
this.SuspendLayout();
ShowInTaskbar = false;
StartPosition = FormStartPosition.CenterScreen;
FormBorderStyle = FormBorderStyle.FixedDialog;
MinimizeBox = MaximizeBox = false;
Icon = null;
ClientSize = new Size(640, 440);
int buttonSize = 92;
int buttonYLoc = 464 - 2 * 24 - 4;
int buttonXStart = Width - ((buttonSize + 4) * 4) - 4;
label1.Size = new Size(Width - 4, 1);
label1.BorderStyle = BorderStyle.Fixed3D;
label1.Location = new Point(2, 404 - 2);
label1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left;
Controls.Add(label1);
backButton.Text = ResourceService.GetString("Global.BackButtonText");
backButton.Location = new Point(buttonXStart, buttonYLoc);
backButton.ClientSize = new Size(buttonSize, 26);
backButton.Click += new EventHandler(ShowPrevPanelEvent);
backButton.FlatStyle = FlatStyle.System;
backButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Controls.Add(backButton);
nextButton.Text = ResourceService.GetString("Global.NextButtonText");
nextButton.Location = new Point(buttonXStart + buttonSize + 4, buttonYLoc);
nextButton.ClientSize = new Size(buttonSize, 26);
nextButton.Click += new EventHandler(ShowNextPanelEvent);
nextButton.FlatStyle = FlatStyle.System;
nextButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Controls.Add(nextButton);
finishButton.Text = ResourceService.GetString("Dialog.WizardDialog.FinishButton");
finishButton.Location = new Point(buttonXStart + 2 * (buttonSize + 4), buttonYLoc);
finishButton.ClientSize = new Size(buttonSize, 26);
finishButton.Click += new EventHandler(FinishEvent);
finishButton.FlatStyle = FlatStyle.System;
finishButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Controls.Add(finishButton);
cancelButton.Text = ResourceService.GetString("Global.CancelButtonText");
cancelButton.Location = new Point(buttonXStart + 3 * (buttonSize + 4), buttonYLoc);
cancelButton.ClientSize = new Size(buttonSize, 26);
cancelButton.Click += new EventHandler(CancelEvent);
cancelButton.FlatStyle = FlatStyle.System;
cancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
Controls.Add(cancelButton);
// helpButton.Text = ResourceService.GetString("Global.HelpButtonText");
// helpButton.Location = new Point(buttonXStart + 4 * (buttonSize + 4), buttonYLoc);
// helpButton.ClientSize = new Size(buttonSize, 26);
// helpButton.Click += new EventHandler(HelpEvent);
// helpButton.FlatStyle = FlatStyle.System;
// helpButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
// Controls.Add(helpButton);
statusPanel = new StatusPanel(this);
statusPanel.Location = new Point(2, 2);
statusPanel.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left;
Controls.Add(statusPanel);
curPanel = new CurrentPanelPanel(this);
curPanel.Location = new Point(200, 2);
curPanel.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left;
Controls.Add(curPanel);
dialogPanel.Location = new Point(200, 27);
// dialogPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
dialogPanel.Size = new Size(Width - 8 - statusPanel.Bounds.Right,
label1.Location.Y - dialogPanel.Location.Y);
dialogPanel.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
Controls.Add(dialogPanel);
this.ResumeLayout(true);
}
}
}

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SecondaryViews/ReportPreview.cs

@ -57,7 +57,7 @@ namespace ICSharpCode.Reports.Addin
/// <summary> /// <summary>
/// The <see cref="System.Windows.Forms.Control"/> representing the view /// The <see cref="System.Windows.Forms.Control"/> representing the view
/// </summary> /// </summary>
public override Control Control { public override object Control {
get { get {
if (this.previewControl == null) { if (this.previewControl == null) {
previewControl = new PreviewControl(); previewControl = new PreviewControl();

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SecondaryViews/ReportViewerSecondaryView.cs

@ -83,7 +83,7 @@ namespace ICSharpCode.Reports.Addin
public override Control Control { public override object Control {
get { get {
return this.control; return this.control;
} }

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SecondaryViews/XmlView.cs

@ -52,7 +52,7 @@ namespace ICSharpCode.Reports.Addin
} }
public override Control Control { public override object Control {
get { get {
return this.rtb; return this.rtb;
} }

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Services/DefaultServiceContainer.cs

@ -41,7 +41,7 @@ namespace ICSharpCode.Reports.Addin
try { try {
disposeMe.Dispose(); disposeMe.Dispose();
} catch (Exception e) { } catch (Exception e) {
ICSharpCode.Core.MessageService.ShowError(e, "Exception while disposing " + disposeMe); ICSharpCode.Core.MessageService.ShowException(e, "Exception while disposing " + disposeMe);
} }
} }
} }

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Services/TypeDiscoveryService.cs

@ -44,7 +44,7 @@ namespace ICSharpCode.Reports.Addin
// ToArray to prevent an exception if the collection changes. // ToArray to prevent an exception if the collection changes.
foreach (Assembly asm in TypeResolutionService.DesignerAssemblies.ToArray()) { foreach (Assembly asm in TypeResolutionService.DesignerAssemblies.ToArray()) {
if (excludeGlobalTypes) { if (excludeGlobalTypes) {
if (FileUtility.IsBaseDirectory(GacInterop.GacRootPath, asm.Location)) { if (GacInterop.IsWithinGac(asm.Location)) {
continue; continue;
} }
} }

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/Services/UIService.cs

@ -52,7 +52,7 @@ namespace ICSharpCode.Reports.Addin
#region Dialog functions #region Dialog functions
public IWin32Window GetDialogOwnerWindow() public IWin32Window GetDialogOwnerWindow()
{ {
return WorkbenchSingleton.MainForm; return WorkbenchSingleton.MainWin32Window;
} }
public DialogResult ShowDialog(Form form) public DialogResult ShowDialog(Form form)

13
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SharpQuery/GUI/SharpQueryDataView.cs

@ -28,7 +28,7 @@ namespace SharpQuery.Gui.DataView
/// The <see cref="System.Windows.Forms.Control"/> representing the view /// The <see cref="System.Windows.Forms.Control"/> representing the view
/// </summary> /// </summary>
/// ///
public override Control Control public override object Control
{ {
get get
{ {
@ -79,22 +79,13 @@ namespace SharpQuery.Gui.DataView
// throw new System.NotImplementedException(); // throw new System.NotImplementedException();
// } // }
/// <summary>
/// Refreshes the view
/// </summary>
public override void RedrawContent()
{
// TODO: Refresh the whole view control here, renew all resource strings whatever
// Note that you do not need to recreate the control.
}
/// <summary> /// <summary>
/// Cleans up all used resources /// Cleans up all used resources
/// </summary> /// </summary>
public override void Dispose() public override void Dispose()
{ {
// TODO: Clean up resources in this method // TODO: Clean up resources in this method
Control.Dispose(); pDataGrid.Dispose();
} }
#endregion #endregion

12
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Project/SharpQuery/GUI/SharpQueryPad.cs

@ -27,7 +27,7 @@ namespace SharpQuery.Pads
/// <summary> /// <summary>
/// The <see cref="System.Windows.Forms.Control"/> representing the pad /// The <see cref="System.Windows.Forms.Control"/> representing the pad
/// </summary> /// </summary>
public override Control Control public override object Control
{ {
get get
{ {
@ -53,16 +53,6 @@ namespace SharpQuery.Pads
{ {
} }
/// <summary>
/// Refreshes the pad
/// </summary>
public override void RedrawContent()
{
// OnTitleChanged(null);
// OnIconChanged(null);
sharpQueryTree.Refresh();
}
/// <summary> /// <summary>
/// Cleans up all used resources /// Cleans up all used resources
/// </summary> /// </summary>

4
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/Designer/MockOpenedFile.cs

@ -24,7 +24,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
public MockOpenedFile(string fileName) public MockOpenedFile(string fileName)
{ {
this.FileName = fileName; this.FileName = ICSharpCode.Core.FileName.Create(fileName);
} }
public override IList<IViewContent> RegisteredViewContents { public override IList<IViewContent> RegisteredViewContents {
@ -41,6 +41,8 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
{ {
} }
public override event EventHandler FileClosed { add {} remove {} }
// public override bool IsDirty { // public override bool IsDirty {
// get { return base.IsDirty; } // get { return base.IsDirty; }
// set { base.IsDirty = value; } // set { base.IsDirty = value; }

19
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/Designer/MockViewContend.cs

@ -9,6 +9,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
@ -20,7 +21,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
public class MockViewContent:IViewContent public class MockViewContent:IViewContent
{ {
string fileName = String.Empty; FileName fileName = null;
List<IViewContent> secondaryViewContents = new List<IViewContent>(); List<IViewContent> secondaryViewContents = new List<IViewContent>();
public MockViewContent() public MockViewContent()
@ -32,7 +33,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
public event EventHandler Disposed; public event EventHandler Disposed;
public event EventHandler IsDirtyChanged; public event EventHandler IsDirtyChanged;
public Control Control public object Control
{ {
get {return null;} get {return null;}
} }
@ -62,12 +63,6 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
get { return secondaryViewContents; } get { return secondaryViewContents; }
} }
public object Content {
get {
throw new NotImplementedException();
}
}
public IWorkbenchWindow WorkbenchWindow { public IWorkbenchWindow WorkbenchWindow {
get { get {
throw new NotImplementedException(); throw new NotImplementedException();
@ -156,7 +151,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
} }
} }
public string PrimaryFileName { public FileName PrimaryFileName {
get { return fileName; } get { return fileName; }
set { fileName = value; } set { fileName = value; }
} }
@ -224,5 +219,11 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
IsDirtyChanged(this, e); IsDirtyChanged(this, e);
} }
} }
public object InitiallyFocusedControl {
get {
throw new NotImplementedException();
}
}
} }
} }

2
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/Designer/ReportDesignerDisplayBindingTestFixture.cs

@ -30,7 +30,7 @@ namespace ICSharpCode.Reports.Addin.Test.Designer
{ {
displayBinding = new DerivedReportDesignerDisplayBinding(); displayBinding = new DerivedReportDesignerDisplayBinding();
viewContent = new MockViewContent(); viewContent = new MockViewContent();
viewContent.PrimaryFileName = "test.srd"; viewContent.PrimaryFileName = FileName.Create("test.srd");
// viewContent.TextEditorControl.Text = "text content"; // viewContent.TextEditorControl.Text = "text content";
// parseInfo = new ParseInformation(); // parseInfo = new ParseInformation();
// displayBinding.ParseServiceParseInfoToReturn = parseInfo; // displayBinding.ParseServiceParseInfoToReturn = parseInfo;

5
src/AddIns/Misc/Reports/ICSharpCode.Reports.Addin/Test/ICSharpCode.Reports.Addin.Test.csproj

@ -1,4 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{2B232C7E-CFB6-4B73-A1B8-134A8A2ED4F7}</ProjectGuid> <ProjectGuid>{2B232C7E-CFB6-4B73-A1B8-134A8A2ED4F7}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -11,7 +12,7 @@
<NoStdLib>False</NoStdLib> <NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SourceAnalysisOverrideSettingsFile>C:\Users\Peter Forstmeier\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile> <SourceAnalysisOverrideSettingsFile>C:\Users\Peter Forstmeier\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

10
src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/ICSharpCode.Reports.Core.csproj

@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.Reports.Core</RootNamespace> <RootNamespace>ICSharpCode.Reports.Core</RootNamespace>
@ -16,7 +17,7 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SourceAnalysisOverrideSettingsFile>"C:\Program Files\SharpDevelop\bin\..\AddIns\AddIns\Misc\SourceAnalysis\Settings.SourceAnalysis"</SourceAnalysisOverrideSettingsFile> <SourceAnalysisOverrideSettingsFile>"C:\Program Files\SharpDevelop\bin\..\AddIns\AddIns\Misc\SourceAnalysis\Settings.SourceAnalysis"</SourceAnalysisOverrideSettingsFile>
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpDevelopReports\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SharpDevelopReports\</OutputPath>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
@ -61,10 +62,9 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework> <RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference> </Reference>
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<Reference Include="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Design" /> <Reference Include="System.Design" />
<Reference Include="System.Xml.Linq"> <Reference Include="System.Xml.Linq">

5
src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/ICSharpCode.Reports.Core.Test.csproj

@ -1,4 +1,5 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{E16B73CA-3603-47EE-915E-6F8B2A07304B}</ProjectGuid> <ProjectGuid>{E16B73CA-3603-47EE-915E-6F8B2A07304B}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -6,7 +7,7 @@
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.Reports.Core.Test</RootNamespace> <RootNamespace>ICSharpCode.Reports.Core.Test</RootNamespace>
<AssemblyName>ICSharpCode.Reports.Core.Test</AssemblyName> <AssemblyName>ICSharpCode.Reports.Core.Test</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<SourceAnalysisOverrideSettingsFile>C:\Dokumente und Einstellungen\Peter\Anwendungsdaten\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile> <SourceAnalysisOverrideSettingsFile>C:\Dokumente und Einstellungen\Peter\Anwendungsdaten\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>

4
src/AddIns/Misc/Reports/SharpDevelop.Reports.sln

@ -60,8 +60,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", ".
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "..\..\..\Tools\Tools.build", "{3DF4060F-5EE0-41CF-8096-F27355FD5511}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reports", "Reports", "{F3DAFD3D-361A-4CCE-BA52-39401D4A78FC}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reports", "Reports", "{F3DAFD3D-361A-4CCE-BA52-39401D4A78FC}"
ProjectSection(SolutionItems) = postProject ProjectSection(SolutionItems) = postProject
EndProjectSection EndProjectSection
@ -122,6 +120,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Addin", ".
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "..\..\..\Tools\Tools.build", "{3DF4060F-5EE0-41CF-8096-F27355FD5511}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU

Loading…
Cancel
Save