public PageCredits()
        {
            InitializeComponent();

            StackPanel panelContent = new StackPanel();

            panelContent.Margin = new Thickness(10, 0, 10, 0);
            panelContent.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;


            Image imgCredits = new Image();

            imgCredits.Source = new BitmapImage(new Uri(AppSettings.getDataPath() + "\\graphics\\credits.png", UriKind.RelativeOrAbsolute));
            imgCredits.Height = GraphicsHelpers.GetContentHeight();
            RenderOptions.SetBitmapScalingMode(imgCredits, BitmapScalingMode.HighQuality);


            panelContent.Children.Add(imgCredits);

            //base.setTopMenu(new PageTopMenu());

            //base.hideNavigator();

            //base.hideBottomMenu();

            base.setContent(panelContent);

            base.setHeaderContent(Translator.GetInstance().GetString("PageCredits", "1000"));

            showPage(this);
        }
Esempio n. 2
0
        private void frameContent_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            Size s = ((Frame)sender).RenderSize;

            GraphicsHelpers.SetContentHeight(s.Height - 100);
            GraphicsHelpers.SetContentWidth(s.Width / 2);
        }
        public PageCalendar()
        {
            InitializeComponent();


            this.Uid   = "1000";
            this.Title = Translator.GetInstance().GetString("PageCalendar", this.Uid);

            StackPanel calendarPanel = new StackPanel();

            calendarPanel.Margin = new Thickness(10, 0, 10, 0);

            cbShowAll                     = new CheckBox();
            cbShowAll.Content             = Translator.GetInstance().GetString("PageCalendar", "200");
            cbShowAll.FlowDirection       = System.Windows.FlowDirection.RightToLeft;
            cbShowAll.Checked            += new RoutedEventHandler(cbShowAll_Checked);
            cbShowAll.Unchecked          += new RoutedEventHandler(cbShowAll_Unchecked);
            cbShowAll.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            cbShowAll.IsChecked           = false;

            calendarPanel.Children.Add(cbShowAll);

            ScrollViewer viewer = new ScrollViewer();

            viewer.MaxHeight = GraphicsHelpers.GetContentHeight() - 50;

            ucCalendar = new ucCalendar();

            viewer.Content = ucCalendar;

            calendarPanel.Children.Add(viewer);

            base.setContent(calendarPanel);

            base.setHeaderContent(this.Title);



            showPage(this);
        }
Esempio n. 4
0
        public PagePerformance()
        {
            InitializeComponent();

            StackPanel panelContent = new StackPanel();

            panelContent.Margin = new Thickness(10, 0, 10, 0);
            panelContent.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;

            ContentControl txtHeader = new ContentControl();

            txtHeader.ContentTemplate     = this.Resources["PerformanceHeader"] as DataTemplate;
            txtHeader.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;

            panelContent.Children.Add(txtHeader);

            ListBox lbCounters = new ListBox();

            lbCounters.ItemTemplate = this.Resources["PerformanceItem"] as DataTemplate;
            lbCounters.MaxHeight    = GraphicsHelpers.GetContentHeight() - 50;
            lbCounters.ItemContainerStyleSelector = new ListBoxItemStyleSelector();

            foreach (string pageCounter in PerformanceCounters.GetPages())
            {
                lbCounters.Items.Add(pageCounter);
            }



            panelContent.Children.Add(lbCounters);


            base.setContent(panelContent);

            base.setHeaderContent("Performance Counters");

            showPage(this);
        }
Esempio n. 5
0
        public PageNewsBox()
        {
            this.selectedNews = new List <News>();

            InitializeComponent();

            this.Uid   = "1000";
            this.Title = Translator.GetInstance().GetString("PageNewsBox", this.Uid);

            StackPanel newsPanel = new StackPanel();

            newsPanel.Margin = new Thickness(10, 0, 10, 0);

            StandardContentPanel panelContent = new StandardContentPanel();

            panelContent.setContentPage(newsPanel, StandardContentPanel.ContentLocation.Left);

            Panel panelSideMenu = new StackPanel();

            ccNews = new ContentControl();
            ccNews.ContentTemplate = this.Resources["NewsShowItem"] as DataTemplate;
            ccNews.Visibility      = System.Windows.Visibility.Collapsed;

            panelSideMenu.Children.Add(ccNews);

            panelContent.setContentPage(panelSideMenu, StandardContentPanel.ContentLocation.Right);

            ContentControl ccNewsHeader = new ContentControl();

            ccNewsHeader.ContentTemplate = this.Resources["NewsHeader"] as DataTemplate;
            newsPanel.Children.Add(ccNewsHeader);


            lbNews = new ListBox();
            lbNews.ItemContainerStyleSelector = new ListBoxItemStyleSelector();
            lbNews.ItemTemplate = this.Resources["NewsItem"] as DataTemplate;
            lbNews.MaxHeight    = GraphicsHelpers.GetContentHeight() - 100;

            newsPanel.Children.Add(lbNews);

            WrapPanel panelButtons = new WrapPanel();

            panelButtons.Margin = new Thickness(0, 5, 0, 0);

            Button btnRead = new Button();

            btnRead.SetResourceReference(Button.StyleProperty, "RoundedButton");
            btnRead.Click              += new RoutedEventHandler(btnRead_Click);
            btnRead.Height              = Double.NaN;
            btnRead.Width               = Double.NaN;
            btnRead.Uid                 = "201";
            btnRead.Content             = Translator.GetInstance().GetString("PageNewsBox", btnRead.Uid);
            btnRead.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            btnRead.SetResourceReference(Button.BackgroundProperty, "ButtonBrush");
            panelButtons.Children.Add(btnRead);

            Button btnDelete = new Button();

            btnDelete.SetResourceReference(Button.StyleProperty, "RoundedButton");
            btnDelete.Height  = Double.NaN;
            btnDelete.Width   = Double.NaN;
            btnDelete.Uid     = "202";
            btnDelete.Margin  = new Thickness(5, 0, 0, 0);
            btnDelete.Click  += new RoutedEventHandler(btnDelete_Click);
            btnDelete.Content = Translator.GetInstance().GetString("PageNewsBox", btnDelete.Uid);
            btnDelete.SetResourceReference(Button.BackgroundProperty, "ButtonBrush");
            panelButtons.Children.Add(btnDelete);

            Button btnDeleteAll = new Button();

            btnDeleteAll.SetResourceReference(Button.StyleProperty, "RoundedButton");
            btnDeleteAll.Height  = Double.NaN;
            btnDeleteAll.Width   = Double.NaN;
            btnDeleteAll.Uid     = "203";
            btnDeleteAll.Margin  = new Thickness(5, 0, 0, 0);
            btnDeleteAll.Content = Translator.GetInstance().GetString("PageNewsBox", btnDeleteAll.Uid);
            btnDeleteAll.SetResourceReference(Button.BackgroundProperty, "ButtonBrush");
            btnDeleteAll.Click += btnDeleteAll_Click;
            panelButtons.Children.Add(btnDeleteAll);

            newsPanel.Children.Add(panelButtons);



            base.setContent(panelContent);

            base.setHeaderContent(this.Title);



            showPage(this);

            showNews(true);
        }