예제 #1
0
파일: Graph.cs 프로젝트: bungaca/abstools
    public void GraphSearch( WorkSpace w )
    {
        // Step 1: initialize visited member of all nodes
        Iterator<Vertex> vxiter = GetVertices( );
        if ( vxiter.hasNext( ) == false )
        {
            return; // if there are no vertices return
        }

        // Initializing the vertices
        while( vxiter.hasNext( ) )
        {
            Vertex v = vxiter.next( );
            v.init_vertex( w );
        }

        // Step 2: traverse neighbors of each node
        for( vxiter = GetVertices( ); vxiter.hasNext( ); )
        {
            Vertex v = vxiter.next( );
            if ( !v.visited )
            {
                w.nextRegionAction( v );
                v.nodeSearch( w );
            }
        }
    }
예제 #2
0
파일: Vertex.cs 프로젝트: bungaca/abstools
    public void nodeSearch( WorkSpace w )
    {
        Vertex v;

        // Step 1: Do preVisitAction.
        //            If we've already visited this node return
        w.preVisitAction( ( Vertex ) this );

        if ( visited )
            return;

        // Step 2: else remember that we've visited and
        //         visit all neighbors
        visited = true;

        for ( Iterator<Vertex>  vxiter = GetNeighbors(); vxiter.hasNext(); )
        {
            v = vxiter.next( );
            w.checkNeighborAction( ( Vertex ) this, v );
            v.nodeSearch( w );
        }

        // Step 3: do postVisitAction now
        w.postVisitAction( ( Vertex ) this );
    }
 public SearchResultQueryDataTable SearchForQueries(WorkSpace WorkSpace, string SearchPatternUserGroup, string SearchPatternQueryName, string SearchPatternFunctionAreaName)
 {
     SearchResultQueryDataTable table = new SearchResultQueryDataTable();
     IRfcFunction function = this._des.Repository.CreateFunction("RSAQ_REMOTE_QUERY_CATALOG");
     function["WORKSPACE"].SetValue( (WorkSpace == WorkSpace.GlobalArea) ? "X" : " ");
     if (SearchPatternQueryName.Trim().Equals(""))
     {
         SearchPatternQueryName = "*";
     }
     if (SearchPatternUserGroup.Trim().Equals(""))
     {
         SearchPatternUserGroup = "*";
     }
     if (SearchPatternFunctionAreaName.Trim().Equals(""))
     {
         SearchPatternFunctionAreaName = "*";
     }
     function["GENERIC_QUERYNAME"].SetValue(SearchPatternQueryName);
     function["GENERIC_USERGROUP"].SetValue(SearchPatternUserGroup);
     function["GENERIC_FUNCAREA"].SetValue(SearchPatternFunctionAreaName);
     function.Invoke(_des);
     IRfcTable table2 = function.GetTable("QUERYCATALOG");
     foreach (IRfcStructure structure in table2.ToList())
     {
         table.AddSearchResultQueryRow(structure["QUERY"].GetValue().ToString().Trim(), structure["NUM"].GetValue().ToString().Trim(), structure["QTEXT"].GetValue().ToString().Trim());
     }
     return table;
 }
 public SearchResultUserGroupsDataTable SearchForUserGroups(WorkSpace WorkSpace, string UserGroupSearchPattern)
 {
     SearchResultUserGroupsDataTable table = new SearchResultUserGroupsDataTable();
     IRfcFunction function = this._des.Repository.CreateFunction("RSAQ_REMOTE_USERGROUP_CATALOG");
     function["WORKSPACE"].SetValue((WorkSpace == WorkSpace.GlobalArea) ? "X" : " ");
     function["GENERIC_USERGROUP"].SetValue(UserGroupSearchPattern);
     function.Invoke(_des);
     IRfcTable table2 = function.GetTable("USERGROUPCATALOG");
     foreach (IRfcStructure structure in table2.ToList())
     {
         string userGroup = structure["NUM"].GetValue().ToString().Trim();
         string descriptionText = structure["UTEXT"].GetValue().ToString().Trim();
         table.AddSearchResultUserGroupsRow(userGroup, descriptionText);
     }
     return table;
 }
 private void btnSearchUserGroup_Click(object sender, EventArgs e)
 {
     area = checkStandard.Checked == true ? WorkSpace.StandardArea : WorkSpace.GlobalArea;
     systemName = this.cbxSystemList.Text.Trim();
     QueryHelper helper = new QueryHelper(systemName);
     string searchString = cbxUserGroup.Text;
     if (string.IsNullOrEmpty(searchString))
     {
         searchString = "*";
     }
     SearchResultUserGroupsDataTable dt = helper.SearchForUserGroups(area, searchString);
     cbxUserGroup.DataSource = null;
     cbxUserGroup.DataSource = dt;
     cbxUserGroup.DisplayMember = "UserGroup";
     this.dgvSearchResult.DataSource = null;
     this.dgvSearchResult.DataSource = dt;
 }
예제 #6
0
파일: Vertex.cs 프로젝트: bungaca/abstools
    public void nodeSearch( WorkSpace w )
    {
        int     s, c;
        Vertex  v;
        Vertex  header;

        // Step 1: if preVisitAction is true or if we've already
        //         visited this node
        w.preVisitAction( ( Vertex ) this );

        if ( visited )
        {
            return;
        }

        // Step 2: Mark as visited, put the unvisited neighbors in the queue
        //     and make the recursive call on the first element of the queue
        //     if there is such if not you are done
        visited = true;

        // Step 3: do postVisitAction now, you are no longer going through the
        // node again, mark it as black
        w.postVisitAction( ( Vertex ) this );

        // enqueues the vertices not visited
        for ( Iterator<Vertex> vxiter = GetNeighbors( ); vxiter.hasNext( ); )
        {
            v = vxiter.next( );

            // if your neighbor has not been visited then enqueue
            if ( !v.visited )
            {
                GlobalVarsWrapper.Queue.Add( v );
            }

        } // end of for

        // while there is something in the queue
        while( GlobalVarsWrapper.Queue.Count!= 0 )
        {
            header = ( Vertex ) GlobalVarsWrapper.Queue[0];
            GlobalVarsWrapper.Queue.RemoveAt( 0 );
            header.nodeSearch( w );
        }
    }
