전자실메일양식 통일 및 정리 작업

This commit is contained in:
chi
2024-01-09 14:04:01 +09:00
parent aca27c5484
commit aef0c375ad
134 changed files with 4651 additions and 2343 deletions

View File

@@ -1,36 +0,0 @@
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class BoldButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand("Bold", false, null);
}
public Image IconImage
{
get
{
return Resources.bold;
}
}
public string IconName
{
get { return "Bold"; }
}
public string IconTooltip
{
get { return "Bold"; }
}
public string CommandIdentifier
{
get { return "Bold"; }
}
}
}

View File

@@ -1,41 +0,0 @@
using System.Drawing;
using System.Windows.Forms;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class ForecolorButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
var colorPicker = new ColorDialog();
var result = colorPicker.ShowDialog();
if(result == DialogResult.OK)
{
var color = colorPicker.Color;
var hexcolor = ColorTranslator.ToHtml(color);
args.Document.ExecCommand("ForeColor", false, hexcolor);
}
}
public Image IconImage
{
get { return Resources.fontforecolorpicker; }
}
public string IconName
{
get { return "Color"; }
}
public string IconTooltip
{
get { return "Color"; }
}
public string CommandIdentifier
{
get { return "ForeColor"; }
}
}
}

View File

@@ -1,26 +0,0 @@
using System.Drawing;
using System.Windows.Forms;
namespace YARTE.UI.Buttons
{
public struct HTMLEditorButtonArgs
{
public HtmlDocument Document;
public HtmlEditor Editor;
}
public interface IHTMLEditorButton
{
void IconClicked(HTMLEditorButtonArgs doc);
Image IconImage { get; }
string IconName { get; }
string IconTooltip { get; }
/// <summary>
/// This is the string that will be used to poll the text area to determine if the cursor
/// is in a given area (say, 'Bold') and show the corresponding button as selected
/// Leave blank if there is no command or you have no idea what to put here
/// </summary>
string CommandIdentifier { get; }
}
}

View File

@@ -1,41 +0,0 @@
using System.Drawing;
using Microsoft.VisualBasic;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class InsertLinkedImageButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
var x = args.Editor.Location.X + 10;
var y = args.Editor.Location.Y + 10;
var url = Interaction.InputBox("Please enter an image url", "URL", null, x, y);
if (!string.IsNullOrEmpty(url))
{
args.Document.ExecCommand("InsertImage", false, url);
}
}
public Image IconImage
{
get { return Resources.insertimage; }
}
public string IconName
{
get { return "Linked image"; }
}
public string IconTooltip
{
get { return "Linked image"; }
}
public string CommandIdentifier
{
get { return "InsertImage"; }
}
}
}

View File

@@ -1,35 +0,0 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class ItalicButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand("Italic", false, null);
}
public Image IconImage
{
get { return Resources.italic; }
}
public string IconName
{
get { return "Italic"; }
}
public string IconTooltip
{
get { return "Italic"; }
}
public string CommandIdentifier
{
get { return "Italic"; }
}
}
}

View File

@@ -1,33 +0,0 @@
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class JustifyCenterButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand(CommandIdentifier, false, null);
}
public Image IconImage
{
get { return Resources.justifycenter; }
}
public string IconName
{
get { return "Justify center"; }
}
public string IconTooltip
{
get { return "Justify center"; }
}
public string CommandIdentifier
{
get { return "JustifyCenter"; }
}
}
}

View File

@@ -1,33 +0,0 @@
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class JustifyLeftButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand(CommandIdentifier, false, null);
}
public Image IconImage
{
get { return Resources.justifyleft; }
}
public string IconName
{
get { return "Justify left"; }
}
public string IconTooltip
{
get { return "Justify left"; }
}
public string CommandIdentifier
{
get { return "JustifyLeft"; }
}
}
}

View File

@@ -1,33 +0,0 @@
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class JustifyRightButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand(CommandIdentifier, false, null);
}
public Image IconImage
{
get { return Resources.justifyright; }
}
public string IconName
{
get { return "Justify right"; }
}
public string IconTooltip
{
get { return "Justify right"; }
}
public string CommandIdentifier
{
get { return "JustifyRight"; }
}
}
}

View File

@@ -1,33 +0,0 @@
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class LinkButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand("CreateLink", true, null);
}
public Image IconImage
{
get { return Resources.createlink; }
}
public string IconName
{
get { return "Create link"; }
}
public string IconTooltip
{
get { return "Create link"; }
}
public string CommandIdentifier
{
get { return "CreateLink"; }
}
}
}

View File

@@ -1,34 +0,0 @@
using System;
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class OrderedListButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand("InsertOrderedList", false, null);
}
public Image IconImage
{
get { return Resources.numberedlist; }
}
public string IconName
{
get { return "Ordered list"; }
}
public string IconTooltip
{
get { return "Ordered list"; }
}
public string CommandIdentifier
{
get { return "InsertOrderedList"; }
}
}
}

View File

@@ -1,31 +0,0 @@
using System.Linq;
namespace YARTE.UI.Buttons
{
public static class PredefinedButtonSets
{
private static readonly string[] _webSafeFonts = new [] { "Courier New", "Times New Roman", "Georgia", "Arial", "Verdana"};
public static void SetupDefaultButtons(HtmlEditor editor)
{
editor.AddToolbarItem(new BoldButton());
editor.AddToolbarItem(new ItalicButton());
editor.AddFontSelector(_webSafeFonts);
editor.AddFontSizeSelector(Enumerable.Range(1,7));
editor.AddToolbarDivider();
editor.AddToolbarItem(new LinkButton());
editor.AddToolbarItem(new UnlinkButton());
editor.AddToolbarDivider();
editor.AddToolbarItem(new InsertLinkedImageButton());
editor.AddToolbarDivider();
editor.AddToolbarItem(new OrderedListButton());
editor.AddToolbarItem(new UnorderedListButton());
editor.AddToolbarDivider();
editor.AddToolbarItem(new ForecolorButton());
editor.AddToolbarDivider();
editor.AddToolbarItem(new JustifyLeftButton());
editor.AddToolbarItem(new JustifyCenterButton());
editor.AddToolbarItem(new JustifyRightButton());
}
}
}

View File

@@ -1,34 +0,0 @@
using System;
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class UnderlineButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand("Underline", false, null);
}
public Image IconImage
{
get { return Resources.underline; }
}
public string IconName
{
get { return "Underline"; }
}
public string IconTooltip
{
get { return "Underline"; }
}
public string CommandIdentifier
{
get { return "Underline"; }
}
}
}

View File

@@ -1,33 +0,0 @@
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class UnlinkButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand("Unlink", false, null);
}
public Image IconImage
{
get { return Resources.unlink; }
}
public string IconName
{
get { return "Unlink"; }
}
public string IconTooltip
{
get { return "Unlink"; }
}
public string CommandIdentifier
{
get { return "Unlink"; }
}
}
}

View File

@@ -1,33 +0,0 @@
using System.Drawing;
using YARTE.Properties;
namespace YARTE.UI.Buttons
{
public class UnorderedListButton : IHTMLEditorButton
{
public void IconClicked(HTMLEditorButtonArgs args)
{
args.Document.ExecCommand("InsertUnorderedList", false, null);
}
public Image IconImage
{
get { return Resources.bulletedlist; }
}
public string IconName
{
get { return "Unordered list"; }
}
public string IconTooltip
{
get { return "Unordered list"; }
}
public string CommandIdentifier
{
get { return "InsertUnorderedList"; }
}
}
}