Esempio n. 1
0
    private static string GetWeekday(DateTime dt)
    {
        WebmailResourceManager resMan = (new WebmailResourceManagerCreator()).CreateResourceManager();

        switch (dt.DayOfWeek)
        {
        case DayOfWeek.Monday:
            return(resMan.GetString("DayToolMonday"));

        case DayOfWeek.Tuesday:
            return(resMan.GetString("DayToolTuesday"));

        case DayOfWeek.Wednesday:
            return(resMan.GetString("DayToolWednesday"));

        case DayOfWeek.Thursday:
            return(resMan.GetString("DayToolThursday"));

        case DayOfWeek.Friday:
            return(resMan.GetString("DayToolFriday"));

        case DayOfWeek.Saturday:
            return(resMan.GetString("DayToolSaturday"));

        default:
            return(resMan.GetString("DayToolSunday"));
        }
    }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SetActiveClassNames();
            WebMail.Account acct = (WebMail.Account)Session[Constants.sessionAccount];
            Skin = acct.UserOfAccount.Settings.DefaultSkin;

            if (acct == null)
            {
                Response.Redirect("default.aspx", true);
            }
            else
            {
                try
                {
                    _manager = (new WebmailResourceManagerCreator()).CreateResourceManager();

                    _CalendarDiv = @"<div class=""wm_accountslist_contacts wm_active_tab"">
										<a href=""#"" onclick=""return false;"">"                                         + _manager.GetString("Calendar") + @"</a>
									</div>"                                    ;
                    WebmailSettings settings = (new WebMailSettingsCreator()).CreateWebMailSettings();
                    if (settings.AllowContacts)
                    {
                        _ContactsDiv = @"<div class=""wm_accountslist_contacts" + contactsActiveClassName + @""">
											<a href="""                                             + _contactsLink + @""">" + _manager.GetString("Contacts") + @"</a>
										</div>"                                        ;
                    }

                    BaseWebMailActions bwa = new BaseWebMailActions(acct, Page);

                    AccountCollection Accounts = bwa.GetAccounts(acct.IDUser);
                    //_accountsCount = Accounts.Length;
                    if (Accounts.Count > 1)
                    {
                        AcctList = @"
						<div id=""popup_replace_1"" class=""wm_accountslist_email"                         + mailActiveClassName + @""">
							<a href="""                             + _accountsListLink + @""">
								"                                 + acct.Email + @"
							</a>
						</div>
						<div class=""wm_accountslist_selection wm_control"" id=""popup_control_1""
							 onmouseover=""this.className='wm_accountslist_selection_over wm_control';"" 
							 onmousedown=""this.className='wm_accountslist_selection_press wm_control';""
							 onmouseup=""this.className='wm_accountslist_selection_over wm_control';"" 
							 onmouseout=""this.className='wm_accountslist_selection wm_control';"">
						</div>
					"                    ;

                        string temp = String.Empty;

                        for (int i = 0; Accounts.Count > i; i++)
                        {
                            if (Accounts[i].ID != acct.ID)
                            {
                                temp += @"
							<div>
							<div id="""                             + Accounts[i].ID + @""" onmouseout=""this.className='wm_account_item';"" onmouseover=""this.className='wm_account_item_over';"" onclick=""javascript:ChangeAccount(this.id);"" class=""wm_account_item"">
								"                                 + Accounts[i].Email + @"
							</div>
							</div>
						"                        ;
                            }
                        }

                        temp = @"
						<div id=""popup_menu_1"" class=""wm_hide"">
							"                             + temp + @"
						</div>
					"                    ;

                        AcctList = temp + AcctList;
                    }
                    else
                    {
                        AcctList = @"
						<div class=""wm_accountslist_email"""                         + mailActiveClassName + @">
							<a href="""                             + _accountsListLink + @""">
								"                                 + acct.Email + @"
							</a>
						</div>
						<div class=""wm_accountslist_selection_none""></div>
					"                    ;
                    }
                }
                catch (Exception)
                {
//					((basewebmail)Page).OutputException(ex);
                }
            }
        }
Esempio n. 3
0
    private static string GetMonth(DateTime dt)
    {
        WebmailResourceManager resMan = (new WebmailResourceManagerCreator()).CreateResourceManager();

        switch (dt.Month)
        {
        case 2:
            return(resMan.GetString("ShortMonthFebruary"));

        case 3:
            return(resMan.GetString("ShortMonthMarch"));

        case 4:
            return(resMan.GetString("ShortMonthApril"));

        case 5:
            return(resMan.GetString("ShortMonthMay"));

        case 6:
            return(resMan.GetString("ShortMonthJune"));

        case 7:
            return(resMan.GetString("ShortMonthJuly"));

        case 8:
            return(resMan.GetString("ShortMonthAugust"));

        case 9:
            return(resMan.GetString("ShortMonthSeptember"));

        case 10:
            return(resMan.GetString("ShortMonthOctober"));

        case 11:
            return(resMan.GetString("ShortMonthNovember"));

        case 12:
            return(resMan.GetString("ShortMonthDecember"));

        default:
            return(resMan.GetString("ShortMonthJanuary"));
        }
    }