예제 #7
0
파일: Program.cs 프로젝트: murrrkle/TILS
        private static async Task <QLabClient> SetupQLab()
        {
            if (IS_TESTING_DEVICE)
            {
                return(null);
            }
            Console.Clear();
            Console.WriteLine("Connect to QLab");
            Console.WriteLine("Provide Ip Address");
            QLabClient client;

            while (true)
            {
                string ipAddress = Console.ReadLine();
                try
                {
                    client = new QLabClient(ipAddress);
                    client.Connect();
                    break;
                }
                catch
                {
                    Console.WriteLine("Could not connect to QLab please enter another Ip Address");
                }
            }
            // Now select a work space.
            List <WorkSpace> workspaces;

            while ((workspaces = (await client.GetWorkSpaces())?.data) == null)
            {
            }
            if (workspaces.Count == 0)
            {
                Console.WriteLine("No workspaces on QLab to choose from, closing program in 5 seconds...");
                await Task.Delay(5000);

                Environment.Exit(-1);
            }
            int count = 0;

            foreach (WorkSpace workspace in workspaces)
            {
                Console.WriteLine("[" + count + "] " + workspace.displayName);
                count++;
            }

            //Now choose a workspace
            Console.WriteLine("Choose the workspace you want to connect to");
            while (true)
            {
                int number;
                if (int.TryParse(Console.ReadLine(), out number))
                {
                    try
                    {
                        _workspace = workspaces[number];
                        Console.WriteLine("Connected to Workspace: " + _workspace.displayName);
                        break;
                    }
                    catch
                    {
                        Console.WriteLine("Invalid workspace secified, please try again");
                    }
                }
            }
            connectedToQLab = true;
            return(client);
        }
예제 #8
0
 public void GraphSearch( WorkSpace w )
 {
     Iterator<Vertex> vxiter = GetVertices( ); if ( vxiter.hasNext( ) == false ) { return; } while( vxiter.hasNext( ) ) { Vertex v = vxiter.next( ); v.init_vertex( w ); } for( vxiter = GetVertices( ); vxiter.hasNext( ); ) { Vertex v = vxiter.next( ); if ( !v.visited ) { w.nextRegionAction( v ); v.nodeSearch( w ); } }
 }
예제 #9
0
        private static void InitWorkSpace(bool startLocalGrid)
        {
            GingerConsoleWorkSpace ws = new GingerConsoleWorkSpace();

            WorkSpace.Init(ws, startLocalGrid);
        }
예제 #10
0
 public void TestInitialize()
 {
     WorkSpace.LockWS();
 }
예제 #11
0
        /// <summary>
        /// 当前图片的位置
        /// </summary>
        /// <param name="pictureMinRow"></param>
        /// <param name="pictureMaxRow"></param>
        /// <param name="pictureMinCol"></param>
        /// <param name="pictureMaxCol"></param>
        /// <param name="workSpace"></param>
        /// <returns></returns>
        private static bool IsInternalOrIntersect(
            int pictureMinRow, int pictureMaxRow, int pictureMinCol, int pictureMaxCol, WorkSpace workSpace)
        {
            int _rangeMinRow = workSpace.MinRow ?? pictureMinRow;
            int _rangeMaxRow = workSpace.MaxRow ?? pictureMaxRow;
            int _rangeMinCol = workSpace.MinRow ?? pictureMinCol;
            int _rangeMaxCol = workSpace.MaxCol ?? pictureMaxCol;

            if (workSpace.OnlyInternal)
            {
                return(_rangeMinRow <= pictureMinRow && _rangeMaxRow >= pictureMaxRow &&
                       _rangeMinCol <= pictureMinCol && _rangeMaxCol >= pictureMaxCol);
            }
            else
            {
                return((Math.Abs(_rangeMaxRow - _rangeMinRow) + Math.Abs(pictureMaxRow - pictureMinRow) >= Math.Abs(_rangeMaxRow + _rangeMinRow - pictureMaxRow - pictureMinRow)) &&
                       (Math.Abs(_rangeMaxCol - _rangeMinCol) + Math.Abs(pictureMaxCol - pictureMinCol) >= Math.Abs(_rangeMaxCol + _rangeMinCol - pictureMaxCol - pictureMinCol)));
            }
        }
예제 #12
0
 public void FireAnEmployee(WorkSpace obj)
 {
     workers--;
     objPool.ReturnEquipmentToWarehouse(obj);
 }
예제 #13
0
 /// <summary>
 /// 往工作区集合中添加元素
 /// </summary>
 /// <param name="workSpace"></param>
 private void AddWorkSpaceListItem(WorkSpace workSpace)
 {
     WorkSpaceList.Add(workSpace);
 }
예제 #14
0
 public static void ClassInitialize(TestContext TC)
 {
     RepositoryItemHelper.RepositoryItemFactory = new RepositoryItemFactory();
     WorkSpace.Init(new WorkSpaceEventHandler());
 }
예제 #15
0
 private void Move_WorkSpace_Carret_To_End()
 {
     WorkSpace.CaretIndex = WorkSpace.Text.Length;
     WorkSpace.Focus();
 }
예제 #16
0
 /// <summary>
 /// Clears whole text in workspace.
 /// </summary>
 private void Clear_WorkSpace()
 {
     WorkSpace.Clear();
     WorkSpace.CaretIndex = 0;
     WorkSpace.Focus();
 }
