Ejemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void buildNonRotatingLog() throws java.io.IOException
        private void BuildNonRotatingLog()
        {
            Stream logOutputStream = createOrOpenAsOutputStream(_fileSystem, _currentQueryLogFile, true);

            _log      = _logBuilder.toOutputStream(logOutputStream);
            _closable = logOutputStream;
        }
        private void SingletonDomainUnload(object source, System.EventArgs arguments)
        {
            bool mustReleaseLock = false;

            System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();
            try
            {
                System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();
                System.Threading.Monitor.Enter(ModuleUninitializer.@lock, ref mustReleaseLock);
                System.Collections.IEnumerator enumerator = this.GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        ((System.EventHandler)enumerator.Current)(source, arguments);
                    }
                }
                finally
                {
                    System.IDisposable source2 = enumerator as System.IDisposable;
                    if (source2 != null)
                    {
                        source2.Dispose();
                    }
                }
            }
            finally
            {
                if (mustReleaseLock)
                {
                    System.Threading.Monitor.Exit(ModuleUninitializer.@lock);
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a <see cref="DeviceContext9">Direct3D9 device context</see> according to the specified settings.
        /// The base class retains ownership of the context and will dispose of it when appropriate.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <returns>The initialized device context.</returns>
        protected void InitializeDevice(DeviceSettings9 settings)
        {
            var result = new DeviceContext9(Form, settings);

            apiContext = result;
            Context9   = result;
        }
Ejemplo n.º 4
0
        protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
        {
            if (this.trackItemsPropChanges)
            {
                switch (e.Action)
                {
                case NotifyCollectionChangedAction.Add:
                {
                    System.Collections.IEnumerator enumerator = e.NewItems.GetEnumerator();
                    try
                    {
                        while (enumerator.MoveNext())
                        {
                            T item = (T)((object)enumerator.Current);
                            item.PropertyChanged += new PropertyChangedEventHandler(this.item_PropertyChanged);
                        }
                    }
                    finally
                    {
                        System.IDisposable disposable = enumerator as System.IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }
                    break;
                }

                case NotifyCollectionChangedAction.Remove:
                {
                    System.Collections.IEnumerator enumerator = e.OldItems.GetEnumerator();
                    try
                    {
                        while (enumerator.MoveNext())
                        {
                            T item = (T)((object)enumerator.Current);
                            item.PropertyChanged -= new PropertyChangedEventHandler(this.item_PropertyChanged);
                        }
                    }
                    finally
                    {
                        System.IDisposable disposable = enumerator as System.IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }
                    break;
                }

                case NotifyCollectionChangedAction.Reset:
                    foreach (T item in base.Items)
                    {
                        item.PropertyChanged += new PropertyChangedEventHandler(this.item_PropertyChanged);
                    }
                    break;
                }
            }
            base.OnCollectionChanged(e);
        }
        // Foreach is readonly since foreach is syntactic sugar for the following logic.
        // If change reference, then enumerator won't be able to find the next object in the collection -
        // hence the object reference is readonly.
        public static void TestEnumeratorForEach()
        {
            var people = new List <Person>
            {
                new Person()
                {
                    FirstName = "John", LastName = "Doe"
                },
                new Person()
                {
                    FirstName = "Jane", LastName = "Doe"
                },
            };

            List <Person> .Enumerator e = people.GetEnumerator();

            try
            {
                Person v;
                while (e.MoveNext())
                {
                    v = e.Current;  // If change value for v, then enumerator will not be able to locate next object in the collection.
                }
            }
            finally
            {
                System.IDisposable d = e as System.IDisposable;
                if (d != null)
                {
                    d.Dispose();
                }
            }
        }
 static StackObject *AssignFromStack_staticField_1(ref object o, ILIntepreter __intp, StackObject *ptr_of_this_method, IList <object> __mStack)
 {
     ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
     System.IDisposable @staticField = (System.IDisposable) typeof(System.IDisposable).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
     ILRuntimeTest.TestFramework.ClassInheritanceTest.staticField = @staticField;
     return(ptr_of_this_method);
 }
Ejemplo n.º 7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void buildRotatingLog(long rotationThreshold, int maxArchives) throws java.io.IOException
        private void BuildRotatingLog(long rotationThreshold, int maxArchives)
        {
            RotatingFileOutputStreamSupplier rotatingSupplier = new RotatingFileOutputStreamSupplier(_fileSystem, _currentQueryLogFile, rotationThreshold, 0, maxArchives, _scheduler.executor(Group.LOG_ROTATION));

            _log      = _logBuilder.toOutputStream(rotatingSupplier);
            _closable = rotatingSupplier;
        }
Ejemplo n.º 8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void closeIfNotNull(java.io.Closeable closeable) throws java.io.IOException
        private static void CloseIfNotNull(System.IDisposable closeable)
        {
            if (closeable != null)
            {
                closeable.Dispose();
            }
        }
Ejemplo n.º 9
0
    protected override void Start()
    {
        base.Start();
        playerTransform = GetPlayer().transform;
        topTransform    = GetTopTransform();
        anim            = enemyAnimation.anim;
        System.Type type       = EnemyAttackTypeDictionary.typeDictionary[attackType];
        var         attackHook = GetComponentInParent(type) as IEventHook;

        if (attackHook == null)
        {
            Debug.Log("type: " + type.Name);
        }

        this.observer = attackHook.trigger.Subscribe((e) => {
            if (e)
            {
                AttackStart();
            }
            else
            {
                AttackEnd();
            }
        });
        rotateTime = RotationTime();
    }
Ejemplo n.º 10
0
        public SaiHistoryHandler(SmartScriptBase script, ISmartFactory smartFactory)
        {
            this.script       = script;
            this.smartFactory = smartFactory;
            this.script.Events.CollectionChanged += Events_CollectionChanged;
            this.script.BulkEditingStarted       += OnBulkEditingStarted;
            this.script.BulkEditingFinished      += OnBulkEditingFinished;

            variablesDisposable = this.script.GlobalVariables.ToStream().Subscribe(e =>
            {
                if (e.Type == CollectionEventType.Add)
                {
                    e.Item.CommentChanged      += OnGlobalVariableCommentChanged;
                    e.Item.VariableTypeChanged += OnGlobalVariableTypeChanged;
                    e.Item.NameChanged         += OnGlobalVariableNameChanged;
                    e.Item.KeyChanged          += OnGlobalVariableKeyChanged;
                }
                else
                {
                    e.Item.CommentChanged      -= OnGlobalVariableCommentChanged;
                    e.Item.VariableTypeChanged -= OnGlobalVariableTypeChanged;
                    e.Item.NameChanged         -= OnGlobalVariableNameChanged;
                    e.Item.KeyChanged          -= OnGlobalVariableKeyChanged;
                }
            });

            script.GlobalVariables.CollectionChanged += GlobalVariablesOnCollectionChanged;

            foreach (SmartEvent ev in this.script.Events)
            {
                BindEvent(ev);
            }
        }
Ejemplo n.º 11
0
        static void Main(string[] args)
        {
            var people = new List <Person>
            {
                new Person()
                {
                    FirstName = "Willamar", LastName = "Fernandes"
                },
                new Person()
                {
                    FirstName = "Willian", LastName = "Fernandes"
                }
            };

            List <Person> .Enumerator e = people.GetEnumerator();

            try
            {
                Person v;
                while (e.MoveNext())
                {
                    v = e.Current;
                    Console.WriteLine(v.FirstName);
                }
            }
            finally
            {
                System.IDisposable d = e as System.IDisposable;
                if (d != null)
                {
                    d.Dispose();
                }
            }
            Console.Read();
        }
Ejemplo n.º 12
0
        private bool validata(string theme)
        {
            DropdownColumn dropdownColumn = (DropdownColumn)this.grdTopCategries.Columns[1];

            System.Collections.IEnumerator enumerator = this.grdTopCategries.Rows.GetEnumerator();
            bool result;

            try
            {
                while (enumerator.MoveNext())
                {
                    System.Web.UI.WebControls.GridViewRow gridViewRow = (System.Web.UI.WebControls.GridViewRow)enumerator.Current;
                    string a = dropdownColumn.SelectedValues[gridViewRow.RowIndex];
                    if (a == theme)
                    {
                        result = false;
                        return(result);
                    }
                }
                return(true);
            }
            finally
            {
                System.IDisposable disposable = enumerator as System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            return(result);
        }
Ejemplo n.º 13
0
        public static void ForeachCompilerCodeDemo()
        {
            var people = new List <Person>
            {
                new Person()
                {
                    FirstName = "John", LastName = "Doe"
                },
                new Person()
                {
                    FirstName = "Jane", LastName = "Doe"
                },
            };

            List <Person> .Enumerator e = people.GetEnumerator();

            try
            {
                Person v;
                while (e.MoveNext())
                {
                    v = e.Current;
                }
            }
            finally
            {
                System.IDisposable d = e as System.IDisposable;
                if (d != null)
                {
                    d.Dispose();
                }
            }
        }
Ejemplo n.º 14
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void confirmTargetDirectoryIsWritable(org.neo4j.io.layout.StoreLayout storeLayout) throws CannotWriteException, java.io.IOException
        private static void ConfirmTargetDirectoryIsWritable(StoreLayout storeLayout)
        {
            using (System.IDisposable ignored = StoreLockChecker.Check(storeLayout))
            {
                // empty
            }
        }
Ejemplo n.º 15
0
    public void TimerStart()
    {
        TimerStop();
        TimerReset();

        if (OnStart != null)
        {
            OnStart.Invoke(currentTime);
        }
        subscribe = Observable.Interval(System.TimeSpan.FromSeconds(1)).Select(_ => currentTime).Where(_ => _ > 0).Subscribe(_ => {
            currentTime--;
            if (OnUpdate != null)
            {
                OnUpdate.Invoke(currentTime);
            }

            if (currentTime == 0)
            {
                subscribe.Dispose();
                if (OnOver != null)
                {
                    OnOver.Invoke();
                }
            }
        });
    }
Ejemplo n.º 16
0
    protected void Start()
    {
        rigidbody2D = GetComponent <Rigidbody2D>();

        disposable = this.UpdateAsObservable()
                     .Subscribe(_ => CheckLifeTime());
    }
Ejemplo n.º 17
0
 public void Dispose()
 {
     truthSub?.Dispose();
     tickSub?.Dispose();
     truthSub = null;
     tickSub  = null;
 }
        static StackObject *AddTo_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.GameObject @gameObject = (UnityEngine.GameObject) typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.IDisposable @disposable = (System.IDisposable) typeof(System.IDisposable).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = UniRx.DisposableExtensions.AddTo <System.IDisposable>(@disposable, @gameObject);

            object obj_result_of_this_method = result_of_this_method;

            if (obj_result_of_this_method is CrossBindingAdaptorType)
            {
                return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance));
            }
            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Ejemplo n.º 19
0
 protected internal ThreadAhead(System.IDisposable actual)
 {
     this._actual = actual;
     Name         = this.GetType().Name + " for " + actual;
     this._owner  = Thread.CurrentThread;
     Daemon       = true;
 }
Ejemplo n.º 20
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private StoreLogService(org.neo4j.logging.LogProvider userLogProvider, org.neo4j.io.fs.FileSystemAbstraction fileSystem, java.io.File internalLog, java.util.Map<String, org.neo4j.logging.Level> logLevels, org.neo4j.logging.Level defaultLevel, java.time.ZoneId logTimeZone, long internalLogRotationThreshold, long internalLogRotationDelay, int maxInternalLogArchives, java.util.concurrent.Executor rotationExecutor, final System.Action<org.neo4j.logging.LogProvider> rotationListener) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
        private StoreLogService(LogProvider userLogProvider, FileSystemAbstraction fileSystem, File internalLog, IDictionary <string, Level> logLevels, Level defaultLevel, ZoneId logTimeZone, long internalLogRotationThreshold, long internalLogRotationDelay, int maxInternalLogArchives, Executor rotationExecutor, System.Action <LogProvider> rotationListener)
        {
            if (!internalLog.ParentFile.exists())
            {
                fileSystem.Mkdirs(internalLog.ParentFile);
            }

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.logging.FormattedLogProvider.Builder internalLogBuilder = org.neo4j.logging.FormattedLogProvider.withZoneId(logTimeZone).withDefaultLogLevel(defaultLevel).withLogLevels(logLevels);
            FormattedLogProvider.Builder internalLogBuilder = FormattedLogProvider.withZoneId(logTimeZone).withDefaultLogLevel(defaultLevel).withLogLevels(logLevels);

            FormattedLogProvider internalLogProvider;

            if (internalLogRotationThreshold == 0)
            {
                Stream outputStream = createOrOpenAsOutputStream(fileSystem, internalLog, true);
                internalLogProvider = internalLogBuilder.ToOutputStream(outputStream);
                rotationListener(internalLogProvider);
                this._closeable = outputStream;
            }
            else
            {
                RotatingFileOutputStreamSupplier rotatingSupplier = new RotatingFileOutputStreamSupplier(fileSystem, internalLog, internalLogRotationThreshold, internalLogRotationDelay, maxInternalLogArchives, rotationExecutor, new RotationListenerAnonymousInnerClass(this, rotationListener, internalLogBuilder));
                internalLogProvider = internalLogBuilder.ToOutputStream(rotatingSupplier);
                this._closeable     = rotatingSupplier;
            }
            this._logService = new SimpleLogService(userLogProvider, internalLogProvider);
        }
Ejemplo n.º 21
0
 private System.Collections.IEnumerator ActionNode14_Tick()
 {
     ActionNode14_Result = ActionNode14.Result;
     // GetRandomListItem
     while (this.DebugInfo("68961abd-e820-48aa-a995-9cc061db72e3", "b41bbe7f-ce36-4757-a82f-262a4ca53efb", this) == 1)
     {
         yield return(null);
     }
     GetRandomListItem15_Result = Group.Items[UnityEngine.Random.Range(0, Group.Items.Count)];
     ActionNode16_gameObject    = GetRandomListItem15_Result;
     // ActionNode
     while (this.DebugInfo("b41bbe7f-ce36-4757-a82f-262a4ca53efb", "fedb37d4-17d7-448b-aacc-80a004c7dcf3", this) == 1)
     {
         yield return(null);
     }
     // Visit uFrame.ECS.Actions.GameObjects.Instantiate
     ActionNode16_Result = uFrame.ECS.Actions.GameObjects.Instantiate(ActionNode16_gameObject, ActionNode16_position, ActionNode16_rotation);
     // SetVariableNode
     while (this.DebugInfo("fedb37d4-17d7-448b-aacc-80a004c7dcf3", "0f5e4b94-6070-4ecd-8398-9b080c87ab8f", this) == 1)
     {
         yield return(null);
     }
     ActionNode16_Result.transform.parent = (UnityEngine.Transform)Group.Parent;
     yield break;
 }
Ejemplo n.º 22
0
 protected void btnDel_Click(object sender, System.EventArgs e)
 {
     System.Collections.IEnumerator enumerator = this.gvResource.Rows.GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             GridViewRow gridViewRow = (GridViewRow)enumerator.Current;
             CheckBox    cb          = gridViewRow.FindControl("cbBox") as CheckBox;
             if (cb != null && cb.Checked)
             {
                 using (pm2Entities pm2Entities = new pm2Entities())
                 {
                     if (base.Request["num"] == "1")
                     {
                         Res_Template res_Template = (
                             from m in pm2Entities.Res_Template
                             where m.TemplateId == cb.ToolTip
                             select m).FirstOrDefault <Res_Template>();
                         if (res_Template != null)
                         {
                             res_Template.IsValid = new bool?(false);
                             pm2Entities.SaveChanges();
                         }
                     }
                     else
                     {
                         IQueryable <Res_TemplateItem> queryable =
                             from m in pm2Entities.Res_TemplateItem
                             where m.Res_Template.TemplateId == cb.ToolTip
                             select m;
                         foreach (Res_TemplateItem current in queryable)
                         {
                             pm2Entities.DeleteObject(current);
                         }
                         Res_Template res_Template2 = (
                             from m in pm2Entities.Res_Template
                             where m.TemplateId == cb.ToolTip
                             select m).FirstOrDefault <Res_Template>();
                         if (res_Template2 != null)
                         {
                             pm2Entities.DeleteObject(res_Template2);
                             pm2Entities.SaveChanges();
                         }
                     }
                 }
             }
         }
     }
     finally
     {
         System.IDisposable disposable = enumerator as System.IDisposable;
         if (disposable != null)
         {
             disposable.Dispose();
         }
     }
     base.RegisterScript("location.href=location.href;");
 }
