Click here to Skip to main content
12,451,703 members (61,016 online)
Click here to Skip to main content
Articles » Languages » C# » Applications » Downloads

Stats

123K views
36.6K downloads
193 bookmarked
Posted

AccountPlus

, 10 Sep 2009 LGPL3
A Complete Account Management System
AccountPlus
AccountPlus
AccountPlus.JPG
Database
AccountPlus.mdb
Documents
AccountPlus.doc
Thumbs.db
Setup
setup.msi
Thumbs.db
Source_Code.zip
AccountPlusSource
AccountPlus.BusinessLogic
AccountPlus.BusinessLogic.csproj.user
Properties
AccountPlus.Configurations
Properties
AccountPlus.DataAccess
Properties
AccountPlus.Formatting
Properties
AccountPlus.Messaging
Properties
AccountPlus.Setup
AccountPlus.Setup.CustomActions
Properties
AccountPlus.Setup.vdproj
AccountPlus.UserInterface
AccountPlus.UserInterface.csproj.user
AccPlus.csproj.user
Help
AccountPlus.pdf
log4net.dll
Properties
propertiesORoptions.ico
Assemblies
log4net.dll
Database
MS Access
AccountPlus.mdb
MySQL
SQL Server
Backup
AccountPlus.bak
Script
Setup
Setup.msi
using System;
using System.Collections.Generic;
using System.Text;
using System.Resources;
using System.Globalization;
using System.Windows.Forms;
using AccountPlus.Configurations;

namespace AccountPlus.Messaging
{
    public static class MessageManager
    {
        private static global::System.Resources.ResourceManager resourceMan;
        private static global::System.Globalization.CultureInfo resourceCulture;

        private const string ACCOUNT_PLUS_CAPTION = "AccountPlus";

        public static DialogResult DisplayMessage(string message, string caption, MessageBoxIcon icon, MessageBoxButtons buttons)
        {
            return MessageBox.Show(message, caption, buttons, icon);
        }

        public static DialogResult DisplayMessage(string msgNo,  MessageBoxIcon icon, MessageBoxButtons buttons)
        {
            string message = GetMessage(msgNo);
            return DisplayMessage(message, ACCOUNT_PLUS_CAPTION + " [" + msgNo  + "]", icon, buttons);
        }

        public static DialogResult DisplayMessage(string msgNo, MessageBoxIcon icon)
        {
            string message = GetMessage(msgNo, false);
            return DisplayMessage(message, ACCOUNT_PLUS_CAPTION + " [" + msgNo  + "]", icon, MessageBoxButtons.OK);
        }

        public static DialogResult DisplayMessage(string msgNo, MessageBoxButtons buttons)
        {
            string message = GetMessage(msgNo, false);
            MessageBoxIcon icon = GetIcon(buttons);
            return DisplayMessage(message, ACCOUNT_PLUS_CAPTION + " [" + msgNo  + "]", icon, buttons);
        }


        public static DialogResult DisplayMessage(string msgNo, string[] arg, MessageBoxButtons buttons)
        {
            string message = GetMessage(msgNo, arg);
            MessageBoxIcon icon = GetIcon(buttons);
            return DisplayMessage(message, ACCOUNT_PLUS_CAPTION + " [" + msgNo  + "]", icon, buttons);
        }

        public static DialogResult DisplayMessage(string msgNo, string arg0, MessageBoxButtons buttons)
        {
            return DisplayMessage(msgNo, new string[] { arg0 }, buttons);
        }

        public static DialogResult DisplayMessage(string msgNo, string arg0, string arg1, MessageBoxButtons buttons)
        {
            return DisplayMessage(msgNo, new string[] { arg0, arg1 }, buttons);
        }

        public static DialogResult DisplayMessage(string msgNo, string arg0, string arg1,string arg2, MessageBoxButtons buttons)
        {
            return DisplayMessage(msgNo, new string[] { arg0, arg1, arg2 }, buttons);
        }

        public static DialogResult DisplayMessage(string msgNo)
        {
            string message = GetMessage(msgNo);            
            return DisplayMessage(message, ACCOUNT_PLUS_CAPTION + " [" + msgNo  + "]", MessageBoxIcon.Information , MessageBoxButtons.OK );
        }

        public static DialogResult DisplayMessage(string msgNo, string[] arg)
        {
            string message = GetMessage(msgNo, arg);
            return DisplayMessage(message, ACCOUNT_PLUS_CAPTION + " [" + msgNo  + "]", MessageBoxIcon.Information, MessageBoxButtons.OK);
        }

        public static DialogResult DisplayMessage(string msgNo, string arg)
        {
            return DisplayMessage(msgNo, new string[] { arg});
        }

