Ejemplo n.º 1
0
        internal bool FinalizeStartUpScreen()
        {
            if (false != startUpScreenFinalized)
            {
                return(true);              // Already done that.
            }
            startUpScreenFinalized = true; // Mark as being done.

            StartUpScreen startUpScreen = new StartUpScreen();

            startUpScreen.Name = "StartUpScreen";
            Grid.SetRow(startUpScreen, 3);
            Grid.SetRowSpan(startUpScreen, 4);
            Grid.SetZIndex(startUpScreen, 2000);
            TextEditorControl.Instance.grid.Children.Add(startUpScreen);
            TextEditorControl.Instance.StartUpButton.Visibility = Visibility.Collapsed;

            StartUpTabControl        = new CurvyTabControl();
            StartUpTabControl.Name   = "StartUpTabControl";
            StartUpTabControl.Height = 28;
            StartUpTabControl.Width  = 120;
            Grid.SetColumn(StartUpTabControl, 1);
            StartUpTabControl.HorizontalAlignment = HorizontalAlignment.Right;
            StartUpTabControl.VerticalAlignment   = VerticalAlignment.Bottom;

            Rectangle rectangle = new Rectangle();

            rectangle.Name = "StartUpRectangle";
            rectangle.VerticalAlignment   = VerticalAlignment.Bottom;
            rectangle.HorizontalAlignment = HorizontalAlignment.Stretch;
            rectangle.Height = 2;
            Brush curvtTabColour = new SolidColorBrush(Color.FromRgb(224, 224, 224));

            rectangle.Fill  = curvtTabColour;
            rectangle.Width = TextEditorControl.Instance.textCanvas.Width;
            Grid.SetColumn(rectangle, 0);
            Grid.SetColumnSpan(rectangle, 2);
            TextEditorControl.Instance.InnerGrid.Children.Add(rectangle);

            TextEditorControl.Instance.InnerGrid.Children.Add(StartUpTabControl);
            StartUpTabControl.ShowCloseButton = true;
            StartUpTabControl.InsertNewTab("StartUp", startUpScreen);
            StartUpTabControl.RegisterTabClosingCallback(StartUpTabClosingCallback);
            StartUpTabControl.TabChanged += new TabChangeHandler(OnTabControlTabChanged);
            StartUpTabControl.ActivateTab(0);

            return(true);
        }
Ejemplo n.º 2
0
        internal bool FinalizeStartUpScreen()
        {
            if (false != startUpScreenFinalized)
                return true; // Already done that.

            startUpScreenFinalized = true; // Mark as being done.

            StartUpScreen startUpScreen = new StartUpScreen();
            startUpScreen.Name = "StartUpScreen";
            Grid.SetRow(startUpScreen, 3);
            Grid.SetRowSpan(startUpScreen, 4);
            Grid.SetZIndex(startUpScreen, 2000);
            TextEditorControl.Instance.grid.Children.Add(startUpScreen);
            TextEditorControl.Instance.StartUpButton.Visibility = Visibility.Collapsed;

            StartUpTabControl = new CurvyTabControl();
            StartUpTabControl.Name = "StartUpTabControl";
            StartUpTabControl.Height = 28;
            StartUpTabControl.Width = 120;
            Grid.SetColumn(StartUpTabControl, 1);
            StartUpTabControl.HorizontalAlignment = HorizontalAlignment.Right;
            StartUpTabControl.VerticalAlignment = VerticalAlignment.Bottom;

            Rectangle rectangle = new Rectangle();
            rectangle.Name = "StartUpRectangle";
            rectangle.VerticalAlignment = VerticalAlignment.Bottom;
            rectangle.HorizontalAlignment = HorizontalAlignment.Stretch;
            rectangle.Height = 2;
            Brush curvtTabColour = new SolidColorBrush(Color.FromRgb(224, 224, 224));
            rectangle.Fill = curvtTabColour;
            rectangle.Width = TextEditorControl.Instance.textCanvas.Width;
            Grid.SetColumn(rectangle, 0);
            Grid.SetColumnSpan(rectangle, 2);
            TextEditorControl.Instance.InnerGrid.Children.Add(rectangle);

            TextEditorControl.Instance.InnerGrid.Children.Add(StartUpTabControl);
            StartUpTabControl.ShowCloseButton = true;
            StartUpTabControl.InsertNewTab("StartUp", startUpScreen);
            StartUpTabControl.RegisterTabClosingCallback(StartUpTabClosingCallback);
            StartUpTabControl.TabChanged += new TabChangeHandler(OnTabControlTabChanged);
            StartUpTabControl.ActivateTab(0);

            return true;
        }