示例#1
0
        public void ScanForDefinedNS(AcpiLib acpiLib, string aslCode)
        {
            string[] Lines = aslCode.Split(new char[] { '\n' });

            for (int i = 4; i < Lines.Length; i++)
            {
                // parse every line
                // Lines[i] // what is this line
                string line   = Lines[i].Trim();
                string opCode = GetOpCode(ref line);
                if (opCode != null && line.Length > 0 && ValidArgString(line))
                {
                    //AmlOp amlOp = new AmlOp(opCode, i);
                    //amlCurrent = amlOp;
                    AmlOp amlCurrent = new AmlOp(opCode, i);
                    if (!GetArgs(opCode, ref line, ref amlCurrent))
                    {
                        //
                        // TODO: debug assert
                    }
                    amlOps.Add(amlCurrent);
                    //amlCurrent = amlOps.Last();
                }
            }
            InitializeData(acpiLib);
            return;
        }
示例#2
0
 /// <summary>
 /// Main Form constructor
 /// </summary>
 public MainForm()
 {
     IntiEvalData();
     InitializeComponent();
     this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Dpi;
     InitAppSize();
     //statusStrip1.Height = 200;
     statusStrip1.Items.Add("Offline Mode");
     statusStrip1.Items.Add("");
     statusStrip1.Cursor = DefaultCursor;
     TrewViewWidth       = this.ClientSize.Width / 3;
     ResizeLayout();
     acpiLib = new AcpiLib();
     if (!acpiLib.AcpiLibValid())
     {
         //MessageBox.Show("Did not find acpilib.dll, need to put acpilib.dll/hwacc.sys in the same folder of acpiwin",
         //    "Error");
         InitializeAcpiTables();
     }
     else
     {
         amlBuilder.acpiLib = acpiLib;
         InitializeAcpiObjects();
     }
     //amlMethod = new AmlMethod(acpiLib, "\\___");
     //amlMethod.RunMethod(); // Run method is a internal test code
     //amlMethod = null;
 }
示例#3
0
 public void InitializeData(AcpiLib acpilib)
 {
     localAcpiLib = acpilib;
     if (localAcpiLib == null)
     {
         return;
     }
     InitDebugData();
 }
示例#4
0
 /// <summary>
 /// constructor a acpi data from a acpi name
 /// </summary>
 /// <param name="apcilib">acpi libary</param>
 /// <param name="Path">path of name</param>
 /// <param name="Name">acpi name</param>
 public AcpiData(AcpiLib apcilib, string Path, string Name)
 {
     this.acpiLib = apcilib;
     QueryData(Path, Name);
 }