private void windowListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { selectedWindow = windowListBox.SelectedItem as AWindow; IconImage.Source = selectedWindow.IconImage; TitleText.Text = selectedWindow.Title; HWNDText.Text = selectedWindow.Hwnd.ToString(); StylesListBox.Items.Clear(); foreach (KeyValuePair <string, uint> style in selectedWindow.WindowStyles.Styles) { TextBlock item = new TextBlock(); item.Text = style.Key + " (" + style.Value.ToString() + ")"; StylesListBox.Items.Add(item); } ExStylesListBox.Items.Clear(); foreach (KeyValuePair <string, uint> exstyle in selectedWindow.WindowStyles.ExStyles) { TextBlock item = new TextBlock(); item.Text = exstyle.Key + " (" + exstyle.Value.ToString() + ")"; ExStylesListBox.Items.Add(item); } }
public ReportWindow(string new_report, string new_name, AWindow owner) : base(owner) { InitializeComponent(); report = new_report; name = new_name; }
public void OnSurfacesCreated(AWindow vout) { var play = false; var enableVideo = false; lock (_locker) { if (!_mp.IsPlaying /* && mp.PlayRequested*/) { play = true; } else if (_mp.VoutCount == 0) { enableVideo = true; } } if (play) { _mp.Play(); } else if (enableVideo) { lock (_locker) { _mp.SetVideoTrack(0); } } }
public ExTests01(AWindow w, Document doc) { this.w = w; this.doc = doc; fm = new FieldsManager(w, doc); }
protected virtual void OnWindowCreated(object sender, OpenCloseEventArgs e) { AWindow awin = WindowHelper.GetAWINDOW(e.HWND); WindowHelper.windowList.Add(awin); CurrentLog.Add(LogEntryType.WindowsEvent, "Window Created: " + e.Title + ", (" + e.HWND.ToString() + ")"); }
public ShowInfo(AWindow w) { W = w; string docName = MainFields.DocName; this.documentName = docName.IsVoid() ? "un-named" : docName; }
public ExStoreMgr(AWindow w, Document doc) { this.doc = doc; W = w; dsMgr = new DataStoreManager(doc); scMgr = SchemaManager.Instance; show = new ShowInfo(w); exData = ExStorData.Instance; }
protected virtual void OnWindowNameChanged(object sender, NameChangeEventArgs e) { AWindow awin = WindowHelper.windowList.FirstOrDefault(awindow => awindow.Hwnd == e.HWND); if (awin != null) { awin.Title = e.newName; CurrentLog.Add(LogEntryType.WindowsEvent, "Window Name Changed: " + e.oldName + " to " + e.newName + " (" + e.HWND.ToString() + ")"); } }
protected virtual void OnWindowDestroyed(object sender, OpenCloseEventArgs e) { AWindow awin = WindowHelper.windowList.FirstOrDefault(awindow => awindow.Hwnd == e.HWND); if (awin != null) { WindowHelper.windowList.Remove(awin); CurrentLog.Add(LogEntryType.WindowsEvent, "Window Destroyed: " + e.Title + ", (" + e.HWND.ToString() + ")"); } }
void Attach() { _awindow = new AWindow(new SurfaceCallback(_mediaPlayer)); _awindow.AddCallback(this); _awindow.SetVideoView(this); _awindow.AttachViews(); _mediaPlayer.SetAndroidContext(_awindow.Handle); _layoutListener = new LayoutChangeListener(_awindow); AddOnLayoutChangeListener(_layoutListener); }
void Detach() { _awindow.RemoveCallback(this); _awindow.DetachViews(); _mediaPlayer.SetAndroidContext(IntPtr.Zero); RemoveOnLayoutChangeListener(_layoutListener); _layoutListener.Dispose(); _layoutListener = null; _awindow.Dispose(); _awindow = null; }
/// <summary> /// 绑定Windows的值 /// </summary> /// <param name="o"></param> static public void AutoSetTransformPath(AWindow win) { var vt = win.GetType(); var fields = vt.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public); var vTransform = win.Transform; foreach (var f in fields) { if (f.FieldType.IsSubclassOf(checkType) == false) { continue; } //1.自动获取节点 //TODO 热更层必须这样获取属性 var _attrs = f.GetCustomAttributes(typeof(TransformPath), false); //as Attribute[]; if (_attrs != null && _attrs.Length > 0) { var attr = _attrs[0] as TransformPath; if (attr == null) { continue; } //获取节点,并且获取组件 var trans = vTransform.Find(attr.Path); if (trans == null) { BDebug.LogError(string.Format("自动设置节点失败:{0} - {1}", vt.FullName, attr.Path)); continue; } var com = trans.GetComponent(f.FieldType); if (com == null) { BDebug.LogError(string.Format("节点没有对应组件:type【{0}】 - {1}", f.FieldType, attr.Path)); } //设置属性 f.SetValue(win, com); //Debug.LogFormat("字段{0}获取到setTransform ,path:{1}" , f.Name , attr.Path); } } #endregion }
protected virtual void OnObjectDestroyed(object sender, WinEventProcEventArgs e) { AWindow awin = WindowHelper.windowList.FirstOrDefault(awindow => awindow.Hwnd == e._hwnd); if (awin != null) { OnWindowDestroyed(sender, new OpenCloseEventArgs() { HWND = e._hwnd, Title = awin.Title }); return; } CurrentLog.Add(LogEntryType.WindowsEvent, "Object Destroyed: (" + e._hwnd.ToString() + ")"); }
public void OnSurfacesDestroyed(AWindow vout) { var disableVideo = false; lock (_locker) { if (_mp.VoutCount > 0) { disableVideo = true; } } if (disableVideo) { //_mp.VideoTrackEnabled = false; } }
public SearchingWindow(string new_game_path, string new_save_path, string new_game_name, bool search_playstation, AWindow owner) : base(owner) { InitializeComponent(); this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); this.backgroundWorker1.WorkerReportsProgress = true; this.backgroundWorker1.WorkerSupportsCancellation = true; this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork); this.backgroundWorker1.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorker1_ProgressChanged); this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted); game_path = new_game_path; save_path = new_save_path; game_name = new_game_name; playstation_search = search_playstation; output = new StringBuilder(); }
protected virtual void OnObjectNameChanged(object sender, WinEventProcEventArgs e) { string newName = WindowHelper.GetTitleOfWindow(e._hwnd); AWindow awin = WindowHelper.windowList.FirstOrDefault(awindow => awindow.Hwnd == e._hwnd); if (awin != null) { string oldName = awin.Title; OnWindowNameChanged(sender, new NameChangeEventArgs() { HWND = e._hwnd, oldName = oldName, newName = newName }); return; } CurrentLog.Add(LogEntryType.WindowsEvent, "Object Name Changed: " + newName + "(" + e._hwnd.ToString() + ")"); }
protected virtual void OnStateChanged(object sender, WinEventProcEventArgs e) { AWindow awin = WindowHelper.windowList.FirstOrDefault(awindow => awindow.Hwnd == e._hwnd); if (awin != null) { WINDOWPLACEMENT newPlacement = new WINDOWPLACEMENT(true); WindowHelper.GetWindowPlacement(e._hwnd, ref newPlacement); awin.LastPlacement = awin.Placement; awin.Placement = newPlacement; OnWindowStateChanged(sender, new WindowStateChangedEventArgs() { HWND = e._hwnd, oldPlacement = awin.LastPlacement, newPlacement = awin.Placement }); } }
public FieldsManager(AWindow w) { W = w; show = new ShowInfo(w); rData = new SchemaRootData(); rData.Configure(SchemaGuidManager.GetNewAppGuidString()); aData = new SchemaAppData(); aData.Configure("App Data Name", "App Data Description"); raData = new SchemaRootAppData(); raData.Configure("Root-App Data Name", "Root-App Data Description"); cData = new SchemaCellData(); cData.Configure("new name", "A1", UpdateRules.UR_AS_NEEDED, "cell Family", false, "xl file path", "worksheet name"); cData.Configure("Another new name", "B2", UpdateRules.UR_AS_NEEDED, "second cell Family", false, "second xl file path", "second worksheet name"); }
public ManualArchiveWindow(GameHandler new_game, AWindow owner) : base(owner) { InitializeComponent(); game = new_game; rootCombo.Items.Clear(); foreach(KeyValuePair<string,DetectedLocationPathHolder> file in game.detected_locations) { //if(file.Value.owner!=null) // rootCombo.Items.Add(file.Value.owner); //else // rootCombo.Items.Add("Global"); rootCombo.Items.Add(file.Key); } if(rootCombo.Items.Contains(Environment.UserName)) rootCombo.SelectedIndex = rootCombo.Items.IndexOf(Environment.UserName); else rootCombo.SelectedIndex = 0; }
public FieldsManager(AWindow w, Document doc) { this.doc = doc; W = w; scMgr = SchemaManager.Instance; exMgr = new ExStoreMgr(w, doc); dsMgr = new DataStoreManager(doc); show = new ShowInfo(w); exData = ExStorData.Instance; rData = new SchemaRootData(); rData.Configure(SchemaGuidManager.GetNewAppGuidString()); aData = new SchemaAppData(); aData.Configure("App Data Name", "App Data Description"); raData = new SchemaRootAppData(); raData.Configure("Root-App Data Name", "Root-App Data Description"); cData = new SchemaCellData(); cData.Configure("new name", "A1", UpdateRules.UR_AS_NEEDED, "cell Family", false, "xl file path", "worksheet name"); }
public RestoreWindow(ArchiveHandler archive, AWindow owner) : this(owner) { this.archive = archive; }
public RestoreWindow(AWindow owner) : base(owner) { InitializeComponent(); default_progress_color = restoreProgress.Foreground; }
public Win_Controller(AWindow window) : base(window) { }
public LayoutChangeListener(AWindow awindow) { _aWindow = awindow; }
/// <summary> /// 添加子窗口 /// </summary> /// <param name="name"></param> /// <param name="win"></param> protected void AddSubWindow(string name, AWindow win) { this.subWindowsDictionary[name] = win; }
public About(AWindow owner) : base(owner) { InitializeComponent(); this.masgauLbl.Content += Core.version; }