예제 #1
0
        private void btnEditQuery_Click(object sender, RoutedEventArgs e)
        {
            QueryConfigPopup popup = new QueryConfigPopup();

            popup.DataContext = new QueryPopupViewModel()
            {
                CurrentQuery = (Model.QueriesRow)((System.Data.DataRowView)QueriesGrid.SelectedValue).Row
            };
            popup.ShowDialog();
        }
예제 #2
0
        private void btnEditQuery_Click(object sender, RoutedEventArgs e)
        {
            QueryConfigPopup popup = new QueryConfigPopup();

            popup.DataContext = new QueryPopupViewModel()
            {
                CurrentQuery = vm.SelectedQuery
            };
            popup.ShowDialog();
        }
예제 #3
0
        private void btnAddQuery_Click(object sender, RoutedEventArgs e)
        {
            QueryConfigPopup popup = new QueryConfigPopup();
            var vm = this.DataContext as MainWindowViewModel;

            Model.QueriesRow NewRow = vm.ActiveModel.Queries.NewQueriesRow();
            NewRow.Name        = "New Query";
            NewRow.MappingType = "";
            NewRow.MaxRows     = 1;
            NewRow.QueryText   = "";
            NewRow.QueryType   = "";
            NewRow.RefreshRate = 5000;
            vm.ActiveModel.Queries.AddQueriesRow(NewRow);


            popup.DataContext = new QueryPopupViewModel()
            {
                CurrentQuery = NewRow,
            };
            popup.ShowDialog();
        }