Ejemplo n.º 1
0
        public void ShowAsWindow(eWindowShowStyle windowStyle = eWindowShowStyle.Dialog)
        {
            Button CopyToClipboradBtn = new Button();

            CopyToClipboradBtn.Content = "Copy to Clipboard";
            CopyToClipboradBtn.Click  += new RoutedEventHandler(CopyToClipboradBtn_Click);

            Button ViewLogBtn = new Button();

            ViewLogBtn.Content = "Open Full Log File";
            ViewLogBtn.Click  += new RoutedEventHandler(ViewLogBtn_Click);

            Button SendMailBtn = new Button();

            SendMailBtn.Content = "Send Details in Mail";
            SendMailBtn.Click  += new RoutedEventHandler(SendMailBtn_Click);

            Amdocs.Ginger.Common.ObservableList <Button> winButtons = new Amdocs.Ginger.Common.ObservableList <Button>();
            winButtons.Add(CopyToClipboradBtn);
            winButtons.Add(ViewLogBtn);
            winButtons.Add(SendMailBtn);

            this.Width  = 800;
            this.Height = 600;
            GingerCore.General.LoadGenericWindow(ref mPageGenericWin, App.MainWindow, windowStyle, "Log Details", this, winButtons);
        }
Ejemplo n.º 2
0
        public void ShowAsWindow()
        {
            Console.SetOut(this.mOutput);
            Console.SetError(this.mErrors);

            Button CopyToClipboradBtn = new Button();

            CopyToClipboradBtn.Content = "Copy to Clipboard";
            CopyToClipboradBtn.Click  += new RoutedEventHandler(CopyToClipboradBtn_Click);

            Button clearConsoleButton = new Button();

            clearConsoleButton.Content = "Clear";
            clearConsoleButton.Click  += new RoutedEventHandler(ClearButton_Click);

            Button onTopButton = new Button();

            onTopButton.Content = "Pin on Top";
            onTopButton.Click  += new RoutedEventHandler(OnTopButton_Click);

            Amdocs.Ginger.Common.ObservableList <Button> winButtons = new Amdocs.Ginger.Common.ObservableList <Button>();

            winButtons.Add(onTopButton);
            winButtons.Add(clearConsoleButton);
            winButtons.Add(CopyToClipboradBtn);

            this.Width  = 800;
            this.Height = 600;
            GingerCore.General.LoadGenericWindow(ref mConsoleWindow, App.MainWindow, eWindowShowStyle.Free, "Ginger - Smart Console", this, winButtons, closeEventHandler: CloseWindow);
        }
Ejemplo n.º 3
0
        public void InitPropertiesGrid(Amdocs.Ginger.Common.ObservableList <ActSoapUiInputValue> datasource, string gridTitle = "Input Values", string type = "Parameter Type", string paramTitle = "Parameter Name", string valueTitle = "Parameter Value", string valueForDriverTitle = "Calculated Parameter Value")
        {
            ProjectPropertiesGrid.VEGrid.Title = gridTitle;
            ProjectPropertiesGrid.VEGrid.SetTitleStyle((Style)TryFindResource("@ucGridTitleLightStyle"));
            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);

            view.GridColsView = new Amdocs.Ginger.Common.ObservableList <GridColView>();
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ActSoapUiInputValue.Type), Header = type, WidthWeight = 100
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ActInputValue.Param), Header = paramTitle, WidthWeight = 100
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ActInputValue.Value), Header = valueTitle, WidthWeight = 100
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = "...", WidthWeight = 30, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = (DataTemplate)ProjectPropertiesGrid.controlGrid.Resources["VEGridValueExpressionButton"]
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ActInputValue.ValueForDriver), Header = valueForDriverTitle, WidthWeight = 100
            });

            ProjectPropertiesGrid.VEGrid.SetAllColumnsDefaultView(view);
            ProjectPropertiesGrid.VEGrid.InitViewItems();
            ProjectPropertiesGrid.VEGrid.DataSourceList = datasource;

            ProjectPropertiesGrid.VEGrid.ShowRefresh    = Visibility.Collapsed;
            ProjectPropertiesGrid.VEGrid.ShowUpDown     = Visibility.Collapsed;
            ProjectPropertiesGrid.VEGrid.ShowEdit       = Visibility.Collapsed;
            ProjectPropertiesGrid.VEGrid.ShowAdd        = Visibility.Collapsed;
            ProjectPropertiesGrid.VEGrid.ShowDelete     = Visibility.Collapsed;
            ProjectPropertiesGrid.VEGrid.ShowClearAll   = Visibility.Collapsed;
            ProjectPropertiesGrid.VEGrid.ShowTagsFilter = Visibility.Collapsed;
        }
        public void StartDriver(Amdocs.Ginger.Common.ObservableList <DriverConfigParam> driverConfiguration = null)
        {
            //TODO: get return code - based on it set status if running OK
            NewPayLoad        PL            = new NewPayLoad("StartDriver"); //!!!! Rename to StartService + use const
            List <NewPayLoad> DriverConfigs = new List <NewPayLoad>();

            if (driverConfiguration != null)
            {
                foreach (DriverConfigParam DC in driverConfiguration)
                {
                    NewPayLoad FieldPL = new NewPayLoad("Config", DC.Parameter, DC.Value == null ? " " : DC.Value);

                    DriverConfigs.Add(FieldPL);
                }
            }
            PL.AddListPayLoad(DriverConfigs);
            PL.ClosePackage();
            NewPayLoad plss = SendRequestPayLoad(PL);

            if (plss.IsErrorPayLoad())
            {
                throw new Exception("Error in GingerNodeProxy.StartDriver - " + plss.GetValueString());
            }
        }