private void button1_Click(object sender, RoutedEventArgs e)
        {
            textBlock1.Text = "";

            OracleConnection oc = CommonMethods.GetConnection();
            oc.Open();
            OracleCommand ocmd = oc.CreateCommand();
            ocmd.CommandText = String.Format("select PERSOON_ID, NAAM, ACHTERNAAM,  EMAIL, WACHTWOORD, TELEFOON, POSTCODE, NATIONALITEIT, WOONPLAATS, ADRES from persoon where email = '{0}' AND wachtwoord = '{1}'",
                textBox1.Text,
                passwordBox1.Password);

            OracleDataReader odr = ocmd.ExecuteReader();
            if (odr.HasRows)
            {
                while (odr.Read())
                {
                    Customer cust = new Customer(Decimal.ToInt32((decimal)odr[0]), (string)odr[1], (string)odr[2], (string)odr[3], (string)odr[4], (string)odr[5], (string)odr[6], (string)odr[7], (string)odr[8], (string)odr[9]);
                    CommonMethods.loginUser = cust;
                }

                NavigationWindow nw = new NavigationWindow();
                nw.ShowsNavigationUI = false;
                nw.Navigate(new HomePage());
                nw.Show();

                CommonMethods.GetWindow(this).Close();
            }
            else
            {
                textBlock1.Text = "Oops!\nGeen gebruiker gevonden met deze gegevens.";
            }
            oc.Close();
        }
示例#2
0
        static void Main()
        {
#if true
            // set TestGuiComponent.Program as "Startup object" in this project's Property window

#if false
            // WPF: dynamically loaded window.
            System.Windows.Application app = new System.Windows.Application();
            app.Run(new DynamicallyLoadedWindow());
#elif false
            // WPF
            System.Windows.Application app = new System.Windows.Application();
            app.Run(new MyWindow());
#elif false
            // WPF
            System.Windows.Application app = new System.Windows.Application();
            System.Windows.Navigation.NavigationWindow window = new System.Windows.Navigation.NavigationWindow();
            MyPage page = new MyPage();
            window.Navigate(page);
            app.Run(window);
#else
            // Windows Forms
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
#endif
#else
            // set TestGuiComponent.App as "Startup object" in this project's Property window

            // WPF
            //System.Windows.Application app = new TestGuiComponent.App();
            //app.InitializeComponent();
            //app.Run();
#endif
        }
示例#3
0
        private static void OnGoBack(object sender, ExecutedRoutedEventArgs args)
        {
            NavigationWindow nw = sender as NavigationWindow;

            Debug.Assert(nw != null, "sender must be of type NavigationWindow.");
            nw.GoBack();
        }
示例#4
0
        private static void OnRefresh(object sender, ExecutedRoutedEventArgs e)
        {
            NavigationWindow nw = sender as NavigationWindow;

            Debug.Assert(nw != null, "sender must be of type NavigationWindow.");
            nw.Refresh();
        }
示例#5
0
        private static void OnQueryRefresh(object sender, CanExecuteRoutedEventArgs e)
        {
            NavigationWindow nw = sender as NavigationWindow;

            Debug.Assert(nw != null, "sender must be of type NavigationWindow.");
            e.CanExecute = nw.Content != null;
        }
示例#6
0
        // Token: 0x06002A4F RID: 10831 RVA: 0x000C2468 File Offset: 0x000C0668
        private static void OnQueryGoForward(object sender, CanExecuteRoutedEventArgs e)
        {
            NavigationWindow navigationWindow = sender as NavigationWindow;

            e.CanExecute      = navigationWindow.CanGoForward;
            e.ContinueRouting = !navigationWindow.CanGoForward;
        }
示例#7
0
 void myAppStartup(object sender, StartupEventArgs e)
 {
     AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
     NavigationWindow myNavigationWindow = new NavigationWindow();
     myNavigationWindow.Navigate(new SampleViewer());
     myNavigationWindow.Show();
 }
        private void bt1_Click(object sender, RoutedEventArgs e)
        {
            NavigationWindow window = new NavigationWindow();
            SetWindowExTransparent(new WindowInteropHelper(window).Handle);
            window.Title = "Soon!";
            Uri source = new Uri("http://www.google.com", UriKind.Absolute);

            window.Navigating += (o, args) => { customHis = customHis + ((NavigationWindow)o).CurrentSource; };
            window.Navigated += (o, args) => { customHis = customHis + ((NavigationWindow)o).CurrentSource; MessageBox.Show(customHis.ToString()); };
            window.Source = source;
            window.ShowsNavigationUI = false;
            window.Closing += (o, args) =>
            {
                args.Cancel = true;
                ((NavigationWindow)o).Navigate(new Uri("http://www.softuni.bg", UriKind.Absolute));

                IEnumerable back = window.BackStack;
                foreach (var vara in back)
                {
                    MessageBox.Show(vara.ToString());
                }
            };
            //window.AllowsTransparency = true;
            //window.Opacity = 1;
            window.WindowStyle = WindowStyle.None;
            window.Show();
        }