        public static DialogResult DisplayMessage(string msgNo, string arg1, string arg2)
        {
            return DisplayMessage(msgNo, new string[] { arg1, arg2  });
        }

        public static DialogResult DisplayMessage(string msgNo, string arg1, string arg2, string arg3)
        {
            return DisplayMessage(msgNo, new string[] { arg1, arg2, arg3 });
        }

        public static DialogResult DisplayCustomMessage(string message)
        {            
            return DisplayMessage(message, ACCOUNT_PLUS_CAPTION, MessageBoxIcon.Information, MessageBoxButtons.OK);
        }

        public static DialogResult DisplayCustomMessage(string message, MessageBoxButtons buttons)
        {
            MessageBoxIcon icon = GetIcon(buttons);
            return DisplayMessage(message, ACCOUNT_PLUS_CAPTION, icon, buttons);
        }

        private static MessageBoxIcon GetIcon(MessageBoxButtons buttons)
        {
            switch (buttons)
            {
                case MessageBoxButtons.YesNo:
                case MessageBoxButtons.YesNoCancel:
                    return MessageBoxIcon.Question;
                default :
                    return MessageBoxIcon.Information;
            }
        }

        #region Public Methods To Read Message From Resource File
        public static string GetMessage(string messageNo, bool includeNo)
        {
            string message = string.Empty;
            message = ResourceManager.GetString("MSG" + messageNo, Culture);
            message = includeNo ? "[" + messageNo + "] " + message : message;
            return message;
        }

        public static string GetMessage(string messageNo, string[] arg,  bool includeNo)
        {
            string message = string.Empty;
            message = ResourceManager.GetString("MSG" + messageNo, Culture);
            message = string.Format(message, arg);
            message = includeNo ? "[" + messageNo + "]" + message : message;
            return message;
        }

        public static string GetMessage(string messageNo, string arg0, bool includeNo)
        {
            return GetMessage(messageNo, new string[] { arg0 }, includeNo);
        }

        public static string GetMessage(string messageNo, string arg0, string arg1, bool includeNo)
        {
            return GetMessage(messageNo, new string[] { arg0, arg1 }, includeNo);
        }

        public static string GetMessage(string messageNo, string arg0, string arg1, string arg2, bool includeNo)
        {
            return GetMessage(messageNo, new string[] { arg0, arg1, arg2 }, includeNo);
        }

        public static string GetMessage(string messageNo)
        {
            return GetMessage(messageNo, false);
        }

        public static string GetMessage(string messageNo, string[] arg)
        {
            return GetMessage(messageNo, arg, false);
        }

        public static string GetMessage(string messageNo, string arg0)
        {
            return GetMessage(messageNo, new string[] { arg0 });
        }

        public static string GetMessage(string messageNo, string arg0, string arg1)
        {
            return GetMessage(messageNo, new string[] { arg0, arg1 });
        }

        public static string GetMessage(string messageNo, string arg0, string arg1, string arg2)
        {
            return GetMessage(messageNo, new string[] { arg0, arg1, arg2 });
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager
        {
            get
            {
                if (object.ReferenceEquals(resourceMan, null))
                {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AccountPlus.Messaging.MessageResource", typeof(MessageResource).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture
        {
            get
            {
                return resourceCulture;
            }
            set
            {
                resourceCulture = value;
            }
        }

        #endregion
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)

Share

About the Author

Ashish Tripathi
Founder Aspirea Technologies Pvt Ltd
India India
• 8 years of experience in IT Industry as a Developer.
• Experience of End-To-End Software Development and Implementation (Entire SDLC i.e Software Development Life Cycle)
• Real time Exposure to Banking, Finance and Energy industry.
• Expertise in distributed application architecture as well as web based applications using Microsoft.NET platform.
• Expertise in database design, SQL programming and SQL performance tuning.
• Expertise in Web Services and WCF Services.
• Experience of Rich Internet Application using Adobe Flex.
• Experience in migration of legacy application to latest technology, migration of VB application to .NET.
• Knowledge of OOPS and Design Concepts.
• Expertise in Agile/ Scrum software development processes.

Specialties
• Languages\ Technologies-
.NET Framework 1.1/2.0/3.0/3.5, C#.NET, VB.NET, ASP.NET, VB6, AJAX, ASP.NET, Adobe Flex 3.0, Web Services, Windows Communication Foundation (WCF), LINQ, SQL Server, Oracle, MySql, MS Access, HTML, XML, JavaScript, C# Script, CSS and XSLT.

• Methodology/ Concepts-
OOPS, Data Structures, Design Concepts and Agile/ Scrum Software Development

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160826.1 | Last Updated 10 Sep 2009
Article Copyright 2008 by Ashish Tripathi
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid