Inheritance: Displayable
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            LinkGroupCollection groups = new LinkGroupCollection();
            LinkGroup group = new LinkGroup() { DisplayName = "margiebot" };
            groups.Add(group);

            group.Links.Add(new Link() {
                DisplayName = "configure",
                Source = new Uri("/Views/ConfigureView.xaml", UriKind.Relative)
            });

            group.Links.Add(new Link() {
                DisplayName = "debug",
                Source = new Uri("/Views/DebugView.xaml", UriKind.Relative)
            });

            if ((bool)value) {
                group.Links.Add(new Link() {
                    DisplayName = "talk",
                    Source = new Uri("/Views/TalkView.xaml", UriKind.Relative)
                });
            }

            return groups;
        }
Example #2
0
 private void AddCompanyGroup()
 {
     LinkGroup companyGroup = new LinkGroup { DisplayName = "bedrijven" };
     companyGroup.Links.Add(CreateLink("overzicht", "../Pages/CompanyOverview.xaml"));
     companyGroup.Links.Add(CreateLink("toevoegen", "../Pages/CompanyEdit.xaml"));
     MenuLinkGroups.Add(companyGroup);
 }
Example #3
0
 private void AddLoggedInHomeGroup()
 {
     LinkGroup homeGroup = new LinkGroup { DisplayName = "Welcome" };
     homeGroup.Links.Add(CreateLink("home", "../Pages/Home.xaml"));
     homeGroup.Links.Add(CreateLink("logout", "../Pages/Logout.xaml"));
     MenuLinkGroups.Add(homeGroup);
 }
Example #4
0
 private void AddContractGroup()
 {
     LinkGroup contractGroup = new LinkGroup { DisplayName = "contracten" };
     contractGroup.Links.Add(CreateLink("overzicht", "../Pages/ContractOverview.xaml"));
     contractGroup.Links.Add(CreateLink("toevoegen", "../Pages/ContractEdit.xaml"));
     MenuLinkGroups.Add(contractGroup);
 }
Example #5
0
 private void AddReservationGroup()
 {
     LinkGroup reservationGroup = new LinkGroup { DisplayName = "reservaties" };
     reservationGroup.Links.Add(CreateLink("overzicht", "../Pages/ReservationOverview.xaml"));
     reservationGroup.Links.Add(CreateLink("kalendar", "../Pages/ReservationCalendar.xaml"));
     reservationGroup.Links.Add(CreateLink("toevoegen", "../Pages/ReservationEdit.xaml"));
     MenuLinkGroups.Add(reservationGroup);
 }
Example #6
0
        private Attributes()
        {
            pk = -1;
            window = App.Current.MainWindow as ModernWindow;
            group0 = window.MenuLinkGroups.ElementAt(0);
            group1 = window.MenuLinkGroups.ElementAt(1);

            window.MenuLinkGroups.RemoveAt(1);
        }
Example #7
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.nameTitle = ((FirstFloor.ModernUI.Presentation.LinkGroup)(target));
     return;
     }
     this._contentLoaded = true;
 }
Example #8
0
        public MainWindow()
        {
            InitializeComponent();
            Title = "GraphX for WPF showcase application v" + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
#if DEBUG
            var lg = new LinkGroup {DisplayName = "Debug"};
            lg.Links.Add(new Link { DisplayName = "Debug", Source = new Uri("Pages/Debug/DebugGraph.xaml", UriKind.Relative) });          
            MenuLinkGroups.Add(lg);
#endif
            this.CommandBindings.Add(new CommandBinding(LinkCommands.ShowMiniSpecialDialog, OnShowMiniSpecialDialog, OnCanShowMiniSpecialDialog));

        }
 public void LoadMenuItem(IComConMenuItem pItem)
 {
     LinkGroup lg = new LinkGroup();
     lg.GroupKey = pItem.GroupName;
     lg.DisplayName = pItem.DisplayName;
     foreach (IComConSubMenuItem sub in pItem.SubMenuItems)
     {
         lg.Links.Add(new Link() { DisplayName = sub.DisplayName, Source = sub.Source });
     }
     MenuGroups.Add(lg);
     RaisePropertyChanged("MenuGroups");
 }
