Beispiel #1
0
 public void FinishedAnalysis(SourceInfo info, ExitType exit, string errorMessage)
 {
     if (exit != ExitType.OK)
     {
         if (exit == ExitType.ERROR)
         {
             LogItem oSourceLog = log.LogEvent("Source detection");
             if (!string.IsNullOrEmpty(errorMessage))
             {
                 oSourceLog.LogValue("Source detection failed", errorMessage, ImageType.Warning);
             }
             else
             {
                 oSourceLog.LogValue("Source detection failed", "An error occurred in source detection. Doing no processing", ImageType.Warning);
             }
             filters = new DeinterlaceFilter[] { new DeinterlaceFilter("Error", "#An error occurred in source detection. Doing no processing") };
         }
         interlaced = false;
     }
     else
     {
         LogItem oSourceLog = log.LogValue("Source detection", info.analysisResult);
         if (info.sourceType == SourceType.NOT_ENOUGH_SECTIONS || info.sourceType == SourceType.UNKNOWN)
         {
             oSourceLog.LogEvent("Source detection failed: Could not find enough useful sections to determine source type for " + job.Input, ImageType.Warning);
             filters = new DeinterlaceFilter[] { new DeinterlaceFilter("Error", "#Not enough useful sections for source detection. Doing no processing") };
         }
         else
         {
             this.filters = ScriptServer.GetDeinterlacers(info).ToArray();
         }
         interlaced = (info.sourceType != SourceType.PROGRESSIVE);
     }
     finished = true;
 }
Beispiel #2
0
        /// Exit the game after finishing a level (after crossing the
        /// finish line)
        /// Takes a 'disconnected' boolean, which should be true if we
        /// came from the disconnection dialog after losing connection
        /// with another player.
        public static void ExitGameOnFinish(Recording recording = null, bool disconnected = false)
        {
            ExitType exit = disconnected ? ExitType.DISCONNECT : ExitType.FINISH;

            SceneManager.outs = new GameOuts(opts, exit, recording);
            Load(Magic.Scenes.POSTGAME);
        }
Beispiel #3
0
 public static void Exit(ExitType exitType)
 {
     if (IsWindows)
     {
         Windows.ExitInPlatform(exitType);
     }
 }
Beispiel #4
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int Delete(BaseEntity p_Entity)
        {
            try
            {
                ExitType MasterEntity = (ExitType)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //删除主表数据
                string Sql = "";
                Sql = "DELETE FROM Enum_ExitType WHERE " + "ID=" + SysString.ToDBString(MasterEntity.ID);
                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(Sql);
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(Sql);
                }

                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBDelete), E);
            }
        }
Beispiel #5
0
        public async Task StopAsync(ExitType exitType)
        {
            if (_logger.IsInfo) _logger.Info("Shutting down...");
            _runnerCancellation.Cancel();

            if (_logger.IsInfo) _logger.Info("Stopping rlpx peer...");
            var rlpxPeerTask = _rlpxPeer?.Shutdown() ?? Task.CompletedTask;

            if (_logger.IsInfo) _logger.Info("Stopping peer manager...");
            var peerManagerTask = _peerManager?.StopAsync(exitType) ?? Task.CompletedTask;

            if (_logger.IsInfo) _logger.Info("Stopping sync manager...");
            var syncManagerTask = _syncManager?.StopAsync() ?? Task.CompletedTask;

            if (_logger.IsInfo) _logger.Info("Stopping block producer...");
            var blockProducerTask = _blockProducer?.StopAsync() ?? Task.CompletedTask;
            
            if (_logger.IsInfo) _logger.Info("Stopping blockchain processor...");
            var blockchainProcessorTask = (_blockchainProcessor?.StopAsync() ?? Task.CompletedTask);

            if (_logger.IsInfo) _logger.Info("Stopping discovery app...");
            var discoveryStopTask = _discoveryApp?.StopAsync() ?? Task.CompletedTask;

            await Task.WhenAll(discoveryStopTask, rlpxPeerTask, peerManagerTask, syncManagerTask, blockchainProcessorTask, blockProducerTask);

            if (_logger.IsInfo) _logger.Info("Closing DBs...");
            _dbProvider.Dispose();
            if (_logger.IsInfo) _logger.Info("Ethereum shutdown complete... please wait for all components to close");
        }