Ejemplo n.º 23
0
 public virtual void ResetPosition()
 {
     if (_PositionDisposable != null)
     {
         _PositionDisposable.Dispose();
     }
     _PositionDisposable = GetPositionObservable().Subscribe(Entity.PositionProperty).DisposeWith(this);
 }
Ejemplo n.º 24
0
 public InProcessServerControls(File serverFolder, File userLogFile, File internalLogFile, NeoServer server, System.IDisposable additionalClosable)
 {
     this._serverFolder       = serverFolder;
     this._userLogFile        = userLogFile;
     this._internalLogFile    = internalLogFile;
     this._server             = server;
     this._additionalClosable = additionalClosable;
 }
 private void RemoveFromMapOverlay()
 {
     if (_overlayObject != null)
     {
         _overlayObject.Dispose();
         _overlayObject = null;
     }
 }
 public virtual void ResetIsNameFrank()
 {
     if (_IsNameFrankDisposable != null)
     {
         _IsNameFrankDisposable.Dispose();
     }
     _IsNameFrankDisposable = _IsNameFrankProperty.ToComputed(ComputeIsNameFrank, this.GetIsNameFrankDependents().ToArray()).DisposeWith(this);
 }
Ejemplo n.º 27
0
 public FileResponse(int statusCode, System.Collections.Generic.Dictionary <string, System.Collections.Generic.IEnumerable <string> > headers, System.IO.Stream stream, System.IDisposable client, System.IDisposable response)
 {
     StatusCode = statusCode;
     Headers    = headers;
     Stream     = stream;
     _client    = client;
     _response  = response;
 }
 private void ClearOverlay()
 {
     if (_overlayObject != null)
     {
         _overlayObject.Dispose();
         _overlayObject = null;
     }
 }
