コード例 #1
0
ファイル: EventControl.cs プロジェクト: Beugeny/scripts
 public static void onKillUnit(UnitPoint info)
 {
     if (EventControl.killUnit != null)
     {
         EventControl.killUnit(info);
     }
 }
コード例 #2
0
        }//End of bProfile_click button action

        /// <summary>
        /// Button events click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bEvents_Click(object sender, EventArgs e)
        {
            EventControl event_control = Injection.kernel.Get <EventControl>( );

            pContent.Controls.Clear();
            pContent.Controls.Add(event_control);
        }// End of bEvents_Click function
コード例 #3
0
 public ActionResult UserHome()
 {
     ViewBag.UserId      = Session["UserId"].ToString();
     ViewBag.UserEvents  = EventControl.GetUserEvents(Session["UserId"].ToString());
     ViewBag.UserRecords = EventControl.GetUserRecords(ViewBag.UserId);
     return(View());
 }
コード例 #4
0
        private void BT_NewEvent_Click(object sender, EventArgs e)
        {
            EventControl logEvent = new EventControl();

            logEvent.Width = FLP_Events.Width - 6;
            FLP_Events.Controls.Add(logEvent);
        }
コード例 #5
0
        private int CreateEvent(EventControl item)
        {
            TagEvent model = item.GetModel();

            model.Id = GetTagEventId(model.DailyLogId); // 考虑到同时添加多条Event时,EventId要实时更新
            return(context.AddTagEvent(model));
        }
コード例 #6
0
        public List <FileInfo> GetNewFiles()
        {
            List <FileInfo> new_files = GetFiles(new DirectoryInfo(path_));

            foreach (FileInfo s in last_file_list_)
            {
                int file_index = new_files.FindIndex(x => x.FullName.Contains(s.FullName));

                if (file_index >= 0)
                {
                    new_files.RemoveAt(file_index);
                }
            }

            FileProcessEventArgs event_arg = new FileProcessEventArgs(this, "FILE_STATUS");

            foreach (FileInfo f in new_files)
            {
                last_file_list_.Add(f);
                event_arg.input_files.Add(f);
                event_arg.msg.Add("수신시작");
            }

            if (event_use_ && event_arg.input_files.Count > 0)
            {
                EventControl.Instance().SendEvent(event_arg);
            }

            return(new_files);
        }
コード例 #7
0
        public void MakeStart()
        {
            int record_number = data_.Count;

            Byte[] header = MakeHeader(record_number, 0);
            fs_shx_.Write(header, 0, header.Length);

            header = MakeHeader(record_number, 1);
            fs_shp_.Write(header, 0, header.Length);

            int data_count = 0;

            EventControl.Instance().SendEvent(new ProgressEventArgs(null, "PB_OPER", data_count, record_number));
            foreach (Point p in data_)
            {
                Byte[] shx_record    = GetShxRecordContent(20);
                Byte[] record_header = GetRecordHeader(20);

                Byte[] record_content = GetRecordContents(20, p.x, p.y);

                fs_shx_.Write(shx_record, 0, shx_record.Length);
                fs_shp_.Write(record_header, 0, record_header.Length);
                fs_shp_.Write(record_content, 0, record_content.Length);

                if ((data_count % 100) == 0)
                {
                    EventControl.Instance().SendEvent(new ProgressEventArgs(null, "PB_OPER", data_count, record_number));
                }

                data_count++;
            }
        }
コード例 #8
0
ファイル: MacView.cs プロジェクト: CheckTech/Eto
        public virtual void Invalidate(Rectangle rect)
        {
            var region = rect.ToNS();

            region.Y = EventControl.Frame.Height - region.Y - region.Height;
            EventControl.SetNeedsDisplayInRect(region);
        }
コード例 #9
0
ファイル: WinFormUI.cs プロジェクト: PAO200724/PAO_V4
        public void ShowEventDialog(EventInfo eventInfo)
        {
            var eventControl = new EventControl();

            eventControl.Initialize(eventInfo);
            WinFormPublic.ShowDialog(eventControl);
        }
