Ejemplo n.º 1
0
        public AccountsController(
            IDeposit deposit,
            IWithdraw withdraw,
            IClose close,
            IAccountsQueries accountsQueries)
        {
            if (deposit == null)
            {
                throw new ArgumentNullException(nameof(deposit));
            }

            if (withdraw == null)
            {
                throw new ArgumentNullException(nameof(withdraw));
            }

            if (close == null)
            {
                throw new ArgumentNullException(nameof(close));
            }

            if (accountsQueries == null)
            {
                throw new ArgumentNullException(nameof(accountsQueries));
            }

            this.deposit         = deposit;
            this.withdraw        = withdraw;
            this.close           = close;
            this.accountsQueries = accountsQueries;
        }
Ejemplo n.º 2
0
 public ModalWindow(IClose page)
 {
     IPage = page;
     InitializeComponent();
     cc.Content = new Frame()
     {
         Content = page
     };
     this.Title = page.PageName;
 }
Ejemplo n.º 3
0
 public Message(object Contenido, object Titulo)
 {
     InitializeComponent();
     this.Contenido = Contenido.ToStr();
     this.Titulo    = Titulo.ToStr();
     OnPropertyChanged();
     KeyUp += (s, e) => {
         if (e.Key == Key.Enter || e.Key == Key.S)
         {
             IClose.Execute(null);
         }
     };
 }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string         id    = Request.QueryString["id"];
            IClose         close = DataAccess.CreateIClose();
            ProjectEndBean pe    = close.getProjectEnd(id);

            if (!IsPostBack)
            {
                Project_ID.Text           = id;
                Project_Name.Text         = pe.PrjName;
                Project_PersonLiable.Text = pe.IrPerson;
                Project_StartTime.Text    = pe.IrStartTime;
                Project_PlanTime.Text     = pe.IrPlanTime;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Performs a back navigation and once finished, executes the specified action
        /// </summary>
        /// <param name="nav"></param>
        /// <param name="closeable"></param>
        /// <param name="message"></param>
        public static void GoBackThenPublish(this INavigationService nav, IClose closeable, object message)
        {
            NavigatedEventHandler afterNavigation = null;

            // Handles after navigation
            afterNavigation = (s, e) => {
                // Remove handler
                nav.Navigated -= afterNavigation;

                // Get event aggregator
                var events = IoC.Get<IEventAggregator>();

                // Publish event
                if (events != null) {
                    events.Publish(message);
                }
            };

            // Attach handler
            nav.Navigated += afterNavigation;

            // Go back
            nav.GoBack();
        }
Ejemplo n.º 6
0
 public void Cancel(IClose closableWindow)
 {
     closableWindow.TryClose(false);
 }
Ejemplo n.º 7
0
 public void Generate(IClose closableWindow)
 {
     closableWindow.TryClose(true);
 }
Ejemplo n.º 8
0
 public void Close(IClose closableWindow)
 {
     closableWindow?.TryClose();
 }
Ejemplo n.º 9
0
 public SelfClose(IClose close)
 {
     this.close = close;
 }
Ejemplo n.º 10
0
 private string SetAsync(IClose close)
 {
     return("Async");
 }
Ejemplo n.º 11
0
 public AsyncSelfClose(IClose close) : base(close)
 {
 }
 public void Ok(IClose closableWindow)
 {
     closableWindow.TryClose(true);
 }
 public void Close(IClose closeableWindow)
 {
     closeableWindow?.TryClose(true);
 }