Ejemplo n.º 29
0
    public void AddPrice()
    {
        string id = this.hdGuid.Value;

        if (!string.IsNullOrEmpty(this.resourceId))
        {
            id = this.resourceId;
        }
        using (pm2Entities pm2Entities = new pm2Entities())
        {
            IQueryable <Res_Price> queryable =
                from m in pm2Entities.Res_Price
                where m.ResourceId == id
                select m;
            foreach (Res_Price current in queryable)
            {
                pm2Entities.DeleteObject(current);
            }
            pm2Entities.SaveChanges();
        }
        System.Collections.IEnumerator enumerator2 = this.gvwPriceType.Rows.GetEnumerator();
        try
        {
            while (enumerator2.MoveNext())
            {
                GridViewRow gridViewRow = (GridViewRow)enumerator2.Current;
                TextBox     tb          = gridViewRow.FindControl("txtPrice") as TextBox;
                using (pm2Entities pm2Entities2 = new pm2Entities())
                {
                    Res_Price res_Price = new Res_Price();
                    if (!string.IsNullOrEmpty(tb.Text))
                    {
                        res_Price.PriceValue = System.Convert.ToDecimal(tb.Text);
                    }
                    Res_PriceType res_PriceType = (
                        from m in pm2Entities2.Res_PriceType
                        where m.PriceTypeId == tb.ToolTip
                        select m).First <Res_PriceType>();
                    res_PriceType.Res_Price.Add(res_Price);
                    Res_Resource res_Resource = (
                        from m in pm2Entities2.Res_Resource
                        where m.ResourceId == id
                        select m).First <Res_Resource>();
                    res_Resource.Res_Price.Add(res_Price);
                    pm2Entities2.AddToRes_Price(res_Price);
                    pm2Entities2.SaveChanges();
                }
            }
        }
        finally
        {
            System.IDisposable disposable = enumerator2 as System.IDisposable;
            if (disposable != null)
            {
                disposable.Dispose();
            }
        }
    }
