|
10 | 10 | using System.Windows.Media; |
11 | 11 | using System.Windows.Media.Imaging; |
12 | 12 | using System.Windows.Threading; |
| 13 | +using Octgn.Controls; |
13 | 14 | using Octgn.Core; |
14 | 15 | using Octgn.Core.DataExtensionMethods; |
15 | 16 | using Octgn.Core.Util; |
|
24 | 25 | using Card = Octgn.Play.Card; |
25 | 26 | using Counter = Octgn.Play.Counter; |
26 | 27 | using Group = Octgn.Play.Group; |
| 28 | +using HorizontalAlignment = System.Windows.HorizontalAlignment; |
27 | 29 | using Marker = Octgn.Play.Marker; |
28 | 30 | using Player = Octgn.Play.Player; |
29 | 31 |
|
@@ -775,7 +777,7 @@ public void CardSetAnchored(int cardId, bool anchored) |
775 | 777 | { |
776 | 778 | if (card == null) |
777 | 779 | return; |
778 | | - card.SetAnchored(false, anchored); |
| 780 | + card.SetAnchored(false, anchored); |
779 | 781 | }); |
780 | 782 | } |
781 | 783 |
|
@@ -1284,7 +1286,7 @@ public void PlayerSetGlobalVariable(int id, string name, object value) |
1284 | 1286 | } |
1285 | 1287 | else |
1286 | 1288 | QueueAction(() => Player.LocalPlayer.GlobalVariables.Add(name, val)); |
1287 | | - Program.Client.Rpc.PlayerSetGlobalVariable(Player.LocalPlayer, name, oldvalue ?? "",val); |
| 1289 | + Program.Client.Rpc.PlayerSetGlobalVariable(Player.LocalPlayer, name, oldvalue ?? "", val); |
1288 | 1290 | } |
1289 | 1291 |
|
1290 | 1292 | public string PlayerGetGlobalVariable(int id, string name) |
@@ -1418,29 +1420,12 @@ public void ResetGame() |
1418 | 1420 | QueueAction(() => Program.Client.Rpc.ResetReq()); |
1419 | 1421 | } |
1420 | 1422 |
|
1421 | | - public void FormToWindow(System.Windows.Forms.Form form) |
| 1423 | + public void ShowWinForm(Form form) |
1422 | 1424 | { |
1423 | 1425 | QueueAction(() => |
1424 | 1426 | { |
1425 | | - form.TopLevel = false; |
1426 | | - form.FormBorderStyle = FormBorderStyle.None; |
1427 | | - |
1428 | | - var win = new System.Windows.Window(); |
1429 | | - win.Owner = WindowManager.PlayWindow; |
1430 | | - var holder = new System.Windows.Forms.Integration.WindowsFormsHost(); |
1431 | | - holder.Child = form; |
1432 | | - win.Content = holder; |
1433 | | - //win.SizeToContent = SizeToContent.WidthAndHeight; |
1434 | | - win.Width = form.Width; |
1435 | | - win.Height = form.Height; |
1436 | | - win.Title = form.Text; |
1437 | | - |
1438 | | - form.FormClosed += (sender, args) => |
1439 | | - { |
1440 | | - win.Close(); |
1441 | | - }; |
1442 | | - |
1443 | | - win.ShowDialog(); |
| 1427 | + form.ShowDialog(); |
| 1428 | + return; |
1444 | 1429 | }); |
1445 | 1430 | } |
1446 | 1431 | } |
|
0 commit comments