/// <summary>
 /// 安检单列表选择改变
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void checkerGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     GeneralObject item = checkerGrid.SelectedItem as GeneralObject;
     if (item == null)
         return;
     GeneralObject go = new GeneralObject();
     go.WebClientInfo = Application.Current.Resources["dbclient"] as WebClientInfo;
     go.EntityType = "T_INSPECTION";
     if (!item.GetPropertyValue("CONDITION").Equals("未检"))
     {
         go.Path = "one/select distinct t from T_INSPECTION t left join fetch t.LINES where t.id ='" + item.GetPropertyValue("id").ToString() + "'";
         go.DataLoaded += go_DataLoaded;
         //if (!item.GetPropertyValue("CONDITION").Equals("正常"))
         //    userfile.IsEnabled = false;
         //else
         //    userfile.IsEnabled = true;
         go.Load();
     }
     else
     {
         userfile.DataContext = null;
         ClearAll();
         //userfile.IsEnabled = false;
     }
 }
        private void LongListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            LongListSelector selector = sender as LongListSelector;
            //verifying our sender is actually a LongListSelector
            if (selector == null)
                return;

            SoundData data = selector.SelectedItem as SoundData;
            //verifying our sender is actually SoundData
            if (data == null)
                return;
            if (File.Exists(data.FilePath))
            {
                AudioPlayer.Source = new Uri(data.FilePath, UriKind.RelativeOrAbsolute);
            }
            else
            {
                using (var storageFolder = IsolatedStorageFile.GetUserStoreForApplication())
                {
                    using (var stream = new IsolatedStorageFileStream(data.FilePath, FileMode.Open, storageFolder))
                    {
                        AudioPlayer.SetSource(stream);
                    }
                }
            }
            selector.SelectedItem = null;
        }
 private void SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (directDeleteRadioButton.IsChecked == true)
     {
         RemoveItem();
     }            
 }
Example #4
0
 private void Purpose_Combo_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.IsInitialized)
     {
         refresh();
     }
 }
Example #5
0
 private void combo1_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     var classType = combo1.SelectedValue as Type;
     shapeWidth.IsEnabled = true;
     int argCount = NumberOfArguments(classType.Name);
     shapeHeight.IsEnabled = (argCount > 1);
 }
		protected override void OnSelectionChanged(SelectionChangedEventArgs e)
		{
			base.OnSelectionChanged(e);
			if (this.SelectedIndex != CompilerMessageView.Instance.SelectedCategoryIndex) {
				CompilerMessageView.Instance.SelectedCategoryIndex = this.SelectedIndex;
			}
		}
 private void Student_Combo_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (event_running) return;
     event_running = true;
     runEvent();
     event_running = false;
 }
 void Help3CatalogsSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     string item = (string)help3Catalogs.SelectedValue;
     if (!string.IsNullOrEmpty(item)) {
         Help3Service.ActiveCatalogId = item;
     }
 }
		// Cancel current shape request when the symbol selection changes 
		private async void symbolCombo_SelectionChanged(object sender, SelectionChangedEventArgs e)
		{
			if (MyMapView.Editor.IsActive)
				MyMapView.Editor.Cancel.Execute(null);

			await AcceptPointsAsync();
		}
Example #10
0
 private void Letters_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.listLetters.SelectedIndex == -1)
         return;
     NavigationService.Navigate(new Uri("/Views/Words.xaml?nid=0&l=" + AppSettings.CyrillicLetters[this.listLetters.SelectedIndex], UriKind.Relative));
     this.listLetters.SelectedIndex = -1;
 }
 private void ArrangementList_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     curArr = ArrangementList.SelectedIndex;
     if (curArr < 0)
         return;
     UpdateArrangement();
 }
 private void lstGroups_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (lstGroups.SelectedIndex > -1)
     {
         NavigationService.Navigate(new Uri("/GroupDetailPage.xaml?ID=" + (lstGroups.SelectedItem as RecipeDataGroup).UniqueId, UriKind.Relative));
     }
 }
