private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WPF_ControlHelpers.CenterChild(parent, this);
     DI.Wrapper.SerialDiscoveredDevices += this.discoveredDevices;
     DI.Wrapper.SerialOnError           += this.onSerialOnError;
     this.ReloadList();
 }
Beispiel #2
0
 public WifiSelect(Window parent, bool paired = true)
 {
     this.parent = parent;
     InitializeComponent();
     WPF_ControlHelpers.CenterChild(parent, this);
     this.SizeToContent = SizeToContent.WidthAndHeight;
 }
Beispiel #3
0
 private void Window_ContentRendered(object sender, System.EventArgs e)
 {
     if (parent != null)
     {
         WPF_ControlHelpers.CenterChild(parent, this);
     }
 }
Beispiel #4
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WPF_ControlHelpers.CenterChild(parent, this);
     DI.Wrapper.BT_DeviceDiscovered  += this.deviceDiscovered;
     DI.Wrapper.BT_DiscoveryComplete += this.discoveryComplete;
     this.gridWait.Show();
     DI.Wrapper.BTClassicDiscoverAsync(this.pair);
 }
Beispiel #5
0
 public BLESelectCharacteristic(Window parent, List <BLE_CharacteristicDataModel> characteristics)
 {
     this.parent          = parent;
     this.characteristics = characteristics;
     InitializeComponent();
     this.listBox_BLE.ItemsSource = characteristics;
     WPF_ControlHelpers.CenterChild(parent, this);
     this.SizeToContent = SizeToContent.WidthAndHeight;
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     this.wrapper.LanguageList((items) => {
         this.lbxLanguages.ItemsSource = items;
         // Only create the selected index here to avoid it firing on load
         this.lbxLanguages.SelectionChanged += this.lbLanguages_SelectionChanged;
     });
     WPF_ControlHelpers.CenterChild(parent, this);
 }
Beispiel #7
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            WPF_ControlHelpers.CenterChild(parent, this);

            DI.Wrapper.DiscoveredWifiNetworks += this.discoveredWifiNetworks;
            DI.Wrapper.OnWifiError            += this.onWifiError;
            this.gridWait.Show();
            DI.Wrapper.WifiDiscoverAsync();
            // start the load
        }
Beispiel #8
0
 public BTSettings(Window parent)
 {
     this.parent = parent;
     InitializeComponent();
     WPF_ControlHelpers.CenterChild(parent, this);
     this.SizeToContent = SizeToContent.WidthAndHeight;
     this.widthManager  = new ButtonGroupSizeSyncManager(
         this.btnPair, this.btnUnpair, this.btnExit);
     this.widthManager.PrepForChange();
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WPF_ControlHelpers.CenterChild(parent, this);
     DI.Wrapper.BLE_DeviceDiscovered        += this.deviceDiscovered;
     DI.Wrapper.BLE_DeviceRemoved           += this.deviceRemoved;
     DI.Wrapper.BLE_DeviceUpdated           += this.deviceUpdated;
     DI.Wrapper.BLE_DeviceDiscoveryComplete += this.deviceDiscoveryComplete;
     this.listBox_BLE.SelectionChanged      += this.selectionChanged;
     this.gridWait.Show();
     DI.Wrapper.BLE_DiscoverAsync();
 }
Beispiel #10
0
 public CommandSettings(Window parent)
 {
     this.parent = parent;
     InitializeComponent();
     this.btnCmdsHc05.Content = string.Format("{0} (HC-05)", DI.Wrapper.GetText(MsgCode.commands));
     WPF_ControlHelpers.CenterChild(parent, this);
     this.SizeToContent = SizeToContent.WidthAndHeight;
     this.widthManager  = new ButtonGroupSizeSyncManager(
         this.btnExit, this.btnCmdsHc05);
     this.widthManager.PrepForChange();
 }
 public TerminatorSettings(Window parent)
 {
     this.parent = parent;
     InitializeComponent();
     WPF_ControlHelpers.CenterChild(parent, this);
     this.btnDefault.Content = string.Format("{0} \\n\\r", DI.Wrapper.GetText(MsgCode.Default));
     this.SizeToContent      = SizeToContent.WidthAndHeight;
     this.widthManager       = new ButtonGroupSizeSyncManager(
         this.btnExit, this.btnArduino);
     this.widthManager.PrepForChange();
 }
