Пример #1
0
        public OWLOSDriverProperty(OWLOSDriver driver, string name, string value, string flags)
        {
            this.driver = driver;

            this.name   = name;
            this._value = value;
            this.flags  = flags;



            networkStatus = NetworkStatus.online;
        }
Пример #2
0
        public async Task parseDrivers(string driverData)
        {
            List <string> driverRaw = driverData.Split('\n').ToList();
            OWLOSDriver   driver    = null;

            foreach (string driverProp in driverRaw)
            {
                //find driver
                if (driverProp.IndexOf("properties for:") != -1)
                {
                    string driverName = driverProp.Substring(driverProp.IndexOf(":") + 1);
                    driver = drivers.Find(n => n.name == driverName);
                    if (driver == null)
                    {
                        driver = new OWLOSDriver(this, driverName);

                        OWLOSDriverWrapperEventArgs _OWLOSDriverWrapperEventArgs = new OWLOSDriverWrapperEventArgs(driver);

                        NewDriver(_OWLOSDriverWrapperEventArgs);

                        drivers.Add(driver);
                    }
                    else
                    {
                    }
                }
                else
                if (driver != null)
                {
                    if (driverProp.IndexOf("=") != -1)
                    {
                        string key   = driverProp.Substring(0, driverProp.IndexOf("="));
                        string value = driverProp.Substring(driverProp.IndexOf("=") + 1);
                        await driver.SetParsedProperty(key, value);
                    }
                }
            }
        }
Пример #3
0
 public OWLOSDriverWrapperEventArgs(OWLOSDriver driver)
 {
     this.driver = driver;
 }