protected void HandleOrientation(PageOrientations currentOrientation) { var control = (Control)AssociatedObject; switch (currentOrientation) { case PageOrientations.Portrait: VisualStateManager.GoToState(control, PortraitStateName, true); SendMessage(PageOrientations.Portrait); break; case PageOrientations.PortraitFlipped: VisualStateManager.GoToState(control, PortraitFlippedStateName, true); SendMessage(PageOrientations.PortraitFlipped); break; case PageOrientations.Landscape: VisualStateManager.GoToState(control, LandscapeStateName, true); SendMessage(PageOrientations.Landscape); break; case PageOrientations.LandscapeFlipped: VisualStateManager.GoToState(control, LandscapeFlippedStateName, true); SendMessage(PageOrientations.LandscapeFlipped); break; default: VisualStateManager.GoToState(control, LandscapeStateName, true); SendMessage(PageOrientations.Landscape); break; } }
private void HandleOrientation(PageOrientations orientation) { BackgroundImage = ResolveBackgroundImage(orientation); RefreshButtons(orientation); GetAllCategoryContent().ForEach(c => c.HandleOrientation(orientation)); }
public string Print() { HomeDataMonthly hd = new HomeDataMonthly(); Home home = hd.GetHomeData(); string s = new PageOrientations().RenderRazorViewToString(this, "Print", home); return(s); }
public string Print() { CustomerServiceData csd = new CustomerServiceData(); CustomerService customerService = csd.GetCustomerServiceData(); string s = new PageOrientations().RenderRazorViewToString(this, "Print", customerService); return(s); }
private ImageSource ResolveBackgroundImage(PageOrientations orientation) { switch (orientation) { case PageOrientations.Landscape: case PageOrientations.LandscapeFlipped: return(_landscapeImage); case PageOrientations.Portrait: case PageOrientations.PortraitFlipped: default: return(_portraitImage); } }
public string Print() { DirectoryInfo di = new DirectoryInfo(Server.MapPath("~/Uploads/First")); foreach (FileInfo fi in di.GetFiles()) { ViewBag.extension1 = fi.Extension; } if (di.GetFiles().Count() == 0) { ViewBag.extension1 = "none"; } DirectoryInfo di2 = new DirectoryInfo(Server.MapPath("~/Uploads/Second")); foreach (FileInfo fi in di2.GetFiles()) { ViewBag.extension2 = fi.Extension; } if (di2.GetFiles().Count() == 0) { ViewBag.extension2 = "none"; } DirectoryInfo di3 = new DirectoryInfo(Server.MapPath("~/Uploads/Third")); foreach (FileInfo fi in di3.GetFiles()) { ViewBag.extension3 = fi.Extension; } if (di3.GetFiles().Count() == 0) { ViewBag.extension3 = "none"; } DirectoryInfo di4 = new DirectoryInfo(Server.MapPath("~/Uploads/Fourth")); foreach (FileInfo fi in di4.GetFiles()) { ViewBag.extension4 = fi.Extension; } if (di4.GetFiles().Count() == 0) { ViewBag.extension4 = "none"; } MarketingData md = new MarketingData(); List <Marketing> lst = md.GetMarketingData(); string s = new PageOrientations().RenderRazorViewToString(this, "Print", lst); return(s); }
internal void HandleOrientation(PageOrientations orientation) { switch (orientation) { case PageOrientations.Landscape: case PageOrientations.LandscapeFlipped: CurrentPositionX = _button.PositionXLandscape; CurrentPositionY = _button.PositionYLandscape; break; case PageOrientations.Portrait: case PageOrientations.PortraitFlipped: default: CurrentPositionX = _button.PositionXPortrait; CurrentPositionY = _button.PositionYPortrait; break; } CurrentImage = _mainImage; }
private Brush ResolveBackgroundBrush(PageOrientations orientation) { switch (orientation) { case PageOrientations.Portrait: case PageOrientations.PortraitFlipped: return(PortraitImage != null ? new ImageBrush { ImageSource = PortraitImage } : null); //case PageOrientations.Landscape: //case PageOrientations.LandscapeFlipped: default: return(LandscapeImage != null ? new ImageBrush { ImageSource = LandscapeImage } : null); } }
protected override void SendMessage(PageOrientations orientation) { Messenger.Default.Send(new OrientationStateMessage(orientation)); }
public OrientationStateMessage(PageOrientations orientation) { Orientation = orientation; }
protected override void SendMessage(PageOrientations orientation) { Messenger.Default.Send(new OrientationStateMessage(orientation)); }
protected virtual void SendMessage(PageOrientations orientation) { }
protected void HandleOrientation(PageOrientations currentOrientation) { var control = (Control)AssociatedObject; switch (currentOrientation) { case PageOrientations.Portrait: VisualStateManager.GoToState(control, PortraitStateName, true); SendMessage(PageOrientations.Portrait); break; case PageOrientations.PortraitFlipped: VisualStateManager.GoToState(control, PortraitFlippedStateName, true); SendMessage(PageOrientations.PortraitFlipped); break; case PageOrientations.Landscape: VisualStateManager.GoToState(control, LandscapeStateName, true); SendMessage(PageOrientations.Landscape); break; case PageOrientations.LandscapeFlipped: VisualStateManager.GoToState(control, LandscapeFlippedStateName, true); SendMessage(PageOrientations.LandscapeFlipped); break; default: VisualStateManager.GoToState(control, LandscapeStateName, true); SendMessage(PageOrientations.Landscape); break; } }
protected virtual void SendMessage(PageOrientations orientation) { }
public OrientationStateMessage(PageOrientations orientation) { Orientation = orientation; }
internal void HandleOrientation(PageOrientations orientation) { BackgroundImageBrush = ResolveBackgroundBrush(orientation); }
private void RefreshButtons(PageOrientations orientation) { Buttons?.ToList().ForEach(b => b.HandleOrientation(orientation)); }