예제 #17
0
        public static void InitApp()
        {
            // Add event handler for handling non-UI thread exceptions.
            AppDomain currentDomain = AppDomain.CurrentDomain;

            currentDomain.UnhandledException += new UnhandledExceptionEventHandler(StandAloneThreadExceptionHandler);

            Reporter.WorkSpaceReporter = new GingerWorkSpaceReporter();

            WorkSpaceEventHandler WSEH = new WorkSpaceEventHandler();

            WorkSpace.Init(WSEH);

            string phase = string.Empty;

            RepositoryItemHelper.RepositoryItemFactory = new RepositoryItemFactory();

            WorkSpace.Instance.BetaFeatures = BetaFeatures.LoadUserPref();
            WorkSpace.Instance.BetaFeatures.PropertyChanged += BetaFeatureChanged;

            if (WorkSpace.Instance.BetaFeatures.ShowDebugConsole)
            {
                DebugConsoleWindow debugConsole = new DebugConsoleWindow();
                debugConsole.ShowAsWindow();
                WorkSpace.Instance.BetaFeatures.DisplayStatus();
            }

            Reporter.ToLog(eLogLevel.INFO, "######################## Application version " + App.AppVersion + " Started ! ########################");

            SetLoadingInfo("Init Application");
            WorkSpace.AppVersion = App.AppShortVersion;
            // We init the classes dictionary for the Repository Serializer only once
            InitClassTypesDictionary();

            // TODO: need to add a switch what we get from old ginger based on magic key

            phase = "Loading User Profile";
            Reporter.ToLog(eLogLevel.DEBUG, phase);
            SetLoadingInfo(phase);
            WorkSpace.Instance.UserProfile = UserProfile.LoadUserProfile();

            phase = "Configuring User Type";
            Reporter.ToLog(eLogLevel.DEBUG, phase);
            SetLoadingInfo(phase);
            WorkSpace.Instance.UserProfile.LoadUserTypeHelper();


            phase = "Loading User Selected Resource Dictionaries";
            Reporter.ToLog(eLogLevel.DEBUG, phase);
            SetLoadingInfo(phase);
            if (WorkSpace.Instance.UserProfile != null)
            {
                LoadApplicationDictionaries(Amdocs.Ginger.Core.eSkinDicsType.Default, WorkSpace.Instance.UserProfile.TerminologyDictionaryType);
            }
            else
            {
                LoadApplicationDictionaries(Amdocs.Ginger.Core.eSkinDicsType.Default, GingerCore.eTerminologyType.Default);
            }

            Reporter.ToLog(eLogLevel.DEBUG, "Loading user messages pool");
            UserMsgsPool.LoadUserMsgsPool();
            StatusMsgsPool.LoadStatusMsgsPool();

            Reporter.ToLog(eLogLevel.DEBUG, "Init the Centralized Auto Log");
            AutoLogProxy.Init(App.AppVersion);

            Reporter.ToLog(eLogLevel.DEBUG, "Initializing the Source control");
            SetLoadingInfo(phase);

            phase = "Loading the Main Window";
            Reporter.ToLog(eLogLevel.DEBUG, phase);
            SetLoadingInfo(phase);


            AutoLogProxy.LogAppOpened();


            // Register our own Ginger tool tip handler
            //--Canceling customize tooltip for now due to many issues and no real added value

            phase = "Application was loaded and ready";
            Reporter.ToLog(eLogLevel.INFO, phase);
            mIsReady = true;
        }
예제 #18
0
 private void OKButton_Click(object sender, EventArgs e)
 {
     //Добавление пресета
     if (WSComboBox.SelectedIndex == -1)
     {
         return;
     }
     if (nameTextBox.Text == string.Empty)
     {
         return;
     }
     if (pathTextBox.Text == string.Empty)
     {
         return;
     }
     if (UniquePresetName())
     {
         SharedData.WorkSpaces[WSComboBox.SelectedIndex].Presets.Add(new Preset(int.Parse(IDLabel.Text), nameTextBox.Text, commTextBox.Text.Replace("\r\n", " ")));
         SharedData.WorkSpaces[WSComboBox.SelectedIndex].Presets[SharedData.WorkSpaces[WSComboBox.SelectedIndex].Presets.Count - 1].Settings = WorkSpace.LoadPresetSettings(pathTextBox.Text);
         SharedData.WorkSpaces[WSComboBox.SelectedIndex].Save();
         Close();
     }
 }
예제 #19
0
 public ActionResult AllNotes(WorkSpace workspace)
 {
     _selectedWorkSpace = workspace;
     return(View());
 }
예제 #20
0
        private void Create()
        {
            switch (this.Element)
            {
            case DataElementType.WorkSpaces:
            {
                WorkSpace workSpace = new WorkSpace
                {
                    Name = nameTextBox.Text,
                    ID   = Core.Core.Instanse.Data.Items.NextID()
                };

                Core.Core.Instanse.Data.Items.Add(workSpace);
                break;
            }

            case DataElementType.Text:
            {
                if (this.CanCreateItem)
                {
                    int index = this.WorkSpaceIndex;

                    if (index != -1)
                    {
                        Core.Core.Instanse.Data[index].Text.Add(new Text()
                            {
                                ID   = Core.Core.Instanse.Data[index].Text.NextID(),
                                Name = nameTextBox.Text
                            });
                    }
                }

                break;
            }

            case DataElementType.Images:
            {
                if (this.CanCreateItem)
                {
                    int index = this.WorkSpaceIndex;

                    if (index != -1)
                    {
                        Core.Core.Instanse.Data[index].Images.Add(new Image()
                            {
                                ID    = Core.Core.Instanse.Data[index].Images.NextID(),
                                Name  = nameTextBox.Text,
                                Items = new List <IFile>()
                            });
                    }
                }

                break;
            }

            case DataElementType.Keywords:
            {
                if (this.CanCreateItem)
                {
                    int index = this.WorkSpaceIndex;

                    if (index != -1)
                    {
                        Core.Core.Instanse.Data[index].Keywords.Add(new KeyWord()
                            {
                                ID   = Core.Core.Instanse.Data[index].Keywords.NextID(),
                                Name = nameTextBox.Text
                            });
                    }
                }

                break;
            }

            case DataElementType.Templates:
            {
                if (this.CanCreateItem)
                {
                    int index = this.WorkSpaceIndex;

                    if (index != -1)
                    {
                        Core.Core.Instanse.Data[index].Templates.Add(new Template()
                            {
                                ID       = Core.Core.Instanse.Data[index].Keywords.NextID(),
                                Name     = nameTextBox.Text,
                                Encoding = this.Encoding ?? Encoding.Default
                            });
                    }
                }

                break;
            }
            }
        }
예제 #21
0
        internal static void InitConsoleWorkspace()
        {
            ConsoleWorkspaceEventHandler consoleWorkspaceEventHandler = new ConsoleWorkspaceEventHandler();

            WorkSpace.Init(consoleWorkspaceEventHandler);
        }
 public void TestInitialize()
 {
     WorkSpace.Init(new WorkSpaceEventHandler());
     WorkSpace.Instance.SolutionRepository = GingerSolutionRepository.CreateGingerSolutionRepository();
 }
