예제 #1
0
 private void ConfigInit()
 {
     this.ConfigPath = this.EnumEditorID == EnumEditorIDE.Animation ? this.AnimationExprotConfigPath : this.UIExprotConfigPath;
     if (File.Exists(this.ConfigPath))
     {
         try
         {
             XmlNode node1 = XmlAnalysis.GetNode((XmlNode)XmlAnalysis.ReaderXmlFile(this.ConfigPath), "ExprotConfig");
             this.MaxSourceWidth  = int.Parse(XmlAnalysis.GetNode(node1, "MaxSourceWidth").InnerText);
             this.MaxSourceHeight = int.Parse(XmlAnalysis.GetNode(node1, "MaxSourceHeight").InnerText);
             this.PaddingPixel    = int.Parse(XmlAnalysis.GetNode(node1, "PaddingPixel").InnerText);
             this.Cilp            = Convert.ToBoolean(XmlAnalysis.GetNode(node1, "Cilp").InnerText);
             this.SortForm        = (SortFormat)Enum.Parse(typeof(SortFormat), XmlAnalysis.GetNode(node1, "SortForm").InnerText);
             this.ImageForm       = (ImageFileFormat)Enum.Parse(typeof(ImageFileFormat), XmlAnalysis.GetNode(node1, "ImageForm").InnerText);
             this.ExprotPath      = XmlAnalysis.GetNode(node1, "ExprotPath").InnerText;
             this.ExportJsonPath  = XmlAnalysis.GetNode(node1, "ExportJsonPath").InnerText;
             this.ExprotResouces  = int.Parse(XmlAnalysis.GetNode(node1, "ExprotResouces").InnerText);
             this.ExprotCanvas    = int.Parse(XmlAnalysis.GetNode(node1, "ExprotCanvas").InnerText);
             this.ResourceScale   = float.Parse(XmlAnalysis.GetNode(node1, "ResourceScale").InnerText);
             XmlNode node2 = XmlAnalysis.GetNode(node1, "FormatExport");
             this.FormatExport = node2 != null && Convert.ToBoolean(node2.InnerText);
         }
         catch (Exception)
         {
             this.Init();
             File.Delete(this.ConfigPath);
         }
     }
     else
     {
         this.Init();
     }
 }
예제 #2
0
        public void SetUp()
        {
            string filepath = @"F:\Code\TestLinkTransfer\trunk\Resource\CRM.xml";

//            string filepath = @"F:\Code\TestLinkTransfer\trunk\Resource\幻视项目.xml";

            this.xmlAnalysis = new XmlAnalysis(filepath);
        }
예제 #3
0
        public void SetUp()
        {
            string filepath = @"G:\Code\TestLinkTransfer\trunk\Resource\CRM.xml";

            XmlAnalysis xmlAnalysis = new XmlAnalysis(filepath);
            XmlToModel xtm = new XmlToModel(xmlAnalysis.GetAllTestCaseNodes());
            this._testCaseList = xtm.OutputTestCases();
        }
예제 #4
0
        public void SetUp()
        {
            string filepath = @"F:\Code\TestLinkTransfer\trunk\Resource\CRM.xml";

            XmlAnalysis xmlAnalysis = new XmlAnalysis(filepath);

            this._xmlNodes = xmlAnalysis.GetAllTestCaseNodes();
            this._node     = this._xmlNodes[0];
        }
예제 #5
0
 private void XmlToExcel(string fileDir)
 {
     _ = GoogleAnalyticsTracker.Tracker("Work", "XmlToExcel");
     try
     {
         XmlAnalysis     xmlAnalysis = new XmlAnalysis(fileDir);
         XmlToModel      xtm         = new XmlToModel(xmlAnalysis.GetAllTestCaseNodes());
         List <TestCase> tcList      = xtm.OutputTestCases();
         this._tcDic = new Dictionary <string, List <TestCase> >();
         _tcDic.Add("TestCase", tcList);
     }
     catch (Exception ex)
     {
         this._logger.Error(ex);
         OutputDisplay.ShowMessage(ex.ToString(), Color.Red);
         return;
     }
 }
예제 #6
0
        /// <summary>
        /// XML转换为Excel
        /// </summary>
        /// <param name="fileDir">文件路径</param>
        private void XmlToExcel(string fileDir)
        {
            try
            {
                XmlAnalysis     xmlAnalysis = new XmlAnalysis(fileDir);
                XmlToModel      xtm         = new XmlToModel(xmlAnalysis.GetAllTestCaseNodes());
                List <TestCase> tcList      = xtm.OutputTestCases();
                this._tcDic = new Dictionary <string, List <TestCase> >();
                _tcDic.Add("TestCase", tcList);

                ExcelHandler eh = new ExcelHandler(tcList);
                eh.WriteExcel();
            }
            catch (Exception ex)
            {
                this._logger.Error(ex);
                OutputDisplay.ShowMessage(ex.ToString(), Color.Red);
                return;
            }
        }
예제 #7
0
 private void ConfigInit()
 {
     if (File.Exists(this.LoginInfoConfigPath))
     {
         try
         {
             XmlNode node = XmlAnalysis.GetNode((XmlNode)XmlAnalysis.ReaderXmlFile(this.LoginInfoConfigPath), "LoginInfoConfig");
             this.IsRememberPassWord = Convert.ToBoolean(XmlAnalysis.GetNode(node, "IsRememberPassWord").InnerText);
             this.UserName           = XmlAnalysis.GetNode(node, "UserName").InnerText;
             string innerText = XmlAnalysis.GetNode(node, "UserPassword").InnerText;
             this.IsAutoLogin  = Convert.ToBoolean(XmlAnalysis.GetNode(node, "IsAutoLogin").InnerText);
             this.UserPassword = LoginEncrypt.Decrypt(innerText, "E99F9354-BC29-48A2-9839-F3D0DD83CCE5", Encoding.Default);
         }
         catch (Exception)
         {
             this.Init();
             File.Delete(this.LoginInfoConfigPath);
         }
     }
     else
     {
         this.Init();
     }
 }
예제 #8
0
 public void TearDown()
 {
     this.xmlAnalysis = null;
 }