Example #10
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.SignoutLink = ((FirstFloor.ModernUI.Presentation.Link)(target));
                return;

            case 2:
                this.home = ((FirstFloor.ModernUI.Presentation.LinkGroup)(target));
                return;

            case 3:
                this.cwaEngine = ((FirstFloor.ModernUI.Presentation.LinkGroup)(target));
                return;

            case 4:
                this.cwaEngine_SA = ((FirstFloor.ModernUI.Presentation.Link)(target));
                return;

            case 5:
                this.cwaEngine_Analyst = ((FirstFloor.ModernUI.Presentation.Link)(target));
                return;

            case 6:
                this.webEngine = ((FirstFloor.ModernUI.Presentation.LinkGroup)(target));
                return;

            case 7:
                this.webEngine_OfflineBrowser = ((FirstFloor.ModernUI.Presentation.Link)(target));
                return;

            case 8:
                this.messenger = ((FirstFloor.ModernUI.Presentation.LinkGroup)(target));
                return;

            case 9:
                this.messenger_Social = ((FirstFloor.ModernUI.Presentation.Link)(target));
                return;

            case 10:
                this.messenger_Chat = ((FirstFloor.ModernUI.Presentation.Link)(target));
                return;

            case 11:
                this.messenger_Friends = ((FirstFloor.ModernUI.Presentation.Link)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public ShellViewModel()
        {

            //LinkGroup g = new LinkGroup();
            //g.GroupName = "ComCon";
            //g.DisplayName = "ComCon";

            //MenuGroups.Add(g);

            LinkGroup lg = new LinkGroup();
            lg.GroupKey = "Einstellungen";
            lg.DisplayName = "Einstellungen";
            lg.Links.Add(new Link() { DisplayName = "einstellungen", Source = new Uri("/Pages/Settings", UriKind.RelativeOrAbsolute) });

            MenuGroups.Add(lg);

            TopMenuLinks.Add(new Link() { DisplayName = "einstellungen", Source = new Uri("/Pages/Settings", UriKind.RelativeOrAbsolute) });
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\MainWindow.xaml"
                ((City_Of_Orlando_Automated_Controller.MainWindow)(target)).PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.ModTab_PreviewMouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 2:
                this.Display = ((FirstFloor.ModernUI.Presentation.LinkGroup)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #13
0
        public MasterViewModel()
        {
            _menu = new LinkGroupCollection();
            String roleUser = LoginViewModel.GetUser().Role;
            LinkGroup groupPatient = new LinkGroup();
            LinkGroup groupUser = new LinkGroup();

            groupPatient.DisplayName = "Patients";
            groupUser.DisplayName = "Utilisateurs";

            groupPatient.Links.Add(new Link
            {
                DisplayName = "Consulter",
                Source = new Uri("/View/Pages/PatientList.xaml", UriKind.Relative),
            });
            groupUser.Links.Add(new Link
            {
                DisplayName = "Consulter",
                Source = new Uri("/View/Pages/UserList.xaml", UriKind.Relative),
            });

            if (!roleUser.Equals("Infirmier") && !roleUser.Equals("Infirmière"))
            {
                groupPatient.Links.Add(new Link
                {
                    DisplayName = "Ajouter",
                    Source = new Uri("/View/Pages/PatientAdd.xaml", UriKind.Relative),
                });
                groupUser.Links.Add(new Link
                {
                    DisplayName = "Ajouter",
                    Source = new Uri("/View/Pages/UserAdd.xaml", UriKind.Relative),
                });
            }

            _menu.Add(groupPatient);
            _menu.Add(groupUser);
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MainWindowInst = ((MochaEditor.MainWindow)(target));

            #line 9 "..\..\MainWindow.xaml"
                this.MainWindowInst.Closed += new System.EventHandler(this.Window_Closed);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                this.MainWindowInst.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                this.MainWindowInst.Initialized += new System.EventHandler(this.Window_Initialized);

            #line default
            #line hidden

            #line 9 "..\..\MainWindow.xaml"
                this.MainWindowInst.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.ModernWindow_KeyDown_1);

            #line default
            #line hidden
                return;

            case 2:
                this.MochaLinkGroup = ((FirstFloor.ModernUI.Presentation.LinkGroup)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #15
0
 /// <summary>
 /// Gets a non-null name for given group.
 /// </summary>
 /// <param name="group"></param>
 /// <returns></returns>
 private static string GetGroupName(LinkGroup group)
 {
     // use special key for GroupName <null>
     return group.GroupName ?? "<null>";
 }
Example #16
0
 private void AddSettingsGroup()
 {
     LinkGroup settingsGroup = new LinkGroup
     {
         DisplayName = "instellingen",
         GroupName = "Settings"
     };
     settingsGroup.Links.Add(CreateLink("software", "../Pages/Settings.xaml"));
     MenuLinkGroups.Add(settingsGroup);
 }
Example #17
0
 private void OnSelectedLinkGroupChanged(LinkGroup oldValue, LinkGroup newValue) {
     if (oldValue != null) {
         oldValue.PropertyChanged -= Group_PropertyChanged;
     }
     
     if (newValue != null) {
         newValue.PropertyChanged += Group_PropertyChanged;
         SelectedLink = newValue.SelectedLink;
     } else {
         SelectedLink = null;
     }
 }
 private void DisplayAdminWindow()
 {
     ModernWindow mw = Window.GetWindow(this) as ModernWindow;
     Uri u1 = new Uri("/AdminApproveMembersView.xaml", UriKind.Relative);
     mw.ContentSource = u1;
     mw.MenuLinkGroups.Clear();
     LinkGroup lg = new LinkGroup();
     Link l1 = new Link();
     l1.DisplayName = "Manage Members";
     l1.Source = u1;
     lg.Links.Add(l1);
     Uri u2 = new Uri("/AdminProjectSettingsView.xaml", UriKind.Relative);
     Link l2 = new Link();
     l2.DisplayName = "Manage Project Settings";
     l2.Source = u2;
     lg.Links.Add(l2);
     mw.MenuLinkGroups.Add(lg);
     Uri logoutUri = new Uri("/LoginView.xaml", UriKind.Relative);
     Link logoutLink = new Link();
     logoutLink.DisplayName = "Log out";
     logoutLink.Source = logoutUri;
     mw.TitleLinks.Add(logoutLink);
 }
Example #19
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.MainWindowInst = ((MochaEditor.MainWindow)(target));
     
     #line 9 "..\..\MainWindow.xaml"
     this.MainWindowInst.Closed += new System.EventHandler(this.Window_Closed);
     
     #line default
     #line hidden
     
     #line 9 "..\..\MainWindow.xaml"
     this.MainWindowInst.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     
     #line 9 "..\..\MainWindow.xaml"
     this.MainWindowInst.Initialized += new System.EventHandler(this.Window_Initialized);
     
     #line default
     #line hidden
     
     #line 9 "..\..\MainWindow.xaml"
     this.MainWindowInst.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.ModernWindow_KeyDown_1);
     
     #line default
     #line hidden
     return;
     case 2:
     this.MochaLinkGroup = ((FirstFloor.ModernUI.Presentation.LinkGroup)(target));
     return;
     }
     this._contentLoaded = true;
 }
        /// <summary>
        /// Adds the new links to the window.
        /// </summary>
        private void AddNewLinksToWindow()
        {
            ModernWindow mw = Window.GetWindow(this) as ModernWindow;
            mw.MenuLinkGroups.Clear();
            LinkGroup lg = new LinkGroup();
            Link l1 = new Link();
            l1.DisplayName = "All Test Cases";
            Uri u1 = new Uri("/Views/TestCasesInitialView.xaml", UriKind.Relative);
            l1.Source = u1;
            mw.ContentSource = u1;
            lg.Links.Add(l1);

            Link l3 = new Link();
            l3.DisplayName = "All Shared Steps";
            Uri u3 = new Uri("/Views/SharedStepsInitialView.xaml", UriKind.Relative);
            l3.Source = u3;
            lg.Links.Add(l3);

            Uri u2 = new Uri("/Views/TestCaseBatchDuplicateView.xaml#loadTestCases=true&loadSpecificTestCases=false", UriKind.Relative);
            Link l2 = new Link();
            l2.DisplayName = "Replace|Duplicate Test Cases";
            l2.Source = u2;
            lg.Links.Add(l2);

            Uri u4 = new Uri("/Views/TestCaseBatchDuplicateView.xaml#loadTestCases=false&loadSpecificTestCases=false", UriKind.Relative);
            Link l4 = new Link();
            l4.DisplayName = "Replace|Duplicate Shared Steps";
            l4.Source = u4;
            lg.Links.Add(l4);

            Uri u5 = new Uri("/Views/TestCasesMigrationView.xaml", UriKind.Relative);
            Link l5 = new Link();
            l5.DisplayName = "Migrate Test Cases";
            l5.Source = u5;
            lg.Links.Add(l5);

            mw.MenuLinkGroups.Add(lg);
        }
        /// <summary>
        /// Adds the new links to window.
        /// </summary>
        private void AddNewLinksToWindow()
        {
            ModernWindow mw = Window.GetWindow(this) as ModernWindow;
            mw.MenuLinkGroups.Clear();
            LinkGroup lg = new LinkGroup();

            Link l1 = new Link();
            l1.DisplayName = "Edit Playlists";
            Uri u1 = new Uri("/Views/YouTubePlaylistsEditView.xaml", UriKind.Relative);
            l1.Source = u1;
            mw.ContentSource = u1;
            lg.Links.Add(l1);

            Link l3 = new Link();
            l3.DisplayName = "YouTube Player";
            Uri u3 = new Uri("/Views/YouTubePlayerView.xaml", UriKind.Relative);
            l3.Source = u3;
            lg.Links.Add(l3);     
            mw.MenuLinkGroups.Add(lg);
        }