예제 #23
0
        public void LoadConf(XmlNode root)
        {
            XmlNode xn = null;

            try
            {
                // 读取显示属性

                log.WriteFileLog("读取产品信息");

                type       = root.Attributes["type"].InnerText;
                product_id = root.Attributes["product_id"].InnerText;
                enable     = bool.Parse(root.Attributes["enable"].InnerText);
                name       = root.Attributes["name"].InnerText;
                funclist   = root.Attributes["funclist"].InnerText;

                // 读取节点配置明细
                log.WriteFileLog("读取配置库信息");
                xn         = root.SelectSingleNode("Repository");
                Repository = xn.Attributes["repo"].InnerText;
                WorkSpace  = xn.Attributes["workspace"].InnerText;
                // OutDir 如果以 \ 结尾,会导致编译前台Drp时,批处理里会出现 "C:\src\", \"会被认为是转义,就报错了,
                // 这里如果,结尾是\,去掉
                if (WorkSpace[WorkSpace.Length - 1] == '\\')
                {
                    WorkSpace = WorkSpace.Substring(0, WorkSpace.Length - 1);
                }
                SvnRepo           = new SvnPort(name, Repository);
                SvnRepo.Workspace = WorkSpace;

                // 读取修改单配置明细
                log.WriteFileLog("读取开发工具信息");
                xn      = root.SelectSingleNode("Develop");
                DevTool = xn.Attributes["devtool"].InnerText;
                Rar     = xn.Attributes["rar"].InnerText;
                OutDir  = xn.Attributes["outdir"].InnerText;
                // OutDir 如果以 \ 结尾,会导致编译前台Drp时,批处理里会出现 "C:\src\", \"会被认为是转义,就报错了,
                // 这里如果,结尾是\,去掉
                if (OutDir[OutDir.Length - 1] == '\\')
                {
                    OutDir = OutDir.Substring(0, OutDir.Length - 1);
                }

                // 读取Ssh连接配置
                log.WriteFileLog("读取Ssh连接配置");
                xn   = root.SelectSingleNode("SSHConn");
                Conn = new ReSSH(xn.Attributes["name"].InnerText,
                                 xn.Attributes["host"].InnerText,
                                 int.Parse(xn.Attributes["port"].InnerText),
                                 xn.Attributes["user"].InnerText,
                                 xn.Attributes["pass"].InnerText,
                                 bool.Parse(xn.Attributes["restartas"].InnerText));
                Conn.localdir = OutDir;

                // 读取小球FTP路径递交配置
                log.WriteFileLog("读取小球FTP路径递交配置");
                xn           = root.SelectSingleNode("CommitFtp");
                fc           = new FtpConf();
                fc.host      = xn.Attributes["host"].InnerText;
                fc.port      = int.Parse(xn.Attributes["port"].InnerText);
                fc.user      = xn.Attributes["user"].InnerText;
                fc.pass      = xn.Attributes["pass"].InnerText;
                fc.ServerDir = xn.Attributes["remotedir"].Value;
                fc.LocalDir  = xn.Attributes["localdir"].Value;
                if (fc.LocalDir[fc.LocalDir.Length - 1] == '\\')
                {
                    fc.LocalDir = fc.LocalDir.Substring(0, fc.LocalDir.Length - 1);
                }

                // 初始化 ftp配置
                ftp = new FTPConnection();
                ftp.ServerAddress   = fc.host;
                ftp.ServerPort      = fc.port;
                ftp.UserName        = fc.user;
                ftp.Password        = fc.pass;
                ftp.TransferType    = FTPTransferType.BINARY;         // 指定 BINARY 传输,否则对于压缩包会失败
                ftp.CommandEncoding = Encoding.GetEncoding("gb2312"); // 重要,否则乱码且连接不

                log.WriteFileLog("读取对比参数");
                xn         = root.SelectSingleNode("Diff");
                DiffEnable = bool.Parse(xn.Attributes["enable"].Value);
                DiffBin    = xn.Attributes["bin"].Value;
                DiffArgs   = xn.Attributes["args"].Value;

                log.WriteFileLog("读取Delphi编译版本配置");
                xn      = root.SelectSingleNode("SpecialCom");
                SpeComs = new ArrayList();
                XmlNodeList xnl = xn.ChildNodes;
                foreach (XmlNode x in xnl)
                {
                    if (x.NodeType == XmlNodeType.Comment)
                    {
                        continue;
                    }
                    ComInfo com = new ComInfo(x.Attributes["lang"].Value,
                                              int.Parse(x.Attributes["ver"].Value),
                                              x.Attributes["coms"].Value);
                    SpeComs.Add(com);
                }

                // 读取数据库连接属性
                xn  = root.SelectSingleNode("DB");
                xnl = xn.ChildNodes;
                foreach (XmlNode x in xnl)
                {
                    DBUser u = new DBUser(x.Attributes["name"].InnerText,
                                          x.Attributes["pass"].InnerText,
                                          x.Attributes["dbtns"].InnerText,
                                          x.Attributes["note"].InnerText);
                    Users.Add(u);
                }


                // 读取公用递交配置
                try
                {
                    xn         = root.SelectSingleNode("CommitPublic");
                    logmessage = xn.Attributes["logmessage"].Value;
                    xnl        = xn.ChildNodes;
                    foreach (XmlNode x in xnl)
                    {
                        CommitPublic.Add(x.Attributes["dir"].InnerText);
                    }
                }
                catch
                {
                    log.WriteLog("无法读取公共递交资源CommitPublic!,请检查MAConf.xml配置");
                }
            }
            catch (Exception e)
            {
                log.WriteLog("加载配置失败,活动节点:" + xn.Name + e.Message, LogLevel.Error);
                throw new MissingFieldException("LoadConf");
            }
        }
예제 #24
0
        /// <summary>
        /// 获取所有的图片信息
        /// </summary>
        /// <param name="sheet"></param>
        /// <param name="workSpace"></param>
        /// <returns></returns>
        private static List <ColumnFile> GetAllPictureInfos(XSSFSheet sheet, WorkSpace workSpace)
        {
            List <ColumnFile> fileInfoList = new List <ColumnFile>();

            var documentPartList = sheet.GetRelations();

            foreach (var documentPart in documentPartList)
            {
                if (documentPart is XSSFDrawing)
                {
                    var drawing   = (XSSFDrawing)documentPart;
                    var shapeList = drawing.GetShapes();
                    foreach (var shape in shapeList)
                    {
                        if (shape is XSSFPicture)
                        {
                            var picture = (XSSFPicture)shape;
                            var anchor  = picture.GetAnchor();
                            //var anchor = picture.GetPreferredSize();

                            int row1 = (int)anchor.GetType().GetProperty("Row1").GetValue(anchor);
                            int row2;
                            int col1 = (int)anchor.GetType().GetProperty("Col1").GetValue(anchor);
                            int col2;
                            try
                            {
                                row2 = (int)anchor.GetType().GetProperty("Row2").GetValue(anchor);
                                col2 = (int)anchor.GetType().GetProperty("Col2").GetValue(anchor);
                            }
                            catch
                            {
                                row2 = row1; //给默认值
                                col2 = col1; //给默认值
                            }

                            if (IsInternalOrIntersect(row1, row2, col1, col2, workSpace))
                            {
                                ColumnFile entity = new ColumnFile()
                                {
                                    //图片所在开始行
                                    MinRow = row1,
                                    //图片所在结束行
                                    MaxRow = row2,
                                    // 图片所在开始列
                                    MinCol = col1,
                                    //图片所在结束列
                                    MaxCol = col2,
                                    //图片数据
                                    FileBytes = picture.PictureData.Data,
                                    //文件名称
                                    //FileName = picture.FileName,
                                    //响应类型
                                    MimeType = picture.PictureData.MimeType,
                                    //扩展名称
                                    ExtensionName = picture.PictureData.SuggestFileExtension(),
                                    //图片索引
                                    //FileIndex = picture.PictureIndex
                                };
                                fileInfoList.Add(entity);
                            }
                        }
                    }
                }
            }

            return(fileInfoList);
        }