Beispiel #6
0
 /// <summary>
 /// 新增(传入事务处理)
 /// </summary>
 /// <param name="p_BE">要新增的实体</param>
 /// <param name="sqlTrans">事务类</param>
 public void RAdd(BaseEntity p_BE, IDBTransAccess sqlTrans)
 {
     try
     {
         this.CheckCorrect(p_BE);
         ExitType entity = (ExitType)p_BE;
         string   sql    = "SELECT 1 FROM Enum_ExitType WHERE Code=" + SysString.ToDBString(entity.Code);
         sql += " AND ID <>" + entity.ID;
         DataTable dt = sqlTrans.Fill(sql);
         if (dt.Rows.Count != 0)
         {
             throw new Exception("此编码已存在,请重新生成");
         }
         ExitTypeCtl control = new ExitTypeCtl(sqlTrans);
         //entity.ID=(int)EntityIDTable.GetID((long)SysEntity.Enum_ExitType,sqlTrans);
         control.AddNew(entity);
     }
     catch (BaseException)
     {
         throw;
     }
     catch (Exception E)
     {
         throw new BaseException(E.Message);
     }
 }
Beispiel #7
0
        /// <summary>
        /// 删除
        /// </summary>
        public override void EntityDelete()
        {
            ExitTypeRule rule   = new ExitTypeRule();
            ExitType     entity = EntityGet();

            rule.RDelete(entity);
        }
Beispiel #8
0
        /// <summary>
        /// 获得实体
        /// </summary>
        /// <returns></returns>
        private ExitType EntityGet()
        {
            ExitType entity = new ExitType();

            entity.ID = HTDataID;
            return(entity);
        }
Beispiel #9
0
        /// <summary>
        /// 新增
        /// </summary>
        public override int EntityAdd()
        {
            ExitTypeRule rule   = new ExitTypeRule();
            ExitType     entity = EntityGet();

            rule.RAdd(entity);
            return(entity.ID);
        }
