Exemple #1
0
 private async void ButtonLoadData_Click(object sender, RoutedEventArgs e)
 {
     StatusInformation = "Start load drones";
     _parrotDrones = await _parrotLoadDevices.LoadParrotDevices();
     MergeLogActions(_parrotLoadDevices.LogActions);
     StatusInformation = "End load drones";
 }
		protected override void OnLostFocus(RoutedEventArgs e)
		{
			_hasFocus = false;
			UpdateHintVisibility();
			
			base.OnLostFocus(e);
		}
Exemple #3
0
 private void button_Click(object sender, RoutedEventArgs e)
 {
     
     //((App)Application.Current).runMe()
     sendData();
     receiveData();
 }
        public void UserRoutedEvent_routed_event_handle_test()
        {
            var autoResetEvent = new AutoResetEvent(false);

            RoutedEventArgs<User> actualRoutedEventArgs = new RoutedEventArgs<User>()
            {
                Parameter = new User() { Id = Guid.NewGuid().ToString(), Name = "Test" }
            };

            var routedEventContainer = Application.Current.Container.Resolve<IRoutedEventContainer>();
            RoutedEventSender expectedRoutedEventSender = null;
            RoutedEventArgs<User> expectedRoutedEventArgs = null;
            routedEventContainer.AddHandler(TestRoutedEvents.UserRoutedEvent, (sender, args) =>
            {
                expectedRoutedEventSender = sender;
                expectedRoutedEventArgs = args;
                autoResetEvent.Set();
            });

            routedEventContainer.Raise(TestRoutedEvents.UserRoutedEvent, this, actualRoutedEventArgs);

            autoResetEvent.WaitOne(5000);

            Assert.IsNotNull(expectedRoutedEventSender);
            Assert.IsNotNull(expectedRoutedEventArgs);

            Assert.AreEqual(expectedRoutedEventArgs.Parameter.Id, actualRoutedEventArgs.Parameter.Id);
        }
Exemple #5
0
 private static void OnSubmenuOpened(object sender, RoutedEventArgs e)
 {
     var commandRouter = IoC.Get<ICommandRouter>();
     var menuItem = (MenuItem) sender;
     foreach (var item in menuItem.Items.OfType<ICommandUiItem>().ToList())
         item.Update(commandRouter.GetCommandHandler(item.CommandDefinition));
 }
 void DataBinding_Unloaded(object sender, RoutedEventArgs e)
 {
     this.Unloaded -= DataBinding_Unloaded;
     this.LayoutRoot.Loaded -= new RoutedEventHandler(LayoutRoot_Loaded);
     MyMap.Layers["tiledLayer"].Failed -= DataBinding_Failed;
     MyMap.Dispose();
 }
        /// <summary>
        /// Handles the Loaded event of the DomainUpDownSample control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void DomainUpDownSample_Loaded(object sender, RoutedEventArgs e)
        {
            IEnumerable airports = Airport.SampleAirports;
            DataContext = airports;

            List<CultureInfo> cultures = new List<CultureInfo>();

            // work through long list of cultures and check if it is actually 
            // allowed in this configuration.
            foreach (string cultureName in _cultureNames)
            {
                try
                {
                    CultureInfo c = new CultureInfo(cultureName);
                    cultures.Add(c);
                }
                catch (ArgumentException)
                {
                }
            }

            cultureList.ItemsSource = cultures;
            // preselect dutch, if allowed.
            cultureList.SelectedItem = cultures.FirstOrDefault(info => info.Name == "nl-NL");
        }
 private static void PasswordChanged(object sender, RoutedEventArgs e)
 {
     PasswordBox password = sender as PasswordBox;
     _updating = true;
     SetBoundPassword(password, password.Password);
     _updating = false;
 }
 private void OnEventToast(object sender, RoutedEventArgs e)
 {
     ToastEventBtn.Content = "== toast animating ==";
     ToastEventBtn.IsEnabled = false;
     Toast2.Message = "This toast is listening for closed event";
     Toast2.Closed += ToastOnClosed;
 }
