コード例 #1
0
ファイル: Form1.cs プロジェクト: kkudryashov/mikrotik4net
        private void btnConsoleSendToParser_Click(object sender, EventArgs e)
        {
            tcMain.SelectedTab = tcpParser;
            TikPropertyParser parser           = new TikPropertyParser(consoleSession, consoleLastCommand, consoleLastResponse);
            XmlDocument       lastParserOutput = parser.GenerateOutput();

            System.IO.StringWriter writer = new System.IO.StringWriter();
            lastParserOutput.Save(writer);
            tbParserOutput.Text = writer.ToString();
            string entityFqn = string.IsNullOrEmpty(parser.EntityNamespace) ? parser.EntityName : parser.EntityNamespace + "." + parser.EntityName;

            tbParserFile.Text = Path.Combine(Path.Combine(Environment.CurrentDirectory, "defs"), entityFqn + ".xml");
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: aocakli/mikrotik4net
 private void btnConsoleSendToParser_Click(object sender, EventArgs e)
 {
     tcMain.SelectedTab = tcpParser;
     TikPropertyParser parser = new TikPropertyParser(consoleSession, consoleLastCommand, consoleLastResponse);
     XmlDocument lastParserOutput = parser.GenerateOutput();
     System.IO.StringWriter writer = new System.IO.StringWriter();
     lastParserOutput.Save(writer);
     tbParserOutput.Text = writer.ToString();
     string entityFqn = string.IsNullOrEmpty(parser.EntityNamespace) ? parser.EntityName : parser.EntityNamespace + "." + parser.EntityName;
     tbParserFile.Text = Path.Combine(Path.Combine(Environment.CurrentDirectory,  "defs"), entityFqn + ".xml");
 }