/// <summary> /// Creates a new window with the given window ID and the current window UI /// </summary> public void CreateNewWindow(int windowID) { if (!Directory.Exists(Application.persistentDataPath + "/Windows")) { Directory.CreateDirectory(Application.persistentDataPath + "/Windows/"); } string path = Application.persistentDataPath; if (windowID == -1) path += "/Windows/BaseWindow.txt"; else path += "/Windows/Window" + windowID.ToString() + ".txt"; try { myData = new WindowData(); myData.windowID = windowID; using (FileStream fs = new FileStream(path, FileMode.Create)) { XmlSerializer xmls = new XmlSerializer(typeof(WindowData)); xmls.Serialize(fs, myData); fs.Close(); } Debug.Log ("Succesfully wrote UIWindow to " + path); } catch (InvalidOperationException e) { Debug.LogError ("Failed to write UIWindow to " + path + "- Error: " + e.Message); } }
RuntimeController(RuntimeDelegate client, WindowData data) { window_data_ = data; client_ = client; //DartVM dartVM //DartSnapshot isolate_snapshot //DartSnapshot shared_snapshot //TaskRunners task_runners //SnapshotDelegate snapshot_delegate //GrContext resource_context //SkiaUnrefQueue unref_queue //string advisory_script_uri //string advisory_script_entrypoint DartIsolate root_isolate = root_isolate_.lock (); root_isolate.SetReturnCodeCallback( (uint code) => { root_isolate_return_code_ = new Tuple <bool, uint>(true, code); }); if (var window = GetWindowIfAvailable()) { tonic::DartState::Scope scope = new Scope(root_isolate); window.DidCreateIsolate(); if (!FlushRuntimeStateToIsolate()) { FML_DLOG(ERROR) << "Could not setup intial isolate state."; } }
public override void Init() { base.Init(); //添加子窗口 var subwin = new SubWindow_Demo2(this.Transform.Find("SubWindow")); subwin.Init(); this.AddSubWindow("subwin1", subwin); //注册消息监听 RegisterAction("rotation", OnMsg_Rotation); //01按钮 btn_01.onClick.AddListener(() => { this.Close(); ScreenViewManager.Inst.MainLayer.BeginNavTo("main"); }); //02按钮 btn_02.onClick.AddListener(() => { var data = WindowData.Create("testkey"); data.AddData("testkey", "testvalue"); this.OpenSubWindow("subwin1", data); }); }
/// <summary> /// Saves the window with the passed window ID /// </summary> public void SaveWindow(int windowID) { if (!Directory.Exists(Application.persistentDataPath + "/Windows")) { Directory.CreateDirectory(Application.persistentDataPath + "/Windows/"); } string path = Application.persistentDataPath; if (windowID == -1) { path += "/Windows/BaseWindow.txt"; } else { path += "/Windows/Window" + windowID.ToString() + ".txt"; } try { myData = new WindowData(); UpdateAllWindowObjects(); myData.windowID = windowID; using (FileStream fs = new FileStream(path, FileMode.Create)) { XmlSerializer xmls = new XmlSerializer(typeof(WindowData)); xmls.Serialize(fs, myData); fs.Close(); } Debug.Log("Succesfully wrote UIWindow to " + path); } catch (InvalidOperationException e) { Debug.LogError("Failed to write UIWindow to " + path + "- Error: " + e.Message); } }
private void BlitThreadInit(WindowData reg) { Clyde._windowing !.GLMakeContextCurrent(reg.Reg); Clyde._windowing.GLSwapInterval(0); if (!Clyde._isGLES) { GL.Enable(EnableCap.FramebufferSrgb); } var vao = GL.GenVertexArray(); GL.BindVertexArray(vao); GL.BindBuffer(BufferTarget.ArrayBuffer, Clyde.WindowVBO.ObjectHandle); // Vertex Coords GL.VertexAttribPointer(0, 2, VertexAttribPointerType.Float, false, Vertex2D.SizeOf, 0); GL.EnableVertexAttribArray(0); // Texture Coords. GL.VertexAttribPointer(1, 2, VertexAttribPointerType.Float, false, Vertex2D.SizeOf, 2 * sizeof(float)); GL.EnableVertexAttribArray(1); var program = Clyde._compileProgram( Clyde._winBlitShaderVert, Clyde._winBlitShaderFrag, new (string, uint)[]
private void Buy(WindowData window) { if (Computer.CanCreateWindow(window) && Computer.Coin.Pay(window.Cost)) { Computer.CreateWindow(window); } }
/// <summary> /// 初始化窗口数据 /// </summary> public virtual void InitWindowData() { if (windowData == null) { windowData = new WindowData(); } }
private void MakeFullScreen(WindowData windowData) { if (windowData.EditorWindow == null || windowData.IsFullScreen) { return; } float scalingFactor = GetScalingFactor(); Vector2 dims = windowData.MonitorResolution / scalingFactor; Vector2 offset = windowData.MonitorOffset / scalingFactor; int tabHeight = (int)(TAB_HEIGHT / scalingFactor); int borderWidth = (int)(BORDER_WIDTH / scalingFactor); Rect windowRect = new Rect( offset.x, offset.y - tabHeight, dims.x, dims.y + tabHeight - borderWidth); windowData.IsFullScreen = true; windowData.EditorWindow.minSize = windowData.EditorWindow.maxSize = new Vector2( dims.x, dims.y + tabHeight - borderWidth); windowData.EditorWindow.position = windowRect; }
private void WindowDropdown_SelectedIndexChanged(object sender, EventArgs e) { WindowData Data = (WindowData)WindowDropdown.SelectedItem; WindowName = Data.Name; WindowTitle = Data.Title; WindowHandle = Data.Handle; }
private void Application_Startup(object sender, StartupEventArgs e) { var loader = new DataLoader(); loader.Load(); AppConfig = loader.GetAppConfig(); WindowData = loader.GetWindowData(); }
private void CreateAndBindExchanger() { IExchangerSettings settings = WindowData.GetCurrentExchangerSettings(); exchanger = ExchangerFactory.Create(WindowData.ExchangerType, settings); exchanger.BindSourceData(In); exchanger.BindResultData(Out); }
public static int SaveWindow(string windowType, string viewModelType, string board, string seccode) { var windowData = new WindowData(windowType, viewModelType, board, seccode, ""); var id = GenerateWindowId(); WindowPlacements.Add(id, windowData); return(id); }
public AWindow(Transform transform) { this.Transform = transform; this.TempData = WindowData.Create(); subWindowsDictionary = new Dictionary <string, SubWindow>(); UITools.AutoSetTransformPath(this); }
public void RunPhonemeExtractor(AudioClip audioFile, string transcription, string _pathToConvertedFile) { audioClip = audioFile; pathToConvertedFile = _pathToConvertedFile; textTranscripton = transcription; currentPaths = dataManager.LoadWindowData(); RunJavaProcess(); DataCleaning.LoadingBarViewer.Instance.StartLoading(); }
public void LoadContent(WindowData wd) { var places = wd.SQLDatabase.GetPlaces(); foreach (var p in places) { wd.PlaceDatas.PlaceList.Add(p); } }
public void OnMsg_GetData(WindowData data) { if (data != null) { var dial = data.GetData <Dial>("key"); Debugger.Log("新增新转盘"); Debugger.Log(dial); } }
public void LoadContent(WindowData datas) { var charas = datas.SQLDatabase.GetCharacters(); foreach (var c in charas) { datas.CharacterDatas.CharacterList.Add(c); } }
public override bool SwapBuffersImpl(WindowData wdata) { var hWnd = ((Win32WindowData)wdata).Hwnd; var hdc = GetDC(hWnd); var result = SwapBuffers(hdc); ReleaseDC(hWnd, hdc); return(result); }
public override IntPtr CreateContextImpl(WindowData wdata) { var hWnd = ((Win32WindowData)wdata).Hwnd; var hdc = GetDC(hWnd); var hrc = WglCreateContext(hdc); ReleaseDC(hWnd, hdc); return(hrc); }
/// <summary> /// Constructor. /// </summary> public ViderePlayer(WindowData data) { windowData = data; data.Window.Closing += (Sender, Args) => data.MediaPlayer.Dispose( ); MainDispatcher = data.Window.Dispatcher; this.LoadComponents( ); this.InitializeComponents( ); }
public GameObject GetGameWindow(NFCWindows.UI_WIN_STATE eState) { if (mhtWindows.ContainsKey(eState)) { WindowData xWindowData = (WindowData)mhtWindows[eState]; return(xWindowData.xWindowGameObject); } return(null); }
/// <summary> /// 更新UI使用的数据 /// </summary> /// <param name="data">数据</param> public void SendMessage(WindowData data) { Action <WindowData> action = null; callbackMap.TryGetValue(data.Name, out action); if (action != null) { action(data); } }
public static List<IntPtr> SearchForWindow(string wndclass) { WindowData sd = new WindowData { Wndclass = wndclass, hWnd = new List<IntPtr>() }; EnumWindows(new EnumWindowsProc(EnumProc), ref sd); return sd.hWnd; }
private void CloseWindow(WindowData windowData) { if (windowData.EditorWindow == null) { return; } windowData.EditorWindow.Close(); windowData.EditorWindow = null; }
public void RegisterWindowStateCallback(NFCWindows.UI_WIN_STATE eState, WindowStateEventHandler handler) { if (!mhtWindows.ContainsKey(eState)) { return; } WindowData xWindowData = (WindowData)mhtWindows[eState]; xWindowData.doWindowHandleDel += handler; }
//public static void CreateBackupLogForm(ITrace trace) public static void CreateBackupLogForm() { //gLogBackupForm = new LogForm(trace); gLogBackupForm = new LogForm(); WindowData windowData = WindowsApp.CurrentWindowsApp.AddWindow(gLogBackupForm); gLogBackupForm.Icon = main.gIcon; gLogBackupForm.Text = "Pib - log backup"; gLogBackupForm.ShowInTaskbar = false; }
public static List <IntPtr> SearchForWindow(string wndclass) { WindowData sd = new WindowData { Wndclass = wndclass, hWnd = new List <IntPtr>() }; EnumWindows(new EnumWindowsProc(EnumProc), ref sd); return(sd.hWnd); }
public void Insert(float samplerate, float[] data, float[] spectrum) { if (buffer.Count >= length) { buffer.Dequeue(); } WindowData newData = new WindowData(samplerate, data, spectrum); buffer.Enqueue(newData); }
public override void Open(WindowData data = null) { base.Open(); if (data != null) { foreach (var v in data.DataMap) { text_msg.text = v.Key.ToString() + ":" + v.Value.ToString(); } } }
public override bool SwapBuffersImpl(WindowData wdata) { var wwdata = (WaylandWindowData)wdata; var result = EGLSwapBuffers(_wwsd.EGLDisplay, wwdata.EGLSurface); if (!result) { LogError("eglSwapBuffers"); } return(result); }
private void save() { if (tempDialData == null) { return; } var data = WindowData.Create("AddDial"); data.AddData("key", tempDialData); UIManager.Inst.SendMessage((int)WinEnum.Win_Menu, data); }
public override IntPtr CreateContextImpl(WindowData wdata) { var wwdata = (WaylandWindowData)wdata; var ctx = EGLCreateContext(_wwsd.EGLDisplay, wwdata.EGLConfig, IntPtr.Zero, ref EGL_NONE); if (ctx == IntPtr.Zero) { LogError("eglCreateContext"); } return(ctx); }
public static List<IntPtr> SearchForWindow(string wndclass,string title) { WindowData sd = new WindowData { Wndclass = wndclass, windowName = title, hWnd = new List<IntPtr>() }; EnumWindows(new EnumWindowsProc(EnumProcwithTitle), ref sd); return sd.hWnd; }
//Callback Function public static bool EnumProc(IntPtr hWnd, ref WindowData data) { //Check for className and get list of handles StringBuilder sb = new StringBuilder(1024); GetClassName(hWnd, sb, sb.Capacity); if (sb.ToString().Equals(data.Wndclass)) { //Add more conditions for differenting between different instances of firefox data.hWnd.Add(hWnd); return true; //Continue Enumerating and adding } return true; }
//Callback Function public static bool EnumProcwithTitle(IntPtr hWnd, ref WindowData data) { //Check for className and get list of handles StringBuilder sb = new StringBuilder(1024); GetClassName(hWnd, sb, sb.Capacity); if (sb.ToString().Equals(data.Wndclass)) { StringBuilder title = new StringBuilder(1024); GetWindowText(hWnd, title, title.Capacity); if(title.ToString().Contains(data.windowName)) data.hWnd.Add(hWnd); return true; //Continue Enumerating and adding } return true; }
private BasicTeraData(string resourceDirectory) { ResourceDirectory = resourceDirectory; Directory.CreateDirectory(Path.Combine(resourceDirectory, "config")); //ensure config dir is created XmlConfigurator.Configure(new Uri(Path.Combine(ResourceDirectory, "log4net.xml"))); HotkeysData = new HotkeysData(this); WindowData = new WindowData(this); EventsData = new EventsData(this); _dataForRegion = Helpers.Memoize<string, TeraData>(region => new TeraData(region)); Servers = new ServerDatabase(Path.Combine(ResourceDirectory, "data")); //handle overrides var serversOverridePath = Path.Combine(ResourceDirectory, "config/server-overrides.txt"); if (!File.Exists(serversOverridePath))//create the default file if it doesn't exist File.WriteAllText(serversOverridePath, LP.ServerOverrides ); var overriddenServers = GetServers(serversOverridePath).ToList(); Servers.AddOverrides(overriddenServers); ImageDatabase = new ImageDatabase(Path.Combine(ResourceDirectory, "img/")); Icons = new IconsDatabase(Path.Combine(ResourceDirectory, "data/")); }
private void UpdateProperties(SystemWindow sw) { if (!delayedUpdate.Checked && (sw.HWnd == windowProperties.Handle || sw.HWnd == parentProperties.Handle)) { windowProperties.Text = "(recursive)"; parentProperties.Text = "(recursive)"; } delayedProperties = getWindowProperties(sw); windowData = new WindowData(mf, sw); SystemWindow swParent = sw.ParentSymmetric; while (swParent != null) { sw = swParent; swParent = sw.ParentSymmetric; } delayedMainProperties = getWindowProperties(sw); parentData = new WindowData(mf, sw); if (!delayedUpdate.Checked) { windowProperties.Text = delayedProperties; parentProperties.Text = delayedMainProperties; } }
public CopiedWindow(WindowData windowData, string window, WindowData mainData, string mainWindow) { this.title = windowData == null ? "[live display]" : windowData.Name; this.window = window; this.mainWindow = mainWindow; this.windowData = windowData; this.mainData = mainData; }
/// <summary> /// Loads the window from the windowID. /// Sets the WindowData to UIWindow and returns it /// </summary> public WindowData LoadWindow(int windowID) { if (!Directory.Exists(Application.persistentDataPath + "/Windows")) { Directory.CreateDirectory(Application.persistentDataPath + "/Windows/"); } string path = Application.persistentDataPath; if (!File.Exists(path + "/Windows/BaseWindow.txt")) { SaveWindow(-1); } try { if (windowID == -1) path += "/Windows/BaseWindow.txt"; else path += "/Windows/Window" + windowID + ".txt"; myData = new WindowData(); XmlSerializer xmls = new XmlSerializer(typeof(WindowData)); using (FileStream fs = new FileStream(path, FileMode.Open)) { myData = xmls.Deserialize(fs) as WindowData; fs.Close(); } Debug.Log("Succesfully Loaded window from path: " + path); return myData; } catch (InvalidOperationException e) { Debug.LogError ("Failed to load UIWindow from " + path + " - Error: " + e.Message); return null; } }
private void ScreenUpdate(WindowData data) { if ((data != null) && (data.Image != null)) { // Unpack the data. // Image partial; Rectangle bounds; Utils.UnpackScreenCaptureData(data, out partial, out bounds); Utils.UpdateScreen(ref _viewerSession.Screen, partial, bounds); UpdateScreenImage(); } }
private static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, ref WindowData data);