Example #13
0
        private void lstAdapters_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            lstAdapterItem selItem = ((lstAdapterItem)lstAdapters.SelectedItem);
            TextBox dnsBox = new TextBox() { Text = selItem.PrimaryDNS };

            TiltEffect.SetIsTiltEnabled(dnsBox, true);

            CustomMessageBox messageBox = new CustomMessageBox()
            {
                Caption = "Edit DNS for " + selItem.Name,
                Message = "Primary DNS Server:",
                Content = dnsBox,
                LeftButtonContent = "save",
                RightButtonContent = "cancel",
                IsFullScreen = false
            };

            messageBox.Dismissed += (s1, e1) =>
            {
                if (e1.Result == CustomMessageBoxResult.LeftButton)
                {
                    Registry.SetMultiStringValue(selItem.KeyRoot, selItem.KeyPath, "DNS", new string[] { dnsBox.Text });
                    //TODO: Clear the list first
                    refreshAdapters();
                }
                //TODO: Fix this
                //lstAdapters.SelectedIndex = -1;
            };

            messageBox.Show();
        }
 private void comboBoxCameras_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     _cameraFrameSource.Camera = comboBoxCameras.SelectedItem as Camera;
     panelCameraInfo.Visibility = comboBoxCameras.SelectedItem != null
                                         ? Visibility.Visible
                                         : Visibility.Collapsed;
 }
Example #15
0
        private void lvItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            StockList.Value v = (StockList.Value)lvItems.SelectedItem;
            if (v != null)
            {
                XmlDataProvider provider = (XmlDataProvider)grdRssFeed.FindResource("rssData");

                switch (v.Market)
                {
                    case "NASDAQ":
                        provider.Source = new Uri("http://articlefeeds.nasdaq.com/nasdaq/symbols?symbol=" + v.Symbol);
                        break;
                    case "LSE":
                        provider.Source = new Uri("http://www.londonstockexchange.com/exchange/CompanyNewsRSS.html?newsSource=RNS&indexSymbol=ASX");
                        break;
                    case "DAX":
                        provider.Source = new Uri("http://feeds.finance.yahoo.com/rss/2.0/headline?s=" + v.Symbol + "&region=US&lang=en-US");
                        break;
                }

                if (!couchDb.isMyStock(v.Symbol))
                {
                    btnDelete.Visibility = System.Windows.Visibility.Collapsed;
                    btnAdd.Visibility = System.Windows.Visibility.Visible;
                }
                else
                {
                    btnDelete.Visibility = System.Windows.Visibility.Visible;
                    btnAdd.Visibility = System.Windows.Visibility.Collapsed;
                }

                wbChart.Navigate(new Uri("http://83.254.83.56:8001/files/highcharts/chart.html?symbol=" + v.Symbol + "&market=" + v.Market.ToLower()));
            }
        }
Example #16
0
        private void availableTradeListView__SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            clsTRADABLE_OTC_VANILLA_IRS_TB clstb 
                    = this.availableTradeListView_.SelectedItem as clsTRADABLE_OTC_VANILLA_IRS_TB;

            string availableTradeCD = clstb.INST_CD;
            bool fixedPayFlag = true;
            double notional = 1000000000;
            DateTime effective = this.ViewModel_.HedgeTradingViewModel_.TradeMaker_.TradingDate_;
            double fixedRate = 0.04;

            VanillaIRS_instrument inst
                = VanillaIRS_instrument.CreateTradableCode(availableTradeCD, 
                                                        fixedPayFlag, 
                                                        notional,
                                                        1,
                                                        effective, 
                                                        fixedRate);

            if (clstb != null)
            {
                this.tradeDetailGrid_.Children.Clear();
                this.tradeDetailGrid_.Children.Add(inst.view());
            }
        }
		private async void Panorama_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
		{
			Debug.WriteLine("SelectionChanged Fired." + e.AddedItems);
			var currentPanoramaItem = e.AddedItems[0] as PanoramaItem;
			if (currentPanoramaItem == RecentReadingItem)
			{
				await ViewModel.UpdateRecentViewAsync();
			}
			else if (currentPanoramaItem == SeriesIndexItem && !ViewModel.IsIndexDataLoaded)
			{
				await ViewModel.LoadSeriesIndexDataAsync();
			}
			else if (currentPanoramaItem == RecommandItem && !ViewModel.IsRecommandLoaded)
			{
				await ViewModel.LoadRecommandDataAsync();
			}
			else if (ContentPanorama.SelectedItem == FavoriteSection && !ViewModel.IsFavoriteLoaded)
			{
				await ViewModel.LoadUserFavouriateAsync();
			}
			//else if (ContentPanorama.SelectedItem == UserRecentSection && !ViewModel.IsUserRecentLoaded)
			//{
			//	await ViewModel.LoadUserRecentAsync();
			//}
		}
 private void comboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     ComboBoxItem cbi = (ComboBoxItem)comboBox.SelectedItem;
     string selectedText = cbi.Content.ToString();
     grado = selectedText;
     label10.Content = grado;
 }