Beispiel #10
0
        public static ExitData Create(Room room, Direction direction, int exitRoom, int exitType, int p1, int p2, int p3, int p4)
        {
            ExitType type = (ExitType)exitType;

            if (type == ExitType.MapChange)
            {
                return(new MapChangeExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Hidden)
            {
                return(new HiddenExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Key)
            {
                return(new KeyExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Item)
            {
                return(new ItemExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Toll)
            {
                return(new TollExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Door)
            {
                return(new DoorExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Trap)
            {
                return(new TrapExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Text)
            {
                return(new TextExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Gate)
            {
                return(new GateExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.RemoteAction)
            {
                return(new RemoteActionExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Class)
            {
                return(new ClassExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Race)
            {
                return(new RaceExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            else if (type == ExitType.Level)
            {
                return(new LevelExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
            }
            return(new ExitData(room, direction, exitRoom, type, p1, p2, p3, p4));
        }
Beispiel #11
0
 public GameOuts(GameOpts opts, ExitType type, Recording recording = null)
 {
     this.opts      = opts;
     this.exit      = type;
     this.name      = MultiPlayerController.Instance.ourName;
     this.partner   = MultiPlayerController.Instance.theirName;
     this.time      = FinalizeLevel.time;
     this.recording = recording;
 }
Beispiel #12
0
 public Virus(VirusType type, VirusShape shape, EnterType enterType, ExitType exitType, Vector3 pos, World world)
 {
     this.type      = type;
     this.shape     = shape;
     this.enterType = enterType;
     this.exitType  = exitType;
     this.position  = pos;
     this.model     = (shape == VirusShape.Complex ? Main.main.comVirusModel : Main.main.icoVirusModel);
     world.viruses.Add(this);
 }
Beispiel #13
0
        protected override async Task OnActivatedAsync(ActorActivationDetails details)
        {
            exitType = (ExitType)details.Params[0];

            canBeFrozen = false;

            await RequestMetadataAsync("Object/SignEol");

            SetAnimation("SignEol");
        }
            internal static void ExitInPlatform(ExitType exitType)
            {
                using (var processHandle = new Interop.Windows.SafeProcessHandle(Process.GetCurrentProcess()))
                {
                    Interop.Windows.SafeTokenHandle tokenHandle;
                    var success = Interop.Windows.OpenProcessToken(
                        processHandle,
                        Interop.Windows.TokenAccessRight.AdjustPrivileges | Interop.Windows.TokenAccessRight.Query,
                        out tokenHandle
                        );
                    if (!success)
                    {
                        Logger.GetInstance(typeof(Platform)).Error("Can not open process token, error code: " + Marshal.GetLastWin32Error());
                        return;
                    }

                    Interop.Windows.TokenPrivileges tokenPrivileges;
                    tokenPrivileges.Count = 1;
                    tokenPrivileges.Luid  = 0;
                    tokenPrivileges.Attr  = Interop.Windows.SePrivilege.Enabled;
                    success = Interop.Windows.LookupPrivilegeValueW(
                        null,
                        Interop.Windows.SeShutdownName,
                        ref tokenPrivileges.Luid
                        );
                    if (!success)
                    {
                        Logger.GetInstance(typeof(Platform)).Error("Can not lookup privilege value, error code: " + Marshal.GetLastWin32Error());
                        return;
                    }

                    success = Interop.Windows.AdjustTokenPrivileges(
                        tokenHandle,
                        false,
                        ref tokenPrivileges,
                        0,
                        IntPtr.Zero,
                        IntPtr.Zero
                        );
                    if (!success)
                    {
                        Logger.GetInstance(typeof(Platform)).Error("Can not adjust token privileges, error code: " + Marshal.GetLastWin32Error());
                        return;
                    }

                    success = Interop.Windows.ExitWindowsEx(
                        ConvertWindowsExitTypeFrom(exitType),
                        (uint)Interop.Windows.ShutdownReason.Unknown
                        );
                    if (!success)
                    {
                        Logger.GetInstance(typeof(Platform)).Error("Can not exit Windows, error code: " + Marshal.GetLastWin32Error());
                    }
                }
            }
Beispiel #15
0
 public ExitData(Room room, Direction direction, int exitRoom, ExitType exitType, int p1, int p2, int p3, int p4)
 {
     Room       = room;
     Direction  = direction;
     ExitRoom   = exitRoom;
     ExitType   = exitType;
     Parameter1 = p1;
     Parameter2 = p2;
     Parameter3 = p3;
     Parameter4 = p4;
 }
Beispiel #16
0
        public override void OnAttach(ActorInstantiationDetails details)
        {
            base.OnAttach(details);

            exitType = (ExitType)details.Params[0];

            canBeFrozen = false;

            RequestMetadata("Object/SignEol");
            SetAnimation("SignEol");
        }
Beispiel #17
0
		public Button(string text, Position position, Position size, Rectangle container, string id, bool disable = false, ExitType exitType = ExitType.Center)
		{
			Text = text;
			this.Id = id;
			this.Position = position;
			this.Size = size;
			this.Disabled = disable;
			this.Selected = false;
			this.ExitType = exitType;
			ApplyContainer (container);
		}
Beispiel #18
0
        /// <summary>
        /// 获得实体
        /// </summary>
        /// <returns></returns>
        private ExitType EntityGet()
        {
            ExitType entity = new ExitType();

            entity.ID = HTDataID;
            entity.SelectByID();
            entity.Code   = txtCode.Text.Trim();
            entity.Name   = txtName.Text.Trim();
            entity.Remark = txtRemark.Text.Trim();

            return(entity);
        }
Beispiel #19
0
        /// Exit the game by quitting (e.g. pressing 'exit' in the pause
        /// menu or disconnect dialog)
        /// Takes a 'disconnected' boolean, which should be true if we
        /// came from the disconnection dialog after losing connection
        /// with another player.
        public static void ExitGameOnQuit(bool disconnected)
        {
            ExitType exit = disconnected ? ExitType.DISCONNECT : ExitType.QUIT;

            SceneManager.outs = new GameOuts(opts, exit);

            // if we're in a networked game, we should leave
            // the room
            MultiPlayerController.Instance.LeaveGame();

            Load(Magic.Scenes.MAIN_MENU);
        }
Beispiel #20
0
        /// <summary>
        /// 进入关卡
        /// </summary>
        /// <param name="level">关卡序号.</param>
        /// <param name="exitType">出口类型.</param>
        public void EnterLevel(int level, ExitType exitType)
        {
            exploreSceneReady = false;

            MapWalkableEventsStopAction();

            correctWordList.Clear();
            wrongWordList.Clear();

            IEnumerator enterLevelCoroutine = LatelyEnterLevel(level, exitType);

            StartCoroutine(enterLevelCoroutine);
        }
Beispiel #21
0
        public void InitLevelChange(ExitType exitType, string nextLevel)
        {
            if (initState == InitState.Disposing)
            {
                return;
            }

            initState = InitState.Disposing;

            foreach (Player player in players)
            {
                player.OnLevelChanging(exitType);
            }

            if (nextLevel == null)
            {
                nextLevel = (exitType == ExitType.Bonus ? defaultSecretLevel : defaultNextLevel);
            }

            LevelInitialization data = default(LevelInitialization);

            if (nextLevel != null)
            {
                int i = nextLevel.IndexOf('/');
                if (i == -1)
                {
                    data.EpisodeName = episodeName;
                    data.LevelName   = nextLevel;
                }
                else
                {
                    data.EpisodeName = nextLevel.Substring(0, i);
                    data.LevelName   = nextLevel.Substring(i + 1);
                }
            }

            data.Difficulty = difficulty;
            data.ExitType   = exitType;

            data.PlayerCarryOvers = new PlayerCarryOver[players.Count];
            for (int i = 0; i < players.Count; i++)
            {
                data.PlayerCarryOvers[i] = players[i].PrepareLevelCarryOver();
            }

            data.LastEpisodeName = episodeName;

            currentCarryOver = data;

            levelChangeTimer = 50f;
        }
Beispiel #22
0
        public void SetUpExitType(ExitType exitType)
        {
            this.exitType = exitType;
            switch (exitType)
            {
            case ExitType.ToLastLevel:
                sealAnimReturn.gameObject.SetActive(true);
                break;

            case ExitType.ToNextLevel:
                sealAnimReturn.gameObject.SetActive(false);
                break;
            }
        }
Beispiel #23
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                ExitType MasterEntity = (ExitType)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Enum_ExitType(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("Code" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Code) + ",");
                MasterField.Append("Name" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Name) + ",");
                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("DelFlag" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
 private static Interop.Windows.ExitType ConvertWindowsExitTypeFrom(ExitType exitType)
 {
     if (exitType == ExitType.Logoff)
     {
         return(Interop.Windows.ExitType.Force | Interop.Windows.ExitType.Logoff);
     }
     if (exitType == ExitType.Shutdown)
     {
         return(Interop.Windows.ExitType.Force | Interop.Windows.ExitType.Poweroff);
     }
     if (exitType == ExitType.Reboot)
     {
         return(Interop.Windows.ExitType.Force | Interop.Windows.ExitType.Reboot);
     }
     return(Interop.Windows.ExitType.Force | Interop.Windows.ExitType.Reboot);
 }
Beispiel #25
0
        /// <summary>
        /// 设置
        /// </summary>
        public override void EntitySet()
        {
            ExitType entity = new ExitType();

            entity.ID = HTDataID;
            bool findFlag = entity.SelectByID();

            txtCode.Text   = entity.Code.ToString();
            txtName.Text   = entity.Name.ToString();
            txtRemark.Text = entity.Remark.ToString();


            if (!findFlag)
            {
            }
        }
Beispiel #26
0
    void ReleaseControl(ExitType EExitType)
    {
        if (m_controlled)
        {
            m_bPhysicAnim = false;

            // keep release time
            if (EExitType != ExitType.ClimbExit)
            {
                m_releaseTime = Time.time;
            }

            // Leave control
            m_controlled.EventListeners.ForEach(e => e.OnEdgeGrabEnd(this));
            m_controlled.IsControlled = false;

            // exit with small impulse
            if (EExitType == ExitType.Jump)
            {
                APCharacterMotor motor = m_controlled.GetMotor();
                motor.m_velocity = m_jumpExitPower;

                float horAxis = m_controlled.m_inputs.m_axisX.GetValue();
                motor.m_velocity.x *= horAxis;

                // make sure to exit in right side
                if ((motor.m_velocity.x > 0f && !motor.FaceRight) || (motor.m_velocity.x < 0f && motor.FaceRight))
                {
                    motor.Flip();
                }
            }
            else if (EExitType == ExitType.ClimbExit)
            {
                float fClampedInput = GetClampedInput();

                // inject exit character velocity
                float fGroundSpeed = m_controlled.ComputeMaxGroundSpeed();
                m_controlled.GetMotor().m_velocity = Vector2.right * fClampedInput * fGroundSpeed;

                // limit exit input
                m_controlled.m_inputs.m_axisX.ResetValue(fClampedInput);
            }

            m_controlled = null;
        }
    }
Beispiel #27
0
        public LevelInitialization(string episode, string level, GameDifficulty difficulty, PlayerType playerType)
        {
            LevelName   = level;
            EpisodeName = episode;
            Difficulty  = difficulty;

            ExitType = ExitType.None;

            PlayerCarryOvers = new[] {
                new PlayerCarryOver {
                    Type  = playerType,
                    Lives = 3
                }
            };

            LastEpisodeName = null;
        }
        private static bool ConsoleCtrlHandler(ExitType signal)
        {
            switch (signal)
            {
            case ExitType.CTRL_BREAK_EVENT:
            case ExitType.CTRL_C_EVENT:
            case ExitType.CTRL_LOGOFF_EVENT:
            case ExitType.CTRL_SHUTDOWN_EVENT:
            case ExitType.CTRL_CLOSE_EVENT:

                KillProcesses();
                Environment.Exit(0);
                return(false);

            default:
                return(false);
            }
        }
Beispiel #29
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="p_BE">要删除的实体</param>
 /// <param name="sqlTrans">事务类</param>
 public void RDelete(BaseEntity p_BE, IDBTransAccess sqlTrans)
 {
     try
     {
         this.CheckCorrect(p_BE);
         ExitType    entity  = (ExitType)p_BE;
         ExitTypeCtl control = new ExitTypeCtl(sqlTrans);
         control.Delete(entity);
     }
     catch (BaseException)
     {
         throw;
     }
     catch (Exception E)
     {
         throw new BaseException(E.Message);
     }
 }
Beispiel #30
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int Update(BaseEntity p_Entity)
        {
            try
            {
                ExitType MasterEntity = (ExitType)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //更新主表数据
                StringBuilder UpdateBuilder = new StringBuilder();
                UpdateBuilder.Append("UPDATE Enum_ExitType SET ");
                UpdateBuilder.Append(" ID=" + SysString.ToDBString(MasterEntity.ID) + ",");
                UpdateBuilder.Append(" Code=" + SysString.ToDBString(MasterEntity.Code) + ",");
                UpdateBuilder.Append(" Name=" + SysString.ToDBString(MasterEntity.Name) + ",");
                UpdateBuilder.Append(" Remark=" + SysString.ToDBString(MasterEntity.Remark) + ",");
                UpdateBuilder.Append(" DelFlag=" + SysString.ToDBString(MasterEntity.DelFlag));

                UpdateBuilder.Append(" WHERE " + "ID=" + SysString.ToDBString(MasterEntity.ID));



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(UpdateBuilder.ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(UpdateBuilder.ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBUpdate), E);
            }
        }
 public void ToggleExit(ExitType exitType)
 {
     if (myManager.Connected)
     {
         //Increase index by 1 for the toggle event. This works better but seems incorrect since 0 is a valid exit index as well
         if (exitType == ExitType.Main)
         {
             myManager.TransmitEvent(EventsEnum.KEY_TOGGLE_AIRCRAFT_EXIT, mainExitIndex + 1);
         }
         else if (exitType == ExitType.Cargo)
         {
             myManager.TransmitEvent(EventsEnum.KEY_TOGGLE_AIRCRAFT_EXIT, cargoExitIndex + 1);
         }
         else if (exitType == ExitType.Emergency)
         {
             myManager.TransmitEvent(EventsEnum.KEY_TOGGLE_AIRCRAFT_EXIT, emergencyExitIndex + 1);
         }
     }
 }
Beispiel #32
0
 public Space(Position position, Rectangle container, ExitType exitType, int length = 5)
     : base("space", position, new Position(length,1), container, "Space", false, exitType)
 {
 }
Beispiel #33
0
 public Ok(Position position, Rectangle container, ExitType exitType, Position size)
     : base("Ok", position, size, container, "Ok", false, exitType)
 {
 }
Beispiel #34
0
 public Shift(Position position, Rectangle container, ExitType exitType, bool small = true)
     : base("Shift", position, small ? new Position(3,1) : new Position(2,2), container, "Shift", false, exitType)
 {
     this.small = small;
     arrowRect = new Rectangle (new Point (outherBox.P1.X + 3 * characterEdge, outherBox.P1.Y + 2 * characterEdge), new Point (outherBox.P1.X + 14 * characterEdge, outherBox.P2.Y - 7 * characterEdge));
     if (!small)
     {
         arrowRect = new Rectangle (new Point (arrowRect.P1.X, arrowRect.P1.Y), new Point (arrowRect.P2.X, arrowRect.P1.Y + (arrowRect.P2.Y - arrowRect.P1.Y)/2 - 2 * characterEdge));
         arrowRect = arrowRect + new Point (7, 0);
     }
     lineStart = new Point(arrowRect.P1.X + ((arrowRect.P2.X - arrowRect.P1.X) / 2), arrowRect.P2.Y);
     lineLength = (innerBox.P2.Y - lineStart.Y)  - 2 * characterEdge;
     if (small)
     {
         lineLength = (innerBox.P2.Y - lineStart.Y)  - 2 * characterEdge;
         textDisplacement = new Point (10, 6);
     }
     else
     {
         lineLength = (innerBox.P2.Y - lineStart.Y)/3;
         textDisplacement = new Point (5, 14);
     }
 }
		public ExitStatement(ExitType exitType) {}
 public OpenExitConfirmation(ExitType type)
 {
     this.type = type;
 }
 private void ShowGameWindow(GameWindow frame)
 {
     this.Hide();
     frame.ShowDialog(this);
     //frame has exited
     exitChoice = frame.ReturnStatus();
     if (exitChoice != ExitType.PLAY_MENU)
     {
         this.Dispose();
     }
     else
     {
         this.Show();
         this.BringToFront();
     }
 }
Beispiel #38
0
 public GameWindow(GameBoard board, NetworkInterface comm, bool canExitToGameSelect)
 {
     InitializeComponent(board);
     network = (comm != null);
     exitChoice = ExitType.DESKTOP;
     board.SetFrameComponents(turnIndicator, sessionStatus, moveIndicator, mnuForfeit, mnuAskTie, mnuRestart, new GameSpecificMenuEntries(mnuStrip));
     if (network)
     {
         this.mnuOpen.Enabled = false;
         this.mnuSave.Enabled = false;
     }
     if (!canExitToGameSelect)
         this.mnuExitToChooseGame.Enabled = false;
 }
        // TODO
        public void RemoveUser(SimpleUser usr, ExitType type)
        {
            if (usr == null)
                throw new ArgumentNullException("usr");

            lock (this._users)
            {
                if (this._users.Contains(usr))
                {
                    this._users.Remove(usr);
                    this._members.Remove(usr.UpLink);
                    usr.UpLink.Channels.Remove(this.Name);
            /* TODO: nachrichten senden
                    switch (type)
                    {
                        case ExitType.Quit:
                        case ExitType.Kick:
                        case ExitType.Part:
                            /*
                            * Server informieren <-- nicht notwendig, sieht Part()
                            *
                    }*/
                }
            }

            if (this.HasMode('P')) // pre-defined channel
                return;

            if (this.MemberCount == 0)
            {
                this._server.RemoveChannel(this);
                this.Dispose();
            }
        }
Beispiel #40
0
 private void mnuExitToDesktop_Click(object sender, EventArgs e)
 {
     exitChoice = ExitType.DESKTOP;
     this.Close();
 }
Beispiel #41
0
        private void appSettingInit()
        {
            this.exitType = ExitType.None;
            lblUsername.Text = T8UserLoginInfo.Username;
            lblTanggal.Text = string.Format("{0:dd MMM yyyy}", DateTime.Now);

            lblJam.Text = string.Format("{0: HH}", DateTime.Now);
            lblJam.AutoSize = false;
            lblJam.TextAlignment = ContentAlignment.MiddleLeft;
            lblJam.Size = new System.Drawing.Size(25, 23);
            //lblJam.BorderVisible = true;// = Color.Red;
            lblJam.Padding = new System.Windows.Forms.Padding(0);
            lblJam.Margin = new System.Windows.Forms.Padding(0);

            lblDetik.Text = ":";
            lblDetik.AutoSize = false;
            lblDetik.TextAlignment = ContentAlignment.MiddleCenter;
            lblDetik.Size = new System.Drawing.Size(13, 23);
            //lblDetik.BorderVisible = true;// = Color.Red;
            lblDetik.Padding = new System.Windows.Forms.Padding(0);
            lblDetik.Margin = new System.Windows.Forms.Padding(0);

            lblMenit.Text = string.Format("{0: mm}", DateTime.Now);
            lblMenit.AutoSize = false;
            lblMenit.TextAlignment = ContentAlignment.MiddleLeft;
            lblMenit.Size = new System.Drawing.Size(25, 23);
            //lblMenit.BorderVisible = true;// = Color.Red;
            lblMenit.Padding = new System.Windows.Forms.Padding(0);
            lblMenit.Margin = new System.Windows.Forms.Padding(0);

            timer1.Enabled = true;
            timer1.Interval = 500;
            timer1.Start();
        }
Beispiel #42
0
 private void ThisText(Int32 _val)
 {
     this.exitType = ExitType.Lock;
     this.Close();
 }
Beispiel #43
0
 private void radMenuItem5_Click(object sender, EventArgs e)
 {
     this.exitType = ExitType.Exit;
     this.Close();
 }
Beispiel #44
0
        private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (exitType == ExitType.Exit || exitType == ExitType.None)
            {
                if (MessageBox.Show(this, "Anda yakin akan menutup aplikasi?", "Konfirmasi", MessageBoxButtons.YesNo,  MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
                    == System.Windows.Forms.DialogResult.No)
                {
                    e.Cancel = true;
                }
                UserBusiness.Logout(T8UserLoginInfo.IdLogin);
                UserBusiness.LastLogout(T8UserLoginInfo.Username);
            }

            else if (exitType == ExitType.Lock)
            {
                e.Cancel = true;
                FrmLock frmLogin = new FrmLock(this);
                frmLogin.ShowDialog();
                RunTimerLock();
            }

            else if (exitType == ExitType.Logout)
            {
                UserBusiness.Logout(T8UserLoginInfo.IdLogin);
                UserBusiness.LastLogout(T8UserLoginInfo.Username);
            }
            this.exitType = ExitType.None;
        }
Beispiel #45
0
		public ExitStatement(ExitType exitType) {
			ExitType = exitType;
		}
Beispiel #46
0
 private void mnuExitToChooseGame_Click(object sender, EventArgs e)
 {
     exitChoice = ExitType.GAME_MENU;
     this.Close();
 }
Beispiel #47
0
 private void mnuExitToChoosePlayMethod_Click(object sender, EventArgs e)
 {
     exitChoice = ExitType.PLAY_MENU;
     this.Close();
 }
 private void btnBack_Click(object sender, EventArgs e)
 {
     exitChoice = ExitType.GAME_MENU;
     this.Dispose();
 }
Beispiel #49
0
 private void FrmMain_KeyDown(object sender, KeyEventArgs e)
 {
     if(e.KeyCode==Keys.F5)
     {
         RefreshData();
     }
     else if(e.KeyCode==Keys.Escape)
     {
         this.exitType = ExitType.Exit;
         this.Close();
     }
     else if(e.KeyCode == Keys.F1)
     {
         if (!FillPassword()) return;
         InputSurat();
     }
     else if(e.KeyCode==Keys.F11)
     {
         if (!FillPassword()) return;
         Pengaturan();
     }
 }
Beispiel #50
0
        private static ExitType OldOMBuildProject(ExitType exitType, string projectFile, string[] targets, string toolsVersion, Dictionary<string, string> globalProperties, ILogger[] loggers, LoggerVerbosity verbosity, bool needToValidateProject, string schemaFile, int cpuCount)
        {
            // Log something to avoid confusion caused by errant environment variable sending us down here
            Console.WriteLine(AssemblyResources.GetString("Using35Engine"));

            Microsoft.Build.BuildEngine.BuildPropertyGroup oldGlobalProps = new Microsoft.Build.BuildEngine.BuildPropertyGroup();
            // Copy over the global properties to the old OM
            foreach (KeyValuePair<string, string> globalProp in globalProperties)
            {
                oldGlobalProps.SetProperty(globalProp.Key, globalProp.Value);
            }

            if (!BuildProjectWithOldOM(projectFile, targets, toolsVersion, oldGlobalProps, loggers, verbosity, null, needToValidateProject, schemaFile, cpuCount))
            {
                exitType = ExitType.BuildError;
            }
            return exitType;
        }
Beispiel #51
0
 public Enter(Position position, Rectangle container, ExitType exitType)
     : base("", position, new Position(2,1), container, "Enter", false, exitType)
 {
     arrowRect = new Rectangle (new Point (outherBox.P1.X + characterEdge, outherBox.P1.Y + 4 * characterEdge), new Point (outherBox.P2.X - ((outherBox.P2.X - outherBox.P1.X)/2) - 3* characterEdge, outherBox.P2.Y - 3 * characterEdge));
 }
 public ExitStatement(ExitType exitType)
 {
     this.exitType = exitType;
 }
Beispiel #53
0
 public Ok(Position position, Rectangle container, ExitType exitType)
     : this(position, container, exitType, new Position(2,1))
 {
 }
Beispiel #54
0
 private static bool ConsoleExitHandler(ExitType exitType)
 {
     System.Console.WriteLine("Shutting down the job...");
     TokenSource.Cancel();
     return true;
 }
Beispiel #55
0
 private void radMenuItem12_Click(object sender, EventArgs e)
 {
     this.exitType = ExitType.Logout;
     if (MessageBox.Show(this, "Anda yakin akan keluar aplikasi?", "Konfirmasi", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
             == System.Windows.Forms.DialogResult.No) return;
     else
     {
         Application.Restart();
     }
 }