/TIENITCodeGener/frmAbout.cs

http://gener.codeplex.com · C# · 196 lines · 160 code · 21 blank · 15 comment · 18 complexity · de59527d745a642b35942bfd06940032 MD5 · raw file

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. namespace TIENITCodeGener
  9. {
  10. public partial class frmAbout : Form
  11. {
  12. #region "Constructor"
  13. public frmAbout()
  14. {
  15. InitializeComponent();
  16. ITFACommon.SetFormIcon(this);
  17. SetLanguage();
  18. this.Size = new System.Drawing.Size(599, 205);
  19. }
  20. #endregion
  21. #region "Form Events"
  22. private void frmAbout_Load(object sender, EventArgs e)
  23. {
  24. try
  25. {
  26. SetEditionName();
  27. }
  28. catch
  29. {
  30. }
  31. }
  32. private void frmAbout_KeyDown(object sender, KeyEventArgs e)
  33. {
  34. if (e.KeyCode == Keys.Escape)
  35. {
  36. this.Close();
  37. }
  38. }
  39. #endregion
  40. #region "Common Function"
  41. private void SetEditionName()
  42. {
  43. // EDITION
  44. // ULT : Ultimate - Full Option
  45. // PRO_NET : Professional for .NET
  46. // PRO_JAVA : Professional for Java
  47. // PRO_WP : Professional for Windows Phone
  48. // PRO_IOS : Professional for iOS
  49. // PRO_ANDROID : Professional for Android
  50. if (TIENITCodeGener.Properties.Settings.Default.Soft_Edition.Equals("ULT"))
  51. {
  52. lbl_Edition.Text = "Ultimate";
  53. }
  54. else if (TIENITCodeGener.Properties.Settings.Default.Soft_Edition.Equals("PRO_NET"))
  55. {
  56. lbl_Edition.Text = "Professional for .NET";
  57. }
  58. else if (TIENITCodeGener.Properties.Settings.Default.Soft_Edition.Equals("PRO_JAVA"))
  59. {
  60. lbl_Edition.Text = "Professional for Java";
  61. }
  62. else if (TIENITCodeGener.Properties.Settings.Default.Soft_Edition.Equals("PRO_WP"))
  63. {
  64. lbl_Edition.Text = "Professional for WP";
  65. }
  66. else if (TIENITCodeGener.Properties.Settings.Default.Soft_Edition.Equals("PRO_IOS"))
  67. {
  68. lbl_Edition.Text = "Professional for iOS";
  69. }
  70. else if (TIENITCodeGener.Properties.Settings.Default.Soft_Edition.Equals("PRO_ANDROID"))
  71. {
  72. lbl_Edition.Text = "Professional for Android";
  73. }
  74. }
  75. private void SetLanguage()
  76. {
  77. if (TIENITCodeGener.Properties.Settings.Default.Soft_Language.Equals("EN-US"))
  78. {
  79. lbl_Title.Text = "Software Information";
  80. this.Text = "Software Information";
  81. toolTip.SetToolTip(pic_Groups, "More information ...");
  82. }
  83. else if (TIENITCodeGener.Properties.Settings.Default.Soft_Language.Equals("VI-VN"))
  84. {
  85. lbl_Title.Text = "Thông Tin Phần Mềm";
  86. this.Text = "Thông Tin Phần Mềm";
  87. toolTip.SetToolTip(pic_Groups, "Thông tin thêm ...");
  88. }
  89. }
  90. #endregion
  91. #region "Link Click"
  92. private void StartURL(string url)
  93. {
  94. System.Diagnostics.Process.Start(url);
  95. }
  96. private void lbl_FB_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  97. {
  98. StartURL(lbl_FB.Text);
  99. }
  100. private void lbl_GooglePlus_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  101. {
  102. StartURL(lbl_GooglePlus.Text);
  103. }
  104. private void lbl_Wordpress_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  105. {
  106. StartURL(lbl_Wordpress.Text);
  107. }
  108. private void lbl_Twitter_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  109. {
  110. StartURL(lbl_Twitter.Text);
  111. }
  112. private void lbl_LinkedIn_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  113. {
  114. StartURL(lbl_LinkedIn.Text);
  115. }
  116. private void lbl_YuoTube_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  117. {
  118. StartURL(lbl_YuoTube.Text);
  119. }
  120. private void lbl_Flickr_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  121. {
  122. StartURL(lbl_Flickr.Text);
  123. }
  124. private void lbl_Gmail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  125. {
  126. StartURL("mailto:bktien@gmail.com");
  127. }
  128. private void lbl_Yahoo_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  129. {
  130. StartURL("mailto:nguyen_quyet_tien_87hy@yahoo.com");
  131. }
  132. private void lbl_Skype_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  133. {
  134. StartURL("skype:tiennq187");
  135. }
  136. private void lbl_Hotmail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  137. {
  138. StartURL("mailto:tienit@outlook.com");
  139. }
  140. #endregion
  141. #region "Timer"
  142. private void timer_ABOUT_Tick(object sender, EventArgs e)
  143. {
  144. try
  145. {
  146. int _seconds = DateTime.Now.Second;
  147. if (_seconds % 2 == 0)
  148. {
  149. picICON.Image = TIENITCodeGener.Properties.Resources.CG_METRO_144;
  150. }
  151. else
  152. {
  153. picICON.Image = TIENITCodeGener.Properties.Resources.CG_METRO_144_ONE;
  154. }
  155. }
  156. catch
  157. {
  158. }
  159. }
  160. #endregion
  161. #region "More Information"
  162. private void pic_Groups_Click(object sender, EventArgs e)
  163. {
  164. //if (this.Size.Height == 205)
  165. //{
  166. // this.Size = new System.Drawing.Size(599, 684);
  167. //}
  168. //else if (this.Size.Height == 684)
  169. //{
  170. // this.Size = new System.Drawing.Size(599, 205);
  171. //}
  172. }
  173. #endregion
  174. }
  175. }