Beispiel #1
0
        private void Import_Click(object sender, RoutedEventArgs e)
        {
            ImportForm importForm = new ImportForm(this);

            importForm.ShowDialog();
            mainModel.ReloadListProfileRFDGV();
        }
Beispiel #2
0
        private void importButton_Click(object sender, EventArgs e)
        {
            ImportForm import = new ImportForm();

            import.SetMemberImport();
            import.ShowDialog();
        }
Beispiel #3
0
 private void ImportBtn_Click(object sender, EventArgs e)
 {
     importForm = new ImportForm <OsZbPurchaseProjectInfo>("项目信息导出表.xlsx");
     //importForm.importEvent += btnImportProject_Click;
     importForm.ImportCheck = ImportCheck;
     DialogUtil.ShowDialog(importForm, this, importForm.Width, importForm.Height, new FormWindowProp(false, false, FormBorderStyle.FixedDialog));
 }
Beispiel #4
0
 private void addButton_Click(object sender, EventArgs e)
 {
     if (importForm.IsDisposed)
     {
         importForm = new ImportForm(controller, this);
     }
     importForm.Show();
 }
Beispiel #5
0
 public static bool Run(SongDatabase db)
 {
     ImportForm frm = new ImportForm(db);
     if (frm.ShowDialog() == DialogResult.OK)
     {
         frm.Work();
         return true;
     }
     return false;
 }
Beispiel #6
0
        public Form1(Controller controller)
        {
            this.controller = controller;
            importForm      = new ImportForm(controller, this);
            InitializeComponent();
            policiesTreeView.CheckBoxes = true;

            controller.updatePolicyComBox(policiesComboBox);

            setCustomization();
        }
		public CompilerOptionsForm(GraphControl graph)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			this.graph = graph;
			importForm = new ImportForm(graph);
			warnings.DropDownStyle = ComboBoxStyle.DropDownList;
		}
Beispiel #8
0
        private void 导入_Click(object sender, EventArgs e)
        {
            ImportForm imt = new ImportForm();

            imt.textBox2.Text = tree1.filename;
            if (imt.ShowDialog() == DialogResult.OK)
            {
                tree1.SelNodeLoadFromDirectory(imt.textBox2.Text);
                fileList1.LoadFiles(imt.textBox2.Text);
            }
        }
