Esempio n. 1
0
 public Framework.Xaml.ActionForm.ActionParameter GetNavigateToCommandParam_CommonResultView(
     long oneCondition // can be more
     , Framework.Xaml.ListItemViewModes listItemViewMode
     , bool?bindToGroupedResults
     , string orderByPropertyName
     , Framework.Queries.QueryOrderDirections?orderByDirection)
 {
     return(new Framework.Xaml.ActionForm.ActionParameter {
         Domain = DomainKey
         , Page = Framework.Xaml.StandardRouteRelativeKey.CommonResultView.ToString()
         , SendMessage = () => {
             SendMessage_Init_CommonResultView(oneCondition, listItemViewMode, bindToGroupedResults, orderByPropertyName, orderByDirection);
         }
     });
 }
Esempio n. 2
0
            /// <summary>
            /// this method can be called in other view models or anywhere to initialize CommonResultView if referenced in other places.
            /// </summary>
            public void SendMessage_Init_CommonResultView(
                long oneCondition // can be more
                , Framework.Xaml.ListItemViewModes listItemViewMode
                , bool?bindToGroupedResults
                , string orderByPropertyName
                , Framework.Queries.QueryOrderDirections?orderByDirection)
            {
                var vm = DependencyService.Resolve <Elmah.MVVMLightViewModels.ElmahType.IndexVM>();

                MessagingCenter.Send <Elmah.MVVMLightViewModels.ElmahType.IndexVM, Framework.Xaml.LoadListDataRequest>(vm, Elmah.MVVMLightViewModels.ElmahType.IndexVM.MessageTitle_LoadData,
                                                                                                                       new Framework.Xaml.LoadListDataRequest
                {
                    ListItemViewMode       = listItemViewMode
                    , BindToGroupedResults = bindToGroupedResults
                    , OrderByPropertyName  = orderByPropertyName
                    , OrderByDirection     = orderByDirection
                    , Parameters           = new Dictionary <string, object> {
                        // { nameof(Elmah.DataSourceEntities.ElmahType.oneCondition), oneCondition },
                        // { nameof(Elmah.DataSourceEntities.ElmahType.BusinessEntityID), businessEntityID }, // can be more
                    }
                    , ActionWhenLaunch     = () => { DefaultItem(oneCondition); ListFooterActionSheet = GetListFooterActionSheet(vm); }
                });
            }
Esempio n. 3
0
            // 03.01. CommonSearchView -> Elmah.XamarinForms.Pages.ElmahType.CommonSearchView

