Example #1
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            Save();
            NavBar.Navigate(new Models(), this.Parent.Parent.Parent.Parent, this);

            this.Close();
        }
Example #2
0
        private void btn_Back_Click(object sender, EventArgs e)
        {
            closingData = Globals.FillDictionary(this.radPanel1);

            if (CheckDataModified(initialData, closingData) == true)
            {
                DialogResult dialogResult = MessageBox.Show("Записът е бил променен. Сигурни ли сте, че искате да запазите промените?", "Съобщение", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    Save();
                    MessageBox.Show("Записът беше запаметен!");

                    NavBar.Navigate(new Manufacturers(), this.Parent.Parent.Parent.Parent, this);
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Записът не беше запаметен!");

                    NavBar.Navigate(new Manufacturers(), this.Parent.Parent.Parent.Parent, this);
                    this.Close();
                }
            }
            else
            {
                NavBar.Navigate(new Manufacturers(), this.Parent.Parent.Parent.Parent, this);
                this.Close();
            }
        }
Example #3
0
 public StepDefinitions()
 {
     chromeDriver = new ChromeDriver();
     formPage     = new FormPage(chromeDriver);
     homePage     = new HomePage(chromeDriver);
     navBar       = new NavBar(chromeDriver);
 }
        private void Init()
        {
            if (isUsingActualConfig)
            {
                // Load configurations
                GameConfiguration.Load();
                settingsData = GameConfiguration.Settings;
            }
            else
            {
                settingsData = new SettingsData();
                var a = settingsData.AddTabData(new SettingsTab("A", "icon-arrow-left"));
                a.AddEntry(new SettingsEntryBool("a-a", testDataAA            = new BindableBool(false)));
                a.AddEntry(new SettingsEntryBool("a-b", testDataAB            = new BindableBool(true)));
                a.AddEntry(new SettingsEntryEnum <TestType>("a-c", testDataAC = new Bindable <TestType>(TestType.TypeB)));

                var b = settingsData.AddTabData(new SettingsTab("B", "icon-backward"));
                b.AddEntry(new SettingsEntryFloat("b-a", testDataBA = new BindableFloat(0f, -10f, 10f)));
                b.AddEntry(new SettingsEntryFloat("b-b", testDataBB = new BindableFloat(5f, 10f, 20f)));
                b.AddEntry(new SettingsEntryInt("b-c", testDataBC   = new BindableInt(0, -20, 5)));
            }

            // Create nav bar.
            navBar = RootMain.CreateChild <NavBar>("nav-bar");
            {
                navBar.Size = new Vector2(64f, 400f);
                navBar.SetSettingsData(settingsData);
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

            if (NavBar != null)
            {
                NavBar.Dispose();
                NavBar = null;
            }

            if (NotificationSoundPicker != null)
            {
                NotificationSoundPicker.Dispose();
                NotificationSoundPicker = null;
            }

            if (NotificationsSectionHeader != null)
            {
                NotificationsSectionHeader.Dispose();
                NotificationsSectionHeader = null;
            }
        }
Example #6
0
        public DownloadMenu()
        {
            InitializeComponent();

            gameTextBlockPrefab = XamlWriter.Save(GameListTextTemplate);

            dwManager = Library.client.downloadManager;

            NavBar.SetMode(Controls.NavBar.Modes.Download);

            if (dwManager == null || dwManager.queue.Count == 0)
            {
                Debug.Log("Nothing to show here");
                //PageManager.SetPage(new EmptyDownloadMenu().Content);
                SetEmptyMenu();
                return;
            }



            //SetValues();
            if (updatePercentageThread != null)
            {
                if (updatePercentageThread.IsAlive)
                {
                    stopThread = true;
                    updatePercentageThread.Join();
                    stopThread = false;
                }
            }
            updatePercentageThread = new Thread(UpdatePercentageThread);
            updatePercentageThread.Start();
        }
 public static void Init()
 {
     NavBar      = new NavBar();
     Cards       = new CardsPage();
     CardDetails = new CardDetails();
     logger.Info("Compeleted BasePage.Init()");
 }
        /// <summary>
        /// Method that generates the list items to bring to view for NavBar
        /// </summary>
        /// <param name="model">The publicVM Model used</param>
        private void populateNavBar(IEnumerable <PublicVM> model)
        {
            IEnumerable <PublicVM> nb = model
                                        .OrderBy(e => e.CategoryName)
                                        .GroupBy(e => e.CategoryName)
                                        .Select(g => g.First());

            List <NavBar> nbl = new List <NavBar>();

            foreach (PublicVM pvm in nb)
            {
                NavBar nbitem = new NavBar();

                nbitem.CategoryName = pvm.CategoryName;

                foreach (PublicVM pp in model.GroupBy(g => g.DocumentTypeName).Select(g => g.First()).OrderBy(e => e.DocumentTypeName))
                {
                    if (pp.CategoryName == nbitem.CategoryName && !nbl.Any(s => s.DocumentTypeName.Contains(pp.DocumentTypeName)))
                    {
                        nbitem.DocumentTypeName.Add(pp.DocumentTypeName);
                    }
                }

                nbl.Add(nbitem);
            }

            ViewBag.CategoryNavBar = nbl;

            ViewBag.PolicyNavBar = model
                                   .Where(e => e.EffectiveDate != null && e.ReferenceType == "Policy")
                                   .OrderBy(e => e.RefNumber)
                                   .GroupBy(e => e.RefNumber)
                                   .Select(g => g.First().RefNumber).Where(y => y != "");
        }
 public NavBarSteps(ScenarioContext injectedContext)
 {
     context = injectedContext;
     driver  = context.Get <IWebDriver>("_driver");
     config  = context.Get <IConfiguration>("config");
     navBar  = new NavBar(driver, config);
 }
Example #10
0
        private void InitMenus(List <Menus> menus)
        {
            //1级菜单
            Dictionary <string, int> captionsText = new Dictionary <string, int>();

            foreach (var menu in menus.Where(p => p.ParentId == 0))
            {
                captionsText.Add(menu.MenuName, menu.Id);
            }
            NavBar navbar = new NavBar(captionsText);

            NaviContainer.Controls.Add(navbar);
            navbar.OnItemClick += Navbar_OnItemClick;
            navbar.InitNavBar();
            //2级菜单
            var groups = navbar.Groups;

            foreach (var icongroup in groups)
            {
                foreach (var menu in menus.Where(p => p.ParentId == icongroup.OrderId))
                {
                    icongroup.AddIcons(new IconButton(null, menu.MenuName, menu.MenuPath));
                }
            }
            navbar.Show();
        }
        public IHttpActionResult PutNavBar(int id, NavBar navBar)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != navBar.NavBarId)
            {
                return(BadRequest());
            }

            db.Entry(navBar).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!NavBarExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Example #12
