示例#1
0
        public static UserPassport BindThirdPassport(ThirdPassport entity, out SignStatus status)
        {
            entity.AssertNotNull("entity");

            UserPassport passport = null;

            status = SignStatus.None;
            var thirdPassport = ThirdPassport.FindByPlatformPassportId(entity.Platform, entity.PlatformPassportId);

            if (null == thirdPassport)
            {
                var email    = string.Format("${0}@{1}.io", entity.PlatformPassportId, entity.Platform);
                var password = EncryptProvider.GenerateSalt();

                passport = MemberShip.SignUp(email, null, null, password, ProfileType.UserProfile, new SignedUpInfo(), out status);
                if (SignStatus.Success == status)
                {
                    thirdPassport            = entity;
                    thirdPassport.PassportId = passport.PassportId;
                    thirdPassport.Save();
                }
            }
            else
            {
                passport = UserPassport.FindById(thirdPassport.PassportId);
                status   = null == passport ? SignStatus.Error : SignStatus.Success;
            }

            return(passport);
        }
示例#2
0
        static ControlService()
        {
            string appdir = ConfigurationManager.AppSettings["ProWriteFontFile"];

            if (appdir.IndexOf(@":") == -1)
            {
                appdir = Application.StartupPath + @"\" + appdir;
            }
            else
            {
                appdir = ConfigurationManager.AppSettings["ProWriteFontFile"];
            }

            FontManager.Initialize(appdir);

            _libraryTree      = new LibraryTree();
            _signCombo        = new SignRepositoryItemLookUpEdit();
            _propertyGrid     = new PropertyGridControl();
            _effectTree       = new EffectTreeControl();
            _toolBox          = new ToolBoxControl();
            _timeSliceControl = new TimeSliceGroupControl();
            _signImage        = new SignImage();
            _signStatus       = new SignStatus();

            _barButtonPosition = new BarButtonItem();
            //_barButtonPosition.CategoryGuid = new System.Guid("77795bb7-9bc5-4dd2-a297-cc758682e23d");
            //_barButtonPosition.Id = 0;
            //_barButtonPosition.Name = "siPosition";

            _statusBar            = new RibbonStatusBar();
            _currentClip          = new CurrentClip();
            _spellChecker         = new DevExpress.XtraSpellChecker.SpellChecker();
            _signStorageIndicator = new SignStorageIndicator();

            _pictureBox = new PictureEdit();
            _pictureBox.Properties.ShowMenu = false;
            _pictureBox.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom;

            if (_libraryTree != null)
            {
                _libraryTree.Controller.RemoveLibraryItemEvent += new EventHandler <RemoveLibraryEventArgs>(Controller_RemoveLibraryItemEvent);
            }
            _fonts         = new List <PWFont>();
            _fontsBitMap   = new List <PWFont>();
            _fontsTrueType = new List <PWFont>();

            spellCheckTask = Task.Create((p) =>
            {
                CultureInfo engCulture = new CultureInfo("En-us");
                dictionary             = new SpellCheckerISpellDictionary(DemoUtils.GetRelativePath("american.xlg"), DemoUtils.GetRelativePath("english.aff"), engCulture);

                dictionary.AlphabetPath = DemoUtils.GetRelativePath("EnglishAlphabet.txt");
                customDictorary         = new SpellCheckerCustomDictionary();
                customDictorary.Culture = engCulture;

                SpellCheckerList.Load();
                customDictorary.AddWords(ServiceManager.Get <SpellCheckerList>());
            });
        }
        public CollectionModel GetMyESignRequestsInStatus([FromUri] string status,
                                                          [FromUri] string keywords = "")
        {
            try {
                SignStatus signStatus = GetSignStatusFromRequest(status);

                FixedList <SignRequestDTO> myRequests =
                    ESignUseCases.GetMyESignRequests(signStatus, keywords);

                return(GetResponse(myRequests));
            } catch (Exception e) {
                throw base.CreateHttpException(e);
            }
        }
