private void NewSAIWindow(int entryorguid, SmartScripts.SAIType type) { scratch = new ScratchWindow(); scratch.Show(dockPanel1); scratch.ElementSelected += this_callback; scratch.RequestWarnings += this_RequestWarnings; scratch.RequestNewSAIWindow += scratch_RequestNewSAIWindow; scratch.Type = type; scratch.LoadFromDB(entryorguid); events.SetSAIType(type); scratches.Add(scratch); }
private void dockPanel1_ActiveDocumentChanged(object sender, EventArgs e) { if (dockPanel1.ActiveDocument == null) { return; } if (dockPanel1.ActiveDocument.DockHandler.Form is ScratchWindow) { scratch = (ScratchWindow)dockPanel1.ActiveDocument.DockHandler.Form; events.SetSAIType(scratch.Type); } errors.Clear(); if (scratch == null) { return; } foreach (SmartEvent ev in scratch.GetEvents()) { errors.AddWarnings(ev.Validate()); } }
private void NewSAIWindow(int entryorguid, SmartScripts.SAIType type) { scratch = new ScratchWindow(); scratch.Show(dockPanel1); scratch.ElementSelected += this_callback; scratch.RequestWarnings += this_RequestWarnings; scratch.RequestNewSAIWindow += scratch_RequestNewSAIWindow; scratch.Type = type; scratch.LoadFromDB(entryorguid); scratch.FormClosed += scratch_FormClosed; events.SetSAIType(type); scratches.Add(scratch); }
private void dockPanel1_ActiveDocumentChanged(object sender, EventArgs e) { if (dockPanel1.ActiveDocument == null) return; if (dockPanel1.ActiveDocument.DockHandler.Form is ScratchWindow) { scratch = (ScratchWindow)dockPanel1.ActiveDocument.DockHandler.Form; events.SetSAIType(scratch.Type); } errors.Clear(); if (scratch == null) return; foreach (SmartEvent ev in scratch.GetEvents()) errors.AddWarnings(ev.Validate()); }
private void Form1_Load(object sender, EventArgs e) { Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US"); LoadCustomEventsAndActions(); dockPanel1.Theme = new VS2012LightTheme(); vS2012ToolStripExtender1.SetEnableVS2012Style(this.menuStrip1, true); scratch = new ScratchWindow(); scratch.Show(dockPanel1); events = new ToolWindow("data/events.txt", "Events"); events.Show(dockPanel1, DockState.DockLeft); conditions = new ToolWindow("data/conditions.txt", "Conditions"); conditions.Show(events.Pane, DockAlignment.Bottom, 0.5); actions = new ToolWindow("data/actions.txt", "Actions"); actions.Show(dockPanel1, DockState.DockRight); targets = new ToolWindow("data/targets.txt", "Targets"); targets.Show(actions.Pane, DockAlignment.Bottom, 0.8); properties = new PropertyWindow(); properties.Show(targets.Pane, DockAlignment.Bottom, 0.6); errors = new ErrorsWindow(); errors.Show(dockPanel1, DockState.DockBottom); errors.WarningSelected += this_warningSelected; scratch.ElementSelected += this_callback; scratch.RequestWarnings += this_RequestWarnings; }
private void loadFromDBToolStripMenuItem_Click(object sender, EventArgs e) { ScratchWindow w = new ScratchWindow(); w.Show(dockPanel1); }