/// <summary>
 /// Called when an list item has been tapped
 /// @param {Ext.List} subList The subList the item is on
 /// @param {Number} subIdx The id of the item tapped
 /// @param {Ext.Element} el The element of the item tapped
 /// @param {Ext.EventObject} e The event
 /// </summary>
 public void onItemTap(List subList, JsNumber subIdx, Element el, EventObject e){}
Esempio n. 2
0
        private void SetControls( params string[] Acq )
        {
            Controls = new List<PaneNavButton>();
            foreach( string Ctrl in Acq )
            {
                switch ( Ctrl )
                {

                    case "NewComment":
                        Controls.Add(
                            new PaneNavButton(
                                new IconComment() { AutoScale = true }
                                , CC_WriteReview
                            )
                        );
                        break;

                    case "Back":
                        Controls.Add(
                            new PaneNavButton(
                                new IconLogout() { AutoScale = true }
                                , CC_CloseReview
                            )
                        );
                        break;

                    case "Reload":
                        Controls.Add(
                            new PaneNavButton(
                                new IconReload() { AutoScale = true }
                                , CC_Reload
                            )
                        );
                        break;

                    case "Submit":
                        Controls.Add(
                            new PaneNavButton(
                                new IconTick() { AutoScale = true }
                                , CC_Submit
                            )
                        );
                        break;

                    case "Cancel":
                        Controls.Add(
                            new PaneNavButton(
                                new IconCross() { AutoScale = true }
                                , CC_Cancel
                            )
                        );
                        break;
                }
            }

            NotifyChanged( "Controls" );
        }
Esempio n. 3
0
        public IEnumerable<SubtleUpdateItem> NavSections()
        {
            IEnumerable<XParameter> Params = IsCustomSectionEnabled
                ? Customs.Where( ( x ) => !x.GetBool( "custom" ) )
                : Customs
                ;

            List<SubtleUpdateItem> Secs = new List<SubtleUpdateItem>();
            StringResources stx = new StringResources( "NavigationTitles" );
            foreach ( XParameter Param in Params )
            {
                Tuple<Type, string> Def = SectionDefs[ Param.Id ];
                Secs.Add(
                    new SubtleUpdateItem(
                        stx.Text( Param.Id ), stx.Text( "Desc_" + Param.Id )
                        , Def.Item1 , Def.Item2
                    )
                );
            }

            return Secs;
        }
Esempio n. 4
0
        private void RequestsStatus( DRequestCompletedEventArgs e, string QId )
        {
            try
            {
                int NGrants = 0;
                int NScripts = 0;
                JsonObject JMesg = JsonStatus.Parse( e.ResponseString );
                JsonArray JData = JMesg.GetNamedArray( "data" );

                if ( 0 < Grants.Count() )
                {
                    List<SHGrant> CurrGrants = new List<SHGrant>( Grants );
                    foreach( JsonValue JValue in JData )
                    {
                        SHGrant G = new SHGrant( JValue.GetObject() );
                        if ( Grants.Any( x => x.Id == G.Id ) ) continue;
                        CurrGrants.Add( G );
                    }
                    Grants = CurrGrants.ToArray();
                }
                else
                {
                    Grants = JData.Remap( x =>
                    {
                        SHGrant G = new SHGrant( x.GetObject() );

                        int l = G.Grants.Length;
                        if ( !G.SourceRemoved )
                        {
                            if ( 0 < l ) NScripts++;
                            NGrants += l;
                        }

                        return G;
                    } );
                }

                if ( 0 < NGrants )
                {
                    AddActivity( () =>
                    {
                        StringResources stx = new StringResources();
                        return string.Format( stx.Text( "GrantsReceived" ), NGrants, NScripts );
                    }, () => MessageBus.SendUI( typeof( SharersHub ), AppKeys.SH_SHOW_GRANTS ) );
                }
            }
            catch ( Exception ex )
            {
                Logger.Log( ID, ex.Message, LogType.WARNING );
            }
        }