示例#9
0
        private static void OnBrowseStop(object sender, ExecutedRoutedEventArgs e)
        {
            NavigationWindow nw = sender as NavigationWindow;

            Debug.Assert(nw != null, "sender must be of type NavigationWindow.");
            nw.StopLoading();
        }
示例#10
0
        private static void OnQueryGoForward(object sender, CanExecuteRoutedEventArgs e)
        {
            NavigationWindow nw = sender as NavigationWindow;

            Debug.Assert(nw != null, "sender must be of type NavigationWindow.");
            e.CanExecute      = nw.CanGoForward;
            e.ContinueRouting = !nw.CanGoForward;
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="FrameNavigationService" /> class.
 /// </summary>
 public WindowNavigationService([NotNull] NavigationWindow window)
 {
     Should.NotBeNull(window, "window");
     _window = window;
     _useUrlNavigation = true;
     _window.Navigating += OnNavigating;
     _window.Navigated += OnNavigated;
 }
 public WindowNavigationService([NotNull] NavigationWindow window, bool useUrlNavigation)
 {
     Should.NotBeNull(window, nameof(window));
     _window = window;
     _useUrlNavigation = useUrlNavigation;
     _window.Navigating += OnNavigating;
     _window.Navigated += OnNavigated;
 }
        private void button5_Click(object sender, RoutedEventArgs e)
        {
            CommonMethods.loginUser = null;

            NavigationWindow nw = new NavigationWindow();
            nw.Navigate(new LoginPage());
            nw.Show();
            CommonMethods.GetWindow(this).Close();
        }
示例#14
0
        // Token: 0x06002A28 RID: 10792 RVA: 0x000C214C File Offset: 0x000C034C
        private static void OnSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NavigationWindow navigationWindow = (NavigationWindow)d;

            if (!navigationWindow._sourceUpdatedFromNavService)
            {
                Uri uriToNavigate = BindUriHelper.GetUriToNavigate(navigationWindow, d.GetValue(BaseUriHelper.BaseUriProperty) as Uri, (Uri)e.NewValue);
                navigationWindow._navigationService.Navigate(uriToNavigate, null, false, true);
            }
        }
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            if (CheckBox(txtbx_Naam) &&
                CheckBox(txtbx_Email) &&
                !passwordBox1.Password.Trim().Equals("") &&
                CheckBox(txtbx_Telefoon) &&
                CheckBox(txtbx_Postcode) &&
                CheckBox(txtbx_Nationaliteit) &&
                CheckBox(txtbx_Adres) &&
                CheckBox(txtbx_Woonplaats) &&
                CheckBox(txtbx_Achternaam))
            {
                OracleConnection oc = CommonMethods.GetConnection();
                oc.Open();
                OracleCommand ocmd = oc.CreateCommand();
                ocmd.CommandText = String.Format("SELECT PERSOON_ID FROM PERSOON WHERE email = '{0}'",
                    txtbx_Email.Text);
                OracleDataReader odr = ocmd.ExecuteReader();
                if (odr.HasRows)
                {
                    error_Textblock.Text = "Email adres is reeds in gebruik.";
                    txtbx_Email.Focus();
                    return;
                }

                ocmd.CommandText = String.Format("INSERT INTO PERSOON (NAAM, ACHTERNAAM, EMAIL, WACHTWOORD, TELEFOON, POSTCODE, NATIONALITEIT, WOONPLAATS, ADRES) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}') returning PERSOON_ID into :p1",
                    txtbx_Naam.Text,
                    txtbx_Achternaam.Text,
                    txtbx_Email.Text,
                    passwordBox1.Password,
                    txtbx_Telefoon.Text,
                    txtbx_Postcode.Text,
                    txtbx_Nationaliteit.Text,
                    txtbx_Woonplaats.Text,
                    txtbx_Adres.Text);
                ocmd.ExecuteNonQuery();

                OracleDecimal idDec = (OracleDecimal)ocmd.Parameters["p1"].Value;
                int persoonId = idDec.ToInt32();
                oc.Close();

                CommonMethods.loginUser = new Customer(persoonId, txtbx_Naam.Text, txtbx_Achternaam.Text, txtbx_Email.Text, passwordBox1.Password, txtbx_Telefoon.Text, txtbx_Postcode.Text, txtbx_Nationaliteit.Text, txtbx_Woonplaats.Text, txtbx_Adres.Text);

                NavigationWindow nw = new NavigationWindow();
                nw.Navigate(new HomePage());
                nw.ShowsNavigationUI = false;
                nw.Show();

                CommonMethods.GetWindow(this).Close();
            }
            else
            {
                error_Textblock.Text = "Alle velden dienen ingevuld te worden.";
            }
        }
