예제 #1
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     SetContentView(Resource.Layout.DatabaseView);
     // Create your application here
     dsGrid       = FindViewById <DSGridView>(Resource.Id.dataGrid);
     databaseName = Intent.GetStringExtra("DatabaseName");
     SetTitle(); //sets the title of the page
     if (databaseName == "User")
     {
         OperateUser();
     }
     else if (databaseName == "Table")
     {
         OperateTable();
     }
     else if (databaseName == "Graph")
     {
         OperateGraph();
     }
     else if (databaseName == "Field")
     {
         OperateField();
     }
     else if (databaseName == "CustomField")
     {
         OperateCustomField();
     }
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DSoft.UI.Grid.Views.DSGridViewContainer"/> class.
        /// </summary>
        /// <param name="grdView">Grd view.</param>
        public DSGridViewContainer(DSGridView grdView)
            : base(grdView.Context)
        {
            mParentGrid = grdView;

            Initialize();
        }
예제 #3
0
        /// <summary>
        /// This Code Assigns all the buttons to the respective code and assigns the grid
        /// to the initialized spreadsheet
        /// </summary>
        /// <param name="bundle">Used for Generating the page</param>
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Home);
            db = new DataDB(this);

            dsGrid = FindViewById <DSGridView>(Resource.Id.dataGrid);
            if (dsGrid != null)
            {
                dsGrid.DataSource = new DataSet(this);
                dsGrid.TableName  = "DT";
            }
            dsGrid.SetMinimumHeight(Resources.DisplayMetrics.HeightPixels / 2);
            btnCollect        = FindViewById <Button>(Resource.Id.btnCollect);
            btnCollect.Click += BtnCollect_Click;

            btnGraph        = FindViewById <Button>(Resource.Id.btnGraph);
            btnGraph.Click += BtnGraph_Click;

            btnExport        = FindViewById <Button>(Resource.Id.btnExport);
            btnExport.Click += BtnExport_Click;

            btnReset        = FindViewById <Button>(Resource.Id.btnReset);
            btnReset.Click += BtnReset_Click;
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DSoft.UI.Grid.Views.DSGridRowView"/> class.
 /// </summary>
 /// <param name="aView">A view.</param>
 internal DSGridRowView(DSGridView aView)
 {
     mCells    = new DSGridCellViewCollection();
     mGridView = aView;
     //this.Opaque = true;
     this.BackgroundColor = NSColor.Clear;
 }
예제 #5
0
        /// <summary>
        /// Tears down.
        /// </summary>
        public void TearDown()
        {
            if (mContentView != null)
            {
                mContentView.RemoveFromSuperview();
            }

            mContentView = null;
            mGridView    = null;
            mRowView     = null;
            Formatter    = null;
        }
예제 #6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            mDataGrid = this.FindViewById <DSGridView>(Resource.Id.myDataGrid);

            if (mDataGrid != null)
            {
                mDataGrid.DataSource = new ExampleDataSet(this);
                mDataGrid.TableName  = "DT1";
            }
        }
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			this.View.BackgroundColor = UIColor.White;

			var aFrame = this.View.Frame;

			aFrame.Height -= 50;

			if (iOSHelper.IsiOS7)
			{
				aFrame.Y += 64;
				aFrame.Height -= 64;
			}
			else
			{
				aFrame.Y = 0;
				aFrame.Height -= 44;
			}



			aFrame.Inflate (-5, -5);

			mGridView = new DSGridView (aFrame);

			//turn on showing of the selection
			mGridView.ShowSelection = true;

			//allow the scrolling to bounce
			mGridView.Bounces = false;

			//set the data source to be a DataSet with multiple datatables
			mGridView.DataSource = new ExampleDataSet ();

			//set the first database as the initial grid source
			mGridView.TableName = ((DSDataSet)mGridView.DataSource).Tables [1].Name;

			mGridView.Layer.CornerRadius = 5.0f;

			//set a theme on the control itself so that it doesn't use the global theme
			mGridView.Theme = new ItunesTheme ();

			this.View.Add (mGridView);

			         
		}
예제 #8
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.View.BackgroundColor = UIColor.White;

            var aFrame = this.View.Frame;

            aFrame.Height -= 50;

            if (iOSHelper.IsiOS7)
            {
                aFrame.Y      += 64;
                aFrame.Height -= 64;
            }
            else
            {
                aFrame.Y       = 0;
                aFrame.Height -= 44;
            }



            aFrame.Inflate(-5, -5);

            mGridView = new DSGridView(aFrame);

            //turn on showing of the selection
            mGridView.ShowSelection = true;

            //allow the scrolling to bounce
            mGridView.Bounces = false;

            //set the data source to be a DataSet with multiple datatables
            mGridView.DataSource = new ExampleDataSet();

            //set the first database as the initial grid source
            mGridView.TableName = ((DSDataSet)mGridView.DataSource).Tables [1].Name;

            mGridView.Layer.CornerRadius = 5.0f;

            //set a theme on the control itself so that it doesn't use the global theme
            mGridView.Theme = new ItunesTheme();

            this.View.Add(mGridView);
        }