0
 void ReleaseDesignerOutlets()
 {
     if (CalendarButton != null)
     {
         CalendarButton.Dispose();
         CalendarButton = null;
     }
     if (FavoritesButton != null)
     {
         FavoritesButton.Dispose();
         FavoritesButton = null;
     }
     if (NavBar != null)
     {
         NavBar.Dispose();
         NavBar = null;
     }
     if (NutritionButton != null)
     {
         NutritionButton.Dispose();
         NutritionButton = null;
     }
     if (ProfileButton != null)
     {
         ProfileButton.Dispose();
         ProfileButton = null;
     }
     if (WorkoutsButton != null)
     {
         WorkoutsButton.Dispose();
         WorkoutsButton = null;
     }
 }
Example #13
0
		public static void Execute(Atom parent)
		{
			var nb =new NavBar ();
			nb.BrandText="App Title";
			nb.Add ("Home");
			nb.Add ("License");
			nb.Add ("Contact");

			var dd = new DropdownMenu ();
			dd.Text = "Config";
			dd.Nav.Add ("Users");
			dd.Nav.Add ("Groups");

			nb.Add (dd);

			var log = new Div ();
			var code = new Div ();

			new Div (d=>{
				d.ClassName="bs-docs-example";
				d.JQuery.Append(nb).Append(log).Append("C# code".Header(4)).Append(code);
				parent.Append(d);
			});

			nb.Selected += (e) => {
				var i = e.CurrentTarget.As<NavItem> ();
				log.Text=  "{0} Clicked".Fmt(i.Text); 
			};

			var rq =jQuery.GetData<string> ("code/demonavbar.html");
			rq.Done (s=> code.Text=s);

		}
        public void LogOut()
        {
            NavBar navBar = new NavBar();

            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            navBar.ClickLogOut();
            Assert.AreEqual(Driver.Url, "https://testdo.bitwarden.com/#/", "URL doesn't match");
        }
        public IHttpActionResult PostNavBar(NavBar navBar)
        {
            NavBarService navBarService = new NavBarService();

            navBarService.UpsertNavBarDataByClientUrl(navBar, db);

            return(CreatedAtRoute("DefaultApi", new { id = navBar.NavBarId }, navBar));
        }
