Esempio n. 1
0
 private void Plugin_importPath_TextChanged(object sender, TextChangedEventArgs e)
 {
     Params.importPath = this.Plugin_importPath.Text;
     if (this.Plugin_importPath.Text != "")
     {
         ImportDataCmd.setEnable(true);
     }
     else
     {
         ImportDataCmd.setEnable(false);
     }
 }
Esempio n. 2
0
 private void Plugin_importName_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (this.Plugin_importName.Text != "")
     {
         Params.Instance.importName = this.Plugin_importName.Text;
         if (Params.importPath != null && Params.importPath != "")
         {
             ImportDataCmd.setEnable(true);
         }
     }
     else
     {
         Params.Instance.importName = Params.DEFAULT_IMPORTNAME;
     }
 }
Esempio n. 3
0
        private void ImportBrowseButton_Click(object sender, RoutedEventArgs e)
        {
            // Configure open file dialog box
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
            Nullable <bool> result             = dlg.ShowDialog();

            if (result == true)
            {
                this.Plugin_importPath.Text = dlg.FileName;
                Params.importPath           = this.Plugin_importPath.Text;
            }

            if (this.Plugin_importPath.Text != "")
            {
                ImportDataCmd.setEnable(true);
            }
            else
            {
                ImportDataCmd.setEnable(false);
            }
        }
Esempio n. 4
0
        public void LoadUserSettings(string settingsString)
        {
            string[] stringSeparators = new string[] { Params.DELIM };
            string[] result           = settingsString.Split(stringSeparators, StringSplitOptions.None);

            if (result != null)
            {
                Params.Instance.exportName  = result[0];
                this.Plugin_exportName.Text = Params.Instance.exportName;

                if (result.Length > 1)
                {
                    if (result[1] != "")
                    {
                        Params.exportPath           = result[1];
                        this.Plugin_exportPath.Text = Params.exportPath;
                        ExportDataCmd.setEnable(true);
                    }
                }

                if (result.Length > 2)
                {
                    Params.Instance.importName  = result[2];
                    this.Plugin_importName.Text = Params.Instance.importName;
                }

                if (result.Length > 3)
                {
                    if (result[3] != "")
                    {
                        Params.importPath           = result[3];
                        this.Plugin_importPath.Text = Params.importPath;
                        ImportDataCmd.setEnable(true);
                    }
                }
            }
        }