Beispiel #9
0
        private void insertFromfilesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ParseForm.TestCase[] testCases = new ImportForm().GetTestCases();

            foreach (ParseForm.TestCase testCase in testCases)
            {
                ListViewItem item = new ListViewItem(new[] { String.Empty, testCase.input, testCase.output });
                item.Lazify();

                testCasesListView.Items.Add(item);
            }

            testCasesGroupBox.Text = String.Format("Test Cases ({0})", testCasesListView.Items.Count);
        }
 public void Import()
 {
     try
     {
         using (var modal = new ImportForm())
         {
             modal.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "OperationError".GetUiTranslation(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #11
0
 public static void Run(IWin32Window owner)
 {
   ImportSettings settings = new ImportSettings();
   ImportSettingsForm importSettingsForm = new ImportSettingsForm();
   importSettingsForm.Init(settings);
   if (importSettingsForm.ShowDialog(owner) == DialogResult.OK)
   {
     ImportForm importForm = new ImportForm();
     importForm.Init(settings);
     int num = (int) importForm.ShowDialog(owner);
     importForm.Dispose();
   }
   importSettingsForm.Dispose();
 }
        public override async Task <ProjectImport> CreateAsync(ProjectImport resource)
        {
            var importForm = new ImportForm(UserRepository,
                                            GroupRepository,
                                            CurrentUserContext,
                                            UserRolesRepository,
                                            OrganizationRepository,
                                            ProductDefinitionRepository,
                                            StoreRepository);

            if (!await importForm.IsValid(resource))
            {
                throw new JsonApiException(importForm.Errors);
            }
            return(await base.CreateAsync(resource));
        }
Beispiel #13
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            _presenter = new MainFormPresenter(this);
            _presenter.GenerateSample();

            form = new ImportForm();

            if (ApplicationDeployment.IsNetworkDeployed)
            {
                ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;

                uxVersionToolStripStatusLabel.Text = ad.CurrentVersion.ToString();
            }
            else
                uxVersionToolStripStatusLabel.Text = Application.ProductVersion;
        }
Beispiel #14
0
        public virtual async Task <IActionResult> Import(ImportForm form)
        {
            if (form == null)
            {
                throw new ArgumentNullException(nameof(form));
            }

            var configuration = await this.CreateConfigurationAsync();

            var model = new ImportViewModel {
                Form = form
            };

            if (this.ModelState.IsValid)
            {
                try
                {
                    var result = await this.DataImporter.ImportAsync(configuration, new ImportOptions { DeleteAllOthers = form.DeleteAllOthers, VerifyOnly = form.VerifyOnly });

                    if (result.Errors.Any())
                    {
                        foreach (var error in result.Errors)
                        {
                            this.ModelState.AddModelError(nameof(ImportForm.Files), error);
                        }
                    }
                    else
                    {
                        model.Confirmation = !form.VerifyOnly;
                        model.Form         = null;
                        model.Result       = result;
                        this.ModelState.Clear();
                    }
                }
                catch (Exception exception)
                {
                    this.Logger.LogErrorIfEnabled(exception, "Could not import.");
                    this.ModelState.AddModelError(nameof(ImportForm.Files), this.Localizer.GetString("errors/ImportException"));
                }
            }

            return(await Task.FromResult(this.View(model)));
        }
Beispiel #15
0
        private void btnImport_Click(object sender, EventArgs e)
        {
            var importForm = new ImportForm();
            importForm.ShowDialog();

            RefreshData();
        }
Beispiel #16
0
        private void ImportButton_Click(object sender, EventArgs e)
        {
            FillGlobals();

            ImportForm pForm = new ImportForm();
            pForm.ShowDialog();
        }
Beispiel #17
0
 internal static void OpenImportForm()
 {
     if (!IsImportFormOpen())
     {
         IronUI.IF = new ImportForm();
         IronUI.IF.Show();
     }
     IronUI.IF.Activate();
 }
Beispiel #18
0
 /*
  * ChangeBackground
  *
  * Launches an image selection dialog box, and changes the background to the selection
  */
 private void ChangeBackground(object sender, EventArgs e)
 {
     ImportForm imageSelectDialog = new ImportForm();
     if(imageSelectDialog.ShowDialog() == DialogResult.OK)
     {
         UpdateBackgroundPreview(imageSelectDialog.SelectedImage);
     }
 }
        private void importBtn_Click(object sender, EventArgs e)
        {
            if (!RiverSimulationProfile.profile.IsImportReady())
            {
                MessageBox.Show("請先完成前置設定", "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            ImportForm form = new ImportForm();
            if (DialogResult.OK == form.ShowDialog())
            {
                RiverSimulationProfile.profile.importFinished = true;
            }
            UpdateStatus();
        }
        private void btnImport_Click2(object sender, EventArgs e)
        {
            using (ImportForm form = new ImportForm(data, FileLoaded))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {

                }
            }
        }
Beispiel #21
0
		/// <summary>
		/// Handles the Click event of the fileImportToolStripMenuItem 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>
		/// <remarks>Documented by Dev09, 2009-03-05</remarks>
		private void fileImportToolStripMenuItem_Click(object sender, EventArgs e)
		{
			ImportForm importer = new ImportForm();
			importer.ShowDialog();
			OnLMOptionsChanged();
		}
 private void button5_Click(object sender, EventArgs e)
 {
     ImportForm imform = new ImportForm();
     imform.ShowDialog();
 }
Beispiel #23
0
 private void импортToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var w = new ImportForm();
     w.ShowDialog();
     if (ImportForm.ClosedByOk)
     {
         _font = ImportForm.OCRFont;
         ReloadFont();
     }
 }
Beispiel #24
0
        private void Import_Click(object sender, RoutedEventArgs e)
        {
            ImportForm importForm = new ImportForm();

            importForm.ShowDialog();
        }
Beispiel #25
0
 protected override void OnCreateMainForm()
 {
     MainForm = new ImportForm();
 }
Beispiel #26
0
        /// <summary>
        /// Show the form to import a key
        /// </summary>
        private bool ImportKey()
        {
            // already have one?
            if (Authenticator != null)
            {
                DialogResult warning = MessageBox.Show(this, "WARNING: You already have an authenticator registered.\n\n"
                    + "You will NOT be able to access your Battle.net account if you continue and this authenticator is overwritten.\n\n"
                    + "Do you still want to import an authenticator?", "Import Authenticator", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
                if (warning != System.Windows.Forms.DialogResult.Yes)
                {
                    return false;
                }
            }

            // get the import
            ImportForm import = new ImportForm();
            if (import.ShowDialog(this) != System.Windows.Forms.DialogResult.OK)
            {
                return false;
            }

            // remember old
            WinAuthConfig oldconfig = Config;
            // set the new authenticator
            Config = Config.Clone() as WinAuthConfig;
            Config.Authenticator = import.Authenticator;
            Config.AutoLogin = null;
            // save config data
            if (SaveAuthenticator(null) == false)
            {
                // restore auth
                Config = oldconfig;
                return false;
            }

            // unhook and rehook hotkey
            HookHotkey(this.Config);

            // set filename and window title
            notifyIcon.Text = this.Text = WinAuth.APPLICATION_TITLE + " - " + Path.GetFileNameWithoutExtension(Config.Filename);

            // prompt to backup
            InitializedForm initForm = new InitializedForm();
            initForm.Authenticator = Config.Authenticator;
            if (initForm.ShowDialog(this) == System.Windows.Forms.DialogResult.Yes)
            {
                BackupData();
            }

            // show new code and serial
            ShowCode();

            return true;
        }
Beispiel #27
0
 public static void RunImport()
 {
     ImportForm formImport = new ImportForm();
     formImport.ShowDialog();
 }
Beispiel #28
0
        private void ImportMailBtn_Click(object sender, EventArgs e)
        {
            ImportForm importForm = new ImportForm(new Point(Location.X + Width, Location.Y));

            importForm.ShowDialog();
        }
Beispiel #29
0
 private void importToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var form = new ImportForm();
     form.MdiParent = this;
     form.Show();
 }
Beispiel #30
0
 public void OpenProductForm()
 {
     ImportForm inForm = new ImportForm(path);
     this.Hide();
     inForm.Show();
 }
Beispiel #31
0
        public ImportContext AskImport()
        {
            using (var importForm = new ImportForm())
            {
                if (importForm.ShowDialog() == DialogResult.OK)
                {
                    return new ImportContext
                    {
                        Path = importForm.Path,
                        DeleteExisting = importForm.DeleteExistingAlarms
                    };
                }

                return null;
            }
        }
Beispiel #32
0
        private void barButtonItemImport_ItemClick(object sender, ItemClickEventArgs e)
        {
            ImportForm form = Program.Kernel.Get <ImportForm>();

            form.ShowDialog();
        }
Beispiel #33
0
        private void menuItem_imxport_Click(object sender, EventArgs e)
        {
            var importForm = new ImportForm();
            importForm.Import += (o, args) =>
            {
                var importConfig = args.ConfigImportOption != ImportForm.ImportOption.None;
                var importGestures = args.GesturesImportOption != ImportForm.ImportOption.None;
                var mergeGestures = args.GesturesImportOption == ImportForm.ImportOption.Merge;

                //冻结绘图,以提升批量修改的性能
                SuspendDrawingControl.SuspendDrawing(this);
                try
                {
                    Controller.Import(args.ConfigAndGestures, importConfig, importGestures, mergeGestures);
                    //如果还没有切换到“手势”tab,则listApps没有app加载。
                    if(listApps.Items.Count > 0) LoadApps();
                    LoadHotCornerCommands();
                }
                finally
                {
                    SuspendDrawingControl.ResumeDrawing(this);
                }

                //settingsFormControllerBindingSource.ResetBindings(true);
            };

            importForm.ShowDialog();
        }
Beispiel #34
0
        public override object RunAction(object aParams)
        {
            string action = CommonParams.GetParam(CommonConsts.cParamAction, aParams, String.Empty, 1);
            string objectName = GetObjectFromCommand(action);
            action = GetActionFromCommand(action);
            string pluginName = CommonParams.GetParam(CommonConsts.cParamPlugin, aParams, String.Empty, 1);

            if (pluginName == String.Empty || pluginName == "ImportPlugin")
            {
                aParams = CommonParams.AddParam(CommonConsts.cParamCallbackMethod, _run_action, aParams);

                switch (objectName)
                {
                    case "ImportPlugin":
                        switch(action)
                        {
                            case "Import":
                                ImportForm form = new ImportForm(aParams, settings);
                                form.ShowDialog();
                                break;

                        }
                        break;

                    case "CommandList":
                        return CreateCommandList();

                    default:
                        var _result = base.RunAction(aParams);
                        if (_result != null) return _result;
                        break;
                }
            }
            else
            {
                return _callback(aParams);
            }

            return null;
        }
Beispiel #35
0
 private void importMobToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ImportForm importForm = new ImportForm();
     if (importForm.ShowDialog() == DialogResult.OK)
     {
         Character character = importForm.list_character[importForm.listBox.SelectedIndex];
         TreeNode treeNode = new TreeNode();
         treeNode.Text = string.Concat(new object[]
         {
             "[",
             this.list_mesh.Count,
             "]",
             importForm.list_mesh[(int)character.bone_id].path
         });
         treeNode.BackColor = Color.Red;
         this.treeView.Nodes[0].Nodes.Add(treeNode);
         this.list_mesh.Add(importForm.list_mesh[(int)character.bone_id]);
         this.treeView.Nodes[0].Text = "Skeleton-ZMD [" + this.list_mesh.Count + "]";
         character.bone_id = Convert.ToInt16(this.list_mesh.Count - 1);
         for (int num = 0; num != character.List_Motion.Count; num++)
         {
             TreeNode treeNode2 = new TreeNode();
             treeNode2.Text = string.Concat(new object[]
             {
                 "[",
                 this.list_motion.Count,
                 "]",
                 importForm.list_motion[(int)character.List_Motion[num].zscmotionid].path
             });
             treeNode2.BackColor = Color.Red;
             this.treeView.Nodes[1].Nodes.Add(treeNode2);
             this.list_motion.Add(importForm.list_motion[(int)character.List_Motion[num].zscmotionid]);
             character.List_Motion[num].zscmotionid = Convert.ToInt16(this.list_motion.Count - 1);
         }
         this.treeView.Nodes[1].Text = "Motion-ZMO [" + this.list_motion.Count + "]";
         for (int num = 0; num != character.List_Effect.Count; num++)
         {
             TreeNode treeNode3 = new TreeNode();
             treeNode3.Text = string.Concat(new object[]
             {
                 "[",
                 this.list_effect.Count,
                 "]",
                 importForm.list_effect[(int)character.List_Effect[num].zsceffectid].path
             });
             treeNode3.BackColor = Color.Red;
             this.treeView.Nodes[2].Nodes.Add(treeNode3);
             this.list_effect.Add(importForm.list_effect[(int)character.List_Effect[num].zsceffectid]);
             character.List_Effect[num].zsceffectid = Convert.ToInt16(this.list_effect.Count - 1);
         }
         this.treeView.Nodes[2].Text = "Effect-eft [" + this.list_effect.Count + "]";
         this.list_character[this.treeViewCharacter.SelectedNode.Index] = character;
         if (character.is_active == 1)
         {
             this.treeViewCharacter.SelectedNode.Nodes.Clear();
             this.treeViewCharacter.SelectedNode.Text = string.Concat(new object[]
             {
                 "Mob [",
                 this.treeViewCharacter.SelectedNode.Index,
                 "] : \"",
                 character.name,
                 "\""
             });
             this.treeViewCharacter.SelectedNode.Nodes.Add("Parts [" + character.List_Mesh.Count + "]");
             for (int num2 = 0; num2 != character.List_Mesh.Count; num2++)
             {
                 this.treeViewCharacter.SelectedNode.Nodes[0].Nodes.Add(Convert.ToString(character.List_Mesh[num2].zscobjid));
             }
             this.treeViewCharacter.SelectedNode.Nodes.Add("Animations [" + character.List_Motion.Count + "]");
             for (int num2 = 0; num2 != character.List_Motion.Count; num2++)
             {
                 this.treeViewCharacter.SelectedNode.Nodes[1].Nodes.Add(Convert.ToString((CHRForm.type_action)character.List_Motion[num2].id));
             }
             this.treeViewCharacter.SelectedNode.Nodes.Add("Effects [" + character.List_Effect.Count + "]");
             for (int num2 = 0; num2 != character.List_Effect.Count; num2++)
             {
                 this.treeViewCharacter.SelectedNode.Nodes[2].Nodes.Add(Convert.ToString((CHRForm.type_action)character.List_Effect[num2].id));
             }
         }
         else
         {
             this.treeViewCharacter.SelectedNode.Text = "Mob [" + this.treeViewCharacter.SelectedNode.Index + "] : inactivate";
             this.treeViewCharacter.SelectedNode.Nodes.Clear();
         }
         this.propertyGrid.Refresh();
     }
 }
Beispiel #36
0
        /// <summary>
        /// 批量导入脚本
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void bImportFolder_Click(object sender, EventArgs e)
        {
            TreeNode currentNode = tree.SelectedNode;

            if (currentNode != null)
            {
                FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
                folderBrowserDialog.Description = "请选择要导入的脚本文件所在的文件夹";
                folderBrowserDialog.SelectedPath = Path.Combine(Helper.ClientPath, "scripts");

                if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
                {
                    string folderName = folderBrowserDialog.SelectedPath;
                    List<string> scriptList = new List<string>();

                    DirectoryInfo di = new DirectoryInfo(folderName);
                    
                    foreach (FileInfo fi in di.GetFiles())
                    {
                        if ((fi.Attributes & FileAttributes.Hidden) != FileAttributes.Hidden && fi.Extension == ".lua")
                        {
                            scriptList.Add(fi.Name);
                        }
                    }

                    ImportForm importForm = new ImportForm(currentNode, scriptList, folderName);
                    importForm.CreateTheNewNode = CreateScriptNode;
                    importForm.ShowDialog();
                }
            }
        }
Beispiel #37
0
        /// <summary>
        /// Handles the Click event of the subImportToolStripMenuItem 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 subImportToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ImportForm im = new ImportForm();

            if(im.ShowDialog(this) == DialogResult.OK) {
                this._LoadData(FilterType.NoFilter);
            }
        }
Beispiel #38
0
        private void submenu_import_Click(object sender, EventArgs e)
        {
            ImportForm loadform = new ImportForm(fGlobalEntities);

            loadform.Show();
        }
Beispiel #39
0
 void importPspIsoCustomMenuItem_Click( object sender, EventArgs e )
 {
     using ( ImportForm form = new ImportForm() )
     {
         if ( form.ShowDialog( this ) == DialogResult.OK )
         {
             using ( Stream fileStream = File.OpenRead( form.IsoFileName ) )
             using ( Stream tblStream = File.OpenRead( form.TblFileName ) )
             {
                 LoadFile( LoadType.PspStreamAndTable, null, fileStream, tblStream );
             }
         }
     }
 }
Beispiel #40
0
 private void importEntryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ImportForm importForm = new ImportForm();
     if (importForm.ShowDialog() == DialogResult.OK)
     {
         Object @object = importForm.list_object[importForm.listBox.SelectedIndex];
         this.treeViewObject.SelectedNode.Nodes.Clear();
         for (int num = 0; num != @object.list_mesh.Count; num++)
         {
             TreeNode treeNode = new TreeNode();
             treeNode.Text = string.Concat(new object[]
             {
                 "[",
                 this.list_mesh.Count,
                 "]",
                 importForm.list_mesh[(int)@object.list_mesh[num].mesh_id].path
             });
             treeNode.BackColor = Color.Red;
             this.treeView.Nodes[0].Nodes.Add(treeNode);
             this.list_mesh.Add(importForm.list_mesh[(int)@object.list_mesh[num].mesh_id]);
             this.treeView.Nodes[0].Text = "Mesh-ZMS [" + this.list_mesh.Count + "]";
             @object.list_mesh[num].mesh_id = Convert.ToInt16(this.list_mesh.Count - 1);
             TreeNode treeNode2 = new TreeNode();
             treeNode2.Text = string.Concat(new object[]
             {
                 "[",
                 this.list_materiel.Count,
                 "]",
                 importForm.list_materiel[(int)@object.list_mesh[num].material_id].path
             });
             treeNode2.BackColor = Color.Red;
             this.treeView.Nodes[1].Nodes.Add(treeNode2);
             this.list_materiel.Add(importForm.list_materiel[(int)@object.list_mesh[num].material_id]);
             this.treeView.Nodes[1].Text = "Materiel-DDS [" + this.list_materiel.Count + "]";
             @object.list_mesh[num].material_id = Convert.ToInt16(this.list_materiel.Count - 1);
         }
         for (int num = 0; num != @object.list_effect.Count; num++)
         {
             TreeNode treeNode = new TreeNode();
             treeNode.Text = string.Concat(new object[]
             {
                 "[",
                 this.list_effect.Count,
                 "]",
                 importForm.list_effect[(int)@object.list_effect[num].effect_id].path
             });
             treeNode.BackColor = Color.Red;
             this.treeView.Nodes[2].Nodes.Add(treeNode);
             this.list_effect.Add(importForm.list_effect[(int)@object.list_effect[num].effect_id]);
             this.treeView.Nodes[2].Text = "Effect-eft [" + this.list_effect.Count + "]";
             @object.list_effect[num].effect_id = Convert.ToInt16(this.list_effect.Count - 1);
         }
         this.treeViewObject.SelectedNode.Nodes.Add("Meshs [" + @object.list_mesh.Count + "]");
         for (int num2 = 0; num2 != @object.list_mesh.Count; num2++)
         {
             this.treeViewObject.SelectedNode.Nodes[0].Nodes.Add(string.Concat(new object[]
             {
                 "Model [",
                 @object.list_mesh[num2].mesh_id,
                 "] with Texture [",
                 @object.list_mesh[num2].material_id,
                 "]"
             }));
         }
         this.treeViewObject.SelectedNode.Nodes.Add("Effects [" + @object.list_effect.Count + "]");
         for (int num2 = 0; num2 != @object.list_effect.Count; num2++)
         {
             this.treeViewObject.SelectedNode.Nodes[1].Nodes.Add("Effect[" + @object.list_effect[num2].effect_id + "]");
         }
         this.list_object[this.treeViewObject.SelectedNode.Index] = @object;
         this.propertyGrid.Refresh();
     }
 }
		private void impClick(object sender, System.EventArgs e) {
			if (importForm.IsDisposed) importForm = new ImportForm(graph);
			importForm.Reset();
			importForm.Show();
			importForm.BringToFront();
		}
Beispiel #42
0
 private void btnCancel_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.Alt && e.Control && e.KeyCode == Keys.I)
     {
         ImportForm frmImp = new ImportForm();
         frmImp.ShowDialog();
     }            
 }
Beispiel #43
0
        /// <summary>
        /// 单文件导入脚本
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void bImportFile_Click(object sender, EventArgs e)
        {
            TreeNode currentNode = tree.SelectedNode;

            if (currentNode != null)
            {
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.Title = "请选择要导入的脚本文件";
                openFileDialog.Filter = "脚本文件|*.lua";             
                openFileDialog.InitialDirectory = Path.Combine(Helper.ClientPath, "scripts");

                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    string fullName = openFileDialog.FileName;

                    FileInfo fi = new FileInfo(fullName);
                    string fileName = fi.Name;
                    string folderName = fi.DirectoryName;

                    List<string> scriptList = new List<string>();
                    scriptList.Add(fileName);

                    ImportForm importForm = new ImportForm(currentNode, scriptList, folderName);
                    importForm.CreateTheNewNode = CreateScriptNode;
                    importForm.ShowDialog();
                }
            }
        }