public static bool execute(XApp app) { JSICmdToCreateCurPtCurve2D cmd = new JSICmdToCreateCurPtCurve2D(app); return(cmd.execute()); }
public static bool execute(XApp app) { JSICmdToCreateStandingCard cmd = new JSICmdToCreateStandingCard(app); return(cmd.execute()); }
public override void DoWork() { string appCfgPath = mcsf_clr_systemenvironment_config.GetApplicationPath() + @"\xsample\config\XSample.xml"; XApp app = new XApp(appCfgPath, GetCommunicationProxy()); app.Run(); }
public static JSIEditStandingCardScenario createSingleton(XApp app) { Debug.Assert(JSIEditStandingCardScenario.mSingleton == null); JSIEditStandingCardScenario.mSingleton = new JSIEditStandingCardScenario(app); return(JSIEditStandingCardScenario.mSingleton); }
//初始化接口 public virtual void init(ActionCfg cfg, XApp app) { this.cfg = cfg; this.ActionName = cfg.ActionName; try { this.actionSeq = int.Parse(cfg.ActSeq); } catch { AlertUtil.Show("error", String.Format("Action {0} Seq设置异常,设置值为{1}", ActionName, cfg.ActSeq)); } try { if (cfg.SRange.Length > 0) { sRange = app.getRangeByName(cfg.SRange); } if (cfg.DRange.Length > 0) { dRange = app.getRangeByName(cfg.DRange); } } catch (Exception) { MessageBox.Show("Action:" + ActionName + "的sRange、dRange配置错误!"); return; } }
public static bool execute(XApp app) { JSICmdToSelectSmallestStandingCardByStand cmd = new JSICmdToSelectSmallestStandingCardByStand(app); return(cmd.execute()); }
//控制器初始化,读取Config,初始化整个APP public void init() { List <Worksheet> cfgsheets = new List <Worksheet>(); try { cfgsheets.Add(spreadsheetMain.Document.Worksheets["Config_APP"]); cfgsheets.Add(spreadsheetMain.Document.Worksheets["Config_Data"]); cfgsheets.Add(spreadsheetMain.Document.Worksheets["Config_ShtCmd"]); cfgsheets.Add(spreadsheetMain.Document.Worksheets["Config_Action"]); } catch (Exception) { MessageBox.Show("当前App中缺少Config配置页,请确认文件未损坏货配置页名称正确"); } cfgData = new XCfgData(cfgsheets); app = new XApp(spreadsheetMain.Document, cfgData); //labels["lbl_AppID"].Text = app.AppID; //labels["lbl_User"].Text = String.Format("{0}" , user.getFullUserName()); labels["lbl_AppName"].Text = app.AppName; //labels["lbl_Version"].Text = app.cfg.app.Version; if (app.statu < SysStatu.Designer) { MessageBox.Show("配置存在错误,请检查配置"); return; } RefreshCurrentSheet(); }
public static bool execute(XApp app) { JSICmdToAddCurPtCurve2DToPtCurve2Ds cmd = new JSICmdToAddCurPtCurve2DToPtCurve2Ds(app); return(cmd.execute()); }
public override void DoWork() { const string configPath = @"..\..\IAS\MiddleWare\Filming\\Filming.ProxyTest\Config\FilmingProxyTestBoot.xml"; var app = new XApp(configPath, GetCommunicationProxy()); app.Run(); }
// private constructor private JSICmdToDollyCamera(XApp app) : base(app) { JSIApp jsi = (JSIApp)this.mApp; JSIPenMark pm = jsi.getPenMarkMgr().getLastPenMark(); this.mPrevPt = pm.getRecentPt(1); this.mCurPt = pm.getRecentPt(0); }
private JSICmdToMoveStandingCard(XApp app) : base(app) { JSIApp jsi = (JSIApp)this.mApp; JSIPenMark pm = jsi.getPenMarkMgr().getLastPenMark(); this.mPrevPt = pm.getRecentPt(1); this.mCurPt = pm.getRecentPt(0); }
public virtual void Export() { ContentTheme theme = new ContentTheme(); theme.Name = ctx.Post("Name"); theme.Description = strUtil.CutString(ctx.Post("Description"), 200); if (strUtil.IsNullOrEmpty(theme.Name)) { echoError("请填写主题名称"); return; } List <ContentSection> sectionList = sectionService.GetByApp(ctx.app.Id); // 1、获取app信息 ContentApp app = ctx.app.obj as ContentApp; XApp xapp = exportApp(app); xapp.SectionList = new List <XSection>(); // 2、循环导出section string[] rowList = app.RowList; // 循环行 for (int iRow = 1; iRow < (rowList.Length + 1); iRow++) { int columnCount = cvt.ToInt(rowList[iRow - 1]); if (columnCount <= 0) { continue; } // 循环列 for (int iColumn = 1; iColumn < (columnCount + 1); iColumn++) { List <ContentSection> sections = sectionService.GetByRowColumn(sectionList, iRow, iColumn); // 循环section for (int iSection = 1; iSection < sections.Count + 1; iSection++) { XSection xSection = getSection(sections[iSection - 1], iRow, iColumn, iSection); xapp.SectionList.Add(xSection); } } } // 处理 #sectionId 的css问题,==> 转化成 #portarContainer .row-iRow .col-iColumn .section-iSection processCssId(xapp, sectionList); // 3、保存为 json 格式 exportToDisk(xapp, theme); echoToParentPart(lang("opok")); }
private XApp exportApp(ContentApp app) { XApp x = new XApp(); x.Style = app.Style; x.Layout = app.Layout; x.SkinStyle = app.SkinStyle; return(x); }
private void processCssId(XApp xapp, List <ContentSection> sectionList) { foreach (ContentSection s in sectionList) { XSection xSection = getXSection(xapp.SectionList, s); replaceIdToClass(xapp, "#section" + s.Id, xSection.CssPath + " "); replaceIdToClass(xapp, "#sectionTitle" + s.Id, xSection.CssPath + " .sectionTitle "); replaceIdToClass(xapp, "#sectionContent" + s.Id, xSection.CssPath + " .sectionContent "); replaceIdToClass(xapp, "#sectionContentText" + s.Id, xSection.CssPath + " .sectionContentText "); } }
static public int closeldb(IntPtr l) { try { XApp self = (XApp)checkSelf(l); self.closeldb(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int get_uiRoot(IntPtr l) { try { XApp self = (XApp)checkSelf(l); pushValue(l, true); pushValue(l, self.uiRoot); return(2); } catch (Exception e) { return(error(l, e)); } }
//根据当前选择点,判断选择区域 public void setSelectedNamed() { if (app == null) { app = new XApp(this.spreadsheetMain.Document, null); app.statu = SysStatu.SheetError; } AreasCollection areas = spreadsheetMain.Selection.Areas; /*if (currentXRange != null && RangeUtil.isInRange(areas, currentXRange.getRange()) < 0) * { * this.currentXRange = null; * }*/ this.currentXRange = null; rightClickBarManager.SetPopupContextMenu(spreadsheetMain, null); if (currentSheet != null && currentSheet.sheetName == "Config") { IList <Table> tables = spreadsheetMain.ActiveWorksheet.Tables.GetTables(spreadsheetMain.ActiveCell); if (tables.Count > 0 && tables[0].Name == "CFG_DATA") { if (RangeUtil.isInRange(areas, tables[0].DataRange) >= 0) { rightClickBarManager.SetPopupContextMenu(spreadsheetMain, menus["CfgData"]); } } } else if ((int)app.statu > 0) { XRSheet opSheet = app.getRSheetByName(spreadsheetMain.ActiveWorksheet.Name); //遍历当前Sheet全部命名区域,依次判断是否在区域范围内 if (opSheet != null) { foreach (var dicname in opSheet.ranges) { XRange xname = dicname.Value; int i = xname.isInRange(areas); if (i >= 0) { this.currentXRange = xname; rightClickBarManager.SetPopupContextMenu(spreadsheetMain, menus["Normal"]); //当选择点为命名区域时,将当前坐标写入单元格 //this.currentXRange.onMouseDown(); break;//如果判断到第一个区域,将该区域存储为currentXRange,退出循环判断 } } } else { currentXRange = null; } } }
private void DelRoomButton_Click(object sender, RoutedEventArgs e) { DataRowView selectedRoom = (DataRowView)RoomsData.SelectedItem; int Number = Convert.ToInt32(selectedRoom["Number"]); string sqlRequest = $"DELETE FROM `rooms` WHERE `rooms`.`Number` = {Number};"; XApp.openDBConnection(); MySqlCommand cmd = XApp.connection.CreateCommand(); cmd.CommandText = sqlRequest; cmd.ExecuteNonQuery(); XApp.closeDBConnection(); UpdateTable(); }
static public int set_xloading(IntPtr l) { try { XApp self = (XApp)checkSelf(l); XLoading v; checkType(l, 2, out v); self.xloading = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_xpool(IntPtr l) { try { XApp self = (XApp)checkSelf(l); XPoolManager v; checkType(l, 2, out v); self.xpool = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
private void DelUserButton_Click(object sender, RoutedEventArgs e) { DataRowView selectedUser = (DataRowView)UsersData.SelectedItem; int id = Convert.ToInt32(selectedUser["ID"]); string sqlRequest = $"DELETE FROM `users` WHERE `users`.`ID` = {id}"; XApp.openDBConnection(); MySqlCommand cmd = XApp.connection.CreateCommand(); cmd.CommandText = sqlRequest; cmd.ExecuteNonQuery(); XApp.closeDBConnection(); UpdateTable(); }
static public int set_uiRoot(IntPtr l) { try { XApp self = (XApp)checkSelf(l); UnityEngine.Transform v; checkType(l, 2, out v); self.uiRoot = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
protected override void initTheme() { if (ContentTheme.IdHasError(base.themeId)) { logger.Error("theme id error, id=" + base.themeId); return; } this.xapp = ContentTheme.GetByThemeId(base.themeId); if (this.xapp == null) { throw new Exception("没有有效的主题数据, themeId=" + base.themeId); } }
static public int loadLua(IntPtr l) { try { XApp self = (XApp)checkSelf(l); System.Action <XLoadDesc> a1; LuaDelegation.checkDelegate(l, 2, out a1); var ret = self.loadLua(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
private void SaveButton_Click(object sender, RoutedEventArgs e) { newUser.Login = UserLoginTextBox.Text; newUser.Password = UserPassTextBox.Text; newUser.Role = RoleTextBox.Text; string sqlRequest = $"INSERT INTO `users` (`ID`, `Login`, `Password`, `Role`)" + $" VALUES (NULL, '{newUser.Login}', '{newUser.Password}', '{newUser.Role}');"; XApp.openDBConnection(); MySqlCommand cmd = XApp.connection.CreateCommand(); cmd.CommandText = sqlRequest; cmd.ExecuteNonQuery(); XApp.closeDBConnection(); ownerWin.UpdateTable(); this.Close(); }
private void SaveButton_Click(object sender, RoutedEventArgs e) { newRoom.Cost = Convert.ToInt32(CostTextBox.Text); newRoom.Number = Convert.ToInt32(RoomNumTextBox.Text); newRoom.Person = Convert.ToInt32(RoomPersonNumTextBox.Text); string sqlRequest = $"INSERT INTO `rooms` (`ID`, `Number`, `Person`, `BusyStatus`, `CleanStatus`, " + $"`BookingStatus`, `Cost`) VALUES (NULL, '{newRoom.Number}', '{newRoom.Person}'," + $" '{newRoom.BusyStatus}', '{newRoom.CleanStatus}', '{newRoom.BookingStatus}', '{newRoom.Cost}');"; XApp.openDBConnection(); MySqlCommand cmd = XApp.connection.CreateCommand(); cmd.CommandText = sqlRequest; cmd.ExecuteNonQuery(); XApp.closeDBConnection(); ownerWin.UpdateTable(); this.Close(); }
/// <summary> /// 将安装包保存到磁盘 /// </summary> /// <param name="xapp"></param> private void exportToDisk(XApp xapp, ContentTheme theme) { String jsonString = Json.ToString(xapp); String fileName = Guid.NewGuid().ToString() + ".config"; String savedPath = ContentTheme.GetFileAbsDir(); if (Directory.Exists(savedPath) == false) { Directory.CreateDirectory(savedPath); } file.Write(Path.Combine(savedPath, fileName), jsonString); theme.FileName = fileName; theme.insert(); }
void Awake() { instance = this; GameObject.DontDestroyOnLoad(this.gameObject); GameObject goRoot = GameObject.Find("UIRoot"); if (!goRoot) { XDebug.LogError("UIRoot not exist, quit!!!"); Application.Quit(); return; } uiRoot = goRoot.transform; uiProgress = uiRoot.transform.Find("progress"); if (!uiProgress) { XDebug.LogError("uiProgress not exist, quit!!!"); Application.Quit(); return; } uiMsgBox = uiRoot.transform.Find("msgbox"); if (!uiMsgBox) { XDebug.LogError("uiMsgBox not exist, quit!!!"); Application.Quit(); return; } uiWindow = uiRoot.transform.Find("window"); if (!uiWindow) { XDebug.LogError("uiWindow not exist, quit!!!"); Application.Quit(); return; } uiBack = uiRoot.transform.Find("back"); if (!uiBack) { XDebug.LogError("uiBack not exist, quit!!!"); Application.Quit(); return; } }
public static XAction MakeAction(ActionCfg cfg, XApp app) { XAction action = null; String nametype = cfg.ActionType; nametype = "XSheet.v2.Data.XSheetAction.Action" + nametype; //XNamedTable try { Type type = Type.GetType(nametype, true); action = (XAction)Activator.CreateInstance(type); action.init(cfg, app); } catch (Exception e) { Console.WriteLine(e.ToString()); System.Windows.Forms.MessageBox.Show("Action类型不存在,设置的类型为:" + cfg.ActionType + "\n" + e.ToString()); } return(action); }
private void Init( Thread mainThread, ICommunicationProxy commProxy, ICommunicationMap commMap) { string appCfgPath = @"D:\X-SW\XA\Trunk\UIH\appdata\patientadmin\config\PAShellWindowConfigure.xml"; var app = new XApp(appCfgPath, commProxy); GlobalDefinition.Main = this; GlobalDefinition.MainWnd = app.MainWindow; //GlobalDefinition.MainDataContext = app.MainWindow.DataContext; GlobalDefinition.MainThread = mainThread; try { _Containee.Register(commProxy, commMap); } catch (System.Exception ex) { GlobalDefinition.LoggerWrapper.LogDevError(ex.Message); GlobalDefinition.LoggerWrapper.LogDevError(ex.StackTrace); } app.Run(); }