示例#16
0
        // Token: 0x06002A4A RID: 10826 RVA: 0x000C23C0 File Offset: 0x000C05C0
        private static object CoerceContent(DependencyObject d, object value)
        {
            NavigationWindow navigationWindow = (NavigationWindow)d;

            if (navigationWindow.NavigationService.Content == value)
            {
                return(value);
            }
            navigationWindow.Navigate(value);
            return(DependencyProperty.UnsetValue);
        }
示例#17
0
        // Token: 0x06002A0D RID: 10765 RVA: 0x000C1C64 File Offset: 0x000BFE64
        private static void OnSandboxExternalContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NavigationWindow navigationWindow = (NavigationWindow)d;
            bool             flag             = (bool)e.NewValue;

            SecurityHelper.ThrowExceptionIfSettingTrueInPartialTrust(ref flag);
            if (flag && !(bool)e.OldValue)
            {
                navigationWindow.NavigationService.Refresh();
            }
        }
        /// <summary>
        ///    Called when SandboxExternalContentProperty is invalidated on 'd'.  If the value becomes
        ///    true, then the frame is refreshed to sandbox any content.
        /// </summary>
        private static void OnSandboxExternalContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NavigationWindow window = (NavigationWindow)d;

            bool fSandBox = (bool)e.NewValue;

            if (fSandBox && !(bool)e.OldValue)
            {
                window.NavigationService.Refresh();
            }
        }
示例#19
0
        //------------------------------------------------------
        //
        //  Private Methods
        //
        //------------------------------------------------------

        private static object CoerceContent(DependencyObject d, object value)
        {
            // whenever content changes, defer the change until the Navigate comes in
            NavigationWindow w = (NavigationWindow)d;

            if (w.NavigationService.Content == value)
            {
                return(value);
            }

            w.Navigate(value);
            return(DependencyProperty.UnsetValue);
        }
 public static void ShowNavigationWindows(NavigationWindow window, object pageAction, string title, BaseLayer baseLayer, ITaskLayer taskLayer)
 {
     _baseLayer = baseLayer;
     _taskLayer = taskLayer;
     window.Title = title;
     window.Width = 800;
     window.Height = 600;
     window.MinWidth = 450;
     window.MinHeight = 450;
     window.Content = pageAction;
     window.Closing += window_Closing;
     window.Show();
 }
示例#21
0
        /// <summary>
        ///    Called when SandboxExternalContentProperty is invalidated on 'd'.  If the value becomes
        ///    true, then the frame is refreshed to sandbox any content.
        /// </summary>
        private static void OnSandboxExternalContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NavigationWindow window = (NavigationWindow)d;

            // This feature is disabled in partial trust due to a P3P violation
            bool fSandBox = (bool)e.NewValue;

            SecurityHelper.ThrowExceptionIfSettingTrueInPartialTrust(ref fSandBox);
            if (fSandBox && !(bool)e.OldValue)
            {
                window.NavigationService.Refresh();
            }
        }
 private void loadWebpage(string address, int windowHeight, int windowWidth)
 {
     GetSite gs = new GetSite();
     gs.thisSite.Source = new Uri(address);
     NavigationWindow _navigationWindow = new NavigationWindow();
     _navigationWindow.ResizeMode = ResizeMode.NoResize;
     _navigationWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
     _navigationWindow.Width = windowWidth;
     _navigationWindow.Height = windowHeight;
     _navigationWindow.Show();
     _navigationWindow.WindowStyle = WindowStyle.ToolWindow;
     _navigationWindow.Navigate(gs);
 }