Example #16
0
        private void btn_New_Click(object sender, EventArgs e)
        {
            LocationCard mc = new LocationCard();

            mc.Location_ID = "-1";
            NavBar.Navigate(mc, Globals.GetParent(this.Parent.Parent), this);

            Close();
        }
        private void NavBar_stpanel_MouseEnter(object sender, MouseEventArgs e)
        {
            DoubleAnimation an = new DoubleAnimation();

            an.From     = NavBar.Width;
            an.To       = 100;
            an.Duration = new Duration(TimeSpan.FromMilliseconds(250));
            NavBar.BeginAnimation(WidthProperty, an, HandoffBehavior.SnapshotAndReplace);
        }
Example #18
0
        private void btn_New_Click(object sender, EventArgs e)
        {
            ItemCard ic = new ItemCard();

            ic.Item_ID = "-1";
            NavBar.Navigate(ic, Globals.GetParent(this.Parent.Parent), this);

            Close();
        }
Example #19
0
        //naigate to the hotels main page
        public static void NavigateToHotels(IWebDriver driver)
        {
            Console.WriteLine(":: Navigating to Hotels page.");
            NavBar navBar = new NavBar(driver);

            navBar.Hotels.Click();

            //Thread.Sleep(1000);
        }
Example #20
0
    private void Awake()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            return;
        }

        instance = this;
    }
        public HomePage(IWebDriver driver)
        {
            if (driver == null)
            {
                throw new ArgumentNullException();
            }

            _driver = driver;
            NavBar  = new NavBar(driver);
        }
        public IHttpActionResult GetNavBar(int id)
        {
            NavBar navBar = db.NavBars.Find(id);

            if (navBar == null)
            {
                return(NotFound());
            }

            return(Ok(navBar));
        }
Example #23
0
 public bool clickonOpt(String opt)
 {
     try
     {
         navBar = new NavBar();
         commonuitils.click(findopt(opt));
         return(true);
     }
     catch {
         return(false);
     }
 }
 public Task <bool> SaveNavBar(NavBar navbar)
 {
     if (ModelState.IsValid)
     {
         _repo.Add(navbar);
         return(_repo.SaveAll());
     }
     else
     {
         return(null);
     }
 }
Example #25
0
        private void MasterTemplate_CommandCellClick(object sender, EventArgs e)
        {
            ReportViewer_FORM barcode_report = new ReportViewer_FORM();

            barcode_report.repName = "Item_Barcode";
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add(Item_table.Item_ID, radGridView1.SelectedRows[0].Cells[Item_table.Item_ID].Value.MakeString());
            barcode_report.rep_parameters = parameters;
            barcode_report.Text           = "Справка - Баркод Артикул";
            NavBar.Navigate(barcode_report, Globals.GetParent(this.Parent.Parent), this, true);
        }
