Skip to content

Commit

Permalink
Merge pull request #62 from Mijo-Software/mjohne-patch-1
Browse files Browse the repository at this point in the history
Add files via upload
  • Loading branch information
mjohne authored Dec 30, 2020
2 parents 3a764c8 + 2c3727b commit 921b824
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 380 deletions.
50 changes: 20 additions & 30 deletions EmojiLib/AboutBoxForm.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.IO;
using System.Reflection;
using System.Windows.Forms;

Expand All @@ -13,12 +9,12 @@ internal partial class AboutBoxForm : Form
public AboutBoxForm()
{
InitializeComponent();
this.Text = String.Format("Info über {0}", AssemblyTitle);
this.labelProductName.Text = AssemblyProduct;
this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = AssemblyCompany;
this.textBoxDescription.Text = AssemblyDescription;
Text = $"Info über {AssemblyTitle}";
labelProductName.Text = AssemblyProduct;
labelVersion.Text = $"Version {AssemblyVersion}";
labelCopyright.Text = AssemblyCopyright;
labelCompanyName.Text = AssemblyCompany;
textBoxDescription.Text = AssemblyDescription;
}

#region Assemblyattributaccessoren
Expand All @@ -27,76 +23,70 @@ public static string AssemblyTitle
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(attributeType: typeof(AssemblyTitleAttribute), inherit: false);
if (attributes.Length > 0)
{
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
if (titleAttribute.Title != "")
AssemblyTitleAttribute titleAttribute = attributes[0] as AssemblyTitleAttribute;
if (!string.IsNullOrEmpty(value: titleAttribute.Title))
{
return titleAttribute.Title;
}
}
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
return Path.GetFileNameWithoutExtension(path: Assembly.GetExecutingAssembly().CodeBase);
}
}

public static string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
public static string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();

public static string AssemblyDescription
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(attributeType: typeof(AssemblyDescriptionAttribute), inherit: false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
return (attributes[0] as AssemblyDescriptionAttribute)?.Description;
}
}

public static string AssemblyProduct
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(attributeType: typeof(AssemblyProductAttribute), inherit: false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyProductAttribute)attributes[0]).Product;
return (attributes[0] as AssemblyProductAttribute)?.Product;
}
}

public static string AssemblyCopyright
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(attributeType: typeof(AssemblyCopyrightAttribute), inherit: false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
return (attributes[0] as AssemblyCopyrightAttribute)?.Copyright;
}
}