Exemple #10
0
        private void button_click(object sender, RoutedEventArgs e)
        {

            // Will Put X or O (depending on player) to button text.  
            Button b = (Button)sender;
            if (turn)

                b.Content = "X";
                
            else
                b.Content = "O";
            // Will change variable turn to false or true, depending on current selection
            turn = !turn;

            // Turn off Button once used
            b.IsEnabled = false;

            // Turn counter to see if all squares filled and draw
            turnCount++;

            // Run Methof to see if there is a winner
            checkForWinner(); 

            // Set button box to say who's turn it is
            setCurrentUserText();

            if ((!turn) && (singlePlayer))
            {
                computerTurn();
            }

        }
        /// <summary>
        /// Handle the Loaded event of the page.
        /// </summary>
        /// <param name="sender">The source object.</param>
        /// <param name="rea">The event arguments.</param>
        private void OnLoaded(object sender, RoutedEventArgs rea)
        {
            ControlApi.ItemFilter = (prefix, item) =>
            {
                if (string.IsNullOrEmpty(prefix))
                { 
                    return true; 
                }
                MemberInfoData pme = item as MemberInfoData;
                if (pme == null)
                {
                    return false; 
                }
                return (pme.Name.ToUpper(CultureInfo.InvariantCulture).Contains(prefix.ToUpper(CultureInfo.InvariantCulture)));
            };

            // Reflect and load data
            ControlApi.ItemsSource = MemberInfoData.GetSetForType(typeof(AutoCompleteBox));
            ControlPicker.ItemsSource = InitializeTypeList();

            // Set the changed handlers
            ControlApi.SelectionChanged += OnApiChanged;
            ControlPicker.SelectionChanged += OnPickerChanged;
            
            // Setup the dictionary converter
            ControlPicker.ValueMemberBinding = new Binding
            {
                Converter = new DictionaryKeyValueConverter<string, Type>()
            };
        }
Exemple #12
0
        /// <summary>
        /// IsCheckedProperty property changed handler.
        /// </summary> 
        /// <param name="d">ToggleButton that changed its IsChecked.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs.</param>
        private static void OnIsCheckedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 
        { 
            ToggleButton source = d as ToggleButton;
            System.Diagnostics.Debug.Assert(source != null, 
                "The source is not an instance of ToggleButton!");

            System.Diagnostics.Debug.Assert(typeof(bool?).IsInstanceOfType(e.NewValue) || (e.NewValue == null), 
                "The value is not an instance of bool?!");
            bool? value = (bool?) e.NewValue;
 
            // Raise the appropriate changed event 
            RoutedEventArgs args = new RoutedEventArgs () { OriginalSource = source};
            if (value == true)
            {
                source.OnChecked(args); 
            }
            else if (value == false)
            { 
                source.OnUnchecked(args); 
            }
            else 
            {
                source.OnIndeterminate(args);
            } 
        }
        /// <summary>
        /// Loads the XML sample data and populates the TreeMap.
        /// </summary>
        /// <param name="sender">The object where the event handler is attached.</param>
        /// <param name="e">The event data.</param>
        private void FlexibleTemplateSample_Loaded(object sender, RoutedEventArgs e)
        {
            // Sample browser-specific layout change
            SampleHelpers.ChangeSampleAlignmentToStretch(this);

            treeMapControl.ItemsSource = NhlDataHelper.LoadDefaultFile();
        }
		protected override void OnGotFocus(RoutedEventArgs e)
		{
			_hasFocus = true;
			SetHintVisibility(Visibility.Collapsed);
			
			base.OnGotFocus(e);
		}
        //绘制线
        private void btn_Line_Click(object sender , RoutedEventArgs e)
        {
            DrawLine line = new DrawLine(this.MyMap);
            this.MyMap.Action = line;

            line.DrawCompleted += new EventHandler<DrawEventArgs>(line_DrawCompleted);
        }
    private void WindowLoaded(object sender, RoutedEventArgs e){
        // ...

        /* 
         * ------------------ Command Binding ----------------------------
         */
        this.CommandBindings.Add(
            /* 
             * CommandBinding Constructor (ICommand, ExecutedRoutedEventHandler, CanExecuteRoutedEventHandler) 
             */
            new CommandBinding(
                CommandBank.CloseWindowCommand,               // System.Windows.Input.ICommand. The command to base the new RoutedCommand on.
                CommandBank.CloseWindowCommandExecute,        // Input.ExecutedRoutedEventHandler. Handler for Executed event on new RoutedCommand.
                CommandBank.CanExecuteIfParameterIsNotNull)); // Input.CanExecuteRoutedEventHandler. The handler for CanExecute event on new RoutedCommand.

        /* 
         * ------------------ Input Binding ------------------------------
         */
        foreach (CommandBinding binding in this.CommandBindings){
            RoutedCommand command = (RoutedCommand)binding.Command;
            if (command.InputGestures.Count > 0){
                foreach (InputGesture gesture in command.InputGestures){
                    var iBind = new InputBinding(command, gesture);
                    iBind.CommandParameter = this;
                    this.InputBindings.Add(iBind);
                }
            }
        }

        // menuItemExit is defined in XAML
        menuItemExit.Command = CommandBank.CloseWindow;
        menuItemExit.CommandParameter = this;
        // ...
    }