コード例 #10
0
        protected override void SizeCheckCompleted(object sender, EventArgs e)
        {
            FileSize ch = (sender as FileSize);

            ch.Pause();

            check_count++;

            if (check_count == file_size_checker_.Count)
            {
                FileProcessEventArgs event_args = new FileProcessEventArgs(this, "PROCESS_COMPLETE");

                foreach (FileInfo f in input_files)
                {
                    event_args.input_files.Add(f);
                }

                foreach (FileSize f in file_size_checker_)
                {
                    event_args.output_files.Add(f.current_file);
                    event_args.msg.Add("계산완료");
                    f.Resume();
                }

                check_count            = 0;
                event_args.output_path = output_;
                EventControl.Instance().SendEvent(event_args);

                process_flag_ = false;
            }
        }
コード例 #11
0
ファイル: LevelEnemyWorker.cs プロジェクト: Beugeny/scripts
    void onUnitKilled(UnitPoint unitInfo)
    {
        if (destroyed)
        {
            return;
        }
        if (!hasActiveWaves())
        {
            GameObject[]   enemies    = GameObject.FindGameObjectsWithTag("Enemy");
            int            badEnemies = 0;
            UnitController control;
            for (int i = 0; i < enemies.Length; i++)
            {
                control = enemies[i].GetComponent <UnitController>();
                if (control != null && !control.unitPoint.isDie() && control.unitPoint.team == Teams.BAD)
                {
                    badEnemies++;
                }
            }

            if (badEnemies == 0)
            {
                EventControl.onLevelComplete();
            }
        }
    }
コード例 #12
0
ファイル: GameControl.cs プロジェクト: kenning/popul-vuh
    void Awake()
    {
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            Debug.Log("on iphone");
//			System.Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes");
            Debug.Log("didn't error");
        }

        EventControl.NewLevelReset();
        QControl.Initialize();

        playsLeftText = GameObject.Find("plays left #").GetComponent <TextMesh> ();
        movesLeftText = GameObject.Find("moves left #").GetComponent <TextMesh> ();
        dollarsText   = GameObject.Find("Dollar count").GetComponent <TextMesh> ();
        deckText      = GameObject.Find("Deck count").GetComponent <TextMesh> ();
        playButton    = GameObject.Find("play end button").GetComponent <ButtonAnimate> ();
        moveButton    = GameObject.Find("move end button").GetComponent <ButtonAnimate> ();
        endTurnButton = GameObject.Find("end turn button").GetComponent <ButtonAnimate> ();
        handObj       = GameObject.Find("Hand");
        playBoardObj  = GameObject.Find("Play board");
        playerObj     = GameObject.FindGameObjectWithTag("Player");
        player        = GameObject.FindGameObjectWithTag("Player").GetComponent <Player> ();
        gooeyskin     = (GUISkin)Resources.Load("GUISkins/S.GameControlInst.guiskin");

        SaveDataControl.Load();
        StateSavingControl.Initialize(this, player);

        if (SaveDataControl.UnlockedCards.Count == 0 | SaveDataControl.UnlockedGods.Count == 0)
        {
            SaveDataControl.NewSaveFile();
        }

        MainMenu.UnlockCheck();
    }
コード例 #13
0
ファイル: CheckEvents.cs プロジェクト: Baptista/AVE
 public void addEvent(string name)
 {
     EventControl e = new EventControl(name);
     events.Controls.Add(e);
     Point loc = new Point(10, e.Size.Height * events.Controls.Count);
     e.Location = loc;
 }
コード例 #14
0
 void OnDestroyUnitEvent(DestroyUnitInfo info, EventControl eventControl)
 {
     if (_unitInfo.UnitID == info.DeadInfo.UnitID)
     {
         DestroyObject(gameObject);
     }
 }