예제 #25
0
 public void InitTestForFile()
 {
     workSpace = new WorkSpace();
 }
예제 #26
0
        public static void ClassInit(TestContext context)
        {
            WorkSpaceEventHandler WSEH = new WorkSpaceEventHandler();

            WorkSpace.Init(WSEH);


            // launch PB Test App
            if (proc == null || proc.HasExited)
            {
                proc = new System.Diagnostics.Process();
                proc.StartInfo.FileName         = @"pb_test_app.exe";
                proc.StartInfo.WorkingDirectory = TestResources.GetTestResourcesFolder("PBTestApp");
                Console.WriteLine(proc.StartInfo.WorkingDirectory);
                Console.WriteLine(proc.StartInfo.FileName);
                proc.Start();

                GingerCore.General.DoEvents();
                GingerCore.General.DoEvents();
            }

            mGR = new GingerRunner();
            mGR.CurrentSolution = new Ginger.SolutionGeneral.Solution();
            mBF            = new BusinessFlow();
            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "BF Test PB Driver";
            Platform p = new Platform();

            p.PlatformType = ePlatformType.PowerBuilder;
            mBF.TargetApplications.Add(new TargetApplication()
            {
                AppName = "PBTestAPP"
            });
            Activity activity = new Activity();

            activity.TargetApplication = "PBTestApp";
            mBF.Activities.Add(activity);
            mBF.CurrentActivity = activity;

            mDriver = new PBDriver(mBF);
            mDriver.StartDriver();
            Agent a = new Agent();

            a.Active     = true;
            a.Driver     = mDriver;
            a.DriverType = Agent.eDriverType.PowerBuilder;

            mGR.SolutionAgents = new ObservableList <Agent>();
            mGR.SolutionAgents.Add(a);

            ApplicationAgent AA = new ApplicationAgent();

            AA.AppName = "PBTestApp";
            AA.Agent   = a;
            mGR.ApplicationAgents.Add(AA);
            mGR.CurrentBusinessFlow = mBF;
            mGR.SetCurrentActivityAgent();
            // Do Switch Window, to be ready for actions
            ActSwitchWindow c = new ActSwitchWindow();

            c.LocateBy = eLocateBy.ByTitle;
            c.LocateValueCalculated = "Simple Page";
            c.WaitTime = 10;
            mDriver.RunAction(c);
            //if(c.Status.Value==eRunStatus.Failed)
            //{
            //     c = new ActSwitchWindow();
            //    c.LocateBy = eLocateBy.ByTitle;
            //    c.LocateValueCalculated = "Simple Page";
            //    c.WaitTime = 10;
            //    mDriver.RunAction(c);

            //}

            ActPBControl action = new ActPBControl();

            action.LocateBy           = eLocateBy.ByXPath;
            action.ControlAction      = ActPBControl.eControlAction.SetValue;
            action.AddNewReturnParams = true;
            action.Wait = 4;
            action.LocateValueCalculated = "/[AutomationId:1001]";
            action.Value  = proc.StartInfo.WorkingDirectory = TestResources.GetTestResourcesFolder("PBTestApp") + @"\Browser.html";
            action.Active = true;

            mBF.CurrentActivity.Acts.Add(action);
            mBF.CurrentActivity.Acts.CurrentItem = action;
            //Act
            mGR.RunAction(action, false);

            action                       = new ActPBControl();
            action.LocateBy              = eLocateBy.ByName;
            action.ControlAction         = ActPBControl.eControlAction.SetValue;
            action.LocateValueCalculated = "Launch Widget Window";
            action.Active                = true;

            mBF.CurrentActivity.Acts.Add(action);
            mBF.CurrentActivity.Acts.CurrentItem = action;
            //Act
            mGR.RunAction(action, false);

            c          = new ActSwitchWindow();
            c.LocateBy = eLocateBy.ByTitle;
            c.LocateValueCalculated = "CSM Widgets Test Applicaiton";
            c.WaitTime = 10;
            mDriver.RunAction(c);



            string actual = "";

            do
            {
                action                       = new ActPBControl();
                action.LocateBy              = eLocateBy.ByName;
                action.ControlAction         = ActPBControl.eControlAction.IsExist;
                action.LocateValueCalculated = "Script Error";
                action.AddNewReturnParams    = true;
                action.Timeout               = 10;
                action.Active                = true;

                mBF.CurrentActivity.Acts.Add(action);
                mBF.CurrentActivity.Acts.CurrentItem = action;
                //Act
                mGR.RunAction(action, false);

                Assert.AreEqual(action.Status, eRunStatus.Passed, "Action Status");
                actual = action.GetReturnParam("Actual");
                if (actual.Equals("True"))
                {
                    ActPBControl PbAct = new ActPBControl();
                    PbAct.LocateBy              = eLocateBy.ByXPath;
                    PbAct.ControlAction         = ActPBControl.eControlAction.Click;
                    PbAct.LocateValueCalculated = @"/Script Error/[LocalizedControlType:title bar]/Close";
                    PbAct.Active = true;
                    mBF.CurrentActivity.Acts.Add(PbAct);
                    mBF.CurrentActivity.Acts.CurrentItem = PbAct;
                    mGR.RunAction(PbAct, false);
                }
            } while (actual.Equals("True"));

            //proceed for switch window and initialize browser
            c          = new ActSwitchWindow();
            c.LocateBy = eLocateBy.ByTitle;
            c.LocateValueCalculated = "CSM Widgets Test Applicaiton";
            c.WaitTime = 2;
            mDriver.RunAction(c);

            int count = 1;
            ActBrowserElement actBrowser = new ActBrowserElement();

            do
            {
                actBrowser.LocateBy    = eLocateBy.ByXPath;
                actBrowser.LocateValue = @"/[AutomationId:1000]/[LocalizedControlType:pane]/[LocalizedControlType:pane]/[LocalizedControlType:pane]";

                actBrowser.ControlAction = ActBrowserElement.eControlAction.InitializeBrowser;
                actBrowser.Wait          = 2;
                actBrowser.Timeout       = 10;
                actBrowser.Active        = true;
                mBF.CurrentActivity.Acts.Add(actBrowser);
                mBF.CurrentActivity.Acts.CurrentItem = actBrowser;
                mGR.RunAction(actBrowser, false);
                count--;
            } while (actBrowser.Status.Equals(eRunStatus.Failed) && count > 0);
            if (actBrowser.Status.Equals(eRunStatus.Failed))
            {
                Assert.AreEqual(actBrowser.Status, eRunStatus.Passed, "actBrowser.Status");
                Assert.AreEqual(actBrowser.Error, null, "actBrowser.Error");
            }
        }