Exemple #17
0
 protected override void OnClick(RoutedEventArgs e)
 {
     if (CheckOnClick)
     {
         ToggleState();
     }
 }
 private void BackButton_Click(object sender, RoutedEventArgs e)
 {
     if (ContentFrame != null && ContentFrame.CanGoBack)
     {
         ContentFrame.GoBack();
     }
 }
        private async void DatasetOverlayAnalyst_Click(object sender, RoutedEventArgs e)
        {
            DatasetOverlayAnalystParameters param = new DatasetOverlayAnalystParameters
            {
                Operation = OverlayOperationType.CLIP,
                OperateDataset = "Lake_R@Jingjin",
                SourceDataset = "Landuse_R@Jingjin",

            };
            //与服务器交互
            try
            {
                DatasetOverlayAnalystService datasetOverlayAnalystService = new DatasetOverlayAnalystService(url2);
                var result = await datasetOverlayAnalystService.ProcessAsync(param);

                foreach (Feature feature in result.Recordset.Features)
                {
                    feature.Style = new PredefinedFillStyle
                    {
                        StrokeThickness = 1,
                        Fill = new SolidColorBrush
                        {
                            Color = Colors.Magenta,
                            Opacity = 0.8
                        }
                    };
                }
                featuresLayer.AddFeatureSet(result.Recordset.Features);
            }
            //交互失败
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        /// <summary>
        /// Handles the Loaded event of the TimePickerStudio control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void TimePickerStudio_Loaded(object sender, RoutedEventArgs e)
        {
            // init
            cmbPopupSelectionMode.ItemsSource = typeof(PopupTimeSelectionMode)
                .GetMembers()
                .ToList()
                .Where(m =>
                    m.DeclaringType.Equals(typeof(PopupTimeSelectionMode)) &&
                    !m.Name.StartsWith("_", StringComparison.Ordinal) &&
                    !m.Name.EndsWith("_", StringComparison.Ordinal))
                .Select(m => m.Name)
                .ToList();

            cmbPopup.ItemsSource = new Dictionary<string, Type>()
                                       {
                                           { "ListTimePicker", typeof(ListTimePickerPopup) },
                                           { "RangeTimePicker", typeof(RangeTimePickerPopup) },
                                       };

            cmbFormat.ItemsSource = new Dictionary<string, ITimeFormat>()
                                        {
                                            { "ShortTimeFormat", new ShortTimeFormat() },
                                            { "LongTimeFormat", new LongTimeFormat() },
                                            { "Custom: hh:mm:ss", new CustomTimeFormat("hh:mm:ss") },
                                            { "Custom: hh.mm", new CustomTimeFormat("hh.mm") },
                                        };

            cmbTimeParser.ItemsSource = new Dictionary<string, TimeParser>()
                                            {
                                                { "+/- hours, try +3h", new PlusMinusHourTimeParser() },
                                                { "+/- minutes, try +3m", new PlusMinusMinuteTimeInputParser() },
                                            };

            // defaults
            cmbFormat.SelectedIndex = 0;
            cmbPopupSecondsInterval.SelectedIndex = 1;
            cmbPopupMinutesInterval.SelectedIndex = 3;
            cmbPopupSelectionMode.SelectedIndex = cmbPopupSelectionMode.Items.ToList().IndexOf(tp.PopupTimeSelectionMode.ToString());
            cmbPopup.SelectedIndex = 0;

            List<CultureInfo> cultures = new List<CultureInfo>();

            // work through long list of cultures and check if it is actually 
            // allowed in this configuration.
            foreach (string cultureName in _cultureNames)
            {
                try
                {
                    CultureInfo c = new CultureInfo(cultureName);
                    cultures.Add(c);
                }
                catch (ArgumentException)
                {
                }
            }

            cmbCultures.ItemsSource = cultures;
            // preselect current culture.
            cmbCultures.SelectedItem = cultures.FirstOrDefault(info => info.Name == tp.ActualCulture.Name);
        }
Exemple #21
0
 private void ButtonSendTestDataClick(object sender, RoutedEventArgs e)
 {
     StatusInformation = "Start send test data";
     _parrotSendData.SendTestData(_parrotDrones);
     MergeLogActions(_parrotSendData.LogActions);
     StatusInformation = "End send test data";
 }
 private async void FundingSummary_Loaded(object sender, RoutedEventArgs e)
 {
     if (null == ViewModel) return;
     ViewModel.StepChanged += this.FundingSummary_StepChanged;
     ViewModel.ReSizeGrid += FundingSummary_ResizeGrid;
     await ViewModel.OnStepAsync(FundingSummaryViewModel.EnumStep.Start);
 }
Exemple #23
0
 private void ButtonSendLoadCharsClick(object sender, RoutedEventArgs e)
 {
     StatusInformation = "Start load drones characteristics";
     _parrotCharacteristics.LoadDevicesCharacteristics(_parrotDrones);
     MergeLogActions(_parrotCharacteristics.LogActions);
     StatusInformation = "End load drones characteristics";
 }
Exemple #24
0
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(2) };
     _timer.Tick += _timer_Tick;
     _timer.Start();
     ButtonLoad.Visibility = Visibility.Collapsed;
 }
        private async void isVisible_Click(object sender, RoutedEventArgs e)
        {
            SetLayerStatusParameters parameters = new SetLayerStatusParameters
            {
                HoldTime = 30,
                LayerStatusList = layersStatus,
                ResourceID = tempLayerID
            };
            //与服务端交互
            try
            {
                SetLayerStatusService setLayersStatus = new SetLayerStatusService(url);
                var result = await setLayersStatus.ProcessAsync(parameters);
                if (result.IsSucceed)
                {
                    tempLayerID = result.NewResourceID;
                    layer.LayersID = result.NewResourceID;
                    layer.Refresh();

                }
            }
            //交互失败
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void BitmapImageOpened(object sender, RoutedEventArgs e)
        {
            var bitmap = (BitmapImage)sender;
            bitmap.ImageOpened -= BitmapImageOpened;
            bitmap.ImageFailed -= BitmapImageFailed;

            SwapImages();
        }
 /// <summary>
 /// Update the TreeViewItem's IsChecked property when this IsChecked
 /// property is changed.
 /// </summary>
 /// <param name="sender">The CheckBox.</param>
 /// <param name="e">Event arguments.</param>
 private void OnIsCheckedChanged(object sender, RoutedEventArgs e)
 {
     TreeViewItem item = ParentTreeViewItem;
     if (item != null)
     {
         TreeViewExtensions.SetIsChecked(item, IsChecked);
     }
 }
        private void EventSetter_OnHandler(object sender, RoutedEventArgs e)
        {
            var cell = (DataGridCell)sender;

            if (cell.Content is TextBlock)
                AppBootstrapper.GetInstance<IEventAggregator>()
                    .PublishOnUIThread(new PreviewValueEvent(((TextBlock)cell.Content).Text));
        }
		private void OrientationLock_Checked(object sender, RoutedEventArgs e)
		{
			//var preferences = this.DataContext as ContentPreferencesViewModel;
			//if (preferences != null)
			//{
			//    preferences.Orientation = this.Orientation.ToString();
			//}
		}
 private void button6_Click(object sender, RoutedEventArgs e)
 {
     _errorState = true;
 }
 private void button7_Click(object sender, RoutedEventArgs e)
 {
     _randomizeState = !_randomizeState;
 }
 private void btn_task_Click(object sender, RoutedEventArgs e)
 {
     //DoWork();
     Task.Factory.StartNew(DoWork);
 }
 private void navToClienteLi_Click(object sender, RoutedEventArgs e)
 {
     ClienteLista _clienteLista = new ClienteLista();
     _clienteLista.Owner = this;
     _clienteLista.ShowDialog();
 }
Exemple #34
0
		private void Window_Loaded(object sender, RoutedEventArgs e)
		{
			Threads.AddThread("LoadAll", new System.Threading.Thread(new System.Threading.ThreadStart(() => this.business.LoadAll())), true);
			this.business.LoadAllFinished += Business_LoadAllFinished;
		}
 private void OkButton_Click(object sender, RoutedEventArgs e)
 {
     SetDataTwinText();
 }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (PojemnikBiletowy.Ilosc >= 1)
            {
                string[] Nazwy    = PojemnikBiletowy.listaNazw.ToArray();
                double[] Ceny     = PojemnikBiletowy.listaCen.ToArray();
                int[]    Mnozniki = PojemnikBiletowy.listaMnoznikow.ToArray();

                tbTickets.Text        = Nazwy[0];
                tbPrice.Text          = Ceny[0].ToString() + " zł";
                butAdd.IsEnabled      = true;
                butSubtract.IsEnabled = true;
                tbSum.Text            = (Mnozniki[0] * Ceny[0]).ToString() + " zł";
            }
            if (PojemnikBiletowy.Ilosc >= 2)
            {
                string[] Nazwy    = PojemnikBiletowy.listaNazw.ToArray();
                double[] Ceny     = PojemnikBiletowy.listaCen.ToArray();
                int[]    Mnozniki = PojemnikBiletowy.listaMnoznikow.ToArray();

                tbTickets1.Text        = Nazwy[1];
                tbPrice1.Text          = Ceny[1].ToString() + " zł";
                butAdd1.IsEnabled      = true;
                butSubtract1.IsEnabled = true;
                tbSum1.Text            = (Mnozniki[1] * Ceny[1]).ToString() + " zł";
            }
            if (PojemnikBiletowy.Ilosc >= 3)
            {
                string[] Nazwy    = PojemnikBiletowy.listaNazw.ToArray();
                double[] Ceny     = PojemnikBiletowy.listaCen.ToArray();
                int[]    Mnozniki = PojemnikBiletowy.listaMnoznikow.ToArray();

                tbTickets12.Text        = Nazwy[2];
                tbPrice12.Text          = Ceny[2].ToString() + " zł";
                butAdd12.IsEnabled      = true;
                butSubtract12.IsEnabled = true;
                tbSum12.Text            = (Mnozniki[2] * Ceny[2]).ToString() + " zł";
            }
            if (PojemnikBiletowy.Ilosc >= 4)
            {
                string[] Nazwy    = PojemnikBiletowy.listaNazw.ToArray();
                double[] Ceny     = PojemnikBiletowy.listaCen.ToArray();
                int[]    Mnozniki = PojemnikBiletowy.listaMnoznikow.ToArray();

                tbTickets123.Text        = Nazwy[3];
                tbPrice123.Text          = Ceny[3].ToString() + " zł";
                butAdd123.IsEnabled      = true;
                butSubtract123.IsEnabled = true;
                tbSum123.Text            = (Mnozniki[3] * Ceny[3]).ToString() + " zł";
            }
            if (PojemnikBiletowy.Ilosc >= 5)
            {
                string[] Nazwy    = PojemnikBiletowy.listaNazw.ToArray();
                double[] Ceny     = PojemnikBiletowy.listaCen.ToArray();
                int[]    Mnozniki = PojemnikBiletowy.listaMnoznikow.ToArray();

                tbTickets1234.Text        = Nazwy[4];
                tbPrice1234.Text          = Ceny[4].ToString() + " zł";
                butAdd1234.IsEnabled      = true;
                butSubtract1234.IsEnabled = true;
                tbSum1234.Text            = (Mnozniki[4] * Ceny[4]).ToString() + " zł";
            }
            if (Jezyk.EngOrPol == 1)
            {
                butNewTicket.Content = "ADD NEW TICKET";
                butCancel.Content    = "CANCEL";
                butPay.Content       = "PAY";
                label5.Content       = "SUM:";
                label4.Content       = "AMOUNT:";
                label22.Content      = "CHOSEN TICKETS:";
                label.Content        = "Date/hour:";
                label1.Content       = "Number of tickets:";
                label2.Content       = "Amount to pay:";
                label3.Content       = "TICKET PRICE:";
            }
            else
            {
                butNewTicket.Content = "DODAJ NOWY BILET";
                butCancel.Content    = "ANULUJ";
                butPay.Content       = "ZAPŁAĆ";
                label5.Content       = "SUMA:";
                label4.Content       = "ILOŚĆ:";
                label22.Content      = "WYBRANE BILETY:";
                label.Content        = "Data/godzina:";
                label1.Content       = "Ilość biletów:";
                label2.Content       = "Kwota do zapłaty:";
                label3.Content       = "CENA BILETU:";
            }
        }
        private void viewStudentsButton_Click(object sender, RoutedEventArgs e)
        {
            var studentsWindow = new StudentsWindow(_context);

            ShowWindow(studentsWindow);
        }
        private void viewTeachersButton_Click(object sender, RoutedEventArgs e)
        {
            var teacherWindow = new TeachersWindow(_context);

            ShowWindow(teacherWindow);
        }
        private void viewDisciplinesButton_Click(object sender, RoutedEventArgs e)
        {
            var disciplineWindow = new DisciplinesWindow(_context);

            ShowWindow(disciplineWindow);
        }
        private void viewGroupsButton_Click(object sender, RoutedEventArgs e)
        {
            var groupsWindow = new GroupsWindow(_context);

            ShowWindow(groupsWindow);
        }
        private void viewSpecialtiesButton_Click(object sender, RoutedEventArgs e)
        {
            var specialtiesWindow = new SpecialtiesWindow(_context);

            ShowWindow(specialtiesWindow);
        }
 private void btnNew_Click(object sender, RoutedEventArgs e)
 {
     message = new ArchiveTagDTO();
     ShowItem();
 }
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     TextBox1.IsEnabled = true;
     Button2.IsEnabled = true;
     _moveTubeTimer.Stop();
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     Application_unit_Names = return_list;
     this.Close();
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     this.DialogResult = true;
     Close();
 }
 void FullscreenVideoTransportOsd_Loaded(object sender, RoutedEventArgs e)
 {
     CurrentPositionSlider.PreviewMouseUp += CurrentPositionSlider_PreviewMouseUp;
 }
 private void CancelButton_Click(object sender, RoutedEventArgs e)
 {
     this.Close();
 }
