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(); } }
/// <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(); }
/// <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; }
/// <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; }
/// <summary> /// Tears down. /// </summary> public void TearDown() { if (mContentView != null) { mContentView.RemoveFromSuperview(); } mContentView = null; mGridView = null; mRowView = null; Formatter = null; }
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); }
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); }
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(); }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <summary> /// Tears down. /// </summary> public void TearDown() { mCells.Dispose(); mGridView = null; }
/// <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 (); }