private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var frmEditor = new frm_Editor(); frmEditor.TibiaClient = TibiaClient; frmEditor.Show(); frmEditor.LoadScript(Editor.CurrentScriptPath); }
/// <summary> /// Handles the Load event of the frm_Agent control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void frm_Agent_Load(object sender, EventArgs e) { var frmEditor = new frm_Editor(); frmEditor.Show(); try { var fi = new System.IO.FileInfo(FilePath); if (fi.Exists) { frmEditor.LoadScript(fi.FullName); } } catch (ArgumentException) { } TmForms.Start(); }
private void btnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var frmEditor = new frm_Editor(); frmEditor.TibiaClient = TibiaClient; frmEditor.Show(); }
private void OpenScript() { openScriptDialog.FileName = string.Empty; openScriptDialog.ShowDialog(); if (openScriptDialog.FileName != string.Empty) { if (Editor != null) { Editor.Close(); Editor = null; } Editor = new frm_Editor(); Editor.TibiaClient = TibiaClient; Editor.HideRibbon(); Editor.MdiParent = this; Editor.Show(); Editor.LoadScript(openScriptDialog.FileName); Editor.OnCompileComplete += Editor_OnCompileComplete; Editor.OnInvalidateRequired += Editor_OnInvalidateRequired; SetOpenedScriptState(); } }
private void btnOpen_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { openFileDialog1.FileName = string.Empty; openFileDialog1.ShowDialog(); if (openFileDialog1.FileName != string.Empty) { var frmEditor = new frm_Editor(); frmEditor.MdiParent = this.ParentForm; frmEditor.Show(); frmEditor.LoadScript(openFileDialog1.FileName); } }
private void btnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (CurrentScript != null) { var frmEditor = new frm_Editor(); frmEditor.MdiParent = this.ParentForm; frmEditor.Show(); } else { NewScript(); } }
private void btnOpenWindow_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { openFileDialog1.FileName = string.Empty; openFileDialog1.InitialDirectory = Path.Combine(Application.StartupPath, "MyScripts"); openFileDialog1.ShowDialog(); if (openFileDialog1.FileName != string.Empty) { var frmEditor = new frm_Editor(); frmEditor.Show(); frmEditor.LoadScript(openFileDialog1.FileName); } }