示例#4
0
        /// <summary>
        /// Corresponds to the Context Menu commands for changing the status of files.
        /// </summary>
        /// <param name="path">alienbrain namespace path (ex: ab\cd\ef\..).</param>
        /// <param name="comment">remark text.</param>
        /// <param name="Status">signoff types.</param>
        /// <returns>System.Boolean</returns>
        public bool ChangeStatus(string path, string comment, SignStatus Status)
        {
            Command cmd = new Command("SignOff", 0);

            cmd.SetIn("StatusId", System.Convert.ToInt32(Status));
            cmd.SetIn("Comment", comment);
            cmd.SetIn("ShowDialog", false);
            _ns.RunCommand(Revise(path), cmd);

            if (cmd.WasSuccessful())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public static UserPassport BindThirdPassport(ThirdPassport entity, out SignStatus status)
        {
            UserPassport passport = null;

            status = SignStatus.None;

            if (null == entity ||
                string.IsNullOrEmpty(entity.Platform) || string.IsNullOrEmpty(entity.PlatformPassportId))
            {
                return(null);
            }

            MemberShip.BindThirdPassport(entity, out status);
            if (status == SignStatus.Success)
            {
                Authenticate(passport);
            }

            return(passport);
        }
示例#6
0
 /// <summary>
 /// 初始化签到结果。
 /// </summary>
 /// <param name="status">签到状态。</param>
 /// <param name="tip">提示文本。</param>
 public SignResult(SignStatus status, string tip)
 {
     Status = status;
     Tip    = tip;
 }
        static internal FixedList <SignRequest> GetESignRequests(IContact requestedTo, SignStatus status,
                                                                 string keywords = "")
        {
            string filter = GetSignRequestKeywordsFilter(keywords);

            var op = DataOperation.Parse("@qryEOPSignRequestsForContactInStatus",
                                         requestedTo.Id, (char)status, filter);

            return(DataReader.GetFixedList <SignRequest>(op));
        }
示例#8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="mobilePhone"></param>
        /// <param name="password"></param>
        /// <param name="selectedProfileType"></param>
        /// <param name="signedUpInfo"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        public static UserPassport SignUp(string mobilePhone, string password, ProfileType selectedProfileType, SignedUpInfo signedUpInfo, out SignStatus status)
        {
            status = SignStatus.None;
            status = CheckMobilePhone(mobilePhone);
            if (status != SignStatus.None)
            {
                return(null);
            }

            status = CheckPassword(password);
            if (status != SignStatus.None)
            {
                return(null);
            }

            return(SignUp(null, mobilePhone, null, password, selectedProfileType, signedUpInfo, out status));
        }
示例#9
0
        private static UserPassport SignUp(string email, string mobilePhone, string userName, string password, ProfileType selectedProfileType, SignedUpInfo signedUpInfo, out SignStatus status)
        {
            var userPassport = new UserPassport()
            {
                UserSecurity = new UserSecurity(), Profile = new UserProfile()
            };

            userPassport.Email            = email;
            userPassport.MobilePhone      = mobilePhone;
            userPassport.UserName         = userName;
            userPassport.MultipleProfiles = selectedProfileType;

            userPassport.UserSecurity.Password = password;

            userPassport.Profile.CurrentProfileType = selectedProfileType;
            userPassport.Profile.CreatedTime        = userPassport.CreatedTime;
            userPassport.Profile.LastSignedInTime   = userPassport.Profile.CreatedTime;
            userPassport.Profile.LastActivityTime   = userPassport.Profile.CreatedTime;
            userPassport.Profile.Email = email;
            status = SignStatus.Error;
            if (userPassport.SignUp(signedUpInfo))
            {
                status = SignStatus.Success;
                if (selectedProfileType == ProfileType.OrganizationProfile)
                {
                    OrganizationProfile.Transform(userPassport, new OrganizationProfile());
                }

                if (null != OnSignUp)
                {
                    OnSignUp(userPassport);
                }
            }

            return(userPassport);
        }
示例#10
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="email"></param>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <param name="selectedProfileType"></param>
        /// <param name="signedUpInfo"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        public static UserPassport SignUp(string email, string userName, string password, ProfileType selectedProfileType, SignedUpInfo signedUpInfo, out SignStatus status)
        {
            status = CheckEmail(email);
            if (status != SignStatus.None)
            {
                return(null);
            }

            status = CheckUserName(userName);
            if (status != SignStatus.None)
            {
                return(null);
            }

            status = CheckPassword(password);
            if (status != SignStatus.None)
            {
                return(null);
            }

            return(SignUp(email, null, userName, password, selectedProfileType, signedUpInfo, out status));
        }
        public static UserPassport SignUp(string mobilePhone, string password, ProfileType selectedProfileType, SignedUpInfo signedUpInfo, out SignStatus status)
        {
            var passport = MemberShip.SignUp(mobilePhone, password, selectedProfileType, signedUpInfo, out status);

            if (status == SignStatus.Success)
            {
                Authenticate(passport);
            }

            return(passport);
        }
示例#12
0
 static public FixedList <SignRequestDTO> GetMyESignRequests(SignStatus status, string keywords)
 {
     return(GetESignRequests(GetCurrentUser(), status, keywords));
 }
示例#13
0
        static public FixedList <SignRequestDTO> GetESignRequests(IContact requestedTo, SignStatus status,
                                                                  string keywords)
        {
            FixedList <SignRequest> r = SignDataServices.GetESignRequests(requestedTo, status, keywords);

            return(ESignMapper.Map(r));
        }
示例#14
0
 static public FixedList <SignRequestDTO> GetESignRequests(IContact requestedTo, SignStatus status)
 {
     return(GetESignRequests(requestedTo, status, String.Empty));
 }