示例#23
0
        public TestForm()
        {
            InitializeComponent();

            nw = new NavigationWindow();

            try
            {
                uri = new Uri("pack://application:,,,/NavigationDemo;component/Page1.xaml", UriKind.Absolute);
                nw.Navigate(uri);
                nw.Show();
            }
            catch (Exception ex) {}
        }
示例#24
0
        // Token: 0x06002A54 RID: 10836 RVA: 0x000C24FC File Offset: 0x000C06FC
        private static void OnNavigateJournal(object sender, ExecutedRoutedEventArgs e)
        {
            NavigationWindow navigationWindow = sender as NavigationWindow;
            FrameworkElement frameworkElement = e.Parameter as FrameworkElement;

            if (frameworkElement != null)
            {
                JournalEntry journalEntry = frameworkElement.DataContext as JournalEntry;
                if (journalEntry != null)
                {
                    navigationWindow.JournalNavigationScope.NavigateToEntry(journalEntry);
                }
            }
        }
示例#25
0
        private static void OnNavigateJournal(object sender, ExecutedRoutedEventArgs e)
        {
            NavigationWindow nw = sender as NavigationWindow;

            Debug.Assert(nw != null, "sender must be of type NavigationWindow.");

            FrameworkElement journalEntryUIElem = e.Parameter as FrameworkElement;

            if (journalEntryUIElem != null)
            {
                // Get journal entry from MenuItem
                JournalEntry je = journalEntryUIElem.DataContext as JournalEntry;
                if (je != null)
                {
                    nw.JournalNavigationScope.NavigateToEntry(je);
                }
            }
        }
        private void btlogin_Click(object sender, RoutedEventArgs e)
        {
            lberror.Content = "";
            ServiceStoreClient ssc = new ServiceStoreClient();
            if (ssc.login(tbname.Text, tbpw.Password) != null)
            {
                ClientController.loginperson = ssc.login(tbname.Text, tbpw.Password);
                NavigationWindow nw = new NavigationWindow();
                nw.ShowsNavigationUI = false;
                nw.Navigate(new StorePage());
                nw.Show();

                ClientController.GetWindow(this).Close();
            }
            else
            {
                lberror.Content = "username or password are not valid";
            }
        }
示例#27
0
 public WindowDelegate(NavigationWindow window)
 {
     _window = window;
     _dispatcher = window.Dispatcher;
     _scenes = new List<Scene>();
     _resources = new Dictionary<string, ResourceDictionary>();
     _sceneIndex = -1;
     _windowRect = new Rect();
     _dispatcher.Invoke(() =>
     {
         _windowTopmost = window.Topmost;
         _windowState = window.WindowState;
         _windowStyle = window.WindowStyle;
         _windowResizemode = window.ResizeMode;
         _windowRect.X = window.Left;
         _windowRect.Y = window.Top;
         _windowRect.Width = window.Width;
         _windowRect.Height = window.Height;
         window.LoadCompleted += (sender, e) => NavigateFinished();
     });
 }
示例#28
0
        /// <summary>
        ///    Called when SourceProperty is invalidated on 'd'
        /// </summary>
        private static void OnSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NavigationWindow navWin = (NavigationWindow)d;

            // Don't navigate if the Source value change is from NavService as a result of a navigation happening.
            if (!navWin._sourceUpdatedFromNavService)
            {
                // We used not to need to resolve the Uri here because we did not allow navigating to a xaml rooted inside a NavWin.
                // Now after we allow this, we will need to support navigating to the following xaml,
                //        <NavigationWindow ... Source="a relative uri." ...>
                // When the xaml is rooted in a NavigationWindow with source pointing to a relative uri, the relative uri will need
                // to be resolved with its baseuri unless it is a fragment navigation or there is no baseuri.
                // In this case NavWin is always the root, parser will set the BaseUriProperty for the root element so NavWin doesn't need to
                // implement IUriContext.
                Uri uriToNavigate = BindUriHelper.GetUriToNavigate(navWin, d.GetValue(BaseUriHelper.BaseUriProperty) as Uri, (Uri)e.NewValue);

                // Calling the internal Navigate from Frame and NavWin's Source DP's property changed callbacks
                // We would not set value back in this case.
                navWin._navigationService.Navigate(uriToNavigate, null, false, true /* navigateOnSourceChanged */);
            }
        }
        static void Main()
        {
            #if true
            // set TestGuiComponent.Program as "Startup object" in this project's Property window

            #if false
            // WPF: dynamically loaded window.
            System.Windows.Application app = new System.Windows.Application();
            app.Run(new DynamicallyLoadedWindow());
            #elif false
            // WPF
            System.Windows.Application app = new System.Windows.Application();
            app.Run(new MyWindow());
            #elif false
            // WPF
            System.Windows.Application app = new System.Windows.Application();
            System.Windows.Navigation.NavigationWindow window = new System.Windows.Navigation.NavigationWindow();
            MyPage page = new MyPage();
            window.Navigate(page);
            app.Run(window);
            #else
            // Windows Forms
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
            #endif

            #else
            // set TestGuiComponent.App as "Startup object" in this project's Property window

            // WPF
            //System.Windows.Application app = new TestGuiComponent.App();
            //app.InitializeComponent();
            //app.Run();
            #endif
        }
