Пример #1
0
 public GXOptionsForm(AppType type, GXAmi ami)
 {
     InitializeComponent();
     //We do not need device editor tab at this moment.
     tabControl1.TabPages.Remove(DeviceEditorTab);
     AmiForm = ami;
     GetDevicesAutomaticallyCB.Checked = Gurux.DeviceSuite.Properties.Settings.Default.GetDevicesAutomatically;
     GetDataCollectorsAutomaticallyCB.Checked = Gurux.DeviceSuite.Properties.Settings.Default.GetDataCollectorsAutomatically;
     ShowDevicesCB.Checked = Gurux.DeviceSuite.Properties.Settings.Default.DeviceTreeShowDevices;
     ShowCategoriesCB.Checked = Gurux.DeviceSuite.Properties.Settings.Default.DeviceTreeShowCategories;
     ShowTablesCB.Checked = Gurux.DeviceSuite.Properties.Settings.Default.DeviceTreeShowTables;
     ShowPropertiesCB.Checked = Gurux.DeviceSuite.Properties.Settings.Default.DeviceTreeShowProperties;
     ShowPropertyValueCB.Checked = Gurux.DeviceSuite.Properties.Settings.Default.DeviceTreeShowPropertyValue;
     AddressTB.Text = Gurux.DeviceSuite.Properties.Settings.Default.AmiHostName.Replace("http://", "");            
     this.MaximimErrorCountTB.Text = Gurux.DeviceSuite.Properties.Settings.Default.ErrorMaximumCount.ToString();
     this.MaximimTraceCountTB.Text = Gurux.DeviceSuite.Properties.Settings.Default.TraceMaximumCount.ToString();
     EnableAMICB.Checked = Gurux.DeviceSuite.Properties.Settings.Default.AmiEnabled;
     switch (type)
     {
         case AppType.Ami:
             tabControl1.SelectedTab = AmiTab;
         break;
         case AppType.Director:
         tabControl1.SelectedTab = DirectorTab;
         break;
         case AppType.Editor:
         tabControl1.SelectedTab = DeviceEditorTab;
         break;
     }            
 }        
Пример #2
0
 public MainForm()
 {            
     InitializeComponent();            
     ImportFromDataCollectorMenu.Enabled = ImportMenu.Enabled = false;
     CancelOperationMenu.ShortcutKeyDisplayString = "ESC";
     PropertiesMenu.ShortcutKeys = Keys.Alt | Keys.Enter;
     MruManager = new MRUManager(RecentItemsMenu);
     StatusLbl.Text = Gurux.DeviceSuite.Properties.Resources.ReadyTxt;
     MruManager.OnOpenMRUFile += new OpenMRUFileEventHandler(OnOpenMRUFile);
     Director = new GXDirector(this);
     Editor = new GXDeviceEditor(this);
     AMI = new GXAmi(this);
     Director.OnItemActivated += new EventHandler(OnActivated);
     Editor.OnItemActivated += new EventHandler(OnActivated);
     AMI.OnItemActivated += new EventHandler(OnActivated);
     TransactionManager = new GXTransactionManager(OnAsyncStateChange);
     Director.m_DeviceList.OnUpdated += new ItemUpdatedEventHandler(OnUpdated);
     Director.m_DeviceList.OnSelectedItemChanged += new SelectedItemChangedEventHandler(m_DeviceList_OnSelectedItemChanged);
     Director.m_DeviceList.OnTransactionProgress += new TransactionProgressEventHandler(OnTransactionProgress);
 }