Beispiel #12
0
 public MsgBoxWifiCred(Window parent, string title, string host, string service)
 {
     this.parent = parent;
     InitializeComponent();
     this.Title               = title;
     this.txtHostName.Text    = host;
     this.txtServiceName.Text = service;
     WPF_ControlHelpers.CenterChild(parent, this);
     this.SizeToContent = SizeToContent.WidthAndHeight;
     // Call before rendering which will trigger initial resize events
     this.widthManager = new ButtonGroupSizeSyncManager(this.btnOk, this.btnCancel);
     this.widthManager.PrepForChange();
 }
 public SerialSelectUSB(Window parent, bool isSelect)
 {
     this.parent = parent;
     InitializeComponent();
     WPF_ControlHelpers.CenterChild(parent, this);
     this.SizeToContent = SizeToContent.WidthAndHeight;
     if (!isSelect)
     {
         this.btnSelect.Collapse();
         this.btnCancel.Collapse();
         this.btnExit.Show();
     }
 }
Beispiel #14
0
        public MsgBoxWifiCred(Window parent, IIndexItem <DefaultFileExtraInfo> index)
        {
            this.parent = parent;
            this.index  = index;
            this.InitializeComponent();

            this.PopulateFields(this.index);
            WPF_ControlHelpers.CenterChild(parent, this);
            this.btnOk.Content = DI.Wrapper.GetText(MsgCode.save);
            this.SizeToContent = SizeToContent.WidthAndHeight;
            // Call before rendering which will trigger initial resize events
            this.widthManager = new ButtonGroupSizeSyncManager(this.btnOk, this.btnCancel);
            this.widthManager.PrepForChange();
        }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WPF_ControlHelpers.CenterChild(parent, this);
     this.AddEventHandlers();
     this.timer.Start();
     this.writeControl.OnStartup(this.parent);
     DI.Wrapper.CurrentSupportedLanguage(this.SetLanguage);
     this.ucLogger.Show();
     this.ucLogger.OnStartup();
     this.ucLogger.Collapse();
     this.ucCmds.Show();
     this.ucCmds.OnStartup();
     this.ucCmds.Collapse();
     this.SizeToContent = SizeToContent.WidthAndHeight;
     this.CenterToParent(this.parent);
 }
Beispiel #16
0
        public MsgBoxWifiCred(Window parent)
        {
            this.parent = parent;
            InitializeComponent();
            this.Title = DI.Wrapper.GetText(MsgCode.Create);
            this.lbSSID.Show();
            this.txtSSID.Show();

            this.txtHostName.Text    = string.Empty;
            this.txtServiceName.Text = string.Empty;
            WPF_ControlHelpers.CenterChild(parent, this);
            this.SizeToContent = SizeToContent.WidthAndHeight;
            // Call before rendering which will trigger initial resize events
            this.widthManager = new ButtonGroupSizeSyncManager(this.btnOk, this.btnCancel);
            this.widthManager.PrepForChange();
        }
        public BTRun(Window parent)
        {
            this.parent = parent;
            Instances++;
            InitializeComponent();

            WPF_ControlHelpers.CenterChild(parent, this);
            this.SizeToContent                 = SizeToContent.WidthAndHeight;
            this.ui.ExitClicked               += this.OnUiExit;
            this.ui.ConnectCicked             += this.OnUiConnect;
            this.ui.DisconnectClicked         += this.OnUiDisconnect;
            this.ui.SendClicked               += this.OnUiSend;
            this.ui.InfoClicked               += this.OnUiInfo;
            this.ui.SettingsClicked           += this.OnUiSettings;
            DI.Wrapper.BT_ConnectionCompleted += this.connectionCompleted;
            DI.Wrapper.BT_BytesReceived       += this.bytesReceived;
        }
