static ApplicationWindows() { try { DashboardWindow = new DashboardWindow(); MetadataWindow = new AddonMetadataWindow(); AddonWindow = new AddonWindow(); PluginWindow = new PluginWindow(); TypeWindow = new TypeWindow(); InstanceWindow = new InstanceWindow(); ActionWindow = new ActionWindow(); ConditionWindow = new ConditionWindow(); ExpressionWindow = new ExpressionWindow(); LanguageWindow = new LanguageWindow(); TestWidnow = new TestWindow(); OptionsWindow = new OptionsWindow(); FindAndReplaceWindow = new SearchAndReplaceWindow(); EffectPropertiesWindow = new EffectPropertiesWindow(); EffectParameterWindow = new EffectParameterWindow(); EffectCodeWindow = new EffectCodeWindow(); C2Runtime = new C2RuntimeWindow(); CssWindow = new CssWindow(); } catch (Exception ex) { LogManager.AddErrorLog(ex); throw; } }
private void Done_Click(object sender, RoutedEventArgs e) { this.Hide(); ActionWindow action = new ActionWindow(ActionName.Done); action.MainWind = this; action.ShowDialog(); }
public void DetailLoad(int type) { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { var swe = (from se in dc.Swexamine from sw in dc.Nswinput from sb in dc.Swbase where se.Swid == sw.Id && sw.Swid == sb.Swid && se.Swid == Convert.ToInt32(sm.SelectedRows[0].RecordID.Trim()) select new { se.Swid, se.Result, sb.Levelid, sw.Maindeptid }).First(); var data = from l in dc.Swlearn join r in dc.SwexamineDetail.Where(p => p.Swid == swe.Swid) on l.Lid equals r.Lid into gg from g in gg.DefaultIfEmpty() where l.Levelid == swe.Levelid && l.Deptnumber == swe.Maindeptid && l.Nstatus == 1 select new { l.Lid, l.Lname, g.Remark, isCheck = g.Swid != null }; LearnStore.DataSource = data; LearnStore.DataBind(); try { tfResult.Text = swe.Result; } catch { tfResult.Text = ""; } if (type == 1) { btnSave.Show(); btnSure.Show(); } else if (type == 2) { btnSave.Show(); btnSure.Show(); } else { btnSave.Hide(); btnSure.Hide(); } ActionWindow.Show(); } }
void Start() { Main.Instance.MoveItem = OnMoveItem; GridiaConstants.SoundPlayer.MuteSfx = GridiaConstants.SoundPlayer.MuteMusic = Application.isEditor; Locator.Provide(InputManager); Locator.Provide(this); Locator.Provide(GridiaConstants.SoundPlayer); ResizeCamera(); TabbedGui = new TabbedUI(new Vector2(Int32.MaxValue, 0)); Locator.Provide(TabbedGui); TabbedGui.ScaleXY = GridiaConstants.GuiScale; InvGui = new ContainerWindow(new Vector2(0, Int32.MaxValue)); Locator.Provide(InvGui); InvGui.ScaleXY = GridiaConstants.GuiScale; EquipmentGui = new EquipmentWindow(new Vector2(0, 0)); Locator.Provide(EquipmentGui); EquipmentGui.ScaleXY = GridiaConstants.GuiScale; ChatGui = new ChatWindow(new Vector2(Int32.MaxValue, Int32.MaxValue)); Locator.Provide(ChatGui); ChatGui.ScaleXY = GridiaConstants.GuiScale; ItemUsePickWindow = new ItemUsePickWindow(new Vector2(0, 0)); Locator.Provide(ItemUsePickWindow); ItemUsePickWindow.ScaleXY = GridiaConstants.GuiScale; var helpMenu = new HelpMenu(new Vector2(0, 0)); Locator.Provide(helpMenu); helpMenu.ScaleXY = GridiaConstants.GuiScale; Locator.Provide(ContentManager = new ContentManager(GridiaConstants.WorldName)); Locator.Provide(TextureManager = new TextureManager(GridiaConstants.WorldName)); ActionWindow = new ActionWindow(new Vector2(Int32.MaxValue, Int32.MaxValue)); Locator.Provide(ActionWindow); ActionWindow.ScaleXY = GridiaConstants.GuiScale; }
public void SureFinish() { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { bool isfinish = false; foreach (var item in sm.SelectedRows) { var sd = dc.SwexamineDetail.Where(p => p.Swid == decimal.Parse(item.RecordID)); if (sd.Count() > 0) { var se = dc.Swexamine.First(p => p.Swid == decimal.Parse(item.RecordID)); if (se.Isfinish == 1) { continue; } se.Isfinish = 1; se.Etime = System.DateTime.Today; isfinish = true; } else { isfinish = false; break; } } if (isfinish) { dc.SubmitChanges(); Ext.Msg.Alert("提示", "操作成功!").Show(); LearnStoreLoad(); ActionWindow.Hide(); } else { Ext.Msg.Alert("提示", "至少要进行一个学习项目才能毕业!请先保存学习进度!").Show(); } } }
private void MapAction(ref ActionWindow map, XmlNode nodeId, XmlNode nodeKey, XmlNode nodeRibbonKey, XmlNode nodeDesc) { if (null == nodeId) return; KeyAction but = new KeyAction(); but.ActionType = (Action.ActionType)Int32.Parse(nodeId.InnerText); if (nodeDesc != null) but.Description = nodeDesc.InnerText; if (nodeKey != null) { string[] buttons = nodeKey.InnerText.Split('-'); for (int i = 0; i < buttons.Length - 1; i++) { if (buttons[i] == "Alt") but.Modifiers += "Alt-"; else if (buttons[i] == "Ctrl") but.Modifiers += "Ctrl-"; else if (buttons[i] == "Shift") but.Modifiers += "Shift-"; } but.KeyCode = buttons[buttons.Length - 1]; } if (nodeRibbonKey != null) { but.RibbonKeyCode = nodeRibbonKey.InnerText; } map.Buttons.Add(but); }
/// <summary> /// Loads the keymap file and creates the mapping. /// </summary> /// <returns>True if the load was successfull, false if it failed.</returns> private bool LoadKeyMap() { mapWindows.Clear(); string strFilename = String.Format(@"{0}\{1}", Options.ConfigDir, "keymap.xml"); if (!System.IO.File.Exists(strFilename)) strFilename = String.Format(@"{0}\bin\{1}", Application.StartupPath, "keymap.xml"); log.Info("Load key mapping from {0}", strFilename); try { // Load the XML file XmlDocument doc = new XmlDocument(); doc.Load(strFilename); // Check if it is a keymap if (doc.DocumentElement == null) return false; string strRoot = doc.DocumentElement.Name; if (strRoot != "keymap") return false; // For each window XmlNodeList listWindows = doc.DocumentElement.SelectNodes("/keymap/window"); foreach (XmlNode nodeWindow in listWindows) { XmlNode nodeWindowId = nodeWindow.SelectSingleNode("id"); XmlNode nodeWindowDesc = nodeWindow.SelectSingleNode("description"); if (null != nodeWindowId) { ActionWindow map = new ActionWindow(); map.Window = Int32.Parse(nodeWindowId.InnerText); map.Description = nodeWindowDesc.InnerText; XmlNodeList listNodes = nodeWindow.SelectNodes("action"); // Create a list of key/actiontype mappings foreach (XmlNode node in listNodes) { XmlNode nodeId = node.SelectSingleNode("id"); XmlNode nodeKey = node.SelectSingleNode("key"); XmlNode nodeRibbonKey = node.SelectSingleNode("ribbon"); XmlNode nodeDesc = node.SelectSingleNode("description"); MapAction(ref map, nodeId, nodeKey, nodeRibbonKey, nodeDesc); } if (map.Buttons.Count > 0) { mapWindows.Add(map); } } } } catch (Exception ex) { log.Error("exception loading keymap {0} err:{1} stack:{2}", strFilename, ex.Message, ex.StackTrace); return false; } return true; }
public virtual void SetActionWindow(ActionWindow setting) { _currentActionWindow = setting; }