Exemple #48
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            vm.Login();

        }
 /// <summary>
 /// 検索ボタンクリック
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     GridOutPut();
 }
Exemple #50
0
 void HomepageButton_Click(object sender, RoutedEventArgs e)
 {
     Homepage();
 }
 private void btnCancel_Click(object sender, RoutedEventArgs e)
 {
     this.Close();
 }
Exemple #52
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     OpenFileDialog openFileDialog = new OpenFileDialog();
     openFileDialog.ShowDialog();
 }
 private void btn_count_Click(object sender, RoutedEventArgs e)
 {
     //DoCount();
     Task.Factory.StartNew(DoCount);
 }
 private void shelfInfo_Click(object sender, RoutedEventArgs e)
 {
    contentControl.Content = new ShelfInfo();
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     var data = db.Notes
                 .Join(
                     db.Etudiants,
                     Note => Note.IdEtudiant,
                     Etudiant => Etudiant.IdEtudiant,
                     (Note, Etudiant) => new
                     {
                         IdEtudiant = Etudiant.IdEtudiant,
                         IdCollege = Etudiant.IdCollege,
                         Nom = Etudiant.Nom,
                         Prenom = Etudiant.Prenom,
                         IdMatiere = Note.IdMatiere,
                         NoteControle = Note.NoteControle,
                         IdEnseignant = Note.IdEnseignant
                     }
                     ).Join(
                     db.Matieres,
                     Note => Note.IdMatiere,
                     Matiere => Matiere.IdMatiere,
                     (Note, Matiere) => new
                     {
                         IdEtudiant = Note.IdEtudiant,
                         IdCollege = Note.IdCollege,
                         IdEnseignant = Note.IdEnseignant,
                         Nom = Note.Nom,
                         Prenom = Note.Prenom,
                         IdMatiere = Note.IdMatiere,
                         NoteControle = Note.NoteControle,
                         libelle = Matiere.libelle
                     }
                     ).Join(
                     db.Colleges,
                     Note => Note.IdCollege,
                     College => College.IdCollege,
                     (Note, College) => new
                     {
                         IdEtudiant = Note.IdEtudiant,
                         IdCollege = Note.IdCollege,
                         IdEnseignant = Note.IdEnseignant,
                         Nom = Note.Nom,
                         Prenom = Note.Prenom,
                         IdMatiere = Note.IdMatiere,
                         NoteControle = Note.NoteControle,
                         libelle = Note.libelle,
                         nomCo = College.nomCo,
                         AdresseSite = College.AdresseSite
                     }
                     ).Join(
                     db.Enseignants,
                     Note => Note.IdEnseignant,
                     Enseignant => Enseignant.IdEnseignant,
                     (Note, Enseignant) => new
                     {
                         IdEtudiant = Note.IdEtudiant,
                         IdCollege = Note.IdCollege,
                         IdEnseignant = Note.IdEnseignant,
                         Nom = Note.Nom,
                         Prenom = Note.Prenom,
                         IdMatiere = Note.IdMatiere,
                         NoteControle = Note.NoteControle,
                         libelle = Note.libelle,
                         nomCo = Note.nomCo,
                         AdresseSite = Note.AdresseSite,
                         IdDepartement = Enseignant.IdDepartement
                     }
                     ).Join(
                     db.Departements,
                     Note => Note.IdDepartement,
                     Departement => Departement.IdDepartement,
                     (Note, Departement) => new
                     {
                         IdEtudiant = Note.IdEtudiant,
                         IdCollege = Note.IdCollege,
                         IdEnseignant = Note.IdEnseignant,
                         Nom = Note.Nom,
                         Prenom = Note.Prenom,
                         IdMatiere = Note.IdMatiere,
                         NoteControle = Note.NoteControle,
                         libelle = Note.libelle,
                         nomCo = Note.nomCo,
                         AdresseSite = Note.AdresseSite,
                         IdDepartement = Note.IdDepartement,
                         nomDe = Departement.nomDe
                     }
                     ).Where(c => c.IdMatiere == IdMat && c.IdDepartement == IdDep).ToList();
     NoteMoy2 a = new NoteMoy2();
     a.SetDataSource(data);
     CrystalEnseignant.ViewerCore.ReportSource = a;
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     _sampleState = (!_sampleState);
     lbl1.Content = "Sample " + _sampleState;
     PacOut1(0);
 }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     this.Close();
 }
 /// <summary>
 /// Handles the Loaded event of the IconDisplayer control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
 private void IconDisplayerLoaded(object sender, RoutedEventArgs e) {
   UpdateText();
 }
 private void button2_Click(object sender, RoutedEventArgs e)
 {
     reset_rectangle_tube_width();
 }
        // Initialize the display with a web map and search portal for basemaps
        private async void control_Loaded(object sender, RoutedEventArgs e)
        {
            _portal = await ArcGISPortal.CreateAsync();

            // Initial search on load
            DoSearch();
        }