public PluginsForm(PluginManager manager, string[] fileNames, float blockStart, float blockCount, string startDateTime, string endDateTime) { InitializeComponent(); PluginManager = manager; //Blocks from dataViewer... BlockStart = blockStart; BlockCount = blockCount; StartTime = null; EndTime = null; if(!startDateTime.Equals("")) StartTime = startDateTime; if(!endDateTime.Equals("")) EndTime = endDateTime; plugins = PluginManager.Plugins; if (plugins.Count < 1) { PluginManager.LoadPlugins(); plugins = PluginManager.Plugins; } if (plugins.Count > 0) { foreach (Plugin plugin in plugins) { pluginsComboBox.Items.Add(plugin.ReadableName); } pluginsComboBox.SelectedIndex = 0; CWAFilenames = fileNames; } }
private void MainForm_Load(object sender, EventArgs e) { FilesResetToolStripButtons(); //Create PluginManager pluginManager = new PluginManager(); //TS - Working Folder logic //If current plugin folder is empty then make it My Documents. //if (Properties.Settings.Default.CurrentPluginFolder == "") // Properties.Settings.Default.CurrentPluginFolder = GetPath("C:\\OM\\DefaultPlugins\\"); if (Properties.Settings.Default.CurrentPluginFolder.Length == 0) { string test = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "Plugins"; Console.WriteLine("TEST: " + test); Properties.Settings.Default.CurrentPluginFolder = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "Plugins"; } Console.WriteLine("Current: " + Properties.Settings.Default.CurrentWorkingFolder); Console.WriteLine("Current Plugin: " + Properties.Settings.Default.CurrentPluginFolder); if (Properties.Settings.Default.CurrentWorkingFolder.Equals("")) Properties.Settings.Default.CurrentWorkingFolder = GetPath("{MyDocuments}"); if (!Directory.Exists(Properties.Settings.Default.CurrentWorkingFolder)) { MessageBox.Show("Could not find last working folder: " + Properties.Settings.Default.CurrentWorkingFolder + "\r\n\r\nDefaulting to: " + GetPath("{MyDocuments}"), "Error - Missing Working Folder", MessageBoxButtons.OK, MessageBoxIcon.Warning); Properties.Settings.Default.CurrentWorkingFolder = GetPath("{MyDocuments}"); } if (startupPath != null) { ChangeWorkingFolder(startupPath); } else { LoadWorkingFolder(); } //Recent Folders if (Properties.Settings.Default.RecentFolders.Count == 0) { Properties.Settings.Default.RecentFolders.Add(Properties.Settings.Default.CurrentWorkingFolder); } UpdateRecentFoldersInGUI(); //Setup Column Sorting setupColumnSorter(); DoUpdateCheck(); }