コード例 #15
0
        private List <Polygon> ReadPolygon(int shxLength, byte[] shpArray, byte[] shxArray)
        {
            int            count    = (shxLength - 100) / 8;
            int            offset   = 0;
            List <Polygon> polyList = new List <Polygon> ();

            CoordConversion cc = new CoordConversion();

            for (int i = 0; i < count; i++)
            {
                if ((i % 100) == 0)
                {
                    EventControl.Instance().SendEvent(new ProgressEventArgs(null, "PB_OPER", i, count));
                }

                offset = BitConverter.ToInt32(shxArray, 100 + 8 * i);
                offset = Swap(offset) * 2 + 8;           // BigEndian, Word(16bit) 단위 // SHP 파일의 컨텐츠 위치

                int shapeType = BitConverter.ToInt32(shpArray, offset);
                int nParts    = BitConverter.ToInt32(shpArray, offset + 36);
                int nPoints   = BitConverter.ToInt32(shpArray, offset + 40);

                if (shapeType != 0)
                {
                    Polygon poly = new Polygon(nParts, nPoints);
                    poly.shapeType = BitConverter.ToInt32(shpArray, offset);

                    poly.box[0].x = BitConverter.ToDouble(shpArray, offset + 4 + 8 * 0);
                    poly.box[0].y = BitConverter.ToDouble(shpArray, offset + 4 + 8 * 1);

                    poly.box[0].xy2ll();

                    poly.box[1].x = BitConverter.ToDouble(shpArray, offset + 4 + 8 * 2);
                    poly.box[1].y = BitConverter.ToDouble(shpArray, offset + 4 + 8 * 3);

                    poly.box[1].xy2ll();

                    for (int j = 0; j < nParts; j++)                            // Parts
                    {
                        poly.parts[j] = BitConverter.ToInt32(shpArray, offset + 44 + 4 * j);
                    }

                    for (int j = 0; j < nPoints; j++)
                    {
                        poly.points[j].x = BitConverter.ToDouble(shpArray, offset + 44 + 4 * nParts + 16 * j);
                        poly.points[j].y = BitConverter.ToDouble(shpArray, offset + 44 + 4 * nParts + 16 * j + 8);

                        poly.points[j].xy2ll();
                    }

                    poly.CalcCenter();
                    polyList.Add(poly);
                }
            }
            ////// 폴리곤 읽기 끝
            EventControl.Instance().SendEvent(new ProgressEventArgs(null, "PB_OPER", count, count));

            return(polyList);
        }
コード例 #16
0
ファイル: Main.cs プロジェクト: noday-buttoday/NDMI-Analysis
        private void WriteDbf(DataTable data, int file_index)
        {
            DbfWriter dw = new DbfWriter();

            EventControl.Instance().SendEvent(new ProgressLabelEventArgs(null, "LB_PROG", "Writing Dbf File"));
            dw.SetPath(output_path_);
            dw.SetFile(dbf_file_list_[file_index]);
            dw.SetData(data);
        }
コード例 #17
0
ファイル: Main.cs プロジェクト: noday-buttoday/NDMI-Analysis
        private void WriteDbf(DataTable data, String file_name)
        {
            DbfWriter dw = new DbfWriter();

            EventControl.Instance().SendEvent(new ProgressLabelEventArgs(null, "LB_PROG", "Writing Dbf File"));
            dw.SetPath(output_path_);
            dw.SetFile(file_name);
            dw.SetData(data);
        }
コード例 #18
0
 /// <summary>
 /// New competitor register
 /// </summary>
 /// <param name="event_control"></param>
 public NewRegister(EventControl event_control)
 {
     // Default stuff
     InitializeComponent();
     // event control injection
     this.event_control = event_control;
     // init other variables
     competitor_selected = false;
 }// End of new competitor register function
コード例 #19
0
        public EventFlag(EventControl control, Int64 flag_value, string[] items, int type /*0=event_flag, 1=spell_hit, 2=cast_flag */, int action)
        {
            InitializeComponent();

            flagType    = type;
            this.action = action;
            parent      = control;

            LoadFlags(items, flag_value);
        }