예제 #27
0
 /// <summary>
 /// 删除工作区集合中的某个元素
 /// </summary>
 /// <param name="workSpace"></param>
 private void DeleteWorkSpaceItem(WorkSpace workSpace)
 {
     WorkSpaceList.Remove(workSpace);
 }
예제 #28
0
 public SearchResultVariantsDataTable SearchForVariants(WorkSpace WorkSpace, string UserGroupName, string QueryName)
 {
     SearchResultVariantsDataTable table = new SearchResultVariantsDataTable();
     IRfcFunction function = this._des.Repository.CreateFunction("RSAQ_REMOTE_QUERY_CALL_CATALOG");
     function["WORKSPACE"].SetValue((WorkSpace == WorkSpace.GlobalArea) ? "X" : " ");
     function["GENERIC_QUERYNAME"].SetValue(QueryName);
     function["GENERIC_USERGROUP"].SetValue(UserGroupName);
     function["GENERIC_FUNCAREA"].SetValue("*");
     function.Invoke(_des);
     IRfcTable table2 = function.GetTable("QUERYCATALOG");
     foreach (IRfcStructure structure in table2.ToList())
     {
         string str = structure["VARIANT"].GetValue().ToString().Trim();
         string descriptionText = structure["VTEXT"].GetValue().ToString().Trim();
         bool flag = false;
         if (!str.Equals(""))
         {
             foreach (SearchResultVariantsRow row in table.Rows)
             {
                 if (row.VariantName.Trim().Equals(str))
                 {
                     flag = true;
                 }
             }
             if (!flag)
             {
                 table.AddSearchResultVariantsRow(str, descriptionText);
             }
         }
     }
     return table;
 }
예제 #29
0
 public PendingChange[] GetPendingChanges()
 => WorkSpace.GetPendingChanges(_branchMap[BranchType.Target].Local, RecursionType.Full);
        public static void ClassInitialize(TestContext TestContext)
        {
            WorkSpaceEventHandler WSEH = new WorkSpaceEventHandler();

            WorkSpace.Init(WSEH);
        }
예제 #31
0
 public void nodeSearch( WorkSpace w )
 {
     Vertex v; w.preVisitAction( ( Vertex ) this ); if ( visited ) return; visited = true; for ( Iterator<Vertex> vxiter = GetNeighbors(); vxiter.hasNext(); ) { v = vxiter.next( ); w.checkNeighborAction( ( Vertex ) this, v ); v.nodeSearch( w ); } w.postVisitAction( ( Vertex ) this );
 }
        public unsafe ReplyForGetSensorData(WorkSpace readBuffer)
        {
            *(ReplyForGetSensorData *)ref this = new ReplyForGetSensorData();
            int size = readBuffer.Size;

            this.Pheader = (CommHeader *)(void *)readBuffer.Address;
            int num = size - sizeof(CommHeader);

            if (num < 0)
            {
                throw new ConnectionLostException("Received Header size is invalid.");
            }
            // ISSUE: reference to a compiler-generated field
            byte  fixedElementField = this.Pheader->uOption0.abyCode.FixedElementField;
            byte *numPtr1           = (byte *)((CommHeader *)(void *)readBuffer.Address + 1);

            if (((int)fixedElementField >> 1 & 1) == 1 && sizeof(StructSize) <= num && ((StructSize *)numPtr1)->lLength == sizeof(VisionSensorState))
            {
                num -= sizeof(StructSize) + sizeof(VisionSensorState);
                if (num < 0)
                {
                    throw new ConnectionLostException("Received SensorState data size is invalid.");
                }
                byte *numPtr2 = numPtr1 + sizeof(StructSize);
                this.PSensorState = (VisionSensorState *)numPtr2;
                numPtr1           = numPtr2 + sizeof(VisionSensorState);
            }
            if (((int)fixedElementField & 1) == 1 && sizeof(StructSize) <= num && ((StructSize *)numPtr1)->lLength == sizeof(ImageSetMono))
            {
                num -= sizeof(StructSize) + sizeof(ImageSetMono);
                if (num < 0)
                {
                    throw new ConnectionLostException("Received monochrome image data size is invalid");
                }
                byte *numPtr2 = numPtr1 + sizeof(StructSize);
                this.PMonoImage = (ImageSetMono *)numPtr2;
                numPtr1         = numPtr2 + sizeof(ImageSetMono);
            }
            if (((int)fixedElementField & 1) == 1 && sizeof(StructSize) <= num && ((StructSize *)numPtr1)->lLength == sizeof(ImageSetColor))
            {
                num -= sizeof(StructSize) + sizeof(ImageSetColor);
                if (num < 0)
                {
                    throw new ConnectionLostException("Received color Image data size is invalid.");
                }
                byte *numPtr2 = numPtr1 + sizeof(StructSize);
                this.PColorImage = (ImageSetColor *)numPtr2;
                numPtr1          = numPtr2 + sizeof(ImageSetColor);
            }
            if (((int)fixedElementField >> 2 & 1) == 1 && sizeof(StructSize) <= num && ((StructSize *)numPtr1)->lLength == sizeof(VsaRunningInfo))
            {
                num -= sizeof(StructSize) + sizeof(VsaRunningInfo);
                if (num < 0)
                {
                    throw new ConnectionLostException("Received runninf info size is invalid.");
                }
                byte *numPtr2 = numPtr1 + sizeof(StructSize);
                this.PRunninfInfo = (VsaRunningInfo *)numPtr2;
                numPtr1           = numPtr2 + sizeof(VsaRunningInfo);
            }
            if (((int)fixedElementField >> 3 & 1) == 1 && sizeof(StructSize) <= num && ((StructSize *)numPtr1)->lLength == sizeof(Summary))
            {
                num -= sizeof(StructSize) + sizeof(Summary);
                if (num < 0)
                {
                    throw new ConnectionLostException("Received summary data size is invalid.");
                }
                byte *numPtr2 = numPtr1 + sizeof(StructSize);
                this.PSummary = (Summary *)numPtr2;
                numPtr1       = numPtr2 + sizeof(Summary);
            }
            if (((int)fixedElementField >> 4 & 1) != 1 || sizeof(StructSize) > num || ((StructSize *)numPtr1)->lLength != sizeof(Histogram))
            {
                return;
            }
            if (num - (sizeof(StructSize) + sizeof(Histogram)) < 0)
            {
                throw new ConnectionLostException("Received histogram data size is invalid.");
            }
            this.PHistogram = (Histogram *)(numPtr1 + sizeof(StructSize));
        }
 public Query CreateQuery(WorkSpace WorkSpace, string UserGroup, string QueryName, string Variant)
 {
     Query query = new Query(m_sysName)
     {
         Name = QueryName,
         WorkArea = WorkSpace,
         UserGroup = UserGroup,
         Variant = Variant
     };
     query.RefreshFieldsAndSelections();
     return query;
 }
