private void SetFirstData(string name) { Dispatcher.Invoke(delegate() { //TopProfileName.Text = name; //TopLeftElements.Visibility = Visibility.Visible; BrushConverter brushConverter = new BrushConverter(); //MainGrid.Background = (Brush)brushConverter.ConvertFrom("#FFF3F3F3"); //MainGrid.Background = new ImageBrush(new BitmapImage(new Uri(@"pack://application:,,,/Testlo;component/Images/WorkBG_1(ByNaptailMarshall).jpg"))); TopPanel.Background = (Brush)brushConverter.ConvertFrom("#33FFFFFF"); MainWinFrame.Margin = new Thickness(0, 60, 0, 0); NavigationWorker = new NavigationWorker(NavigationPanel, new FontFamily(new Uri("pack://application:,,,/"), "./Fonts/New/#Neris Thin")); TestingMenu testingMenu = (PageNavigator.NavigateTo(typeof(TestingMenu)) as TestingMenu); testingMenu.SetTestingMode += MainWindow_SetTestingMode; NavigationWorker.AddButton(new TransButton("Тестирование"), delegate() { PageNavigator.NavigateTo(typeof(TestingMenu)); }); NavigationWorker.AddButton(new TransButton("Профиль"), delegate() { PageNavigator.NavigateTo(typeof(ProfilePage)); }); NavigationWorker.AddButton(new TransButton("Управление"), delegate() { PageNavigator.NavigateTo(typeof(ControlPage)); }); NavigationWorker.AddButton(new TransButton("Настройки", false, false), delegate() { }); NavigationWorker.NavigateTo(0); }); }
private void Server_GetTagListResponse(List <TServer.Common.Content.Tag> obj) { Dispatcher.Invoke(delegate() { Server.GetTagListResponse -= Server_GetTagListResponse; TagComboBox.Items.Clear(); TagComboBox.Items.Add("Все"); foreach (TServer.Common.Content.Tag tag in obj) { TagComboBox.Items.Add(tag.Name); } TagComboBox.SelectedIndex = 0; NavigationWorker.NavigateTo(0); }); }
public TestsControlPage() { InitializeComponent(); NavigationWorker navigationWorker = new NavigationWorker(NavigationPanel); TransButton all = new TransButton("Доступные", false, false, false); all.FontSize = 16; navigationWorker.AddButton(all, delegate() { }); TransButton created = new TransButton("Созданные", false, false, false); created.FontSize = 16; navigationWorker.AddButton(created, delegate() { }); navigationWorker.NavigateTo(0); }
public ControlPage() { InitializeComponent(); PageNavigator = new PageNavigator(ControlPageFrame); NavigationWorker = new NavigationWorker(LeftControlMenu, new FontFamily(new Uri("pack://application:,,,/"), "./Fonts/New/#Neris Thin")); NavigationWorker.AddButton(new TransButtonWithIcon("Тесты", FaIcons.faPaste, false, false, false), delegate() { (PageNavigator.NavigateTo(typeof(Control.TestsControlPage)) as Control.TestsControlPage).CreateTestOnClick += ControlPage_CreateTestOnClick; }); NavigationWorker.AddButton(new TransButtonWithIcon("Доступ", FaIcons.faShield, false, false, false), delegate() { }); NavigationWorker.AddButton(new TransButtonWithIcon("Тэги", FaIcons.faTags, false, false, false), delegate() { }); NavigationWorker.AddButton(new TransButtonWithIcon("Пользователи", FaIcons.faUsers, false, false, false), delegate() { }); NavigationWorker.NavigateTo(0); }
public SelectEvaluationPage(CreateTestHandlerPage ownerPage) { InitializeComponent(); OwnerPage = ownerPage; this.Unloaded += SelectEvaluationPage_Unloaded; this.Loaded += SelectEvaluationPage_Loaded; PercentList.SizeChanged += PercentList_SizeChanged; PointsList.SizeChanged += PointsList_SizeChanged; MaxPointsInput.TextChanged += MaxPointsInput_TextChanged; NavigationWorker navigationWorker = new NavigationWorker(EvaluationSelect); EvaluationSelect percent = new EvaluationSelect("Проценты"); navigationWorker.AddButton(percent, SelectPercent); EvaluationSelect points = new EvaluationSelect("Баллы"); navigationWorker.AddButton(points, SelectPoints); navigationWorker.NavigateTo(0); OwnerPage.NextPageButton.IsEnabled = false; }
private void TestPage_CompliteOrClose(TestPage sender) { sender.CompletedOrClose -= TestPage_CompliteOrClose; TopPanel.Visibility = Visibility.Visible; NavigationWorker.NavigateTo(0); }
private void CreateTestHandlerPage_AbortOrComplite(CreateTestHandlerPage sender) { BeforeClosing(sender); LeftMenu.Visibility = Visibility.Visible; NavigationWorker.NavigateTo(0); }