コード例 #20
0
ファイル: RandomEvents.cs プロジェクト: ukirain/wga63
 // Use this for initialization
 void Start()
 {
     eTree = new EventTree(null, "Story just begining");
     ev    = new EventControl(eTree, messageCanvas, pausedControl, messageText, descriptionText, f, p);
     for (int i = 0; i < 5; i++)
     {
         coroutine = Gen(seconds, i);
         StartCoroutine(coroutine);
     }
 }
コード例 #21
0
ファイル: Main.cs プロジェクト: noday-buttoday/NDMI-Analysis
        private void WriteShp(List <Point> point, int file_index)
        {
            EventControl.Instance().SendEvent(new ProgressLabelEventArgs(null, "LB_PROG", "Writing Shp File"));
            ShapeWriter sw = new ShapeWriter();

            sw.SetShapeData(point);
            sw.OpenFile(output_path_ + "\\" + file_list_[file_index]);
            sw.MakeStart();
            sw.CloseFile();
        }
コード例 #22
0
    static void endPlayerJob()
    {
        OnJobEnd.Invoke();
        EventControl.removeEvents(PlayerDataHolder.Current.PlayerJob.getJobEvents());
        PaerToolBox.callNonUniqueStatChange(PlayerDataHolder.Current.PlayerJob);
        PlayerDataHolder.Current.PlayerJob = null;
        Flag flag = new Flag("PLAYER_JOB_CONTRACT_END", 0, false);

        flag.FireFlag();
    }
コード例 #23
0
 private void CheckGameOver()
 {
     if (player.playerFood <= 0)
     {
         EventControl.LoseCon();
     }
     else if (player.playerHealth <= 0)
     {
         EventControl.LoseCon();
     }
 }
コード例 #24
0
 void CheckForFlagEvents(Flag flag)
 {
     foreach (var flagEvent in flagEvents)
     {
         var Checkflag = flagEvent.neededFlags.SingleOrDefault(newflag => newflag.FlagName == flag.FlagName);
         if (Checkflag != null)
         {
             EventControl.RaiseAnEvent(flagEvent);
         }
     }
 }
コード例 #25
0
        private void ButtonTestException_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            UIPublic.ShowWaitingForm();
            var eventInfo = new ExceptionEventInfo(new Exception("这是测试消息")
                                                   , true
                                                   , true).AddEventData("测试", "测试");
            var eventControl = new EventControl();

            eventControl.Initialize(eventInfo);
            UIPublic.CloseWaitingForm();
            WinFormPublic.ShowDialog(eventControl);
        }
コード例 #26
0
ファイル: UnitController.cs プロジェクト: Beugeny/scripts
 private void applyDamage(int damage)
 {
     unitPoint.currentLife -= damage;
     unitRenderer.color     = new Color(0.9f, 0.3f, 0.3f, 1f);
     CancelInvoke("resetColor");
     Invoke("resetColor", 0.4f);
     if (unitPoint.currentLife <= 0)
     {
         destroyUnit();
         EventControl.onKillUnit(unitPoint);
     }
 }
コード例 #27
0
    public virtual void Burn()
    {
        S.ClickControlInst.DisallowEveryInput();
        if (Selected)
        {
            Deselect();
        }
        S.GameControlInst.Hand.Remove(gameObject);

        cardUI.BurnAnimate();

        EventControl.EventCheck("Burn");
    }
コード例 #28
0
 private void showNewEventControl()
 {
     if (currentEventControl != null)
     {
         this.Controls.Remove(currentEventControl);
         currentEventControl.Dispose();
     }
     currentEvent             = current_biom.getRandomEventObject().getRandomEvent();
     currentEventControl      = new EventControl(currentEvent.FileNameImage, currentEvent.getActions(), currentEvent.Description, OnEventControlResultChanged);
     currentEventControl.Dock = DockStyle.Fill;
     this.Controls.Add(currentEventControl);
     showControl(currentEventControl);
 }