예제 #34
0
파일: Program.cs 프로젝트: linuxerlj/Ginger
        private static void InitWorkSpace()
        {
            GingerConsoleWorkSpace ws = new GingerConsoleWorkSpace();

            WorkSpace.Init(ws);
        }
예제 #35
0
 public void TestInitialize()
 {
     mTestHelper.TestInitialize(TestContext);
     WorkSpace.LockWS();
 }
예제 #36
0
 public void TestCleanUp()
 {
     mTestHelper.TestCleanup();
     WorkSpace.RelWS();
 }
예제 #37
0
 public void init_vertex(WorkSpace w)
 {
     visited = false;
     w.init_vertex(( Vertex )this);
 }
예제 #38
0
 public void TestCleanUp()
 {
     WorkSpace.RelWS();
 }
        private void btnSearchVariant_Click(object sender, EventArgs e)
        {
            systemName = this.cbxSystemList.Text.Trim();
            QueryHelper helper = new QueryHelper(systemName);

            area = checkStandard.Checked == true ? WorkSpace.StandardArea : WorkSpace.GlobalArea;
            userGroup = this.cbxUserGroup.Text.Trim();
            queryName = this.cbxQueries.Text.Trim();

            SearchResultVariantsDataTable dt = helper.SearchForVariants(area, userGroup, queryName);
            cbxVariants.DataSource = null;
            cbxVariants.DataSource = dt;
            cbxVariants.DisplayMember = "VariantName";
            this.dgvSearchResult.DataSource = null;
            this.dgvSearchResult.DataSource = dt;
        }
예제 #40
0
파일: Vertex.cs 프로젝트: bungaca/abstools
 public void init_vertex( WorkSpace w )
 {
     visited = false;
     w.init_vertex( ( Vertex ) this );
 }
        private bool Check()
        {
            systemName = this.cbxSystemList.Text.Trim();
            userGroup = this.cbxUserGroup.Text.Trim();
            queryName = this.cbxQueries.Text.Trim();
            variant = this.cbxVariants.Text.Trim();
            maxRow = Convert.ToInt32(this.txtMaxRows.Text.Trim());
            area = checkStandard.Checked == true ? WorkSpace.StandardArea : WorkSpace.GlobalArea;

            if (maxRow <= 0)
            {
                MessageBox.Show("行数不正确");
                return false;
            }

            if (string.IsNullOrEmpty(systemName))
            {
                MessageBox.Show("请选择系统名称");
                return false;
            }

            if (string.IsNullOrEmpty(userGroup))
            {
                MessageBox.Show("请用户组");
                return false;
            }

            if (string.IsNullOrEmpty(queryName))
            {
                MessageBox.Show("请选择查询");
                return false;
            }

            //if (string.IsNullOrEmpty(variant))
            //{
            //    MessageBox.Show("请选择变量");
            //    return false;
            //}

            return true;

            //throw new NotImplementedException();
        }