Example #26
0
        public static void NavigateBackToProfileWhenLogin(IWebDriver driver)
        {
            Console.WriteLine(":: Navigating to Profile page while logged in.");
            NavBar navBar = new NavBar(driver);

            navBar.LoggedInAccount.Click();

            //find the account element
            IWebElement elements = driver.FindElement(By.XPath(TestVariables.Credentials.AccountDropDown.AccountPage));

            elements.Click();
        }
Example #27
0
        public static void NavigateToLogin(IWebDriver driver)
        {
            Console.WriteLine(":: Navigating to Login page.");
            NavBar navBar = new NavBar(driver);

            navBar.myAccount.Click();

            //locate the dropdown menu item for login
            IWebElement elements = driver.FindElement(By.XPath(TestVariables.Credentials.AccountDropDown.Login));

            elements.Click();
        }
Example #28
0
        public Navigation(frmMain formMain, string moduleCategory)
        {
            InitializeComponent();
            NavBar navBarMain = new NavBar(moduleCategory);

            navBarMain.Name              = "navBarMain";
            navBarMain.Dock              = DockStyle.Left;
            navBarMain.ImageButtonClick += new NavBar.ButtonClickHander(NavBar_ImageButtonClick);
            navBarMain.QuitSystemClick  += new EventHandler(NavBar_QuitSystemClick);
            this.Controls.Add(navBarMain);
            _formMain  = formMain;
            this.Width = 160;
        }
Example #29
0
 public void ActualTest()
 {
     NavBar.GoToHealthCareIndustry();
     Thread.Sleep(3000);
     NavBar.GoToFinancialServicesIndustry();
     Thread.Sleep(3000);
     NavBar.GoToManufacturingIndustry();
     Thread.Sleep(3000);
     NavBar.GoToNonProfitIndustry();
     Thread.Sleep(3000);
     NavBar.GoToRetailIndustry();
     Thread.Sleep(3000);
 }
        protected GoogleBase(IWebDriver webDriver, string url)
        {
            WebDriver = webDriver;
            WebDriver.Manage().Window.Maximize(); //Bug in phantomjs https://github.com/ariya/phantomjs/issues/11637 if you don't do this it sets display false on elements out view which means it errors on click etc

            if (url != null)
            {
                WebDriver.Navigate().GoToUrl(url);
            }

            NavBar = new NavBar(WebDriver);
            Footer = new Footer(WebDriver);
        }
Example #31
0
        public Viewer()
        {
            this.InitializeComponent();

            if (this.ScreenWidth == 1366)
            {
                this.height = 2236;
            }
            else if (this.ScreenWidth == 1920)
            {
                this.height = 5000;   //2610;
            }

            this.Loaded += Viewer_Loaded;

            NavBar bar = new NavBar(this, true, true, true, true);

            bar.Pre += async(sender, ex) =>
            {
                await ToPre();
            };

            bar.Next += async(sender, ex) =>
            {
                await ToNext();
            };


            this.TopAppBar = bar;

            CoreDispatcher dispatcher = Window.Current.CoreWindow.Dispatcher;

            dispatcher.AcceleratorKeyActivated += (sender, ex) =>
            {
                VirtualKey key = ex.VirtualKey;
                if ((ex.EventType == CoreAcceleratorKeyEventType.KeyUp))
                {
                    if (((key == VirtualKey.Up) || (key == VirtualKey.Left)) || (key == VirtualKey.PageUp))
                    {
                        ex.Handled = true;

                        PrePage();
                    }
                    else if (((key == VirtualKey.Down) || (key == VirtualKey.Right)) || (key == VirtualKey.PageDown))
                    {
                        ex.Handled = true;
                        NextPage();
                    }
                }
            };
        }