コード例 #29
0
 // Use this for initialization
 void Awake()
 {
     sr = GetComponent <SpriteRenderer>();
     ec = GameObject.Find("Grid").GetComponent <EventControl>();
     //Random gerneration of mine
     mine = Random.value < 0.15;
     x    = (int)transform.position.x;
     y    = (int)transform.position.y;
     GridControl.elements[x, y] = this;
     if (mine)
     {
         ec.MineCountUp();
     }
 }
コード例 #30
0
        //注册事件
        public void RegisterEvent()
        {
            EventControl.SetEvent("WIN_SetHeight", SetHeight);
            EventControl.SetEvent("WIN_SetWidth", SetWidth);
            EventControl.SetEvent("WIN_ShowDevTools", ShowDevTools);
            EventControl.SetEvent("WIN_SetTitle", SetTitle);

            EventControl.SetEvent("WIN_Show", Show);
            EventControl.SetEvent("WIN_Hide", Hide);
            EventControl.SetEvent("WIN_Close", Close);
            EventControl.SetEvent("WIN_Minimize", Minimize);
            EventControl.SetEvent("WIN_Reload", Reload);
            EventControl.SetEvent("WIN_Back", Back);
            EventControl.SetEvent("WIN_Url", Url);
            EventControl.SetEvent("WIN_Hello", Hello);
        }
コード例 #31
0
ファイル: AowMap.cs プロジェクト: HerveKuate/AowSdk
        public AowMap()
        {
            Players = new AowList <Player>();
            Events  = new EventControl();
            UserCampaignSettings = new UserCampaignSettings();

            Description     = "";
            Title           = "";
            CryptedPassword = "";
            Authors         = "";
            u_19            = "";
            u_3f            = "";
            u_55            = "";

            _unitControl = new UnitControl();
        }
コード例 #32
0
ファイル: GUIEvent.cs プロジェクト: Genesis-3D/Genesis-3D
            /// <summary>
            /// 设置改变对象坐标事件
            /// </summary>
            /// <param name="layout_name">界面名称</param>
            /// <param name="widget_name">控件名称</param>
            /// <param name="func">事件委托</param>
            /// <param name="control">控制属性</param>
            /// <returns>结果</returns>
            public static ExecuteResult SetChangeItemPosition(FString layout_name, FString widget_name, Event.SenderInt func, EventControl control)
            {
                ItemBox ib = null;
                ExecuteResult ret = FindUI(layout_name, widget_name, out ib);
                if (ExecuteResult.Success == ret)
                {

                    switch (control)
                    {
                        case EventControl.Add:
                            {
                                ib.EventChangeItemPosition += func;
                            }
                            break;
                        case EventControl.Remove:
                            {
                                ib.EventChangeItemPosition -= func;
                            }
                            break;
                    }
                }
                return ret;
            }
コード例 #33
0
ファイル: GUIEvent.cs プロジェクト: Genesis-3D/Genesis-3D
            /// <summary>
            /// 设置请求对象坐标事件
            /// </summary>
            /// <param name="layout_name">界面名称</param>
            /// <param name="widget_name">控件名称</param>
            /// <param name="func">事件委托</param>
            /// <param name="control">控制属性</param>
            /// <returns>结果</returns>
            public static ExecuteResult SetEventRequestCoordItem(FString layout_name, FString widget_name, Event.SenderRefIntCoordBool func, EventControl control)
            {
                ItemBox ib = null;
                ExecuteResult ret = FindUI(layout_name, widget_name, out ib);
                if (ExecuteResult.Success == ret)
                {

                    switch (control)
                    {
                        case EventControl.Add:
                            {
                                ib.RequestCoordItem = func;
                            }
                            break;
                        case EventControl.Remove:
                            {
                                ib.RequestCoordItem = null;
                            }
                            break;
                    }
                }
                return ret;
            }