/*
 *          public Framework.Xaml.ActionForm.ActionItemModel GetActionItemModel_LaunchCommonSearchView(
 *              long oneCondition // can be more
 *              , Framework.Xaml.ListItemViewModes listItemViewMode
 *              , bool? bindToGroupedResults
 *              , string orderByPropertyName
 *              , Framework.Queries.QueryOrderDirections? orderByDirection)
 *          {
 *              var actionItem = new Framework.Xaml.ActionForm.ActionItemModel
 *              {
 *                  ActionFormItemType = Framework.Xaml.ActionForm.ActionFormItemTypes.NavigationItem, //CommandItem, open CommonSearchView
 *                  Title = Elmah.Resx.UIStringResourcePerApp.ElmahType, // some localized text here, e.g. Framework.Resx.UIStringResource. or NTierOnTime.Resx.UIStringResourcePerApp, or NTierOnTime.Resx.UIStringResourcePerEntity
 *                  FontIconSettings = new Framework.Xaml.FontIconSettings
 *                  {
 *                      MasterFontIcon = Framework.Xaml.FontAwesomeIcons. // Search, open CommonSearchView
 *                      , MasterFontIconFamily = Framework.Xaml.IconFontFamily.FontAwesomeSolid.ToString()
 *                  },
 *                  NavigationCommand = NavigationVM.NavigationCommand,
 *                  NavigationCommandParam = GetNavigateToCommandParam_CommonSearchView(oneCondition, listItemViewMode, bindToGroupedResults, orderByPropertyName, orderByDirection)
 *                  // Command = popupVM.Command_ShowRightSidePopup, for open CommonSearchView
 *              };
 *
 *              return actionItem;
 *          }
 *
 *          public Framework.Xaml.ActionForm.ActionParameter GetNavigateToCommandParam_CommonSearchView(
 *              long oneCondition // can be more
 *              , Framework.Xaml.ListItemViewModes listItemViewMode
 *              , bool? bindToGroupedResults
 *              , string orderByPropertyName
 *              , Framework.Queries.QueryOrderDirections? orderByDirection)
 *          {
 *              return new Framework.Xaml.ActionForm.ActionParameter {
 *                   Domain = DomainKey
 *                  , Page = Framework.Xaml.StandardRouteRelativeKey.CommonSearchView.ToString()
 *                  , SendMessage = () => {
 *                      SendMessage_Init_CommonSearchView(oneCondition, listItemViewMode, bindToGroupedResults, orderByPropertyName, orderByDirection);
 *                  }
 *              };
 *          }
 *
 *          /// <summary>
 *          /// this method can be called in other view models or anywhere to initialize CommonSearchView if referenced in other places.
 *          /// </summary>
 *          public void SendMessage_Init_CommonSearchView(
 *              long oneCondition // can be more
 *              , Framework.Xaml.ListItemViewModes listItemViewMode
 *              , bool? bindToGroupedResults
 *              , string orderByPropertyName
 *              , Framework.Queries.QueryOrderDirections? orderByDirection)
 *          {
 *              var vm = DependencyService.Resolve<Elmah.MVVMLightViewModels.ElmahType.IndexVM>();
 *              MessagingCenter.Send<Elmah.MVVMLightViewModels.ElmahType.IndexVM, Framework.Xaml.LoadListDataRequest>(vm, Elmah.MVVMLightViewModels.ElmahType.IndexVM.MessageTitle_LoadData,
 *                  new Framework.Xaml.LoadListDataRequest
 *                  {
 *                      ListItemViewMode = listItemViewMode
 *                      , BindToGroupedResults = bindToGroupedResults
 *                      , OrderByPropertyName = orderByPropertyName
 *                      , OrderByDirection = orderByDirection
 *                      , Parameters = new Dictionary<string, object> {
 *                                  { nameof(Elmah.DataSourceEntities.ElmahType.oneCondition), oneCondition },
 *                                  // { nameof(Elmah.DataSourceEntities.ElmahType.BusinessEntityID), businessEntityID }, // can be more
 *                      }
 *                      , ActionWhenLaunch = () => { DefaultItem(oneCondition); ListFooterActionSheet = GetListFooterActionSheet(vm); }
 *                  });
 *          }
 */

            // 03.02. CommonResultView -> Elmah.XamarinForms.Pages.ElmahType.CommonResultView

            public Framework.Xaml.ActionForm.ActionItemModel GetActionItemModel_LaunchCommonResultView(
                long oneCondition // can be more
                , Framework.Xaml.ListItemViewModes listItemViewMode
                , bool?bindToGroupedResults
                , string orderByPropertyName
                , Framework.Queries.QueryOrderDirections?orderByDirection)
            {
                var actionItem = new Framework.Xaml.ActionForm.ActionItemModel
                {
                    ActionFormItemType = Framework.Xaml.ActionForm.ActionFormItemTypes.NavigationItem, //CommandItem, open CommonSearchView
                    Title            = Elmah.Resx.UIStringResourcePerApp.ElmahType,                    // some localized text here, e.g. Framework.Resx.UIStringResource. or NTierOnTime.Resx.UIStringResourcePerApp, or NTierOnTime.Resx.UIStringResourcePerEntity
                    FontIconSettings = new Framework.Xaml.FontIconSettings
                    {
                        MasterFontIcon         = Framework.Xaml.FontAwesomeIcons.Question // Search, open CommonSearchView
                        , MasterFontIconFamily = Framework.Xaml.IconFontFamily.FontAwesomeSolid.ToString()
                    },
                    NavigationCommand      = NavigationVM.NavigationCommand,
                    NavigationCommandParam = GetNavigateToCommandParam_CommonResultView(oneCondition, listItemViewMode, bindToGroupedResults, orderByPropertyName, orderByDirection)
                                             // Command = popupVM.Command_ShowRightSidePopup, for open CommonSearchView
                };

                return(actionItem);
            }