Example #1
0
        public void GuyWire_Delegates_To_ViewInstaller()
        {
            var installer = new ViewRegistration();

            _guyWire.Expect(g => g.ComponentsInfo).Return(new[] { installer });

            Assert.DoesNotThrow(() => _guyWire.Wire());
        }
Example #2
0
        public CreateWidgetCommand(IMessageBus messaging, ToolboxSocket socket, ToolboxLogging log, ViewRegistration registration)
            : base(messaging, socket, log)
        {
            if (registration == null)
            {
                throw new ArgumentNullException(nameof(registration));
            }

            if (string.IsNullOrWhiteSpace(registration.Type?.FullName))
            {
                throw new InvalidOperationException("The view type was not specified.");
            }

            Registration = registration;
            MenuText     = registration.Type.ShortName;
        }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //if (Request.Cookies.Get("FabyMartUsername") == null)
            //{
            //    if (Request.Cookies.Get("IsFirstTime") == null)
            //    {
            //        ViewRegistration.ShowRegistration(true);
            //    }
            //}
            if ((Session[appFunctions.Session.ClientUserID.ToString()] != null))
            {
                if (string.IsNullOrEmpty(Session[appFunctions.Session.ClientUserName.ToString()].ToString()) | Session[appFunctions.Session.ClientUserID.ToString()].ToString() == "0")
                {
                    ViewRegistration.ShowRegistration(true);
                }
            }
            else
            {
                ViewRegistration.ShowRegistration(true);
            }
            SetUpPageContent(ref metaDescription, ref metaKeywords);
            SetRegulerExpression();
            //if (Request.CurrentExecutionFilePath.ToLower().Contains("default.aspx") && Request.FilePath.ToLower().Contains("default.aspx"))
            //{

            //    tblPage objPage = new tblPage();
            //    objPage.Where.AppIsDefault.Value = true;
            //    objPage.Query.Load();
            //    if (objPage.RowCount > 0)
            //    {
            //        Response.Redirect(objPage.AppAlias);
            //    }
            //}
            LoadBanner();
            LoadHighLight();
            LoadFeaturedProduct();
            LoadNewPoducts();
            LoadBestSeller();
            DisplayTranding();
            LoadBestDeal();
        }
    }
Example #4
0
 public WpfViewFactory(ITypeFactory typeFactory) : base(new WpfTypeFactory(typeFactory))
 {
     RegisterViews(ViewRegistration.FromTypes(Types.FromCurrentAppDomain));
 }
Example #5
0
        public bool CanAttach(ViewRegistration registration)
        {
            var viewName = registration?.Type?.FullName;

            return(CanAttach(viewName));
        }