/// <summary></summary> public static void ShowSelf <T>(T data1) where T : WindowMsgData { if (data1 == null) { return; } data = data1; var window = MsgWindow.CreateInstance <MsgWindow>(); Setting(window); switch (data.windowType) { case WindowType.Common: window.Show(); break; case WindowType.Utility: window.ShowUtility(); break; case WindowType.Popup: window.ShowPopup(); break; case WindowType.Aux: window.ShowAuxWindow(); break; default: break; } }
public LoginForm() { InitializeComponent(); // Enable auto scan _msg = new MsgWindow(this); this.Closed += (s, args) => _msg.Dispose(); }
void IDisposable.Dispose() { //remove event handle this.MsgWin = new MsgWindow(); this.MsgWin.BarcodeRead += new Action(MsgWin_BarcodeRead); GC.SuppressFinalize(this); }
public void LogException(string msg) { MsgWindow window = GetWindow(WindowEnumBase.Msg) as MsgWindow; if (window != null) { window.LogException(msg); } }
public void LogWarning(string msg) { MsgWindow window = GetWindow(WindowEnumBase.Msg) as MsgWindow; if (window != null) { window.LogWarning(msg); } }
private void onBtnNotice(EventContext context) { MsgWindow msgWindow = new MsgWindow(); msgWindow.Show(); msgWindow.position = new Vector2(); msgWindow.width = ui.width; msgWindow.height = ui.height; msgWindow.SetTitle("本茶楼公告"); msgWindow.SetMsg(Data.Club.Info.notice != ""? Data.Club.Info.notice:"<center>茶楼老板没有编辑公告</center>"); }
public void OpenFGPickingScreen(string deliveryOrderTag) { var view = new FGPickingForm(); var repository = new Model.Object.FGPickingRepository(); var presenter = new Presenter.FGPickingPresenter(view, repository, deliveryOrderTag); presenter.Screen = Presenter.NextScreen; view.Closed += (s, args) => { _msg = new MsgWindow(this); this.Show(); }; this.Hide(); view.Show(); }
private void OnResNotice(NotificationArg arg) { var data = arg.GetValue <ResNotice>(); if (data.code != 0) { MsgBox.ShowErr(data.msg); return; } MsgWindow msgWindow = new MsgWindow(); msgWindow.Show(); msgWindow.position = new Vector2(); msgWindow.width = mainUI.width; msgWindow.height = mainUI.height; msgWindow.SetTitle("消息通知"); msgWindow.SetMsg(data.notice != ""?data.notice:"<center>暂无通知</center>"); }
public Form1() { InitializeComponent(); this.MsgWin = new MsgWindow(this); }
public ShippingForm() { InitializeComponent(); _msg = new MsgWindow(this); this.Closed += (s, args) => _msg.Dispose(); }
public Media() { InitializeComponent(); this.MsgWin = new MsgWindow(this); }
private void LoadIndexFile() { //Mouse.OverrideCursor = Cursors.Wait; DateTime timeStart = DateTime.Now; Ortsmarke.ListOrtsmarken.Clear(); WebClient w = new WebClient(); w.Encoding = System.Text.Encoding.UTF8; try { Load_From_CSV(w); _textBoxFilter.Text = string.Empty; Filtern(); DateTime timeEnde = DateTime.Now; TimeSpan dauer = timeEnde - timeStart; _textBlockDauer.Text = "Ladedauer: " + dauer.ToString(@"mm\:ss\.fff"); } catch (Exception ex) { MsgWindow errWin = new MsgWindow("DereGlobus Daten laden", "Beim Laden der DereGlobus Daten ist ein Fehler aufgetreten!", ex); errWin.ShowDialog(); } //Mouse.OverrideCursor = Cursors.Arrow; }
void Awake() { BindListenners(); Screen.sleepTimeout = SleepTimeout.NeverSleep; mainUI = GetComponent <UIPanel>().ui; createClubWindow = new CreateClubWindow(); createRoomWindow = new CreateRoomWindow(); joinWindow = new JoinWindow(); list = mainUI.GetChild("list").asCom; // 让茶楼和房间列表选项卡固定在用户选择的页面 var clubOrRoom = list.GetController("tab"); clubOrRoom.onChanged.Set(() => { PlayerPrefs.SetInt("clubOrRoom", clubOrRoom.selectedIndex); }); clubOrRoom.selectedIndex = PlayerPrefs.GetInt("clubOrRoom"); mainUI.GetChild("right").asCom.GetChild("btnCreateClub").onClick.Add(() => { createClubWindow.Show(); createClubWindow.position = new Vector3(); createClubWindow.width = mainUI.width; createClubWindow.height = mainUI.height; }); mainUI.GetChild("right").asCom.GetChild("btnCreateRoom").onClick.Add(() => { createRoomWindow.Show(); createRoomWindow.position = new Vector3(); createRoomWindow.width = mainUI.width; createRoomWindow.height = mainUI.height; }); mainUI.GetChild("right").asCom.GetChild("btnJoinRoom").onClick.Add(() => { PlayerPrefs.SetString("joinType", "room"); joinWindow.Show(); joinWindow.Center(); }); mainUI.GetChild("right").asCom.GetChild("btnJoinClub").onClick.Add(() => { PlayerPrefs.SetString("joinType", "club"); joinWindow.Show(); joinWindow.Center(); }); var footer = mainUI.GetChild("footer").asCom; footer.GetChild("btnHistory").onClick.Add(() => { SceneManager.LoadScene("History"); }); footer.GetChild("btnRule").onClick.Add(() => { MsgWindow msgWindow = new MsgWindow(); msgWindow.Show(); msgWindow.position = new Vector2(); msgWindow.width = mainUI.width; msgWindow.height = mainUI.height; msgWindow.SetTitle("游戏规则"); string rule = @"<b align='center'>牌型</b> <b>五小牛:</b>5张牌点数之和小于等于10 <b>炸弹:</b>有4张牌一样 <b>五花牛:</b>五张牌都是花牌(J/Q/K)组成 <b>牛牛:</b>五张牌中第一组三张牌和第一组二张牌之和分别为10的整数倍。如: 3/7/K/10/J <b>有牛:</b>五张牌中有三张的点数之和为10点的整数倍,并且另外两张牌之和与10进行取余,所得之数即为牛几。如: 2/8/J/6/3,即为牛9。 <b>无牛:</b>五张牌中没有任意三张牌点数之和为10的整数倍。例如: A/8/4/K/7 <b>牌型比较规则</b> <b>数字比较:</b>A>K>Q>J>10>9>8>7>6>5>4>3>2 <b>花色比较:</b>黑桃>红桃>梅花>方块 <b>牌型比较:</b>五小牛>炸弹>五花牛>牛牛>有牛>无牛 <b>无牛牌型比较:</b>取其中最大的一张牌比较大小,牌大的赢,大小相同比花色 <b>有牛牌型比较:</b>取其中最大的一张牌比较大小,牌大的赢,大小相同比花色 <b>炸弹之间大小比较:</b>取炸弹牌比较大小 <b>五小牛牌型比较:</b>庄吃闲 "; msgWindow.SetMsg(rule); }); footer.GetChild("btnMsg").onClick.Add(() => { Api.User.GetNotice(); }); footer.GetChild("btnShare").onClick.Add(() => { Api.User.GetShareText(); }); }
public ScanDeliveryOrderTagForm() { InitializeComponent(); _msg = new MsgWindow(this); this.Closed += (s, args) => _msg.Dispose(); }
static void TestMsgWindow() { MsgWindow.ShowSelf(new WindowMsgData("TestMsgWindow", "这是一个消息窗口", WindowType.Utility)); }
public MainForm() { InitializeComponent(); pageGps = new GPS(this); pageTransport = new Transport(this); pageSearch = new Search(this); #if DEBUG MainMap.Manager.Mode = AccessMode.ServerAndCache; menuItemServerAndCache.Checked = true; menuItemEnableGrid.Checked = true; menuItemGPSenabled.Checked = false; MainMap.ShowTileGridLines = true; #else MainMap.Manager.Mode = AccessMode.CacheOnly; menuItemCacheOnly.Checked = true; #endif MainMap.MapType = MapType.MapsLT_Map; MainMap.MaxZoom = 11; MainMap.MinZoom = 1; MainMap.Zoom = MainMap.MinZoom + 1; MainMap.CurrentPosition = start; MainMap.OnMapTypeChanged += new MapTypeChanged(MainMap_OnMapTypeChanged); MainMap.OnCurrentPositionChanged += new CurrentPositionChanged(MainMap_OnCurrentPositionChanged); MainMap.OnMapZoomChanged += new MapZoomChanged(MainMap_OnMapZoomChanged); // add custom layers { routes = new GMapOverlay(MainMap, "routes"); MainMap.Overlays.Add(routes); objects = new GMapOverlay(MainMap, "objects"); MainMap.Overlays.Add(objects); top = new GMapOverlay(MainMap, "top"); MainMap.Overlays.Add(top); } // map center center = new GMapMarkerCross(MainMap.CurrentPosition); top.Markers.Add(center); #if DEBUG // transparent marker test GMapMarkerTransparentGoogleGreen goo = new GMapMarkerTransparentGoogleGreen(MainMap.CurrentPosition); goo.ToolTipMode = MarkerTooltipMode.Always; goo.ToolTipText = "Welcome to Lithuania! ;}"; objects.Markers.Add(goo); #endif UnregisterFunc1(0, 0x75); // VOLUME UP UnregisterFunc1(0, 0x76); // VOLUME DOWN msgW = new MsgWindow(this); RegisterHotKey(msgW.Hwnd, 3, 0, 0x75); RegisterHotKey(msgW.Hwnd, 4, 0, 0x76); // test performance if(PerfTestEnabled) { timer.Interval = 111; timer.Tick += new EventHandler(timer_Tick); timer.Enabled = true; } }