예제 #42
0
        }//CTOR

        //----------------------------------------------------------------------------------------------//

        public bool Post()
        {
            try
            {
                //Connect and create.
                sdo = new SDOEngine();
                ws  = sdo.Workspaces.Add("App Server");
                ws.Connect(setUsr.sageDBDir, setUsr.sageUsername, setUsr.sagePassword, "Unique");

                salesRecord = (SalesRecord)ws.CreateObject("SalesRecord");
                conData     = (ControlData)ws.CreateObject("ControlData");
                currData    = (CurrencyData)ws.CreateObject("CurrencyData");
                sopPost     = (SopPost)ws.CreateObject("SOPPost");

                //Unwrap order.
                string                cusCode     = order.Customer.Code;
                OrderType             type        = order.type;
                List <Models.Product> productList = order.ProductList;


                //Create a saleRecord with comboAccRef.Text and look for it in database.
                SDOHelper.Write(salesRecord, "ACCOUNT_REF", cusCode);

                if (salesRecord.Find(false))
                {
                    //Check Account Status here.
                    short accStatus = (short)SDOHelper.Read(salesRecord, "ACCOUNT_STATUS");
                    if (accStatus != 0)
                    {
                        throw new MyException("Customer " + order.Customer.Code + "'s account is on hold.");
                    }

                    short  defTaxCode   = (short)SDOHelper.Read(salesRecord, "DEF_TAX_CODE");
                    string taxRateField = "T" + defTaxCode + "_Rate";
                    defTaxRate = (double)SDOHelper.Read(conData, taxRateField);

                    currencyCode = (sbyte)SDOHelper.Read(salesRecord, "CURRENCY") + 1;


                    //If customer exists add details to sopPostHeader.
                    SDOHelper.Write(sopPost.Header, "ACCOUNT_REF", SDOHelper.Read(salesRecord, "ACCOUNT_REF"));
                    SDOHelper.Write(sopPost.Header, "NAME", SDOHelper.Read(salesRecord, "NAME"));


                    //Add each address line to header
                    for (int i = 1; i <= 5; i++)
                    {
                        SDOHelper.Write(sopPost.Header, "ADDRESS_" + i, SDOHelper.Read(salesRecord, "ADDRESS_" + i));
                    }//For



                    if (order.DeliveryAddress != null)
                    {
                        var deliveryAddress = order.DeliveryAddress;

                        SDOHelper.Write(sopPost.Header, "DEL_ADDRESS_1", RestrictLength(deliveryAddress.Line1));
                        SDOHelper.Write(sopPost.Header, "DEL_ADDRESS_2", RestrictLength(deliveryAddress.Line2));
                        SDOHelper.Write(sopPost.Header, "DEL_ADDRESS_3", RestrictLength(deliveryAddress.Line3));
                        SDOHelper.Write(sopPost.Header, "DEL_ADDRESS_4", RestrictLength(deliveryAddress.Line4));
                        SDOHelper.Write(sopPost.Header, "DEL_ADDRESS_5", RestrictLength(deliveryAddress.Line5));
                    }//If



                    //Add date and customer O/N to header
                    SDOHelper.Write(sopPost.Header, "ORDER_DATE", DateTime.Now);
                    SDOHelper.Write(sopPost.Header, "CUST_ORDER_NUMBER", order.CustomerOrderNumber);
                    SDOHelper.Write(sopPost.Header, "CARR_NOM_CODE", ((int)setUsr.carrNomCode).ToString());
                    SDOHelper.Write(sopPost.Header, "CARR_NET", order.Carriage);

                    //Check if we are entering an order for a foreign customer.
                    if (currencyCode != baseCurrencyCode)
                    {
                        taxCode = (short)setUsr.taxCodeForeign;
                        SDOHelper.Write(sopPost.Header, "CARR_TAX_CODE", (short)taxCode);

                        currData.Read(currencyCode);
                        //Populate Foreign Currency Fields
                        SDOHelper.Write(sopPost.Header, "FOREIGN_RATE", SDOHelper.Read(currData, "EXCHANGE_RATE"));
                        SDOHelper.Write(sopPost.Header, "CURRENCY", SDOHelper.Read(salesRecord, "CURRENCY"));
                        SDOHelper.Write(sopPost.Header, "CURRENCY_USED", SDOHelper.Read(salesRecord, "CURRENCY"));
                    }
                    else
                    {
                        taxCode = (short)setUsr.taxCode;
                        SDOHelper.Write(sopPost.Header, "CARR_TAX_CODE", (short)taxCode);
                    }//Else


                    //Check if its a quote or not
                    if (type == OrderType.QUOTE)
                    {
                        // Populate details to generate quote
                        SDOHelper.Write(sopPost.Header, "ORDER_TYPE", (byte)InvoiceType.sdoSopQuote);
                        SDOHelper.Write(sopPost.Header, "QUOTE_STATUS", (byte)QuoteStatus.sdoOpen);
                    }//If

                    //Any notes
                    var notes = order.Notes;
                    if (!string.IsNullOrWhiteSpace(notes))
                    {
                        var len = notes.Length;
                        //Split the note up if it's too long
                        SDOHelper.Write(sopPost.Header, "NOTES_1", RestrictLength(order.Notes.Substring(0, Math.Min(len, MAX_LENGTH_NOTE))));

                        if (len > MAX_LENGTH_NOTE)
                        {
                            SDOHelper.Write(sopPost.Header, "NOTES_2", RestrictLength(order.Notes.Substring(MAX_LENGTH_NOTE, Math.Min(len, 2 * MAX_LENGTH_NOTE))));
                        }

                        if (len > 2 * MAX_LENGTH_NOTE)
                        {
                            SDOHelper.Write(sopPost.Header, "NOTES_3", RestrictLength(order.Notes.Substring(2 * MAX_LENGTH_NOTE, Math.Min(len, 3 * MAX_LENGTH_NOTE))));
                        }
                    }//If

                    //Add discount rate (usually 0).
                    cusDiscountRate = (double)SDOHelper.Read(salesRecord, "DISCOUNT_RATE");


                    //Add each product to sopPost items section.
                    foreach (Models.Product product in productList)
                    {
                        AddItem(product, ws);
                    }//ForEach

                    //Add username
                    SDOHelper.Write(sopPost.Header, "TAKEN_BY", GetTakenBy());

                    //Update: will fail if not set up properly
                    if (!sopPost.Update())
                    {
                        return(false);
                    }
                    else
                    {
                        return(true);
                    }
                }
                else
                {
                    throw new MyException("Customer " + order.Customer.Code + " does not seem to exist.");
                }//Else
            }
            catch (MyException mE)
            {
                throw new MyException(mE.Message);
            }
            catch (Exception e)
            {
                throw new MyException("Problem posting order to database " + e.GetType().Name + ":" + e.Message);
            }
            finally
            {
                DestroyAllObjects();
            } //Finally
        }     //Post
예제 #43
0
        public void TestInitialize()
        {
            WorkSpace.Init(new WorkSpaceEventHandler());
            WorkSpace.Instance.SolutionRepository = GingerSolutionRepository.CreateGingerSolutionRepository();

            // Init SR
            mSolutionRepository = WorkSpace.Instance.SolutionRepository;
            string TempRepositoryFolder = TestResources.GetTestTempFolder(Path.Combine("Solutions", "temp"));

            mSolutionRepository.Open(TempRepositoryFolder);
            Ginger.SolutionGeneral.Solution sol = new Ginger.SolutionGeneral.Solution();
            sol.ContainingFolderFullPath = TempRepositoryFolder;
            WorkSpace.Instance.Solution  = sol;
            mSolutionRepository.StopAllRepositoryFolderWatchers();

            WorkSpace.Instance.Solution.LoggerConfigurations.CalculatedLoggerFolder = Path.Combine(TempRepositoryFolder, "ExecutionResults");

            runset      = new RunSetConfig();
            runset.Name = "NewRunset1";
            WorkSpace.Instance.RunsetExecutor.RunSetConfig = runset;
            runner                 = new GingerRunner();
            runner.Name            = "Runner1";
            runner.CurrentSolution = new Ginger.SolutionGeneral.Solution();
            WorkSpace.Instance.RunsetExecutor.Runners.Add(runner);
            mEnv      = new ProjEnvironment();
            mEnv.Name = "Environment1";
            EnvApplication app1 = new EnvApplication();

            app1.Name = "App1";
            app1.Url  = "URL123";
            mEnv.Applications.Add(app1);
            GeneralParam GP1 = new GeneralParam();

            GP1.Name  = "GP1";
            GP1.Value = "GP1Value";
            app1.GeneralParams.Add(GP1);

            mBF      = new BusinessFlow();
            mBF.Name = "Businessflow1";
            runner.BusinessFlows.Add(mBF);
            mActivity              = new GingerCore.Activity();
            mActivity.Active       = true;
            mActivity.ActivityName = "Activity1";
            mAct             = new ActDummy();
            mAct.Active      = true;
            mAct.Description = "Action1";
            mActivity.Acts.Add(mAct);
            mActivity.Acts.CurrentItem = mAct;
            mBF.AddActivity(mActivity);


            BusinessFlow BF1 = new BusinessFlow();

            BF1.Name = "Businessflow2";
            runner.BusinessFlows.Add(BF1);
            GingerCore.Activity activity = new GingerCore.Activity();
            activity.Active       = true;
            activity.ActivityName = "Activity1";
            ActDummy dummy = new ActDummy();

            dummy.Active      = true;
            dummy.Description = "Dummy1";
            activity.Acts.Add(dummy);
            activity.Acts.CurrentItem = dummy;
            BF1.AddActivity(activity);
        }