Beispiel #18
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (this.index == null)
            {
                // New entry
                this.tEditor.InitialiseEditor(parent, new TerminatorDataModel());
            }
            else
            {
                this.wrapper.RetrieveTerminatorData(this.index, this.OnInitOk, this.OnInitFail);
            }

            this.tEditor.OnSave += TEditor_OnSave;
            DI.Wrapper.GetTerminatorEntitiesList(this.OnTerminatorLoadOk, App.ShowMsg);
            this.listBoxTerminators.SelectionChanged += selectionChangedHandler;


            WPF_ControlHelpers.CenterChild(parent, this);
        }
Beispiel #19
0
 public EthernetRun(Window parent)
 {
     this.parent = parent;
     Instances++;
     InitializeComponent();
     WPF_ControlHelpers.CenterChild(parent, this);
     this.SizeToContent         = SizeToContent.WidthAndHeight;
     this.ui.ExitClicked       += this.OnUiExit;
     this.ui.ConnectCicked     += this.OnUiConnect;
     this.ui.DisconnectClicked += this.OnUiDisconnect;
     this.ui.SendClicked       += this.OnUiSend;
     this.ui.InfoClicked       += this.OnUiInfo;
     this.ui.SettingsClicked   += this.OnUiSettings;
     DI.Wrapper.EthernetParamsRequestedEvent += this.paramsRequestedEventHandler;
     DI.Wrapper.Ethernet_BytesReceived       += this.bytesReceivedHandler;
     DI.Wrapper.OnEthernetError      += this.onEthernetError;
     DI.Wrapper.OnEthernetListChange += this.onEthernetListChange;
     DI.Wrapper.OnEthernetConnectionAttemptCompleted += this.onEthernetConnectionAttemptCompleted;
 }
Beispiel #20
0
        public SerialRun(Window parent)
        {
            this.parent = parent;
            Instances++;
            InitializeComponent();

            WPF_ControlHelpers.CenterChild(parent, this);
            this.SizeToContent = SizeToContent.WidthAndHeight;

            this.ui.ExitClicked              += this.OnUiExit;
            this.ui.ConnectCicked            += this.OnUiConnect;
            this.ui.DisconnectClicked        += this.OnUiDisconnect;
            this.ui.SendClicked              += this.OnUiSend;
            this.ui.InfoClicked              += this.OnUiInfo;
            this.ui.SettingsClicked          += this.OnUiSettings;
            DI.Wrapper.OnSerialConfigRequest += this.onSerialConfigRequest;
            DI.Wrapper.SerialOnError         += this.onSerialError;
            DI.Wrapper.Serial_BytesReceived  += this.bytesReceived;
            DI.Wrapper.OnSerialConnectionAttemptCompleted += this.onSerialConnectionAttemptCompleted;
        }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WPF_ControlHelpers.CenterChild(parent, this);
     this.ui.OnLoad(this, CommMedium.Bluetooth);
 }
Beispiel #22
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WPF_ControlHelpers.CenterChild(parent, this);
     this.listBox_BLE.SelectionChanged += this.ListBox_BLE_SelectionChanged;
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WPF_ControlHelpers.CenterChild(parent, this);
 }
Beispiel #24
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     DI.Wrapper.GetScriptList(this.LoadList, this.OnGetError);
     this.lbxCmds.SelectionChanged += this.selectionChangedHandler;
     WPF_ControlHelpers.CenterChild(parent, this);
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WPF_ControlHelpers.CenterChild(parent, this);
     this.listBoxTerminators.SelectionChanged += SelectionChangedHandler;
 }