/// <summary> /// Class constructor /// </summary> /// <param name="localePrefs">localeprefs</param> /// <param name="dataMatrix">Datamatrix</param> public DataBaseInfo(string[] localePrefs, DataMatrixSchemaInfo[] dataMatrix, IOwnerOfAddIn ownerOfAddIn) { //setting the ResManager resource manager and localization string string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.DataBaseInfo.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { resManager = new ResourceManager("Ferda.FrontEnd.AddIns.DataBaseInfo.Localization_en-US", Assembly.GetExecutingAssembly()); localizationString = "en-US"; } this.ownerOfAddIn = ownerOfAddIn; comparer.column = 0; this.dataMatrix = dataMatrix; InitializeComponent(); this.ListViewInit(); this.FillDBInfoListView(); this.ToolStripMenuItemCopyAll.Click += new EventHandler(ToolStripMenuItemCopyAll_Click); this.ToolStripMenuItemCopySelected.Click += new EventHandler(ToolStripMenuItemCopySelected_Click); }
/// <summary> /// Load the addins to the FrontEnd /// </summary> /// <param name="ownerOfAddIn">Who will own this addin</param> /// <param name="objectAdapter">Some ice stuff</param> /// <param name="modulesManager">Modules Manager</param> /// <param name="displayer">Displayer of the properties (if an Add-in has a property)</param> private static void loadAddIns(IOwnerOfAddIn ownerOfAddIn, Ice.ObjectAdapter objectAdapter, Ferda.ModulesManager.ModulesManager modulesManager, Properties.IOtherObjectDisplayer displayer) { System.Collections.Specialized.StringCollection proxies = new System.Collections.Specialized.StringCollection(); foreach(string file in System.IO.Directory.GetFiles("AddIns")) { if(System.IO.Path.GetExtension(file) == ".dll") { string path = "Ferda.FrontEnd.AddIns." + System.IO.Path.GetFileNameWithoutExtension(file) + ".Main"; //tohle se nezvladne Assembly asembly = System.Reflection.Assembly.LoadFile(System.IO.Path.GetFullPath(file)); IAddInMain addInMain = (IAddInMain)asembly.CreateInstance(path); //adding the properties displayer if it is a addin capable of //displaying properties if (addInMain is Properties.IPropertyProvider) { Properties.IPropertyProvider prov = addInMain as Properties.IPropertyProvider; prov.Displayer = displayer; } addInMain.OwnerOfAddIn = ownerOfAddIn; addInMain.ObjectAdapter = objectAdapter; proxies.AddRange(addInMain.ObjectProxiesToAdd); addIns.Add(addInMain); } } int count = proxies.Count; string[] newServices = new string[count]; if(count > 0) { proxies.CopyTo(newServices, 0); } modulesManager.AddModuleServices(newServices); }
/// <summary> /// Class constructor /// </summary> /// <param name="localePrefs">localeprefs</param> /// <param name="currentDSN">Current DSN</param> public ODBCConnectionStringControl(string[] localePrefs, string currentDSN, IOwnerOfAddIn ownerOfAddIn) { //setting the ResManager resource manager and localization string string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.ODBCConnectionString.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { resManager = new ResourceManager("Ferda.FrontEnd.AddIns.ODBCConnectionString.Localization_en-US", Assembly.GetExecutingAssembly()); localizationString = "en-US"; } this.ownerOfAddIn = ownerOfAddIn; this.path = Assembly.GetExecutingAssembly().Location; InitializeComponent(); this.ChangeLocale(resManager); this.returnString = currentDSN; this.FillList(); this.MyInit(); }
/// <summary> /// Contructor which creates editcategories instance and fills in the needed values /// </summary> /// <param name="localePrefs">Current locale</param> /// <param name="categories">Categories to edit</param> /// <param name="distinctValues">Distinct values for enum categories</param> public MainListView(string[] localePrefs, CategoriesStruct categories, string[] distinctValues, IOwnerOfAddIn ownerOfAddin) { //setting the ResManager resource manager and localization string string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.EditCategories.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { this.resManager = new ResourceManager("Ferda.FrontEnd.AddIns.EditCategories.Localization_en-US", Assembly.GetExecutingAssembly()); localizationString = "en-US"; } this.distinctValues = distinctValues; this.ownerOfAdd = ownerOfAddin; this.path = Assembly.GetExecutingAssembly().Location; InitializeComponent(); this.ChangeLocale(this.resManager); bigDataList = this.MyIceRun(categories); FillEditCategoriesListView(CategoriesListView); //adding a handling method for column sorting this.CategoriesListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick); this.LoadIcons(); this.InitIcons(); }
/// <summary> /// Class constructor /// </summary> /// <param name="localePrefs">Localeprefs</param> /// <param name="hypotheses">Hypotheses to display</param> /// <param name="used_quantifiers">Used quantifiers</param> /// <param name="Displayer">Propertygrid</param> /// <param name="statisticsProxies">Statistics proxies</param> public FerdaResultBrowserControl(string[] localePrefs, HypothesisStruct[] hypotheses, QuantifierProvider[] used_quantifiers, IOtherObjectDisplayer Displayer, List<Ferda.Statistics.StatisticsProviderPrx> statisticsProxies, string taskType, IOwnerOfAddIn ownerOfAddIn) { //setting the ResManager resource manager and localization string string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.ResultBrowser.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { resManager = new ResourceManager("Ferda.FrontEnd.AddIns.ResultBrowser.Localization_en-US", Assembly.GetExecutingAssembly()); localizationString = "en-US"; } this.ownerOfAddIn = ownerOfAddIn; columnSorter.column = 0; InitializeComponent(); InitializeGraph(); this.hypothesesCount = hypotheses.Length; this.taskType = taskType; resultBrowser = new FerdaResult(resManager); resultBrowser.IceTicked += new LongRunTick(resultBrowser_IceTicked); resultBrowser.IceComplete += new LongRunCompleted(resultBrowser_IceComplete); //setting locale this.ChangeLocale(this.resManager); this.displayer = Displayer; this.displayer.Reset(); this.PreloadDisable(); resultBrowser.Initialize(hypotheses, used_quantifiers, statisticsProxies); if ((this.taskType == "LISpMinerTasks.KLTask") || (this.taskType == "LISpMinerTasks.CFTask") || (this.taskType == "LISpMinerTasks.FFTTask")) { RadioFirstTable.Visible = false; RadioSecondTable.Visible = false; } }
/// <summary> /// Class constructor /// </summary> /// <param name="localePrefs">Localeprefs</param> /// <param name="columnInfo">Columninfo</param> public ColumnFrequency(string[] localePrefs, ColumnInfo columnInfo, IOwnerOfAddIn ownerOfAddIn) { //setting the ResManager resource manager and localization string string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.ColumnFr.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { resManager = new ResourceManager("Ferda.FrontEnd.AddIns.ColumnFr.Localization_en-US", Assembly.GetExecutingAssembly()); localizationString = "en-US"; } this.ownerOfAddIn = ownerOfAddIn; //implicitly sorting by the first column comparer.column = 0; this.rowCount = columnInfo.dataMatrix.recordsCount; InitializeComponent(); DBInteraction myDb = new DBInteraction(columnInfo); this.ListViewInit(); this.InitializeGraph(); this.tempTable = myDb.GetAllValuesCount(); this.FrDataTableToFrListView(this.tempTable); this.DrawAreaFromDataTable(this.tempTable, this.ColumnFrequencyAreaChart); this.DrawBarsFromDataTable(this.tempTable, this.ColumnFrequencyBarChart); this.DrawPieFromDataTable(this.tempTable, this.ColumnFrequencyPieChart); this.ToolStripMenuItemAbsolute.CheckedChanged += new EventHandler(ToolStripMenuItem_AbCheckedChanged); this.ToolStripMenuItemCopyAll.Click += new EventHandler(ToolStripMenuItemCopyAll_Click); this.ToolStripMenuItemCopySelected.Click += new EventHandler(ToolStripMenuItemCopySelected_Click); this.ToolStripMenuItemCopyChart.Click += new EventHandler(ToolStripMenuItemCopyChart_Click); }