public static string AssemblyCompany
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(attributeType: typeof(AssemblyCompanyAttribute), inherit: false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCompanyAttribute)attributes[0]).Company;
return (attributes[0] as AssemblyCompanyAttribute)?.Company;
}
}
#endregion
Expand Down
103 changes: 35 additions & 68 deletions EmojiLib/EmojiInfoForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ public partial class EmojiInfoForm : Form
{
public void SetTag(object tag) => Tag = tag;

public void SetCode(string code) => labelCodeDesc.Text = code;
public void SetUnicode(string code) => labelCodeDesc.Text = code;

public void SetShortName(string name) => labelShortNameDesc.Text = name;
public void SetFullName(string name) => labelShortNameDesc.Text = name;

public void SetGroup(string group) => labelGroupDesc.Text = group;

public void SetSubGroup(string subGroup) => labelSubGroupDesc.Text = subGroup;

public void SetAppleImageVersion(Image image)
public void SetAppleImage(Image image)
{
if (image == null)
{
Expand All @@ -29,7 +29,7 @@ public void SetAppleImageVersion(Image image)
}
}

public void SetGoogleImageVersion(Image image)
public void SetGoogleImage(Image image)
{
if (image == null)
{
Expand All @@ -42,7 +42,7 @@ public void SetGoogleImageVersion(Image image)
}
}

public void SetFacebookImageVersion(Image image)
public void SetFacebookImage(Image image)
{
if (image == null)
{
Expand All @@ -55,7 +55,7 @@ public void SetFacebookImageVersion(Image image)
}
}

public void SetWindowsImageVersion(Image image)
public void SetWindowsImage(Image image)
{
if (image == null)
{
Expand All @@ -68,7 +68,7 @@ public void SetWindowsImageVersion(Image image)
}
}

public void SetTwitterImageVersion(Image image)
public void SetTwitterImage(Image image)
{
if (image == null)
{
Expand All @@ -81,7 +81,7 @@ public void SetTwitterImageVersion(Image image)
}
}

public void SetJoyPixelsImageVersion(Image image)
public void SetJoyPixelsImage(Image image)
{
if (image == null)
{
Expand All @@ -94,7 +94,7 @@ public void SetJoyPixelsImageVersion(Image image)
}
}

public void SetSamsungImageVersion(Image image)
public void SetSamsungImage(Image image)
{
if (image == null)
{
Expand All @@ -107,7 +107,7 @@ public void SetSamsungImageVersion(Image image)
}
}

public void SetGmailImageVersion(Image image)
public void SetGmailImage(Image image)
{
if (image == null)
{
Expand All @@ -120,7 +120,7 @@ public void SetGmailImageVersion(Image image)
}
}

public void SetDocomoImageVersion(Image image)
public void SetDocomoImage(Image image)
{
if (image == null)
{
Expand All @@ -133,7 +133,7 @@ public void SetDocomoImageVersion(Image image)
}
}

public void SetKddiImageVersion(Image image)
public void SetKddiImage(Image image)
{
if (image == null)
{
Expand All @@ -146,7 +146,7 @@ public void SetKddiImageVersion(Image image)
}
}

public void SetSoftbankImageVersion(Image image)
public void SetSoftbankImage(Image image)
{
if (image == null)
{
Expand Down Expand Up @@ -330,122 +330,89 @@ private void PictureBoxSoftbank_MouseLeave(object sender, EventArgs e)

private void PictureBoxApple_Click(object sender, EventArgs e)
{
if (pictureBoxApple.Image != null)
if (pictureBoxApple.Image != null && saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
pictureBoxApple.Image.Save(filename: saveFileDialogAsPng.FileName);
}
pictureBoxApple.Image.Save(filename: saveFileDialogAsPng.FileName);
}
}

private void PictureBoxGoogle_Click(object sender, EventArgs e)
{
if (pictureBoxGoogle.Image != null)
if (pictureBoxGoogle.Image != null && saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
pictureBoxGoogle.Image.Save(filename: saveFileDialogAsPng.FileName);
}
pictureBoxGoogle.Image.Save(filename: saveFileDialogAsPng.FileName);
}
}

private void PictureBoxFacebook_Click(object sender, EventArgs e)
{
if (pictureBoxFacebook.Image != null)
if (pictureBoxFacebook.Image != null && saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
pictureBoxFacebook.Image.Save(filename: saveFileDialogAsPng.FileName);
}
pictureBoxFacebook.Image.Save(filename: saveFileDialogAsPng.FileName);
}
}

private void PictureBoxWindows_Click(object sender, EventArgs e)
{
if (pictureBoxWindows.Image != null)
if (pictureBoxWindows.Image != null && saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
pictureBoxWindows.Image.Save(filename: saveFileDialogAsPng.FileName);
}
pictureBoxWindows.Image.Save(filename: saveFileDialogAsPng.FileName);
}
}

private void PictureBoxTwitter_Click(object sender, EventArgs e)
{
if (pictureBoxTwitter.Image != null)
if (pictureBoxTwitter.Image != null && saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
pictureBoxTwitter.Image.Save(filename: saveFileDialogAsPng.FileName);
}
pictureBoxTwitter.Image.Save(filename: saveFileDialogAsPng.FileName);
}
}

private void PictureBoxJoyPixels_Click(object sender, EventArgs e)
{
if (pictureBoxJoyPixels.Image != null)
if (pictureBoxJoyPixels.Image != null && saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
pictureBoxJoyPixels.Image.Save(filename: saveFileDialogAsPng.FileName);
}
pictureBoxJoyPixels.Image.Save(filename: saveFileDialogAsPng.FileName);
}
}

private void PictureBoxSamsung_Click(object sender, EventArgs e)
{
if (pictureBoxSamsung.Image != null)
if (pictureBoxSamsung.Image != null && saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsPng.ShowDialog() == DialogResult.OK)
{
pictureBoxSamsung.Image.Save(filename: saveFileDialogAsPng.FileName);
}
pictureBoxSamsung.Image.Save(filename: saveFileDialogAsPng.FileName);
}
}

