Ejemplo n.º 1
0
 private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     var frmEditor = new frm_Editor();
     frmEditor.TibiaClient = TibiaClient;
     frmEditor.Show();
     frmEditor.LoadScript(Editor.CurrentScriptPath);
 }
Ejemplo n.º 2
0
        /// <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();
        }
Ejemplo n.º 3
0
 private void btnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     var frmEditor = new frm_Editor();
     frmEditor.TibiaClient = TibiaClient;
     frmEditor.Show();
 }
Ejemplo n.º 4
0
 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();
     }
 }
Ejemplo n.º 5
0
 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);
     }
 }
Ejemplo n.º 6
0
 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(); }
 }
Ejemplo n.º 7
0
 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);
     }
 }