コード例 #1
0
ファイル: MasterItemActivity.cs プロジェクト: mokth/merpCS
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            compCode = ((GlobalvarsApp)this.Application).COMPANY_CODE;
            branchCode = ((GlobalvarsApp)this.Application).BRANCH_CODE;
            SetContentView (Resource.Layout.ItemCodeList);
            populate (listData);
            listView = FindViewById<ListView> (Resource.Id.ICodeList);
            txtSearch= FindViewById<EditText > (Resource.Id.txtSearch);

            Button butInvBack= FindViewById<Button> (Resource.Id.butICodeBack);
            butInvBack.Click += (object sender, EventArgs e) => {
                base.OnBackPressed();
            };
            viewdlg = SetViewDelegate;
            //PerformFilteringDlg filterDlg=PerformFiltering;
            //listView.Adapter = new CusotmMasterItemListAdapter(this, listData);

            adapter = new GenericListAdapter<Item> (this, listData, Resource.Layout.ItemCodeDtlList, viewdlg);
            listView.Adapter = adapter;
            listView.ItemClick+= ListView_Click;
            txtSearch.TextChanged+= TxtSearch_TextChanged;
        }
コード例 #2
0
ファイル: CustomerActivity.cs プロジェクト: mokth/merpV3
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            SetTitle (Resource.String.submenu_cust);
            SetContentView (Resource.Layout.ListCustView);
            // Create your application here
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            populate (listData);
            listView = FindViewById<ListView> (Resource.Id.CustList);

            Button butInvBack= FindViewById<Button> (Resource.Id.butCustBack);
            txtSearch= FindViewById<EditText > (Resource.Id.txtSearch);
            butInvBack.Click += (object sender, EventArgs e) => {
                base.OnBackPressed();
            };

            listView.ItemClick+= ListView_ItemClick; ;
            //istView.Adapter = new CusotmCustomerListAdapter(this, listData);
            viewdlg = SetViewDelegate;
            adapter = new GenericListAdapter<Trader> (this, listData, Resource.Layout.ListCustDtlView, viewdlg);
            listView.Adapter = adapter;
            txtSearch.TextChanged+= TxtSearch_TextChanged;
        }
コード例 #3
0
ファイル: CustomerActivity.cs プロジェクト: mokth/merpCS
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            SetContentView (Resource.Layout.ListCustViewEx);
            // Create your application here
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            compCode =((GlobalvarsApp)Application).COMPANY_CODE;
            branchCode =((GlobalvarsApp)Application).BRANCH_CODE;
            compinfo = DataHelper.GetCompany (pathToDatabase,compCode,branchCode);

            populate (listData);
            listView = FindViewById<ListView> (Resource.Id.CustList);

            Button butInvBack= FindViewById<Button> (Resource.Id.butCustBack);
            Button butInvAdd= FindViewById<Button> (Resource.Id.butCustAdd);
            txtSearch= FindViewById<EditText > (Resource.Id.txtSearch);
            butInvBack.Click += (object sender, EventArgs e) => {
                base.OnBackPressed();
            };

            butInvAdd.Click+= (object sender, EventArgs e) => {
                NewLocalCust();
            };

            listView.ItemClick+= ListView_ItemClick; ;
            listView.ItemLongClick+= ListView_ItemLongClick;
            //istView.Adapter = new CusotmCustomerListAdapter(this, listData);
            viewdlg = SetViewDelegate;
            adapter = new GenericListAdapter<Trader> (this, listData, Resource.Layout.ListCustDtlView, viewdlg);
            listView.Adapter = adapter;
            txtSearch.TextChanged+= TxtSearch_TextChanged;
        }
コード例 #4
0
 public override Dialog OnCreateDialog(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     // Begin building a new dialog.
     var builder = new AlertDialog.Builder(Activity);
     //Get the layout inflater
     var inflater = Activity.LayoutInflater;
     populate (listData);
     viewdlg = SetViewDelegate;
     var view = inflater.Inflate(Resource.Layout.ListCustView, null);
     listView = view.FindViewById<ListView> (Resource.Id.CustList);
     if (listView != null) {
         adapter = new GenericListAdapter<Trader> (this.Activity, listData,Resource.Layout.ListCustDtlView, viewdlg);
         listView.Adapter = adapter;
         listView.ItemClick += ListView_Click;
         txtSearch= view.FindViewById<EditText > (Resource.Id.txtSearch);
         butSearch= view.FindViewById<Button> (Resource.Id.butCustBack);
         butSearch.Text = "SEARCH";
         butSearch.SetCompoundDrawables (null, null, null, null);
         butSearch.Click+= ButSearch_Click;
         //txtSearch.TextChanged += TxtSearch_TextChanged;
         builder.SetView (view);
         builder.SetPositiveButton ("CANCEL", HandlePositiveButtonClick);
     }
     var dialog = builder.Create();
     //Now return the constructed dialog to the calling activity
     return dialog;
 }
