private void Startup(Frame frame) { // replace log file so that is one frame to one log ReplaceLogFile(frame.IDPage, frame.ID); OptionItems oi = new OptionItems(frame.Options); // ------ Frame css ------ ChangeCss(oi.GetSingle("css")); // ------ Title ------ headerTitle.Text = frame.Title; if (!oi.GetSingle("title_is_hidden").Equals("true")) // hide title if value is true, else will always show the title { lbTitle.InnerText = frame.Title; TitleStyle(oi.GetList("title_style")); // title style // loads javascript that controls title position SetTitlePosition(); } else { lbTitleContainer.Style.Add("display", "none"); } /****************** GETTING OPTION DATA ******************/ // master/slave indicator bool isMaster = oi.GetSingle("master").ToLower().Equals("yes"); bool isSlave = oi.GetSingle("slave").ToLower().Equals("yes"); // master filter title string masterFilter = oi.GetSingle("master_filter"); // list of the labels of the inputboxs List<string> listInputData = oi.GetList("input_data"); // list of connections List<string> connList = oi.GetList("conn"); // list queries List<string> sqlList = oi.GetList("sql"); bool queryDebug = oi.GetSingle("query_debug").ToLower().Equals("yes"); // list titles List<string> titleList = oi.GetList("titles"); // list gridviews width List<string> tableWidthList = oi.GetList("table_width"); /****************** RUN CLICK EVENT ******************/ // data to be used in Run Click Event LoadTemporaryPageVariables(frame, isSlave, isMaster, listInputData, masterFilter, connList, sqlList, titleList, tableWidthList, queryDebug); /****************** INPUT BOXs ******************/ // if is not slave will build the inputboxs if (!isSlave) { BuildInputBoxs(listInputData); } /****************** GRIDVIEWs ******************/ // builds the gridviews if is master/slave and its not a postback if (!IsPostBack && (isMaster || isSlave) && masterFilter != string.Empty) { BuildGridViews(frame, masterFilter, listInputData, sqlList, connList, titleList, tableWidthList, queryDebug); } }
private void Startup(Frame frame) { // replace log file so that is one frame to one log ReplaceLogFile(frame.IDPage, frame.ID); OptionItems oi = new OptionItems(frame.Options); // ------ Frame css ------ ChangeCss(oi.GetSingle("css")); // ------ Title ------ headerTitle.Text = frame.Title; if (!oi.GetSingle("title_is_hidden").Equals("true")) // hide title if value is true, else will always show the title { lbTitle.InnerText = frame.Title; TitleStyle(oi.GetList("title_style")); // title style } else { lbTitleContainer.Style.Add("display", "none"); } string filterTitle = frame.Title; int pageId = frame.IDPage; ViewState["filter_title"] = filterTitle; ViewState["filter_pageid"] = pageId.ToString(); // ------ Load Javascript ------ SetTitlePosition(); /******************/ List<string> listColummns = oi.GetList("columns_to_filter"); /* List<string> listColummns = new List<string>(); listColummns.Add("SUBESTADO"); listColummns.Add("ALT_DIV"); listColummns.Add("CENARIO"); listColummns.Add("SERVICODESC"); */ /******************/ if (ViewState["list_columns_" + Generic.GetHash(filterTitle)] == null) ViewState["list_columns_" + Generic.GetHash(filterTitle)] = listColummns; bool isVertical = oi.GetSingle("vertical_filtes").Equals("true", StringComparison.CurrentCultureIgnoreCase); LoadData ld = new LoadData { PageId = pageId, Datafile = oi.GetSingle("datafile"), Datatable = oi.GetList("datatable"), DefaultFilter = oi.GetSingle("default_filter"), FileName = oi.GetSingle("xml_file"), MasterFilterId = oi.GetSingle("master_filter").Trim() }; if (ld.FileName != string.Empty || ld.Datafile != string.Empty) BuildFilters( ld, listColummns, filterTitle, isVertical ); }
private void Startup(Frame frame) { // replace log file so that is one frame to one log ReplaceLogFile(frame.IDPage, frame.ID); OptionItems oi = new OptionItems(frame.Options); // ------ Frame css ------ ChangeCss(oi.GetSingle("css")); // ------ Title ------ headerTitle.Text = frame.Title; if (!oi.GetSingle("title_is_hidden").Equals("true")) // hide title if value is true, else will always show the title { lbTitle.InnerText = frame.Title; TitleStyle(oi.GetList("title_style")); // title style // set title position with javascript SetTitlePosition(); } else { lbTitleContainer.Style.Add("display", "none"); } CustomJavascript(oi.GetSingle("custom_javascript")); CustomHtml(oi.GetSingle("custom_html")); CustomCss(oi.GetSingle("custom_css")); }
/// <summary> /// gets the data from master filter /// </summary> private List<string> BuildInputDataList(string filter, List<string> inputData) { /* sql_tool_filter=[orderid = value],[customerid = value]; OR orderid = value, customerid=value */ try { if (filter == string.Empty) return new List<string>(); List<string> unorderedDataList; List<string> orderedDataList = new List<string>(); if (filter.ToLower().Trim().StartsWith("sql_tool_filter=")) { OptionItems oi = new OptionItems(filter); unorderedDataList = oi.GetList("sql_tool_filter"); } else { unorderedDataList = filter.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); } foreach (string name in inputData) { string value = string.Empty; try { value = unorderedDataList.Single(x => x.ToLower().TrimStart().StartsWith(name.ToLower())); // orderid = value TRANSFORM TO value value = value.Substring(value.IndexOf('=') + 1).Trim(); } catch { } orderedDataList.Add(value ?? string.Empty); } return orderedDataList; } catch (Exception ex) { throw new Exception("error processing filter " + ex.Message); } }
public string AddUserFavoritePage(string userId, string pageName, string ctrl) { string crlHash = Generic.GetHash(Generic.GetWebConfigValue("WebServiceKey")); //if (ctrl != crlHash) return js.Serialize(""); db_config_users dcu = null; try { // first validation to guarantee that user is greater than zero int auxUserId = Convert.ToInt32(userId); if (auxUserId < 0) return string.Empty; dcu = new db_config_users(auxUserId); dcu.Open(); Users u = dcu.Get(auxUserId); if (u == null) return string.Empty; // if user does not exists will leave width no return message OptionItems oi = new OptionItems(u.UserOptions); List<string> favoriteList = oi.GetList("favorites"); if (favoriteList.IndexOf(pageName) < 0) { favoriteList.Add(pageName); oi.UpdateOptions("favorites", favoriteList); u.UserOptions = oi.GetOptionsString(); dcu.Commit(); return "page added to favorites"; } else return "page already added to favorite."; } catch (Exception ex) { loging.Error("FrontOffice User Webservice", "Add User Favorite Page", ex.Message, _logRecord); } finally { if (dcu != null) dcu.Close(); } return "failed to add page"; }
public string GetUserFavorites(string userId, string ctrl) { JavaScriptSerializer js = new JavaScriptSerializer(); string crlHash = Generic.GetHash(Generic.GetWebConfigValue("WebServiceKey")); //if (ctrl != crlHash) return js.Serialize(""); db_config_users dcu = null; db_config_page dcp = null; try { // first validation to guarantee that user is greater than zero int auxUserId = Convert.ToInt32(userId); if (auxUserId < 0) return js.Serialize(""); dcu = new db_config_users(auxUserId); dcu.Open(); dcp = new db_config_page(); dcp.Open(); object userOptions = dcu.Get(auxUserId).UserOptions; if (userOptions == null) return js.Serialize(""); OptionItems oi = new OptionItems((string)userOptions); List<Dictionary<string, string>> favoriteList = new List<Dictionary<string, string>>(); foreach (string favoritePage in oi.GetList("favorites")) { try { string title = dcp.Get(favoritePage).Title; favoriteList.Add(new Dictionary<string, string>() { {"Name", favoritePage}, {"Title", title} }); } catch {} } return js.Serialize(favoriteList); } catch (Exception ex) { loging.Error("FrontOffice User Webservice", "Get Favorites ", ex.Message, _logRecord); } finally { if (dcu != null) dcu.Close(); try { if(dcp != null) dcp.Close(); } catch {} // needed to open a new connection (forgot to implement a page method that accepts new ) } return js.Serialize(""); }
private void Startup(Frame frame) { // replace log file so that is one frame to one log ReplaceLogFile(frame.IDPage, frame.ID); OptionItems oi = new OptionItems(frame.Options); // ------ Frame css ------ ChangeCss(oi.GetSingle("css")); // ------ Title ------ headerTitle.Text = frame.Title; if (!oi.GetSingle("title_is_hidden").Equals("true")) // hide title if value is true, else will always show the title { lbTitle.InnerText = frame.Title; TitleStyle(oi.GetList("title_style")); // title style // ------ Load Javascript ------ SetTitlePosition(); // loads javascript that controls title position } else { lbTitleContainer.Style.Add("display", "none"); } // ------ Border ------ // Border is defined in draw_frames class, sets the border of the panel outside de iframe. // ------ Table ------ int rowsCount = -1; // file name is here to be used outside the try catch string filePath = string.Empty; try { /* * default filter => * * default filter from XML is this way: * default_filter = "select SUBESTADO, count as qtd group by SUBESTADO"; * * default filder from sqlite is a query * default_filder = "select * from xpto" * */ LoadData ld = new LoadData { PageId = frame.IDPage, Datafile = oi.GetSingle("datafile"), Datatable = oi.GetList("datatable"), DefaultFilter = oi.GetSingle("default_filter"), FileName = oi.GetSingle("xml_file"), MasterFilterId = oi.GetSingle("master_filter").Trim() }; // set virtual folder lbDownload.HRef = ld.GetVirtualFilePath(); // set real folder filePath = ld.GetFilePath(); mGridView.DataSource = ld.GetData(); rowsCount = ((DataView)mGridView.DataSource).Count; } catch (Exception ex) { loging.Error("table", "load data", ex.Message, ViewState["log_file"].ToString()); /** Hide when error **/ LabelCountVisible(true); LabelDownloadVisible(true); FiltersVisibility(true); } if (rowsCount >= 0) { try { /********** Css Style **********/ mGridView.CssClass = "gridview"; mGridView.AlternatingRowStyle.CssClass = "alt"; mGridView.PagerStyle.CssClass = "pgr"; /********** Sort **********/ GridView_Sort(oi.GetSingle("table_sort").Trim().ToLower().Equals("false")); /********** Paging **********/ GridView_Paging(oi.GetSingle("table_paging"), rowsCount); /********** GridviewHeader **********/ GridView_Header(oi.GetSingle("table_show_header").Trim().ToLower().Equals("false")); /********** GridView Width **********/ GridView_Width(oi.GetSingle("table_width")); /********** Filter **********/ FiltersVisibility(oi.GetSingle("filters_visible").Trim().ToLower().Equals("false")); /********** Color Markers **********/ AddColorMarkers(oi.GetList("color_markers")); //AddColorMarkers(new List<string> { }); /********** Rows Count **********/ LoadLabelCount(rowsCount); LabelCountVisible(oi.GetSingle("label_count_visible").Trim().ToLower().Equals("false")); /********** Show Xml File lastupd **********/ LabelFileLastUpdVisible(oi.GetSingle("show_xml_file_lastupd").Trim().ToLower().Equals("true")); LoadLabelFileLastUpd(filePath); /********** Downloads **********/ LabelDownloadVisible(oi.GetSingle("label_download_visible").Trim().ToLower().Equals("false")); /********** Table Color Alarms **********/ TableColorAlarms(oi.GetList("warning_text"), oi.GetList("critical_text"), oi.GetSingle("warning_color"), oi.GetSingle("critical_color")); /********** Hyperlinks **********/ CreateHyperlink(frame.IDPage, oi.GetList("hyperlinks"), oi.GetSingle("hyperlink_color")); } catch (Exception ex) { loging.Error("table", "load options", ex.Message, ViewState["log_file"].ToString()); } mGridView.DataBind(); // no fim de correr todas as opções faz o databind... } }
/// <summary> /// build the schedule interval select box /// </summary> private void BuildScheduleInterval(int? interval) { db_config_options dco = null; f_schedule_interval.Items.Clear(); try { dco = new db_config_options("backoffice", "frame_options"); dco.Open(); Options op = dco.Get("frame_options"); OptionItems oi = new OptionItems(op.Options1); List<string> scheduleList = oi.GetList("schedule_interval"); for (int i = 0; i < scheduleList.Count; i++) { string[] schedule = scheduleList[i].Split(new [] {','}, StringSplitOptions.RemoveEmptyEntries); f_schedule_interval.Items.Add(new ListItem( schedule[1], schedule[0] )); try { if (Convert.ToInt32(schedule[0]) == interval) f_schedule_interval.SelectedIndex = i; } catch {} } } catch (Exception ex) { throw new Exception("error: build frame type " + ex.Message); } finally { if (dco != null) dco.Close(); } }
private void Startup(Frame frame) { // replace log file so that is one frame to one log ReplaceLogFile(frame.IDPage, frame.ID); OptionItems oi = new OptionItems(frame.Options); // ------ Frame css ------ ChangeCss(oi.GetSingle("css")); // ------ Title ------ headerTitle.Text = frame.Title; if (!oi.GetSingle("title_is_hidden").Equals("true")) // hide title if value is true, else will always show the title { lbTitle.InnerText = frame.Title; TitleStyle(oi.GetList("title_style")); // title style // ------ Load Javascript ------ SetTitlePosition(); // loads javascript that controls title position } else { lbTitleContainer.Style.Add("display", "none"); } string url = oi.GetSingle("url"); // if url does not exists does noting if (url != string.Empty) { /********** Url **********/ AddUrlToIframe(url); /********** Width, Height **********/ string newWidth = oi.GetSingle("width"); string newHeight = oi.GetSingle("height"); SetIframeSize( newWidth != string.Empty ? newWidth : (frame.Width).ToString(CultureInfo.InvariantCulture), newHeight != string.Empty ? newHeight : (frame.Height - 10).ToString(CultureInfo.InvariantCulture) ); } }
/// <summary> /// Generate header bar /// </summary> private void FillMenuBar(OptionItems foOptions) { string username = "******"; try { headerContainer.Controls.Clear(); UserLoginData user = (UserLoginData)db_config_sessions.GetUserAuthentication(); OptionItems userOi = null; db_config_master_page dcmp = new db_config_master_page(); dcmp.Open(); List<string> userFavorites = new List<string>(); // user not autenticated show just public pages if (user == null) { dcmp.SelectPublicObjectsFromDb(); } else { // user autenticated show public pages and user pages dcmp.SelectAuthenticatedObjectsFromDb(user.UserPages); userOi = new OptionItems(user.User.UserOptions); userFavorites = userOi.GetList("favorites"); // prepare username to be used in error exception. username = user.User.Name; } // set url to use when the page start SelectDefaultPage(foOptions.GetSingle("default_page"), user != null ? userOi.GetSingle("default_frontoffice_page") : ""); MenuBar mb = new MenuBar(); mb.AddHeader("Home", "frontoffice.aspx"); // just show data if is not refresh if (!IsPostBack) { mb.AddHeader("Site pages", ""); // site pages int headerId = mb.GetHeaderPosition("Site pages"); db_config_page dcp; foreach (DbConfig.MasterPage item in dcmp.AllMasterPages) { // just show pages that admin dont want to hide from you :) List<DbConfig.Page> visiblePages = (from p in dcmp.GetAllPages(item.ID) where (new OptionItems(p.Options).GetSingle("hidden_from_frontoffice").Equals("true")) == false select p).ToList(); dcp = new db_config_page(dcmp.Db, visiblePages, item.ID); if (user == null) dcp.SelectPublicObjectsFromDb(); else dcp.SelectAuthenticatedObjectsFromDb(user.UserPages); // will just add master page if it has visible pages to show, // if the master page does not have pages will not get here. if (dcp.AllPages.Count > 0) { // add master page to menu mb.AddMenuItem(headerId, item.Title, ""); int menuItemId = mb.GetMenuPosition(headerId, item.Title); // add pages to sub menus foreach (DbConfig.Page subItem in dcp.AllPages) mb.AddSubMenuItem(headerId, menuItemId, subItem.Title, "page.aspx?nm=" + subItem.Name); } dcp.Close(); } if (userFavorites.Count > 0) // favorites { mb.AddHeader("Favorites", ""); int favItemId = mb.GetHeaderPosition("Favorites"); dcp = new db_config_page(dcmp.Db, new List<DbConfig.Page>(), -1); dcp.Refresh(); foreach (string favpage in userFavorites) { if (!dcp.PageExists(favpage)) continue; DbConfig.Page p = dcp.Get(favpage); mb.AddMenuItem(favItemId, p.Title, "page.aspx?nm=" + p.Name); } dcp.Close(); } } dcmp.Close(); headerContainer.Controls.Add(mb.Get()); Generic.JavaScriptInjector("js", mb.GetLoginJavascript()); } catch (Exception ex) { throw new Exception("error: fill menu bar for user " + username + " - " + ex.Message + " ..."); } }
private void Startup(Frame frame) { // replace log file so that is one frame to one log ReplaceLogFile(frame.IDPage, frame.ID); OptionItems oi = new OptionItems(frame.Options); // ------ Frame css ------ ChangeCss(oi.GetSingle("css")); // ------ Title ------ headerTitle.Text = frame.Title; // hide title if value is true, else will always show the title if (!oi.GetSingle("title_is_hidden").Equals("true", StringComparison.CurrentCultureIgnoreCase)) { lbTitle.InnerText = frame.Title; TitleStyle(oi.GetList("title_style")); // title style // ------ Load Javascript ------ SetTitlePosition(); // loads javascript that controls title position } else { lbTitleContainer.Style.Add("display", "none"); } // ------ Border ------ // Border is defined in draw_frames class, sets the border of the panel outside de iframe. // ------ Chart ------ int rowsCount = -1; try { /* * default filter => * * default filter from XML is this way: * default_filter = "select SUBESTADO, count as qtd group by SUBESTADO"; * * default filder from sqlite is a query * default_filder = "select * from xpto" * */ LoadData ld = new LoadData { PageId = frame.IDPage, Datafile = oi.GetSingle("datafile"), Datatable = oi.GetList("datatable"), DefaultFilter = oi.GetSingle("default_filter"), FileName = oi.GetSingle("xml_file"), MasterFilterId = oi.GetSingle("master_filter").Trim() }; DataView dataView = ld.GetData(); rowsCount = dataView.Count; if (rowsCount > -1) WriteDataToChart(dataView); } catch (Exception ex) { throw new Exception("error loading data " + ex.Message); } if (rowsCount >= 0) { try { /********** Alterar a area onde se encontra o grafico **********/ //SetChartArea(new List<string>() { "0", "0", "0", "0" }); // tem de ser dos primeiros para os valores se adaptarem para todos... SetChartArea(oi.GetList("chart_area")); /********** Trocar o eixo de posição **********/ //SetAxis(new List<string> { "right", "left", "left", "left" }); SetAxis(oi.GetList("set_y_axis")); /********** template selector **********/ DesignTemplate(oi.GetSingle("design_template")); /********** chart antialiasing is on text antialiasing is controled by this variable **********/ AntiAliasing(oi.GetSingle("text_antialiasing").Equals("true", StringComparison.CurrentCultureIgnoreCase)); /********** Width, Height **********/ string newWidth = oi.GetSingle("width"); string newHeight = oi.GetSingle("height"); WidthHeight( newWidth != string.Empty ? Convert.ToInt32(newWidth) : frame.Width - 2, newHeight != string.Empty ? Convert.ToInt32(newHeight) : frame.Height - 30 ); /********** Util para grafico de barras e linhas **********/ ScaleBreak(oi.GetSingle("scalebreak").Equals("true", StringComparison.CurrentCultureIgnoreCase)); /********** 3D controls **********/ string inclination = oi.GetSingle("inclination"); string rotation = oi.GetSingle("rotation"); string point_depth = oi.GetSingle("point_depth"); string point_gap_depth = oi.GetSingle("point_gap_depth"); string is_clustered = oi.GetSingle("is_clustered"); Chart3D( oi.GetSingle("chart3d").Equals("true", StringComparison.CurrentCultureIgnoreCase), inclination != string.Empty ? Convert.ToInt32(inclination) : -1, rotation != string.Empty ? Convert.ToInt32(rotation) : -1, point_depth != string.Empty ? Convert.ToInt32(point_depth) : -1, point_gap_depth != string.Empty ? Convert.ToInt32(point_gap_depth) : -1, is_clustered.Equals("true", StringComparison.CurrentCultureIgnoreCase) ); /********** legend control **********/ Legend( oi.GetSingle("legend").Equals("true", StringComparison.CurrentCultureIgnoreCase), oi.GetSingle("docking"), oi.GetSingle("alignment"), oi.GetSingle("text_font"), oi.GetSingle("text_color"), oi.GetSingle("text_size"), oi.GetSingle("back_color") ); /********** grid on and off **********/ ChartGrid(oi.GetSingle("chart_grid").Equals("true", StringComparison.CurrentCultureIgnoreCase)); /********** Cores Manuais **********/ ChartSeriesColors(oi.GetList("chart_colors")); /********** chart type **********/ ChartSeriesType(oi.GetList("chart_type")); /********** enable/disable X axis angle and set this axis angle **********/ SetxAxisStyle( oi.GetSingle("x_label_angle"), oi.GetSingle("disable_x_label").Equals("true", StringComparison.CurrentCultureIgnoreCase), oi.GetSingle("x_axis_interval") ); /********** value label **********/ ShowValueAsLabel( oi.GetList("show_value_in_label"), oi.GetSingle("label_value_color"), oi.GetSingle("label_value_back_color") ); /********** just only Pie and Doughnut property **********/ PieLabelStyle(oi.GetSingle("pie_label_style").ToLower()); } catch (Exception ex) { throw new Exception("error loading options " + ex.Message); } mChart.DataBind(); // in the end do databind... } }
/**************** Iframe build ****************/ /// <summary> /// Create the frame width a panel and a iframe /// </summary> private Control BuildFrameCtrl(Frame f, string frameIdHash) { Panel pn = new Panel(); OptionItems oi = new OptionItems(f.Options); if (_pageType.ToLower().Trim() == "free_draw") { pn.Style.Add("position", "absolute"); pn.Style.Add("top", f.Y + "px"); pn.Style.Add("left", f.X + "px"); } pn.Style.Add("margin", "0"); pn.Style.Add("padding", "0"); pn.Style.Add("border", "0"); pn.Width = Unit.Pixel(f.Width); pn.Height = Unit.Pixel(f.Height); pn.BackColor = Color.Transparent; // ------ Border ------ pn = Views.Frames.GenericFrameSettings.FrameBorderStyle( pn, oi.GetList("frame_style") ); // -------------------- HtmlObjects iframe = new HtmlObjects("iframe"); iframe.Id = frameIdHash; iframe.AddStyle("border", "0"); iframe.AddAttribute("scrolling", f.Scroll); iframe.AddAttribute("width", f.Width + "px"); iframe.AddAttribute("height", f.Height + "px"); iframe.AddAttribute("src", _options.Get(f.FrameType).URL + "?fm=" + frameIdHash); pn.Controls.Add(iframe.GetObject); // for now its just to tell client that this frame is slave of some filter. LoadFrameInfoToClient( f.ID.ToString(CultureInfo.InvariantCulture), frameIdHash, oi.GetSingle("master_filter") ); return pn; }
private void Startup(Frame frame) { // replace log file so that is one frame to one log ReplaceLogFile(frame.IDPage, frame.ID); OptionItems oi = new OptionItems(frame.Options); // ------ Frame css ------ ChangeCss(oi.GetSingle("css")); // ------ Title ------ headerTitle.Text = frame.Title; if (!oi.GetSingle("title_is_hidden").Equals("false")) { lbTitle.InnerText = frame.Title; TitleStyle(oi.GetList("title_style")); // title style // ------ Load Javascript ------ SetTitlePosition(); // loads javascript that controls title position } else { lbTitleContainer.Style.Add("display", "none"); } /********** Select Mon type **********/ string monType = oi.GetSingle("mon_type").ToLower(); if (monType == string.Empty) monType = "meter"; SelectMon(monType); // meter / gauge /********** Width, Height **********/ string newWidth = oi.GetSingle("width"); string newHeight = oi.GetSingle("height"); CanvasSize( newWidth != string.Empty ? Convert.ToInt32(newWidth) : frame.Width - 1, newHeight != string.Empty ? Convert.ToInt32(newHeight) : frame.Height - 30 ); /********** Min/Max/Default Values **********/ /* min_value=[0]; max_value=[100]; default_value=[0]; */ MinValue(oi.GetSingle("min_value")); MaxValue(oi.GetSingle("max_value")); DefaultValue(oi.GetSingle("default_value")); /********** Refresh Interval **********/ RefreshInterval(oi.GetSingle("refresh_interval")); /********** Templates em Xml **********/ LoadXmlTemplate(oi.GetSingle("design_template")); /********** Sqlite/Xml File Control **********/ LoadData ld = new LoadData { PageId = frame.IDPage, Datafile = oi.GetSingle("datafile"), Datatable = oi.GetList("datatable"), DefaultFilter = oi.GetSingle("default_filter"), FileName = oi.GetSingle("xml_file"), }; LoadData(ld); /********** Measure Type **********/ MeasureType(oi.GetSingle("measure_type")); /********** Tick Marks **********/ SetTickMarks( oi.GetList("border_marks_values"), oi.GetList("border_marks_colors") ); /********** Set Threshold **********/ /* ok_color=[transparent]; warning_color=[yellow]; critical_color=[red]; meter_ok=[0,20]; meter_warning=[40,60]; meter_critical=[70,90]; gauge_warning_start=[70]; gauge_critical_start=[85]; */ BuildThreshold(oi, monType); /********** Change the needle size **********/ ChangeGaugeNeedleSize(oi.GetSingle("needle_size")); /********** Show Mon Value **********/ ShowValueInMon(oi.GetSingle("show_value_in_label").Equals("true", StringComparison.CurrentCultureIgnoreCase)); GetMon(); }