示例#30
0
        // Token: 0x06002A4C RID: 10828 RVA: 0x000C2400 File Offset: 0x000C0600
        private static void OnGoBack(object sender, ExecutedRoutedEventArgs args)
        {
            NavigationWindow navigationWindow = sender as NavigationWindow;

            navigationWindow.GoBack();
        }
示例#31
0
        private void buttonArtikal_Click(object sender, RoutedEventArgs e)
        {
            NavigationWindow _naw = new NavigationWindow();

            _naw.Content = new Artikal(this);

            //sakrijem strelice za nazed i napred
            _naw.ShowsNavigationUI = false;
            if (ponudaDetaljno != null)
            {
                _naw.Owner = Window.GetWindow(ponudaDetaljno);
                if (Window.GetWindow(ponudaDetaljno).WindowState == WindowState.Normal)
                {
                    _naw.Width = Window.GetWindow(ponudaDetaljno).ActualWidth;
                    _naw.Height = Window.GetWindow(ponudaDetaljno).ActualHeight;
                }
                else
                {
                    _naw.WindowState = Window.GetWindow(ponudaDetaljno).WindowState;
                }
            }
            else if (radniNalogDetaljno != null)
            {
                _naw.Owner = Window.GetWindow(radniNalogDetaljno);
                if (Window.GetWindow(radniNalogDetaljno).WindowState == WindowState.Normal)
                {
                    _naw.Width = Window.GetWindow(radniNalogDetaljno).ActualWidth;
                    _naw.Height = Window.GetWindow(radniNalogDetaljno).ActualHeight;
                }
                else
                {
                    _naw.WindowState = Window.GetWindow(radniNalogDetaljno).WindowState;
                }
            }

            _naw.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            
            _naw.ShowDialog();
        }
示例#32
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     NavigationWindow win = new NavigationWindow();
     win.Content = new MyPage();
     win.Show();
 }
 public WhiteNavigationWindowPeer(NavigationWindow owner)
     : base(owner)
 {
     whitePeer = WhitePeer.Create(this, owner);
 }
示例#34
0
        // Token: 0x06002A52 RID: 10834 RVA: 0x000C24D8 File Offset: 0x000C06D8
        private static void OnBrowseStop(object sender, ExecutedRoutedEventArgs e)
        {
            NavigationWindow navigationWindow = sender as NavigationWindow;

            navigationWindow.StopLoading();
        }
示例#35
0
 /// <summary>
 /// Find a navigator tree for the given navigator ID
 /// </summary>
 /// <param name="navigationWindow">Navigation Window</param>
 /// <param name="navigatorId">NavigatorId to search</param>
 /// <returns></returns>
 static private INavigatorBase FindTargetInNavigationWindow(NavigationWindow navigationWindow, string navigatorId)
 {
     if (navigationWindow != null)
     {
         return navigationWindow.NavigationService.FindTarget(navigatorId);
     }
     return null;
 }