예제 #9
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            ActionBar actionBar = ((Activity)this).ActionBar;

            actionBar.SetDisplayShowHomeEnabled(true);
            actionBar.SetLogo(Resource.Drawable.ic_launcher);
            actionBar.SetDisplayUseLogoEnabled(true);

            // Create your application here
            SetContentView(Resource.Layout.DownloadJob);
            // Get singleton instance
            imageLoader = ImageLoader.Instance;
            DataGrid    = FindViewById <DSGridView>(Resource.Id.DataGrid);
            txtRegNo    = FindViewById <AutoCompleteTextView>(Resource.Id.txtRegNo);
            btnSearch   = FindViewById <Button>(Resource.Id.btnSearch);

            btnSearch.Click += btnSearch_Click;

            DataGrid.DataSource = new DSDataTable();
            DataGrid.TableName  = "DT1";
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            Window.AddFlags(WindowManagerFlags.KeepScreenOn);

            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetHomeButtonEnabled(true);

            SetContentView(Resource.Layout.activity_test);
            handler = new Handler(Looper.MainLooper);

            state                = FindViewById <TextView>(Resource.Id.state);
            startTest            = FindViewById <Button>(Resource.Id.startTest);
            startTest.Visibility = ViewStates.Gone;
            startTest.Click     += async(sender, e) => {
                if (test.isTesting)
                {
                    StopTest();
                }
                else
                {
                    await StartTest();
                }
            };


            var rawSerials = Intent.GetStringArrayExtra(EXTRA_SERIALS);
            var type       = (EDeviceModel)Intent.GetIntExtra(EXTRA_TEST_TYPE, -1);

            if (rawSerials == null)
            {
                var adb = new AlertDialog.Builder(this);
                adb.SetTitle("Initialization Error");
                adb.SetMessage("Failed to start TestActivity: no serial numbers were passed to the activity");
                adb.SetNegativeButton("Cancel", (sender, e) => {
                    Finish();
                });
                adb.Show();
            }

            var sns = new List <ISerialNumber>();

            foreach (var raw in rawSerials)
            {
                var sn = raw.ParseSerialNumber();
                if (sn.deviceModel != type)
                {
                    var adb = new AlertDialog.Builder(this);
                    adb.SetTitle("Initialization Error");
                    adb.SetMessage("Failed to start TestActivity: serial number type (" + sn.deviceModel + ") is not the expected: " + type);
                    adb.SetNegativeButton("Well, that sucks", (sender, e) => {
                        Finish();
                    });
                    adb.Show();
                    return;
                }
                else
                {
                    sns.Add(sn);
                }
            }

            grid       = FindViewById <DSGridView>(Resource.Id.grid);
            grid.Theme = DSoft.Themes.Grid.DSGridTheme.Current;

            Initialize();

            UpdateStartTestButton();
        }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DSoft.UI.Grid.Views.DSGridRowView"/> class.
 /// </summary>
 /// <param name="aView">A view.</param>
 internal DSGridRowView(DSGridView aView)
 {
     Processor.GridView   = aView;
     this.Opaque          = true;
     this.BackgroundColor = UIColor.Clear;
 }
예제 #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DSoft.UI.Grid.Views.DSGridRowView"/> class.
 /// </summary>
 /// <param name="Index">Index.</param>
 /// <param name="aView">A view.</param>
 internal DSGridRowView(int Index, DSGridView aView) : this(aView)
 {
     this.Processor.RowIndex = Index;
 }
예제 #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DSoft.UI.Grid.Views.DSGridCellView"/> class.
 /// </summary>
 /// <param name="aView">A view.</param>
 /// <param name="RowView">Row view.</param>
 internal DSGridCellView(DSGridView aView, DSGridRowView RowView) : this()
 {
     this.Processor.GridRowView = RowView;
     this.Processor.GridView    = aView;
 }
예제 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DSoft.UI.Grid.Views.DSGridCellView"/> class.
 /// </summary>
 /// <param name="GridView">Grid view.</param>
 /// <param name="RowView">Row view.</param>
 public DSGridCellView(DSGridView GridView, DSGridRowView RowView)
     : this(GridView.Context)
 {
     Processor.GridView    = GridView;
     Processor.GridRowView = RowView;
 }
예제 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DSoft.UI.Grid.Views.DSGridCellView"/> class.
 /// </summary>
 /// <param name="aView">A view.</param>
 /// <param name="RowView">Row view.</param>
 internal DSGridCellView(DSGridView aView, DSGridRowView RowView) : this()
 {
     this.mRowView  = RowView;
     this.mGridView = aView;
 }
예제 #16
0
 /// <summary>
 /// Tears down.
 /// </summary>
 public void TearDown()
 {
     mCells.Dispose();
     mGridView = null;
 }
예제 #17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DSoft.UI.Grid.Views.DSGridRowView"/> class.
        /// </summary>
        /// <param name="GridView">Grid view.</param>
        public DSGridRowView(DSGridView GridView) : base(GridView.Context)
        {
            Processor.GridView = GridView;

            //Initialize ();
        }