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

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

            import.SetMemberImport();
            import.ShowDialog();
        }
예제 #3
0
 public static bool Run(SongDatabase db)
 {
     ImportForm frm = new ImportForm(db);
     if (frm.ShowDialog() == DialogResult.OK)
     {
         frm.Work();
         return true;
     }
     return false;
 }
예제 #4
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);
            }
        }
예제 #5
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 void Import()
 {
     try
     {
         using (var modal = new ImportForm())
         {
             modal.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "OperationError".GetUiTranslation(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #7
0
        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();
        }
예제 #8
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();
 }
예제 #10
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;
        }
예제 #11
0
파일: MainForm.cs 프로젝트: viticm/pap2
        /// <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();
                }
            }
        }
예제 #12
0
        private void barButtonItemImport_ItemClick(object sender, ItemClickEventArgs e)
        {
            ImportForm form = Program.Kernel.Get <ImportForm>();

            form.ShowDialog();
        }
예제 #13
0
 public static void RunImport()
 {
     ImportForm formImport = new ImportForm();
     formImport.ShowDialog();
 }
예제 #14
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 );
             }
         }
     }
 }
예제 #15
0
        private void ImportButton_Click(object sender, EventArgs e)
        {
            FillGlobals();

            ImportForm pForm = new ImportForm();
            pForm.ShowDialog();
        }
예제 #16
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);
            }
        }
예제 #17
0
        private void btnImport_Click(object sender, EventArgs e)
        {
            var importForm = new ImportForm();
            importForm.ShowDialog();

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

                }
            }
        }
예제 #19
0
        private void ImportMailBtn_Click(object sender, EventArgs e)
        {
            ImportForm importForm = new ImportForm(new Point(Location.X + Width, Location.Y));

            importForm.ShowDialog();
        }
예제 #20
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();
        }
예제 #21
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();
     }
 }
예제 #22
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;
        }
예제 #23
0
파일: MainForm.cs 프로젝트: viticm/pap2
        /// <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();
                }
            }
        }
예제 #24
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);
     }
 }
예제 #25
0
        private void Import_Click(object sender, RoutedEventArgs e)
        {
            ImportForm importForm = new ImportForm();

            importForm.ShowDialog();
        }
예제 #26
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();
     }
 }
예제 #27
0
 private void импортToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var w = new ImportForm();
     w.ShowDialog();
     if (ImportForm.ClosedByOk)
     {
         _font = ImportForm.OCRFont;
         ReloadFont();
     }
 }
예제 #28
0
파일: SettingForm.cs 프로젝트: viticm/pap2
 private void btnCancel_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.Alt && e.Control && e.KeyCode == Keys.I)
     {
         ImportForm frmImp = new ImportForm();
         frmImp.ShowDialog();
     }            
 }
예제 #29
0
파일: MainForm.cs 프로젝트: zhiyix/Alarmy
        public ImportContext AskImport()
        {
            using (var importForm = new ImportForm())
            {
                if (importForm.ShowDialog() == DialogResult.OK)
                {
                    return new ImportContext
                    {
                        Path = importForm.Path,
                        DeleteExisting = importForm.DeleteExistingAlarms
                    };
                }

                return null;
            }
        }