コード例 #1
0
        private bool _textToHref( string value)
        {
            var t = value.Split('?');
            value = t[0];
            switch (value)
            { 
                case "PManagerListForm.xaml":
                    HREF = new PManagerListForm();
                    break;
                case "PManagerForm.xaml":
                    HREF = new PManagerForm();
                    break;
                case "PAddVacancyForm.xaml":
                    HREF = new PAddVacancyForm();
                    break;
                case "PCompanyInfoForm.xaml":
                    HREF = new PCompanyInfoForm(Convert.ToInt32(t[1]));
                    break;
                case "PUserInfoForm.xaml":
                    HREF = new PUserInfoForm(Convert.ToInt32(t[1]));
                    break;
                case "PReferencesForm.xaml":
                    HREF = new PUserReferences(t[1][0], Convert.ToInt32(t[1].Substring(1)));
                    break;
                case "PResumeForm.xaml":
                    HREF = new PResumeForm(Convert.ToInt32(t[1]));
                    break;
                case "PResumeEditForm.xaml":
                    HREF = new PResumeEditForm();
                    break;
                case "PLikedForm.xaml":
                    break;
                case "PMailForm.xaml":
                    HREF = new PMailForm();
                    break;
                case "PSearchForm.xaml":
                    HREF=new PSearchForm(t[1][0], Convert.ToInt32(t[1].Substring(1)));
                    break;
                case "PSettingsForm.xaml":
                    HREF = new PSettingsForm();
                    break;
                case "PWriteMessageForm.xaml":
                    try
                    {
                        HREF = new PWriteMessageForm(Convert.ToInt32(t[1]));
                    }
                    catch
                    {
                        HREF = new PWriteMessageForm();
                    }
                    break;
                default:
                    return false;
            }
			return true;
        }
コード例 #2
0
        private bool _textToHref(string value)
        {
            var t = value.Split('?');

            value = t[0];
            switch (value)
            {
            case "PManagerListForm.xaml":
                HREF = new PManagerListForm();
                break;

            case "PManagerForm.xaml":
                HREF = new PManagerForm();
                break;

            case "PAddVacancyForm.xaml":
                HREF = new PAddVacancyForm();
                break;

            case "PCompanyInfoForm.xaml":
                HREF = new PCompanyInfoForm(Convert.ToInt32(t[1]));
                break;

            case "PUserInfoForm.xaml":
                HREF = new PUserInfoForm(Convert.ToInt32(t[1]));
                break;

            case "PReferencesForm.xaml":
                HREF = new PUserReferences(t[1][0], Convert.ToInt32(t[1].Substring(1)));
                break;

            case "PResumeForm.xaml":
                HREF = new PResumeForm(Convert.ToInt32(t[1]));
                break;

            case "PResumeEditForm.xaml":
                HREF = new PResumeEditForm();
                break;

            case "PLikedForm.xaml":
                break;

            case "PMailForm.xaml":
                HREF = new PMailForm();
                break;

            case "PSearchForm.xaml":
                HREF = new PSearchForm(t[1][0], Convert.ToInt32(t[1].Substring(1)));
                break;

            case "PSettingsForm.xaml":
                HREF = new PSettingsForm();
                break;

            case "PWriteMessageForm.xaml":
                try
                {
                    HREF = new PWriteMessageForm(Convert.ToInt32(t[1]));
                }
                catch
                {
                    HREF = new PWriteMessageForm();
                }
                break;

            default:
                return(false);
            }
            return(true);
        }