コード例 #1
0
        private async void button2_Click(object sender, EventArgs e)
        {
            _isBusy     = true;
            this.Cursor = Cursors.WaitCursor;
            pointProxyBindingSource.DataSource = await PointAdapter.GetItemsAsync();

            this.Cursor = Cursors.Arrow;
            _isBusy     = false;
        }
コード例 #2
0
        private async void DataForm_Load(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                _isBusy     = true;
                pointProxyBindingSource.DataSource = await PointAdapter.GetItemsAsync();

                pointListProxyBindingSource.DataSource = await PointListAdapter.GetItemsAsync();

                this.Cursor = Cursors.Arrow;
            }
            catch (FileNotFoundException ioEx)
            {
                MessageBox.Show("Please set database file in settings", ioEx.Message);
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace, ex.Message);
            }
        }