BrailleIOViewRange getMainStatusRegion(int left, int top, int width, int height) { BrailleIOViewRange _status = new BrailleIOViewRange(left, top, width, height); _status.SetBorder(0, 0, 0, 1); _status.SetMargin(0, 0, 0, 2); _status.SetPadding(0, 0, 0, 1); return(_status); }
BrailleIOViewRange getMainDetailRegion(int left, int top, int width, int height) { BrailleIOViewRange bottom = new BrailleIOViewRange(left, top, width, height); bottom.SetBorder(1, 0, 0); bottom.SetMargin(1, 0, 0); bottom.SetPadding(1, 0, 0); return(bottom); }
BrailleIOViewRange getMainTopRegion(int left, int top, int width, int height) { BrailleIOViewRange _top = new BrailleIOViewRange(left, top, width, height); _top.SetBorder(0, 0, 1); _top.SetMargin(0, 0, 1); _top.SetPadding(0, 11, 1, 0); _top.SetWidth((int)(width * 1.4)); // only that region content is not doing line breaks return(_top); }
BrailleIOViewRange getMainScreenCenter2Region(int left, int top, int width, int height) { BrailleIOViewRange center2 = new BrailleIOViewRange(left, top, width, height); center2.SetZoom(-1); center2.SetBorder(0); center2.SetContrastThreshold(STANDARD_CONTRAST_THRESHOLD); center2.SetMargin(7, 0); return(center2); }
// string path = ""; private void showExample() { BrailleIOScreen s = new BrailleIOScreen(); #region Center Region #region screenshot Image bmp = captureScreen(); #endregion BrailleIOViewRange center = new BrailleIOViewRange(0, 7, 120, 46, new bool[120, 40]); //center.Move(1,1); center.SetBitmap(bmp); center.SetZoom(-1); center.SetBorder(0); center.SetContrastThreshold(150); center.ShowScrollbars = true; s.AddViewRange("center", center); #endregion #region Top Reagion BrailleIOViewRange top = new BrailleIOViewRange(0, 0, 120, 7); top.SetBorder(0, 0, 1); top.SetMargin(0, 0, 1); top.SetPadding(0, 0, 1); top.SetText("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\nabcdefghijklmnopqrstuvwxyz\r\n0123456789!\"#$%&<=>?@©®\r\n*+-~:;[],.'^_`(){}/|\\r\nß\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n"); top.SetText("Tactile screen capture"); s.AddViewRange("top", top); #endregion #region Bottom Reagion BrailleIOViewRange bottom = new BrailleIOViewRange(0, 53, 120, 7); bottom.SetBorder(1, 0, 0); bottom.SetMargin(1, 0, 0); bottom.SetPadding(1, 0, 0); bottom.SetText("Detail area: status messages can be shown"); s.AddViewRange("bottom", bottom); #endregion io.AddView(BS_MAIN_NAME, s); io.ShowView(BS_MAIN_NAME); io.RenderDisplay(); }
// string path = ""; private void showExample() { BrailleIOScreen s = new BrailleIOScreen(); #region Center Region #region screenshot Image bmp = captureScreen(); #endregion BrailleIOViewRange center = new BrailleIOViewRange(0, 0, 120, 60, new bool[120, 40]); center.SetMargin(7, 0, 0); center.Move(1, 1); center.SetBitmap(bmp); center.SetZoom(-1); center.SetBorder(0); center.SetContrastThreshold(150); s.AddViewRange("center", center); #endregion #region Top Region BrailleIOViewRange top = new BrailleIOViewRange(0, 0, 120, 7, new bool[0, 0]); top.SetBorder(0, 0, 1); top.SetMargin(0, 0, 1); top.SetPadding(0, 0, 1); top.SetText("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\nabcdefghijklmnopqrstuvwxyz\r\n0123456789!\"#$%&<=>?@©®\r\n*+-~:;[],.'^_`(){}/|\\r\nß\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n"); top.SetText("Tactile screen capture"); s.AddViewRange("top", top); #endregion IO.AddView(BS_MAIN_NAME, s); IO.ShowView(BS_MAIN_NAME); IO.RenderDisplay(); }
/// <summary> /// Change visibility of the given view range. Center view range cannot be hidden. /// </summary> /// <param name="viewName">name of the screen</param> /// <param name="viewRangeName">name of the view range</param> /// <param name="visible">true if view range should become visible, false if view range should become invisible</param> /// <returns>true if successful, false if not successful</returns> private bool changeViewVisibility(string viewName, string viewRangeName, bool visible) { if (!viewRangeName.Equals(VR_CENTER_NAME)) { BrailleIOScreen vs = io.GetView(viewName) as BrailleIOScreen; if (vs != null) { BrailleIOViewRange vr = vs.GetViewRange(viewRangeName); BrailleIOViewRange center = vs.GetViewRange(VR_CENTER_NAME); BrailleIOViewRange top = vs.GetViewRange(VR_TOP_NAME); BrailleIOViewRange bottom = vs.GetViewRange(VR_DETAIL_NAME); if (vr != null && center != null && top != null && bottom != null) { vr.SetVisibility(visible); // change margin of center region if (visible) { if (viewRangeName.Equals(VR_TOP_NAME)) { if (bottom.IsVisible()) { center.SetMargin(7, 0); } else { center.SetMargin(7, 0, 0); } } else if (viewRangeName.Equals(VR_DETAIL_NAME)) { if (top.IsVisible()) { center.SetMargin(7, 0); } else { center.SetMargin(0, 0, 7); } } } else { if (viewRangeName.Equals(VR_TOP_NAME)) { if (bottom.IsVisible()) { center.SetMargin(0, 0, 7); } else { center.SetMargin(0, 0); } } else if (viewRangeName.Equals(VR_DETAIL_NAME)) { if (top.IsVisible()) { center.SetMargin(7, 0, 0); } else { center.SetMargin(0, 0); } } } return(true); } } } audioRenderer.PlayWaveImmediately(StandardSounds.Error); // operation not possible return(false); }
BrailleIOViewRange getMainStatusRegion(int left, int top, int width, int height) { BrailleIOViewRange _status = new BrailleIOViewRange(left, top, width, height); _status.SetBorder(0, 0, 0, 1); _status.SetMargin(0, 0, 0, 2); _status.SetPadding(0, 0, 0, 1); return _status; }
BrailleIOViewRange getMainDetailRegion(int left, int top, int width, int height) { BrailleIOViewRange bottom = new BrailleIOViewRange(left, top, width, height); bottom.SetBorder(1, 0, 0); bottom.SetMargin(1, 0, 0); bottom.SetPadding(1, 0, 0); return bottom; }
BrailleIOViewRange getMainTopRegion(int left, int top, int width, int height) { BrailleIOViewRange _top = new BrailleIOViewRange(left, top, width, height); _top.SetBorder(0, 0, 1); _top.SetMargin(0, 0, 1); _top.SetPadding(0, 11, 1, 0); _top.SetWidth((int)(width * 1.4)); // only that region content is not doing line breaks return _top; }
BrailleIOViewRange getMainScreenCenter2Region(int left, int top, int width, int height) { BrailleIOViewRange center2 = new BrailleIOViewRange(left, top, width, height); center2.SetZoom(-1); center2.SetBorder(0); center2.SetContrastThreshold(STANDARD_CONTRAST_THRESHOLD); center2.SetMargin(7, 0); return center2; }