示例#36
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            string strseasons = "";
            strseasons = "select * from Zones";
            OleDbDataAdapter adpt11 = new OleDbDataAdapter(strseasons, oleconn);
            DataTable aa1 = new DataTable();
            adpt11.Fill(aa1);
            aa1.DefaultView.Sort = "ZoneName";
            cbxzone.ItemsSource = aa1.DefaultView;
            cbxzone.DisplayMemberPath = aa1.Columns["ZoneName"].ToString();
            cbxzone.SelectedValuePath = aa1.Columns["ZoneId"].ToString();

            cbxzone.SelectedIndex = 0;
              //  ObservableCollection<Team> lbx = Database.GetEntityList<Team>(false, true, true, oleconn, "RecordStatus", "TeamName");
            ObservableCollection<Fixture> lbxFixtures = Database.GetEntityList<Fixture>(false, false, false, oleconn, "RecordStatus", "SerialNo");
            //   ObservableCollection<DivisionLoad> lstDivisionLoad = Database.GetEntityList<DivisionLoad>(false, false, false, Database.getReadConnection(), "RecordStatus", "DivisionLoadId");

            try
            {
                NavigationWindow ws = new NavigationWindow();
                ws.ShowsNavigationUI = false;

                cbxzone.SelectedIndex = 0;
                cbxdivision.ItemsSource = null;
                dgvfixtures.ItemsSource = null;
                dgvfixtures.DataContext = null;
                dgvfixtures.Items.Clear();
                lbxGroupA.ItemsSource = null;
                lbxGroupB.ItemsSource = null;
                lbxGroupC.ItemsSource = null;
                lbxGroupD.ItemsSource = null;
                lbxteams.ItemsSource = null;
                lbxGroupA.Items.Clear();
                lbxGroupB.Items.Clear();
                lbxGroupC.Items.Clear();
                lbxGroupD.Items.Clear();
                lbxteams.Items.Clear();
                clearall();

                if (cbxseason.SelectedValue == null)
                {

                }
                if (cbxdivision.SelectedValue == null)
                {

                }

                else
                {

                    lbxFixtures.Clear();

                    lbxFixtures = Database.GetEntityList<Fixture>(false, false, false, oleconn, "RecordStatus", "SerialNo");
                    var objvalues = from s in lbxFixtures where s.DivisionId.ToString() == selectedgridvalue.LoadDivisionId && s.SeasonId.ToString() == TempValues.LoadSeasonId select s;
                    List<Fixture> lstselecteddiv = objvalues.OrderBy(p => p.MatchId).ToList<Fixture>();

                    if (lstselecteddiv.Count > 0)
                    {

                        DataTable dt = new DataTable();
                        dt.Columns.Add("Venue");
                        dt.Columns.Add("Umpire");
                        dt.Columns.Add("Umpiree");
                        dt.Columns.Add("Scorer");
                        dt.Columns.Add("MatchId");
                        dt.Columns.Add("SerialNo");
                        dt.Columns.Add("Day");
                        dt.Columns.Add("Group");
                        dt.Columns.Add("Teams");

                        foreach (var objFixte in lstselecteddiv)
                        {
                            //  Fixture obj = Database.GetEntity<Fixture>(Guid.Parse(selectedgridvalue._fixtureid),false,false,false,oleconn);
                            if (objFixte.SeasonId.ToString() == selectedgridvalue._seasonid)
                            {

                                DataRow dr = dt.NewRow();

                                dr["SerialNo"] = objFixte.SerialNo;
                                dr["Day"] = objFixte.Day;

                                dr["Group"] = objFixte.Group;
                                dr["Teams"] = objFixte.Teams;
                                dr["MatchId"] = objFixte.MatchId;
                                dr["Venue"] = objFixte.Venue;
                                dr["Umpire"] = objFixte.Umpire;
                                dr["Umpiree"] = objFixte.Umpiree;
                                dr["Scorer"] = objFixte.Scorer;
                                dt.Rows.Add(dr);
                            }

                            // dgvfixtures.Items.Add(obj);
                        }

                        dgvfixtures.ItemsSource = null;
                        dgvfixtures.Items.Clear();
                        dgvfixtures.DataContext = dt;
                        dgvfixtures.ItemsSource = dt.DefaultView;

                    }
                }
                //  }

                //else
                //{
                //    lbxteams.Items.Clear();

                //    if (TempValues.index != 0)
                //    {

                //        dgvfixtures.ItemsSource = null;
                //        lbxteams.IsEnabled = true;

                //        lbxGroupA.Items.Clear();
                //        lbxGroupB.Items.Clear();
                //        lbxGroupC.Items.Clear();
                //        lbxGroupD.Items.Clear();
                //        foreach (var objGroupTeamValues in lstGroupTeamValues)
                //        {

                //            // if (objDivision.SeasonId.ToString() == cbxseason.SelectedItem.ToString())
                //            if (objGroupTeamValues.SeasonId.ToString() == cbxseason.SelectedValue.ToString())
                //            {
                //                if (objGroupTeamValues.DivisionId.ToString() == cbxdivision.SelectedValue.ToString())
                //                {
                //                    if (objGroupTeamValues.NoOfGroups == cbxNoOfGroups.Text)
                //                    {
                //                        cbxNoOfGroups.IsEnabled = true;
                //                        ok.IsEnabled = true;
                //                        btntransfer.IsEnabled = false;
                //                        btnreverse.IsEnabled = false;
                //                        btnSave.IsEnabled = false;
                //                        btngeneratefix.IsEnabled = false;
                //                        // lbxTeamLoad.IsEnabled = false;
                //                        if (objGroupTeamValues.GroupA != null)
                //                        {
                //                            lbxGroupA.Items.Add(objGroupTeamValues.GroupA);
                //                        }

                //                        if (objGroupTeamValues.GroupB != null)
                //                        {

                //                            lbxGroupB.Items.Add(objGroupTeamValues.GroupB);

                //                        }

                //                        if (objGroupTeamValues.GroupC != null)
                //                        {

                //                            lbxGroupC.Items.Add(objGroupTeamValues.GroupC);

                //                        }

                //                        if (objGroupTeamValues.GroupD != null)
                //                        {

                //                            lbxGroupD.Items.Add(objGroupTeamValues.GroupD);

                //                        }
                //                    }
                //                }

                //            }
                //        }
                //    }
                //}
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public virtual void Start(IDataContext context = null)
        {
            Initialize();
            context = context.ToNonReadOnly();
            if (!context.Contains(NavigationConstants.IsDialog))
                context.Add(NavigationConstants.IsDialog, false);
            var app = MvvmApplication.Current;
            var viewModelType = app.GetStartViewModelType();

            var mappingProvider = app.IocContainer.Get<IViewMappingProvider>();
            IViewMappingItem mapping = mappingProvider.FindMappingForViewModel(viewModelType, context.GetData(NavigationConstants.ViewName), true);
            if (typeof(Page).IsAssignableFrom(mapping.ViewType))
            {
                _rootWindow = CreateNavigationWindow();
                var service = CreateNavigationService(_rootWindow);
                app.IocContainer.BindToConstant(service);
            }
            app.IocContainer.Get<IViewModelPresenter>().DynamicPresenters.Add(this);
            app.Start(context);
        }
示例#38
0
        internal NavigationWindow GetAppWindow()
        {
            NavigationWindow appWin = null;
            IBrowserCallbackServices ibcs = (IBrowserCallbackServices)this.GetService(typeof(IBrowserCallbackServices));

            // standalone case
            if (ibcs == null)
            {
                appWin = new NavigationWindow();

                // We don't want to show the window before the content is ready, but for compatibility reasons
                // we do want it to have an HWND available.  Not doing this can cause Application's MainWindow
                // to be null when LoadCompleted has happened.
                new WindowInteropHelper(appWin).EnsureHandle();
            }
            else // browser hosted case
            {
                IHostService ihs = (IHostService)this.GetService(typeof(IHostService));
                Debug.Assert(ihs != null, "IHostService in RootBrowserWindow cannot be null");
                appWin = ihs.RootBrowserWindowProxy.RootBrowserWindow;
                Debug.Assert(appWin != null, "appWin must be non-null");
                Debug.Assert(appWin is RootBrowserWindow, "appWin must be a RootBrowserWindow");
            }

            return appWin;
        }
 ///
 public NavigationWindowAutomationPeer(NavigationWindow owner): base(owner)
 {}
        private void buttonPartner_Click(object sender, RoutedEventArgs e)
        {
            NavigationWindow _naw = new NavigationWindow();

            if ((bool)servisnaKnjizica.radioButtonFizickoLice.IsChecked)
            {
                _naw.Content = new FizickoLice(this);
            }
            else if ((bool)servisnaKnjizica.radioButtonPoslovniPartner.IsChecked)
            {
                _naw.Content = new PoslovniPartner(this);
            }

            //sakrijem strelice za nazed i napred
            _naw.ShowsNavigationUI = false;
            _naw.Owner = Window.GetWindow(this);
            _naw.WindowStartupLocation = WindowStartupLocation.CenterOwner;

            if (Window.GetWindow(servisnaKnjizica).WindowState == WindowState.Normal)
            {
                _naw.Width = Window.GetWindow(servisnaKnjizica).ActualWidth;
                _naw.Height = Window.GetWindow(servisnaKnjizica).ActualHeight;
            }
            else
            {
                _naw.WindowState = Window.GetWindow(servisnaKnjizica).WindowState;
            }


            _naw.ShowDialog();
        }
示例#41
0
 private void Button_ProductListDemo_Click(object sender, RoutedEventArgs e)
 {
     NavigationWindow window = new NavigationWindow();
     window.Source = new Uri("ProductListPage.xaml", UriKind.Relative);
     window.Show();
 }
示例#42
0
 /// <summary>
 /// Handles switch between fullscreen and regular mode.
 /// </summary>
 /// <param name="sender">Event sender.</param>
 /// <param name="e">Event argument.</param>
 private void ExpandButton_Click(object sender, RoutedEventArgs e)
 {
     Window win = App.Current.MainWindow;
     VideoElement currentElement = (VideoElement)((VideoPage)((Frame)((Grid)win.Content).Children[0]).Content).player;
     if (!IsFullscreen) {
         currentElement.PausePlayback();
         VideoPage page = new VideoPage(this.Source);
         page.player.Position = currentElement.Position;
         page.player.IsFullscreen = true;
         NavigationWindow window = new NavigationWindow {
             WindowStyle = WindowStyle.None,
             ShowsNavigationUI = false,
             WindowState = WindowState.Maximized,
             Topmost = true,
             Background = win.Background,
             Content = page,
         };
         window.Show();
     } else {
         currentElement.Position = this.Position;
         VideoPage page = (VideoPage)this.Parent;
         NavigationWindow window = (NavigationWindow)page.Parent;
         window.Close();
         currentElement.PlayMedia();
     }
 }
示例#43
0
        private void buttonServisnaKnjizica_Click(object sender, RoutedEventArgs e)
        {
            NavigationWindow _naw = new NavigationWindow();

            _naw.Content = new ServisnaKnjizica(this);

            //sakrijem strelice za nazed i napred
            _naw.ShowsNavigationUI = false;
            _naw.Owner = Window.GetWindow(this);
            _naw.WindowStartupLocation = WindowStartupLocation.CenterOwner;

            if (Window.GetWindow(ponuda).WindowState == WindowState.Normal)
            {
                _naw.Width = Window.GetWindow(ponuda).ActualWidth;
                _naw.Height = Window.GetWindow(ponuda).ActualHeight;
            }
            else
            {
                _naw.WindowState = Window.GetWindow(ponuda).WindowState;
            }
            _naw.ShowDialog();
        }
 protected void ShowNavigationWindow(Page contentPage)
 {
     NavigationWindow = new NavigationWindow
         {
             Title = WindowTitle,
             Content = contentPage,
             Width = 800,
             Height = 550,
             ShowsNavigationUI = false,
         };
     NavigationWindow.Closing += NavigationWindow_Closing;
     NavigationWindow.Show();
 }
 protected virtual INavigationService CreateNavigationService(NavigationWindow window)
 {
     return UseUriNavigation
         ? new WindowNavigationService(window)
         : new WindowNavigationService(window, type => IocContainer.Get(type));
 }
示例#46
0
        // Token: 0x06002A50 RID: 10832 RVA: 0x000C2498 File Offset: 0x000C0698
        private static void OnRefresh(object sender, ExecutedRoutedEventArgs e)
        {
            NavigationWindow navigationWindow = sender as NavigationWindow;

            navigationWindow.Refresh();
        }
 protected virtual INavigationService CreateNavigationService(NavigationWindow window)
 {
     return new WindowNavigationService(window, UseUriNavigation);
 }
示例#48
0
        // Token: 0x06002A51 RID: 10833 RVA: 0x000C24B4 File Offset: 0x000C06B4
        private static void OnQueryRefresh(object sender, CanExecuteRoutedEventArgs e)
        {
            NavigationWindow navigationWindow = sender as NavigationWindow;

            e.CanExecute = (navigationWindow.Content != null);
        }
示例#49
0
 static void label_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     try
     {
         Label label = sender as Label;
         DockPanel dp = label.Parent as DockPanel;
         Uri url = new Uri(dp.Tag.ToString());
         NavigationWindow nw = new NavigationWindow();
         nw.Source = url;
         nw.Show();
     }
     catch (Exception)
     {
     }
 }
示例#50
0
        // Token: 0x06002A4E RID: 10830 RVA: 0x000C244C File Offset: 0x000C064C
        private static void OnGoForward(object sender, ExecutedRoutedEventArgs e)
        {
            NavigationWindow navigationWindow = sender as NavigationWindow;

            navigationWindow.GoForward();
        }