Ejemplo n.º 1
0
        private GuiWidget CreateSdCardManagerContainer()
        {
            GroupBox terminalControlsContainer;

            terminalControlsContainer = new GroupBox("SD Card Printing");

            terminalControlsContainer.Margin      = new BorderDouble(top: 10);
            terminalControlsContainer.TextColor   = ActiveTheme.Instance.PrimaryTextColor;
            terminalControlsContainer.BorderColor = ActiveTheme.Instance.PrimaryTextColor;
            terminalControlsContainer.HAnchor     = Agg.UI.HAnchor.ParentLeftRight;
            terminalControlsContainer.Height      = 68;

            {
                FlowLayoutWidget buttonBar = new FlowLayoutWidget();
                buttonBar.HAnchor |= HAnchor.ParentLeftRight;
                buttonBar.VAnchor |= Agg.UI.VAnchor.ParentCenter;
                buttonBar.Margin   = new BorderDouble(3, 0, 3, 6);
                buttonBar.Padding  = new BorderDouble(0);

                this.textImageButtonFactory.FixedHeight = TallButtonHeight;

                Button showSDPrintingPannel = textImageButtonFactory.Generate("SD CARD MANAGER");
                showSDPrintingPannel.Margin = new BorderDouble(left: 10);
                showSDPrintingPannel.Click += (sender, e) =>
                {
                    SDCardManager.Show();
                };
                buttonBar.AddChild(showSDPrintingPannel);

                terminalControlsContainer.AddChild(buttonBar);
            }

            return(terminalControlsContainer);
        }
Ejemplo n.º 2
0
 public static void Show()
 {
     if (sdCardWindowIsOpen == false)
     {
         connectionWindow         = new SDCardManager();
         sdCardWindowIsOpen       = true;
         connectionWindow.Closed += (parentSender, e) =>
         {
             sdCardWindowIsOpen = false;
             connectionWindow   = null;
         };
     }
     else
     {
         if (connectionWindow != null)
         {
             connectionWindow.BringToFront();
         }
     }
 }
Ejemplo n.º 3
0
 public static void Show()
 {
     if (sdCardWindowIsOpen == false)
     {
         connectionWindow = new SDCardManager();
         sdCardWindowIsOpen = true;
         connectionWindow.Closed += (parentSender, e) =>
         {
             sdCardWindowIsOpen = false;
             connectionWindow = null;
         };
     }
     else
     {
         if (connectionWindow != null)
         {
             connectionWindow.BringToFront();
         }
     }
 }