public static void ShowControlPanel(object panelOwner) { PhantasmagoriaTabItem trg = panelOwner as PhantasmagoriaTabItem; if (trg == null) return; MatWindow w = new MatWindow(); w.InputBindings.AddRange(Application.Current.MainWindow.InputBindings); w.SetTabItem(trg.Clone()); w.Show(); MatApp.ApplicationLog.Log(new LogData(LogCondition.Action, trg.Content.GetType().Name + "を表示しました", "", "GUILayoutM", "MatStudioROBOT2016")); }
/// <summary> /// .matlayoutファイルの一部からウインドウを一つ読み込み、復元します。 /// </summary> /// <param name="sr"></param> private static void LoadWindow(StreamReader sr) { string data = sr.ReadLine(); if (data != "{") return; MatWindow mw = new MatWindow(); do { data = sr.ReadLine(); switch (data) { case "// Top": mw.Top = double.Parse(sr.ReadLine()); break; case "// Left": mw.Left = double.Parse(sr.ReadLine()); break; case "// Height": mw.Height = double.Parse(sr.ReadLine()); break; case "// Width": mw.Width = double.Parse(sr.ReadLine()); break; case "// MatWorkspace": data = sr.ReadLine(); MatWorkspace temp = XamlReader.Parse(data) as MatWorkspace; mw.Content = temp; break; default: break; } } while (data != "}"); mw.Show(); return; }