Ejemplo n.º 30
0
 private void TryStopSeLoop()
 {
     if (seLoopDisposable == null)
     {
         return;
     }
     seLoopDisposable.Dispose();
     seLoopDisposable = null;
 }
 private void ActionNode3_Tick()
 {
     ActionNode3_Result = ActionNode3.Result;
     ActionNode1_gameObject = Group.Prefab;
     // ActionNode
     // Visit uFrame.Actions.GameObjects.Instantiate
     ActionNode1_Result = uFrame.Actions.GameObjects.Instantiate(ActionNode1_gameObject, ActionNode1_position, ActionNode1_rotation);
     // SetVariableNode
     ActionNode1_Result.transform.parent = (UnityEngine.Transform)Group.Parent;
 }
 public virtual void Execute()
 {
     ActionNode3_Seconds = Group.Speed;
     // ActionNode
     // Visit uFrame.Actions.IntervalBySeconds
     ActionNode3.Seconds = ActionNode3_Seconds;
     ActionNode3.System = System;
     ActionNode3.Tick = ActionNode3_Tick;
     ActionNode3.Execute();
     ActionNode3_Result = ActionNode3.Result;
 }
 private void ActionNode22_Tick()
 {
     ActionNode22_Result = ActionNode22.Result;
     // GetRandomListItem
     GetRandomListItem8_Result = Group.Items[UnityEngine.Random.Range(0, Group.Items.Count)];
     ActionNode2_gameObject = GetRandomListItem8_Result;
     // ActionNode
     // Visit uFrame.Actions.GameObjects.Instantiate
     ActionNode2_Result = uFrame.Actions.GameObjects.Instantiate(ActionNode2_gameObject, ActionNode2_position, ActionNode2_rotation);
     // SetVariableNode
     ActionNode2_Result.transform.parent = (UnityEngine.Transform)Group.Parent;
 }
 public virtual void Execute()
 {
     ActionNode22_Seconds = Group.SpawnSpeed;
     ActionNode22_DisposeWith = Group;
     // ActionNode
     // Visit uFrame.Actions.IntervalBySeconds
     ActionNode22.Seconds = ActionNode22_Seconds;
     ActionNode22.DisposeWith = ActionNode22_DisposeWith;
     ActionNode22.System = System;
     ActionNode22.Tick = ActionNode22_Tick;
     ActionNode22.Execute();
     ActionNode22_Result = ActionNode22.Result;
 }
 public virtual void ResetIsNameFrank() {
     if (_IsNameFrankDisposable != null) {
         _IsNameFrankDisposable.Dispose();
     }
     _IsNameFrankDisposable = _IsNameFrankProperty.ToComputed(ComputeIsNameFrank, this.GetIsNameFrankDependents().ToArray()).DisposeWith(this);
 }
        private async void OnFlashPointCommand(object obj)
        {
            CoordinateDD dd;
            var ctvm = CTView.Resources["CTViewModel"] as CoordinateToolViewModel;
            if (ctvm != null)
            {
                if (!CoordinateDD.TryParse(ctvm.InputCoordinate, out dd))
                    return;
            }
            else { return; }

            ArcGIS.Core.CIM.CIMPointSymbol symbol = null;
            var point = await QueuedTask.Run(() =>
            {
                ArcGIS.Core.Geometry.SpatialReference sptlRef = SpatialReferenceBuilder.CreateSpatialReference(4326);
                return MapPointBuilder.CreateMapPoint(dd.Lon, dd.Lat, sptlRef);
            });

            await QueuedTask.Run(() =>
            {
                // Construct point symbol
                symbol = SymbolFactory.ConstructPointSymbol(ColorFactory.Red, 10.0, SimpleMarkerStyle.Star);
            });

            //Get symbol reference from the symbol 
            CIMSymbolReference symbolReference = symbol.MakeSymbolReference();

            await QueuedTask.Run(() =>
            {
                ClearOverlay();
                _overlayObject = MapView.Active.AddOverlay(point, symbolReference);
                MapView.Active.ZoomToAsync(point, new TimeSpan(2500000), true);
            });
        }
 private void ClearOverlay()
 {
     if (_overlayObject != null)
     {
         _overlayObject.Dispose();
         _overlayObject = null;
     }
 }
