private void Map_OnTileClick(object sender, TileClickEventArgs e) { if (gameObject.scene.name == "LevelBuilder") { return; } if (_level == null) { return; } if (e.MouseButton == 0 && !_road.Contains(e.Tile)) { e.Tile.CanHold = !e.Tile.CanHold; } else if (e.MouseButton == 1 && !e.Tile.CanHold) { if (_road.Contains(e.Tile)) { _road.Remove(e.Tile); } else { _road.Add(e.Tile); } } }
private void tileLayoutNewEpisodes_TileClick(object sender, TileClickEventArgs e) { Tile mytile = e.Tile; NewEpisodeTile item = mytile.DataContext as NewEpisodeTile; DashboardMetroVM.Instance.NavigateForward(MetroViews.ContinueWatching, item.AnimeSeries); }
public void Update() { if (Input.GetMouseButtonDown(0)) { Tile t = GetTileUnderMouse(); if (t != null) { TileClickEventArgs e = new TileClickEventArgs(0, t); if (onTileClick != null) { onTileClick(this, e); } } } if (Input.GetMouseButtonDown(1)) { Tile t = GetTileUnderMouse(); if (t != null) { TileClickEventArgs e = new TileClickEventArgs(1, t); if (onTileClick != null) { onTileClick(this, e); } } } }
void tile_Click(object sender, TileClickEventArgs e) { var tile = sender as Tile; if (tile.Name == "开始收银") { new frmPos().Show(); } if (tile.Name == "库存查询") { new frmStockQuery().Show(); } if (tile.Name == "交接班") { new frmTransferWork().Show(); } if (tile.Name == "销售查询") { new frmSaleList().Show(this); } if (tile.Name == "系统设置") { new frmSysConfig().Show(this); } if (tile.Name.Contains("退出")) { AskExit(); } }
void TLYC1_TileClick(object sender, TileClickEventArgs e) { ma = e.Tile.Name.ToString(); tentitle = e.Tile.Header.ToString(); var WbClnt = new WebClient();//Tao WebClient WbClnt.OpenReadCompleted += (a, b) => { if (b.Error == null) { AssemblyPart assmbpart = new AssemblyPart(); Assembly assembly = assmbpart.Load(b.Result); Object Obj = assembly.CreateInstance("HPA.Announcement" + "." + "ViewAnnouncement"); //Truy xuat file dll if (Obj != null) //Neu co file dll thi tao ChildWindow { ChildWindow child = (ChildWindow)assembly.CreateInstance("HPA.Announcement" + "." + "ViewAnnouncement"); child.Width = (double)HtmlPage.Window.Eval("screen.availWidth") - 100; child.Height = (double)HtmlPage.Window.Eval("screen.availHeight") - 100; child.Show(); } else { MessageBox.Show("Page not exist"); } //Khong ton tai page thi bao loi } else { MessageBox.Show("Page not exist"); } //Khong ton tai file dll thi bao loi }; WbClnt.OpenReadAsync(new Uri("http://localhost:10511/Control/" + "HPA.Announcement" + ".dll", UriKind.Absolute)); }
/// <summary> /// 点击地图格子事件 /// </summary> /// <param name="sender"></param> /// <param name="tileClickEventArgs"></param> private void MapOnOnTileClick(object sender, TileClickEventArgs tileArgs) { GameModel gameModel = GetModel <GameModel>(); if (gameModel.IsPlaying && tileArgs.Tile.CanHold) { Tile tile = tileArgs.Tile; if (tile.Data == null) { //空格子,可以放塔 ShowSpawnPanelArgs show = new ShowSpawnPanelArgs { Pos = _map.GetPosition(tile), UpSide = tile.Y < Map.RowCount / 2 }; SendEvent(Consts.E_ShowSpawnPanel, show); } else { //有塔,可以操作塔 Tower tower = tile.Data as Tower; ShowUpgradePanelArgs show = new ShowUpgradePanelArgs { Tower = tower }; SendEvent(Consts.E_ShowUpgradePanel, show); } } }
void Update() { //鼠标左键检测 if (Input.GetMouseButtonDown(0)) { Tile t = GetTileUnderMouse(); if (t != null) { //触发鼠标左键点击事件 TileClickEventArgs e = new TileClickEventArgs(0, t); if (OnTileClick != null) { OnTileClick(this, e); } } } //鼠标右键检测 if (Input.GetMouseButtonDown(1)) { Tile t = GetTileUnderMouse(); if (t != null) { //触发鼠标右键点击事件 TileClickEventArgs e = new TileClickEventArgs(1, t); if (OnTileClick != null) { OnTileClick(this, e); } } } }
private void Map_OnTileClick(object sender, TileClickEventArgs e) { if (Level == null) { return; } //处理放塔操作 if (e.MouseButton == 0 && !m_Road.Contains(e.Tile)) { e.Tile.CanHold = !e.Tile.CanHold; } //处理寻路点操作 if (e.MouseButton == 1 && !e.Tile.CanHold) { if (m_Road.Contains(e.Tile)) { m_Road.Remove(e.Tile); } else { m_Road.Add(e.Tile); } } }
void Map_OnTileClick(object sender, TileClickEventArgs e) { //当前场景不是LevelBuilder不能编辑 if (gameObject.scene.name != "LevelBuilder") { return; } if (Level == null) { return; } //处理放塔操作 if (e.MouseButton == 0 && !m_road.Contains(e.Tile)) { e.Tile.CanHold = !e.Tile.CanHold; } //处理寻路点操作 if (e.MouseButton == 1 && !e.Tile.CanHold) { if (m_road.Contains(e.Tile)) { m_road.Remove(e.Tile); } else { m_road.Add(e.Tile); } } }
private void Map_onTileClick(object sender, TileClickEventArgs e) { if (level == null) { return; } //处理放塔操作 if (e.MouseButton == 0 && !roadList.Contains(e.Tile)) { e.Tile.CanHold = !e.Tile.CanHold; } //处理寻路点操作 if (e.MouseButton == 1 && !e.Tile.CanHold) { if (roadList.Contains(e.Tile)) { roadList.Remove(e.Tile); } else { roadList.Add(e.Tile); } } else { } }
private void tileLayoutRandomSeries_TileClick(object sender, TileClickEventArgs e) { Tile mytile = e.Tile; RandomSeriesTile item = mytile.DataContext as RandomSeriesTile; VM_DashboardMetro.Instance.NavigateForward(MetroViews.ContinueWatching, item.AnimeSeries); }
void tile_Click(object sender, TileClickEventArgs e) { PageGroup page = ((e.Tile as Tile).ActivationTarget as PageGroup); if (page != null) { page.Parent = tileContainer; page.SetSelected((e.Tile as Tile).Document); } }
void tile_Click(object sender, TileClickEventArgs e) { PageGroup page = ((e.Tile as Tile).ActivationTarget as PageGroup); if (page != null) { page.Parent = tileContainer; page.SetSelected((e.Tile as Tile).Document); } }
void windowsUIView1_TileClick(object sender, TileClickEventArgs e) { if (e.Tile == document1Tile) { page1.Document = document1; } if (e.Tile == document2Tile) { page1.Document = document2; } }
private void tileLayoutContinueWatching_TileClick(object sender, TileClickEventArgs e) { Tile mytile = e.Tile; ContinueWatchingTile item = mytile.DataContext as ContinueWatchingTile; if (item == null) { return; } DashboardMetroVM.Instance.NavigateForward(MetroViews.ContinueWatching, item.AnimeSeries); }
private void tileNotImplement_Click(object sender, TileClickEventArgs e) { var notImplmentAction = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutAction() { Caption = "提示", Description = "该功能正在研发中,敬请期待....." }; notImplmentAction.Commands.Add(FlyoutCommand.OK); closeAppFlyout.Action = notImplmentAction; mainWindowsUIView.ShowFlyoutDialog(closeAppFlyout); e.Handled = true; }
void Update() { //鼠标左键检测 if (Input.GetMouseButtonDown(0)) { Tile t = GetTileUnderMouse(); if (t != null) { //触发鼠标左键点击事件 TileClickEventArgs e = new TileClickEventArgs(0, t); if (OnTileClick != null) { OnTileClick(this, e); } } } //鼠标右键检测 if (Input.GetMouseButtonDown(1)) { Tile t = GetTileUnderMouse(); if (t != null) { //触发鼠标右键点击事件 TileClickEventArgs e = new TileClickEventArgs(1, t); if (OnTileClick != null) { OnTileClick(this, e); } } } //大招显示 GameModel gm = MVC.GetModel <GameModel>(); if (Time.time - gm.TT > 10 && !gm.Dazhao) { gm.Dazhao = true; go = Game.Instance.ObjectPool.Spawn("dazhao"); go.transform.position = gm.des; } else if (gm.Dazhao && go == null) { go = Game.Instance.ObjectPool.Spawn("dazhao"); go.transform.position = gm.des; } if (!gm.Dazhao && go != null) { Game.Instance.ObjectPool.Unspawn(go); } }
/// <summary> /// 热门话题点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HotTopicClick(object sender, TileClickEventArgs e) { var list = e.Tile.Tag as List <string>; PageGroup pg = new PageGroup(); pg.Parent = tileContainer; pg.Caption = "微博实时话题榜"; WordCloudPage chart = new WordCloudPage(list); var doc = windowsUIView.AddDocument(chart); pg.Items.Add(doc as Document); windowsUIView.ContentContainers.Add(pg); windowsUIView.ActivateContainer(pg); }
private void Tile_Click(object sender, TileClickEventArgs e) { var eventResult = new CancelEventArgs(); OnStageChanging(eventResult); if (!eventResult.Cancel) { var data = e.Tile.DataContext as ProjectStageTile; if (data != null) { FocusedStage = data; } ; } ; }
//#region WfAddStaticTilte //private void WfAddStaticTilte(TileGroup pTg, StaticTile pStaticTitle, Bitmap pBitmap) //{ // pStaticTitle.Appearance.Normal.BackColor = Color.FromArgb(69, 69, 69); // pStaticTitle.Appearance.Normal.BackColor2 = Color.FromArgb(85, 85, 85); // pStaticTitle.Appearance.Normal.BorderColor = Color.FromArgb(125, 125, 125); // pStaticTitle.Appearance.Selected.BorderColor = Color.FromArgb(38, 115, 236); // pStaticTitle.Appearance.HotTracking.BorderColor = Color.FromArgb(58, 58, 58); // pStaticTitle.CurrentSize = TileSize.Medium; // pStaticTitle.DefaultView.Image.AllResolutions.Image = pBitmap; //} //#endregion #region UltraLiveTileView1TileClick private void UltraLiveTileView1TileClick(object sender, TileClickEventArgs e) { Form openForm; try { openForm = e.Tile.Tag as Form; this.Hide(); openForm.Show(); openForm.BringToFront(); openForm.WindowState = FormWindowState.Maximized; this.Close(); } catch (Exception ex) { throw ex; } }
/// <summary> /// 热搜点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HotSearchClick(object sender, TileClickEventArgs e) { try { var dt = e.Tile.Tag as System.Data.DataTable; PageGroup pg = new PageGroup(); pg.Parent = tileContainer; pg.Caption = string.Format("微博实时热搜榜Top{0}", dt.Rows.Count); HotSearchChart chart = new HotSearchChart(dt); var doc = windowsUIView.AddDocument(chart); pg.Items.Add(doc as Document); windowsUIView.ContentContainers.Add(pg); windowsUIView.ActivateContainer(pg); } catch (Exception) { //throw; } }
private void TileLayoutControl_TileClick(object sender, TileClickEventArgs e) { var ctrl = (TileLayoutControl)sender; foreach (var tile in ctrl.Children.OfType <Tile>()) { if (tile != e.Tile) { tile.SetResourceReference(BorderThicknessProperty, "NormalTileBorder"); } else { tile.SetResourceReference(BorderThicknessProperty, "FocusedTileBorder"); }; } ; _focusedTailTag = (string)e.Tile.Tag; bindActiveProjectsData(); }
void Map_OnTileClick(object sender, TileClickEventArgs e) { GameModel gm = GetModel <GameModel>(); //游戏还未开始,那么不操作菜单 if (!gm.IsPlaying) { return; } //如果有菜单显示,那么隐藏菜单 if (TowerPopup.Instance.IsPopShow) { SendEvent(Consts.E_HidePopups); return; } if (!e.Tile.CanHold) { SendEvent(Consts.E_HidePopups); } if (e.Tile.Data == null) { ShowSpawnPanelArgs e1 = new ShowSpawnPanelArgs() { // Position = null, Position = m_Map.GetPosition(e.Tile), UpSide = e.Tile.Y < (m_Map.RowCount / 2), }; // SendEvent(Consts.E_ShowSpawnPanel, e1); } else { ShowUpgradePanelArgs e2 = new ShowUpgradePanelArgs() { Tower = e.Tile.Data as Tower, }; SendEvent(Consts.E_ShowUpgradePanel, e2); } }
void map_OnTileClick(object sender, TileClickEventArgs e) { GameModel gm = GetModel <GameModel>(); //游戏还未开始,那么不操作菜单 if (!gm.IsPlaying) { return; } //如果有菜单显示,那么隐藏菜单 if (TowerPopup.Instance.IsPopShow) { SendEvent(Consts.E_HidePopup); return; } //非放塔格子,不操作菜单 if (!e.Tile.CanHold) { SendEvent(Consts.E_HidePopup); return; } if (e.Tile.Data == null) { ShowCreateArgs arg = new ShowCreateArgs() { Position = m_Map.GetPosition(e.Tile), UpSide = e.Tile.Y < Map.RowCount / 2 }; SendEvent(Consts.E_ShowCreate, arg); } else { ShowUpgradeArgs arg = new ShowUpgradeArgs() { Tower = e.Tile.Data as Tower }; SendEvent(Consts.E_ShowUpgrade, arg); } }
void windowsUIView_TileClick(object sender, TileClickEventArgs e) { Tile tile = e.Tile as Tile; if (tile != null && tile.Document != null) { BaseModule module = tile.Document.Control as BaseModule; if (module != null) { TileItemFrame frame = tile.CurrentFrame; object data = (frame != null) ? frame.Tag : null; module.ShowModule(data); } if (tile.ActivationTarget == page) { page.Document = tile.Document; page.Caption = tile.Elements[0].Text; } } }
/// <summary> /// 更多按钮点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void moreTile_Click(object sender, TileClickEventArgs e) { var topic = e.Tile.Tag as string; var des = desc.ContainsKey(topic) ? desc[topic] : ""; windowsUIView.BeginUpdate(); PageGroup pg = new PageGroup(); pg.Parent = tileContainer; pg.Caption = topic; GroupDetailPage pageGroup = new GroupDetailPage(topic, des); pageGroup.Tag = pg;//保存当前分组所在页面的容器 var doc = windowsUIView.AddDocument(pageGroup); pg.Items.Add(doc as Document); windowsUIView.ContentContainers.Add(pg); windowsUIView.ActivateContainer(pg); windowsUIView.EndUpdate(); }
private void tileLayoutTraktActivity_TileClick(object sender, TileClickEventArgs e) { try { Tile mytile = e.Tile; object item = mytile.DataContext as object; if (item == null) { return; } if (item.GetType() == typeof(TraktActivityTile)) { TraktActivityTile tile = item as TraktActivityTile; Uri uri = new Uri(tile.URL); Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); } if (item.GetType() == typeof(TraktShoutTile)) { TraktShoutTile tile = item as TraktShoutTile; Uri uri = new Uri(tile.URL); Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); } if (item.GetType() == typeof(Trakt_SignupVM)) { MainWindow mainwdw = (MainWindow)Window.GetWindow(this); mainwdw.tabControl1.SelectedIndex = MainWindow.TAB_MAIN_Settings; mainwdw.tabSettingsChild.SelectedIndex = MainWindow.TAB_Settings_TvDB; } } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
private void Update() { if (Input.GetMouseButtonDown(0)) { Tile tile = GetTileUndermouse(); if (tile != null && OnTileClick != null) { TileClickEventArgs tileClick = new TileClickEventArgs(0, tile); OnTileClick(this, tileClick); } } if (Input.GetMouseButtonDown(1)) { Tile tile = GetTileUndermouse(); if (tile != null && OnTileClick != null) { TileClickEventArgs tileClick = new TileClickEventArgs(1, tile); OnTileClick(this, tileClick); } } }
private void tileLayoutTraktActivity_TileClick(object sender, TileClickEventArgs e) { try { Tile mytile = e.Tile; object item = mytile.DataContext as object; if (item == null) return; if (item.GetType() == typeof(TraktActivityTile)) { TraktActivityTile tile = item as TraktActivityTile; Uri uri = new Uri(tile.URL); Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); } if (item.GetType() == typeof(TraktShoutTile)) { TraktShoutTile tile = item as TraktShoutTile; Uri uri = new Uri(tile.URL); Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); } if (item.GetType() == typeof(Trakt_SignupVM)) { MainWindow mainwdw = (MainWindow)Window.GetWindow(this); mainwdw.tabControl1.SelectedIndex = MainWindow.TAB_MAIN_Settings; mainwdw.tabSettingsChild.SelectedIndex = MainWindow.TAB_Settings_TvDB; } } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
private void TLYC_TileClick(object sender, TileClickEventArgs e) { cha.Add(e.Tile.Name); LoadMenu(e.Tile.Name); }
private void tileLayoutContinueWatching_TileClick(object sender, TileClickEventArgs e) { Tile mytile = e.Tile; ContinueWatchingTile item = mytile.DataContext as ContinueWatchingTile; if (item == null) return; DashboardMetroVM.Instance.NavigateForward(MetroViews.ContinueWatching, item.AnimeSeries); }
private void tileLayoutRandomSeries_TileClick(object sender, TileClickEventArgs e) { Tile mytile = e.Tile; RandomSeriesTile item = mytile.DataContext as RandomSeriesTile; DashboardMetroVM.Instance.NavigateForward(MetroViews.ContinueWatching, item.AnimeSeries); }
private void tileNotImplement_Click(object sender, TileClickEventArgs e) { var notImplmentAction = new DevExpress.XtraBars.Docking2010.Views.WindowsUI.FlyoutAction() { Caption = "提示", Description = "该功能正在研发中,敬请期待....." }; notImplmentAction.Commands.Add(FlyoutCommand.OK); closeAppFlyout.Action = notImplmentAction; mainWindowsUIView.ShowFlyoutDialog(closeAppFlyout); e.Handled = true; }
private void tileZJ_Click(object sender, TileClickEventArgs e) { mainWindowsUIView.ActivateContainer(popupTjFlyout); e.Handled = true; }
private void TLYC_TileClick(object sender, TileClickEventArgs e) { cha.Add(e.Tile.Name); LoadMenu(e.Tile.Name); }
private void tileDesktop_Click(object sender, TileClickEventArgs e) { this.WindowState = FormWindowState.Minimized; }
private void tileExit_Click(object sender, TileClickEventArgs e) { this.Close(); }