예제 #1
0
 /// <summary>
 /// starts the form modal with it's parent
 /// </summary>
 /// <param name="parent"></param>
 public void StartModal(IBE.Form1 parent)
 {
     if (parent.InvokeRequired)
     {
         parent.Invoke(new delStartModal(StartModal), parent);
     }
     else
     {
         m_parent = parent;
         this.ShowDialog(parent);
     }
 }
예제 #2
0
 void m_ExternalDataInterface_ExternalDataEvent(object sender, IBE.IBECompanion.DataEventBase.LocationChangedEventArgs e)
 {
     try
     {
         if((e.Changed & IBE.IBECompanion.DataEventBase.enExternalDataEvents.DataCollected) > 0)
         {
             createMarketdataCollectedEvent();
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error while processing the LocationChanged-event", ex);
     }
 }
예제 #3
0
 void m_ExternalDataInterface_ExternalDataEvent(object sender, IBE.IBECompanion.DataEventBase.LocationChangedEventArgs e)
 {
     try
     {
         if((e.Changed & IBE.IBECompanion.DataEventBase.enExternalDataEvents.DataCollected) > 0)
         {
             GUI.setFilterHasChanged(true);
             //GUI.RefreshData();
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error while processing the LocationChanged-event", ex);
     }
 }
예제 #4
0
        /// <summary>
        /// register the external tool in the CommandersLog for the DataEvent
        /// </summary>
        /// <param name="LogfileScanner"></param>
        public void registerExternalTool(IBE.IBECompanion.DataEventBase ExternalDataInterface)
        {
            try
            {
                if(m_DataEventObject == null)
                { 
                    m_DataEventObject                    = ExternalDataInterface;
                    m_DataEventObject.ExternalDataEvent += m_ExternalDataInterface_ExternalDataEvent;
                }
                else 
                    throw new Exception("LogfileScanner already registered");

            }
            catch (Exception ex)
            {
                throw new Exception("Error while registering the LogfileScanner", ex);
            }
        }
예제 #5
0
        public EDDN.CommodityObject GetCommodityFromFDevIDs(IBE.SQL.Datasets.dsEliteDB.tbcommoditybaseDataTable basedata, Newtonsoft.Json.Linq.JToken commodityItem, bool param1)
        {
            EDDN.CommodityObject commodityObject = null;  
            String skuString = null;

            try
            {
               
                if(commodityItem != null)
                { 
                    if (commodityItem.SelectToken("id", false) == null)
                        throw new NotSupportedException(String.Format("Missing id : {0}", commodityItem));

                    SQL.Datasets.dsEliteDB.tbcommoditybaseRow itemData = basedata.FindByid((Int32)commodityItem.SelectToken("id", false));

                    if(itemData != null)
                    {
                        commodityObject = new EDDN.CommodityObject();

                        commodityObject.Id         = itemData.id;
                        commodityObject.Name       = itemData.name;
                        commodityObject.Category   = itemData.category;
                        commodityObject.Average    = itemData.average;
                    }
                    else
                        throw new NotSupportedException(String.Format("Unknown commodity : {0}", commodityItem));

                }
                else
                    Debug.Print("!");

                return commodityObject;

            }
            catch (NotSupportedException ex)
            {
                Program.MainLog.Log(String.Format("Converting error: {0}", ex.Message));
            }
            catch (Exception ex)
            {
                throw new Exception("Error while converting companion data to commodity object", ex);
            }

            return null;
        }