Example #1
0
        static void Main(string[] args)
        {
            Process Netprocess = new Process();

            Netprocess.StartInfo.FileName               = "ipconfig.exe";
            Netprocess.StartInfo.Arguments              = "/all";
            Netprocess.StartInfo.UseShellExecute        = false;
            Netprocess.StartInfo.RedirectStandardOutput = true;
            Netprocess.StartInfo.CreateNoWindow         = true;
            Netprocess.Start();

            string results = Netprocess.StandardOutput.ReadToEnd();

            Netprocess.WaitForExit();
            Console.WriteLine(results);



            string[] lines = results.Split(new string[] { Environment.NewLine },   //tao array string , cat ghep de lay tung dong 1
                                           StringSplitOptions.RemoveEmptyEntries); // bo qua dong nao k co character gi
            var GetPhysical = from line in lines
                              let PAdd = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                                         where PAdd.Contains("Physical Address")
                                         //select new


                                         ////______________________NET STAT_____________________________________
                                         // var networkConnection = from line in lines
                                         //                         let cols = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                                         //                         where cols.Count() == 5
                                         //                         select new { A = cols[0], B = cols[1], C = cols[2], PID = cols[4] };
                                         //// var getPhysicalAddress = networkConnection.Select(PA => )


                                         //foreach (var line in networkConnection)
                                         //{
                                         //    Console.WriteLine(line);
                                         //}
                                         //___________________________________________________________________________
                                         Console.ReadLine();
        }
Example #2
0
 internal override void RemoveChild(Node child)
 {
     if ( _add_ == child )
     {
     _add_ = null;
     return;
     }
 }
Example #3
0
        public void SetAdd(PAdd node)
        {
            if(_add_ != null)
            {
            _add_.Parent(null);
            }

            if(node != null)
            {
            if(node.Parent() != null)
            {
                node.Parent().RemoveChild(node);
            }

            node.Parent(this);
            }

            _add_ = node;
        }
Example #4
0
     public AAExpression(
         PAdd _add_
 )
     {
         SetAdd (_add_);
     }
Example #5
0
 internal override void RemoveChild(Node child)
 {
     if ( _add_ == child )
     {
     _add_ = null;
     return;
     }
     if ( _operator_minus_ == child )
     {
     _operator_minus_ = null;
     return;
     }
     if ( _mult_ == child )
     {
     _mult_ = null;
     return;
     }
 }
Example #6
0
     public ACAdd(
         PAdd _add_,
         TOperatorMinus _operator_minus_,
         PMult _mult_
 )
     {
         SetAdd (_add_);
         SetOperatorMinus (_operator_minus_);
         SetMult (_mult_);
     }
Example #7
0
     public ABAdd(
         PAdd _add_,
         TOperatorPlus _operator_plus_,
         PMult _mult_
 )
     {
         SetAdd (_add_);
         SetOperatorPlus (_operator_plus_);
         SetMult (_mult_);
     }