Example #19
0
        private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (_loaded)
                updateButtons();

            _indexSelected = true;
        }
 private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     ComboBoxItem cbi = (ComboBoxItem)comboBox1.SelectedItem;
     string selectedText = cbi.Content.ToString();
     categoria = selectedText;
     label10.Content = categoria;
 }
 private void SelectionEstado(object sender, SelectionChangedEventArgs e)
 {
     cidadesel = (sender as ListBox).SelectedItem as CidadeClasse;
     NavigationService.Navigate(new Uri("/Cidade.xaml", UriKind.Relative));
     
     
 }
        private void tcMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var control = (TabControl)sender;

            string selection = ((TabItem)control.SelectedItem).Tag.ToString();

            var frmContent = UIHelpers.FindChild<Frame>(this, "frmContent");

            if (selection == "Overview" && frmContent != null)
            {
                frmContent.Navigate(new PageAirportInfo(Airport) { Tag = this });
            }

            if (selection == "Facilities" && frmContent != null)
            {
                frmContent.Navigate(new PageAirportFacilities(Airport) { Tag = this });
            }

            if (selection == "Traffic" && frmContent != null)
            {
                frmContent.Navigate(new PageAirportTraffic(Airport) { Tag = this });
            }

            if (selection == "Gates" && frmContent != null)
            {
                frmContent.Navigate(new PageAirportGateSchedule(Airport) { Tag = this });
            }

            if (selection == "Demand" && frmContent != null)
            {
                frmContent.Navigate(new PageAirportDemand(Airport) { Tag = this });
            }
        }
 private void cmbDisk_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     lstListFile.Items.Clear();
     string strPath = ((TextBlock)((StackPanel)cmbDisk.SelectedItem).Children[1]).Text;
     LoadContent(strPath, "Folder");
     LoadContent(strPath, "File");
 }
        private void PacketListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count == 0 || e.AddedItems[0] == null)
            {
                ObjectTreeView.Items.Clear();
                return;
            }
            object item = (sender as ListBox).SelectedItem;
            AcknowledgeListItem ack = item as AcknowledgeListItem;
            AsyncListItem async = item as AsyncListItem;
            ErrorListItem err = item as ErrorListItem;

            RootTreeViewItem root = null;

            if (ack != null)
                root = BuildAckTree(ack.ServiceName, ack.Operation, ack.InvokeArguments, ack.Response);
            else if (async != null)
                root = BuildAsyncTree(async.Body);
            else if (err != null)
                root = BuildErrorTree(err.ServiceName, err.Operation, err.InvokeArguments, err.Error);

            ObjectTreeView.Items.Clear();
            ObjectTreeView.Items.Add(root);
            root.IsNodeExpanded = true;
        }
Example #25
0
 private void datePicker1_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
 {
     if (dtDatum.SelectedDate != null)
     {
         LoadSign(dtDatum.SelectedDate.Value);
     }
 }
 private void listWords_SelectionChanged(Object sender, SelectionChangedEventArgs e)
 {
     if (e.AddedItems.Count == 0)
         return;
     Object item = e.AddedItems[0];
     this.listWords.ScrollIntoView(item);
 }
Example #27
0
 private void cbPostcode_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (cbPostcode.SelectedIndex == 0)
         leverancierDataGrid.Items.Filter = null;
     else
         leverancierDataGrid.Items.Filter = new Predicate<object>(PostCodeFilter);
 }
Example #28
0
 private void cbRoles_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (cbRoles.SelectedIndex == -1 && cbRoles.Items.Count > 0)
     {
         cbRoles.SelectedIndex = 0;
     }
 }
Example #29
0
        private void ddlType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (this.sourceValue != null)
            {
                this.sourceValue.Clear();
                this.iteratorsValue.Clear();
                this.modifiersValue.Clear();
                this.outputValue.Clear();

                if (this.ddlType.SelectedIndex >= 0)
                {
                    OperationType type = ((ComboBoxItem)this.ddlType.SelectedItem).Tag as OperationType;
                    if (type != null)
                    {
                        this.sourceValue.Text = type.DefaultSourceValue;
                        this.sourceValue.Foreground = Brushes.LightGray;
                        this.sourceDefaultText.Text = type.DefaultSourceDescription;

                        this.iteratorsValue.Text = string.Empty;
                        this.iteratorsValue.Foreground = Brushes.LightGray;
                        this.iteratorsDefaultText.Text = string.Empty;

                        this.modifiersValue.Text = type.DefaultParametersValue;
                        this.modifiersValue.Foreground = Brushes.LightGray;
                        this.modifiersDefaultText.Text = type.DefaultParametersDescription;
                    }
                }

                this.OpenedFile = null;
            }
        }
 private void ListBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     var selectedItems = ((ListBox)sender).SelectedItems.Cast<Type>();
     var types = new InputTypeCollection();
     types.AddRange(selectedItems);
     Scope.SetForInputTypes(this.Form, types);
 }