コード例 #1
0
ファイル: HomeWindow.xaml.cs プロジェクト: jakeins/WatchCake
        /// <summary>
        /// Instantiate and show new tracker widnow (as dialog).
        /// </summary>
        private void NewTracker(object sender, RoutedEventArgs e)
        {
            var newTrackerWindow = new TrackerEditWindow()
            {
                Owner = this
            };

            newTrackerWindow.ShowDialog();
        }
コード例 #2
0
        /// <summary>
        /// Edit tracker button handler. Opens edit tracker dialog.
        /// </summary>
        private void EditTracker(object sender, RoutedEventArgs e)
        {
            var trackerID         = ((sender as FrameworkElement)?.DataContext as Tracker).ID;
            var editTrackerWindow = new TrackerEditWindow(trackerID)
            {
                Owner = this
            };

            editTrackerWindow.ShowDialog();
        }