コード例 #5
0
ファイル: ItemStockActivity.cs プロジェクト: mokth/merpV3
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            SetTitle (Resource.String.STOCKSUMMARY);
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            SetContentView (Resource.Layout.ItemStockList);
            imm = (InputMethodManager)GetSystemService(Context.InputMethodService);

            dateSearch = DateTime.Today;
            date = DateTime.Today;
            populate (listData);
            listView = FindViewById<ListView> (Resource.Id.ICodeList);
            txtSearch= FindViewById<EditText > (Resource.Id.txtSearch);
            Button butInvBack= FindViewById<Button> (Resource.Id.butICodeBack);
            Button butDate= FindViewById<Button> (Resource.Id.butDate);
            butDate.Click += delegate(object sender, EventArgs e) {
                //imm.HideSoftInputFromWindow(frd.WindowToken, 0);
                ShowDialog (DATE_DIALOG_ID1);
            };
            butInvBack.Click += (object sender, EventArgs e) => {
                base.OnBackPressed();
            };
            viewdlg = SetViewDelegate;
            adapter = new GenericListAdapter<ItemStock> (this, listData, Resource.Layout.ItemStockDtls, viewdlg);
            listView.Adapter = adapter;
            listView.ItemClick+= ListView_Click;
            txtSearch.TextChanged+= TxtSearch_TextChanged;
        }
コード例 #6
0
 public void Setup()
 {
     _list = new GenericListImpl <string> {
         "oh", "hai"
     };
     _adapter = GenericListAdapter.Create(_list);
 }
コード例 #7
0
ファイル: ItemPricesActivity.cs プロジェクト: mokth/merpV3
        void FindItemByText(string classcode)
        {
            List<ItemPrices> found = new List<ItemPrices> ();
            if (string.IsNullOrEmpty(classcode))
                found = PerformSearch (txtSearch.Text,false);
            else found = PerformSearch (classcode,true);

            //List<Item> found = PerformSearch (txtSearch.Text);
            adapter = new GenericListAdapter<ItemPrices> (this, found, Resource.Layout.ItemPriceList, viewdlg);
            listView.Adapter = adapter;
        }
コード例 #8
0
ファイル: MasterItemActivity.cs プロジェクト: mokth/merpCS
 void FindItemByText()
 {
     List<Item> found = PerformSearch (txtSearch.Text);
     adapter = new GenericListAdapter<Item> (this, found, Resource.Layout.ItemCodeDtlList, viewdlg);
     listView.Adapter = adapter;
 }
コード例 #9
0
ファイル: CustomerActivity.cs プロジェクト: mokth/merpV3
 void FindItemByText()
 {
     List<Trader> found = PerformSearch (txtSearch.Text);
     adapter = new GenericListAdapter<Trader> (this, found, Resource.Layout.ListCustDtlView, viewdlg);
     listView.Adapter = adapter;
 }
コード例 #10
0
ファイル: InvoiceDialog.cs プロジェクト: mokth/merpCS
 void FindItemByText()
 {
     List<Invoice> found = PerformSearch (txtSearch.Text);
     adapter = new GenericListAdapter<Invoice> (this.Activity, found,Resource.Layout.ListItemRow, viewdlg);
     listView.Adapter = adapter;
 }
コード例 #11
0
 public void should_fail_if_not_a_list()
 {
     Assert.Throws <ArgumentException>(() => GenericListAdapter.Create(new object()));
 }
コード例 #12
0
        public void should_return_object_if_it_implements_ilist()
        {
            var list = new List <string>();

            GenericListAdapter.Create(list).ShouldBeSameAs(list);
        }
コード例 #13
0
ファイル: EnumerableNode.cs プロジェクト: mikeobrien/Bender
 public EnumerableNode(
     Context context,
     string name,
     IValue enumerable,
     CachedMember member,
     INode parent,
     int?index = null)
     : base(name, enumerable, member, parent, context, index)
 {
     _list = new Lazy <IList>(() =>
                              enumerable.Instance.MapOrDefault(x => enumerable.ActualType.IsArray ?
                                                               ArrayAdapter.Create(enumerable) : GenericListAdapter.Create(x)));
     if (SpecifiedType.IsGenericEnumerable)
     {
         _itemType = enumerable.SpecifiedType.GenericEnumerableType;
     }
 }