Ejemplo n.º 38
0
 /// <summary>
 /// Initializes a <see cref="DeviceContext9">Direct3D9 device context</see> according to the specified settings.
 /// The base class retains ownership of the context and will dispose of it when appropriate.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <returns>The initialized device context.</returns>
 protected void InitializeDevice(DeviceSettings9 settings)
 {
     var result = new DeviceContext9(Form, settings);
     apiContext = result;
     Context9 = result;
 }
Ejemplo n.º 39
0
 public virtual void ResetShouldDestroy()
 {
     if (_ShouldDestroyDisposable != null) {
         _ShouldDestroyDisposable.Dispose();
     }
     _ShouldDestroyDisposable = _ShouldDestroyProperty.ToComputed(ComputeShouldDestroy, this.GetShouldDestroyDependents().ToArray()).DisposeWith(this);
 }
Ejemplo n.º 40
0
 public virtual void ResetShouldCreateAndDrop()
 {
     if (_ShouldCreateAndDropDisposable != null) {
         _ShouldCreateAndDropDisposable.Dispose();
     }
     _ShouldCreateAndDropDisposable = _ShouldCreateAndDropProperty.ToComputed(ComputeShouldCreateAndDrop, this.GetShouldCreateAndDropDependents().ToArray()).DisposeWith(this);
 }
Ejemplo n.º 41
0
 public virtual void ResetCanTap()
 {
     if (_CanTapDisposable != null) {
         _CanTapDisposable.Dispose();
     }
     _CanTapDisposable = _CanTapProperty.ToComputed(ComputeCanTap, this.GetCanTapDependents().ToArray()).DisposeWith(this);
 }