private void PictureBoxGmail_Click(object sender, EventArgs e)
{
if (pictureBoxGmail.Image != null)
if (pictureBoxGmail.Image != null && saveFileDialogAsGif.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsGif.ShowDialog() == DialogResult.OK)
{
pictureBoxGmail.Image.Save(filename: saveFileDialogAsGif.FileName);
}
pictureBoxGmail.Image.Save(filename: saveFileDialogAsGif.FileName);
}
}

private void PictureBoxDocomo_Click(object sender, EventArgs e)
{
if (pictureBoxDocomo.Image != null)
if (pictureBoxDocomo.Image != null && saveFileDialogAsGif.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsGif.ShowDialog() == DialogResult.OK)
{
pictureBoxDocomo.Image.Save(filename: saveFileDialogAsGif.FileName);
}
pictureBoxDocomo.Image.Save(filename: saveFileDialogAsGif.FileName);
}
}

private void PictureBoxKddi_Click(object sender, EventArgs e)
{
if (pictureBoxKddi.Image != null)
if (pictureBoxKddi.Image != null && saveFileDialogAsGif.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsGif.ShowDialog() == DialogResult.OK)
{
pictureBoxKddi.Image.Save(filename: saveFileDialogAsGif.FileName);
}
pictureBoxKddi.Image.Save(filename: saveFileDialogAsGif.FileName);
}
}

private void PictureBoxSoftbank_Click(object sender, EventArgs e)
{
if (pictureBoxSoftbank.Image != null)
if (pictureBoxSoftbank.Image != null && saveFileDialogAsGif.ShowDialog() == DialogResult.OK)
{
if (saveFileDialogAsGif.ShowDialog() == DialogResult.OK)
{
pictureBoxSoftbank.Image.Save(filename: saveFileDialogAsGif.FileName);
}
pictureBoxSoftbank.Image.Save(filename: saveFileDialogAsGif.FileName);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions EmojiLib/EmojiLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>FaceHat.resx</DependentUpon>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="MonkeyFace.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
Expand Down
2 changes: 1 addition & 1 deletion EmojiLib/EmojiSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace EmojiLib
{
public class EmojiSet
public static class EmojiSet
{
internal static readonly Emoji grinningFace = new Emoji(character: "😀", unicode: "U+1F600", group: Resources.smileysAndEmotion, subGroup: Resources.faceSmiling, shortName: "", fullName: "grinning face", description: "", appleIcon: FaceSmiling.GrinningFaceApple, googleIcon: FaceSmiling.GrinningFaceGoogle, facebookIcon: FaceSmiling.GrinningFaceFacebook, windowsIcon: FaceSmiling.GrinningFaceWindows, twitterIcon: FaceSmiling.GrinningFaceTwitter, joypixelsIcon: FaceSmiling.GrinningFaceJoyPixels, samsungIcon: FaceSmiling.GrinningFaceSamsung, gmailIcon: FaceSmiling.GrinningFaceGmail, docomoIcon: null, kddiIcon: null, softbankIcon: null);
internal static readonly Emoji grinningFaceWithBigEyes = new Emoji(character: "😃", unicode: "U+1F600", group: Resources.smileysAndEmotion, subGroup: Resources.faceSmiling, shortName: "", fullName: "grinning face with big eyes", description: "", appleIcon: FaceSmiling.GrinningFaceWithBigEyesApple, googleIcon: FaceSmiling.GrinningFaceWithBigEyesGoogle, facebookIcon: FaceSmiling.GrinningFaceWithBigEyesFacebook, windowsIcon: FaceSmiling.GrinningFaceWithBigEyesWindows, twitterIcon: FaceSmiling.GrinningFaceWithBigEyesTwitter, joypixelsIcon: FaceSmiling.GrinningFaceWithBigEyesJoyPixels, samsungIcon: FaceSmiling.GrinningFaceWithBigEyesSamsung, gmailIcon: FaceSmiling.GrinningFaceWithBigEyesGmail, docomoIcon: FaceSmiling.GrinningFaceWithBigEyesDocomo, kddiIcon: FaceSmiling.GrinningFaceWithBigEyesKddi, softbankIcon: FaceSmiling.GrinningFaceWithBigEyesSoftbank);
Expand Down
Binary file added EmojiLib/GlobalSuppressions.cs
Binary file not shown.
2 changes: 1 addition & 1 deletion EmojiLib/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 921b824

Please sign in to comment.