public IDataLibPlugin Add(IDataLibPlugin PluginObject) { if (base.Contains(PluginObject.PluginFullName) == false) { base.Add(PluginObject.PluginFullName, PluginObject); return(PluginObject); } return(null); }
public IDataLibPlugin GetActivePlugin() { if (activePlugin == null) { activePlugin = new DataLibSQLite3(); //activePlugin = new DataLibPluginCeDB(); activePlugin.Datasource = "scandb"; GlobalArea.Logger.Info("Init {Name} plugin", activePlugin.PluginFullName); } return(activePlugin); }
public OrderViewer() { InitializeComponent(); // Заголовок формы this.Text = string.Format("{0}|({1}){2}", GlobalArea.DbInfo.PereuchetDateText, GlobalArea.DbInfo.AptekaID, GlobalArea.DbInfo.AptekaName); data = GlobalArea.PluginManager.GetActivePlugin(); // this.order = data.GetOrder(); // this.order.AddedMore += ShowMessageIfMoreQty; this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HotKeys); btnScan.Focus(); taskType = TaskType.SCAN_TYPE; this.lastOrderItem = null; barcoder.EnableScanner = true; GlobalArea.AppOption.AppOptionChanged += ChangedOptionAction; lbPackageFlag.ForeColor = (GlobalArea.AppOption.FastScan) ? Color.IndianRed : Color.Gray; lbEmployerName.Text = (GlobalArea.CurrentEmployee != null) ? GlobalArea.CurrentEmployee.Name : ""; }