예제 #1
0
 // Navigeren naar een nieuwe viewmodel en toevoegen aan de navigatie geschiedenis
 public void NavigateTo(ViewModelBase viewModel)
 {
     if (CurrentData.GetType() != viewModel.GetType())
     {
         var index = NavigationHistoryItems.Count;
         NavigationHistoryItems.Add(viewModel);
         CurrentData = NavigationHistoryItems[index];
         AdjustSelectedItem();
         AdjustBackButtonVisibility();
     }
 }
예제 #2
0
        // Deze functie zorgt ervoor dat bij navigeren steeds het juiste incoontje geselecteerd is
        private void AdjustSelectedItem()
        {
            var current = CurrentData.GetType().ToString().ToLower();

            if (current.Contains("establishment"))
            {
                current = "merchants";
            }
            else if (current.Contains("login") || current.Contains("registration"))
            {
                current = "account";
            }
            else if (current.Contains("panel") || current.Contains("add") || current.Contains("edit"))
            {
                current = "panel";
            }

            SelectedItem = NavigationViewItems.SingleOrDefault(n => current.Contains(n.Tag.ToString().ToLower()));
        }
예제 #3
0
        private void StatusbarUpdate()
        {
            if (CurrentData != null)
            {
                this.__sType.Text = CurrentData.GetType().Name;
                this.__sSize.Text = CurrentData.RawData.Length.ToString(Cult.CurrentCulture) + " Bytes";
                this.__sPath.Text = CurrentPath + ',' + CurrentData.Lang.ResourcePath;
            }
            else if (CurrentSource != null)
            {
                this.__sType.Text = "Ready";
                this.__sSize.Text = "";
                this.__sPath.Text = CurrentPath;
            }
            else
            {
                this.__sType.Text = "";
                this.__sSize.Text = "";
                this.__sPath.Text = "Ready";
            }

            this.__sType.BackColor = CurrentData is UnknownResourceData ? System.Drawing.Color.LightYellow : System.Drawing.SystemColors.Control;
        }