コード例 #34
0
ファイル: GUIEvent.cs プロジェクト: Genesis-3D/Genesis-3D
            /// <summary>
            /// 设置记录事件
            /// </summary>
            /// <param name="layout_name">界面名称</param>
            /// <param name="widget_name">控件名称</param>
            /// <param name="func">事件委托</param>
            /// <param name="control">控制属性</param>
            /// <returns>结果</returns>
            public static ExecuteResult SetEventTick(FString layout_name, FString widget_name, Event.SenderTick func, EventControl control)
            {
                Widget widget = null;
                ExecuteResult ret = FindWidget(layout_name, widget_name, out widget);
                if (ExecuteResult.Success == ret)
                {

                    switch (control)
                    {
                        case EventControl.Add:
                            {
                                widget.EventTick += func;
                            }
                            break;
                        case EventControl.Remove:
                            {
                                widget.EventTick -= func;
                            }
                            break;
                    }
                }
                return ret;
            }
コード例 #35
0
ファイル: EventControl.cs プロジェクト: eriol1977/Bullseye
	void Awake ()
	{
		//Make this active and only instance
		instance = this;
	}
コード例 #36
0
ファイル: GUIEvent.cs プロジェクト: Genesis-3D/Genesis-3D
            /// <summary>
            /// 设置窗口位置大小改变事件操作
            /// </summary>
            /// <param name="layout_name">面板名称</param>
            /// <param name="widget_name">控件名称</param>
            /// <param name="func">窗口位置大小改变代理</param>
            /// <param name="control">窗口位置大小改变事件控制方式</param>
            /// <returns>执行结果,若结果为Success,则表示操作成功;否则,表示操作失败</returns>
            public static ExecuteResult SetWindowChangeCoord(FString layout_name, FString widget_name, Event.SenderVoid func, EventControl control)
            {
                Window window = null;
                ExecuteResult ret = FindUI(layout_name, widget_name, out window);
                if (ExecuteResult.Success == ret)
                {

                    switch (control)
                    {
                        case EventControl.Add:
                            {
                                window.EventWindowChangeCoord += func;
                            }
                            break;
                        case EventControl.Remove:
                            {
                                window.EventWindowChangeCoord -= func;
                            }
                            break;
                    }
                }
                return ret;
            }
コード例 #37
0
ファイル: GUIEvent.cs プロジェクト: Genesis-3D/Genesis-3D
            /// <summary>
            /// 设置通知事件
            /// </summary>
            /// <param name="layout_name">界面名称</param>
            /// <param name="widget_name">控件名称</param>
            /// <param name="func">事件委托</param>
            /// <param name="control">控制属性</param>
            /// <returns>结果</returns>
            public static ExecuteResult SetNotifyItem(FString layout_name, FString widget_name, Event.SenderRefIBNotifyItemData func, EventControl control)
            {
                ItemBox ib = null;
                ExecuteResult ret = FindUI(layout_name, widget_name, out ib);
                if (ExecuteResult.Success == ret)
                {

                    switch (control)
                    {
                        case EventControl.Add:
                            {
                                ib.EventNotifyItem += func;
                            }
                            break;
                        case EventControl.Remove:
                            {
                                ib.EventNotifyItem -= func;
                            }
                            break;
                    }
                }
                return ret;
            }
コード例 #38
0
ファイル: GUIEvent.cs プロジェクト: Genesis-3D/Genesis-3D
            /// <summary>
            /// 设置鼠标双击或接收回车键的事件操作
            /// </summary>
            /// <param name="layout_name">面板名称</param>
            /// <param name="widget_name">控件名称</param>
            /// <param name="func">事件操作代理</param>
            /// <param name="control">事件控制方式</param>
            /// <returns>执行结果,若结果为Success,则表示操作成功;否则,表示操作失败</returns>
            public static ExecuteResult SetListSelectAccept(FString layout_name, FString widget_name, Event.SenderInt func, EventControl control)
            {
                ListBox lb = null;
                ExecuteResult ret = FindUI(layout_name, widget_name, out lb);
                if (ExecuteResult.Success == ret)
                {

                    switch (control)
                    {
                        case EventControl.Add:
                            {
                                lb.EventListSelectAccept += func;
                            }
                            break;
                        case EventControl.Remove:
                            {
                                lb.EventListSelectAccept -= func;
                            }
                            break;
                    }
                }
                return ret;
            }