Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public ReportWindow(string new_report, string new_name, AWindow owner)
     : base(owner)
 {
     InitializeComponent();
     report = new_report;
     name = new_name;
 }
Ejemplo n.º 3
0
        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);
                }
            }
        }
Ejemplo n.º 4
0
        public ExTests01(AWindow w, Document doc)
        {
            this.w   = w;
            this.doc = doc;

            fm = new FieldsManager(w, doc);
        }
Ejemplo n.º 5
0
        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() + ")");
        }
Ejemplo n.º 6
0
        public ShowInfo(AWindow w)
        {
            W = w;

            string docName = MainFields.DocName;

            this.documentName = docName.IsVoid() ? "un-named" : docName;
        }
Ejemplo n.º 7
0
        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;
        }
Ejemplo n.º 8
0
        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() + ")");
            }
        }
Ejemplo n.º 9
0
        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() + ")");
            }
        }
Ejemplo n.º 10
0
        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);
        }
Ejemplo n.º 11
0
        void Detach()
        {
            _awindow.RemoveCallback(this);
            _awindow.DetachViews();

            _mediaPlayer.SetAndroidContext(IntPtr.Zero);

            RemoveOnLayoutChangeListener(_layoutListener);
            _layoutListener.Dispose();
            _layoutListener = null;

            _awindow.Dispose();
            _awindow = null;
        }
Ejemplo n.º 12
0
    /// <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
    }
Ejemplo n.º 13
0
        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() + ")");
        }
Ejemplo n.º 14
0
        public void OnSurfacesDestroyed(AWindow vout)
        {
            var disableVideo = false;

            lock (_locker)
            {
                if (_mp.VoutCount > 0)
                {
                    disableVideo = true;
                }
            }
            if (disableVideo)
            {
                //_mp.VideoTrackEnabled = false;
            }
        }
Ejemplo n.º 15
0
 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();
 }
Ejemplo n.º 16
0
        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() + ")");
        }
Ejemplo n.º 17
0
        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
                });
            }
        }
Ejemplo n.º 18
0
        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");
        }
Ejemplo n.º 19
0
        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;
        }
Ejemplo n.º 20
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");
        }
Ejemplo n.º 21
0
 public RestoreWindow(ArchiveHandler archive, AWindow owner)
     : this(owner)
 {
     this.archive = archive;
 }
Ejemplo n.º 22
0
 public RestoreWindow(AWindow owner)
     : base(owner)
 {
     InitializeComponent();
     default_progress_color = restoreProgress.Foreground;
 }
Ejemplo n.º 23
0
 public Win_Controller(AWindow window)
     : base(window)
 {
 }
Ejemplo n.º 24
0
 public Win_Controller(AWindow window) : base(window)
 {
 }
Ejemplo n.º 25
0
 public LayoutChangeListener(AWindow awindow)
 {
     _aWindow = awindow;
 }
Ejemplo n.º 26
0
 /// <summary>
 /// 添加子窗口
 /// </summary>
 /// <param name="name"></param>
 /// <param name="win"></param>
 protected void AddSubWindow(string name, AWindow win)
 {
     this.subWindowsDictionary[name] = win;
 }
Ejemplo n.º 27
0
 public About(AWindow owner)
     : base(owner)
 {
     InitializeComponent();
     this.masgauLbl.Content += Core.version;
 }