Exemplo n.º 1
0
 private void menu_MsBluetooth_Click(object sender, RoutedEventArgs e)
 {
     menu_MsBluetooth.IsChecked     = !menu_MsBluetooth.IsChecked;
     WinBtStream.ForceToshibaMode   = !menu_MsBluetooth.IsChecked;
     UserPrefs.Instance.toshibaMode = !menu_MsBluetooth.IsChecked;
     UserPrefs.SavePrefs();
 }
Exemplo n.º 2
0
        private void btnProperties_Click(object sender, RoutedEventArgs e)
        {
            PropWindow win = new PropWindow(properties, device.Type.ToString());

            win.ShowDialog();

            if (win.customCalibrate)
            {
                CalibrateWindow cb = new CalibrateWindow(device);
                cb.ShowDialog();

                if (cb.doSave)
                {
                    win.props.calString = cb.Calibration.ToString();
                    win.ShowDialog();
                }
                else
                {
                    win.Show();
                }
            }

            if (win.doSave)
            {
                ApplyCalibration(win.props.calPref, win.props.calString);
                properties    = new Property(win.props);
                snapIRpointer = properties.pointerMode != Property.PointerOffScreenMode.Center;
                SetName(properties.name);
                UserPrefs.Instance.AddDevicePref(properties);
                UserPrefs.SavePrefs();
            }
        }
Exemplo n.º 3
0
 private void menu_AutoRefresh_Click(object sender, RoutedEventArgs e)
 {
     menu_AutoRefresh.IsChecked     = !menu_AutoRefresh.IsChecked;
     UserPrefs.Instance.autoRefresh = menu_AutoRefresh.IsChecked;
     UserPrefs.SavePrefs();
     AutoRefresh(menu_AutoRefresh.IsChecked && groupAvailable.Children.Count + groupXinput.Children.Count == 0);
 }
Exemplo n.º 4
0
 private void menu_AutoRefresh_Click(object sender, RoutedEventArgs e)
 {
     menu_AutoRefresh.IsChecked     = !menu_AutoRefresh.IsChecked;
     UserPrefs.Instance.autoRefresh = menu_AutoRefresh.IsChecked;
     UserPrefs.SavePrefs();
     AutoRefresh(menu_AutoRefresh.IsChecked && ApplicationIsActivated());
 }
Exemplo n.º 5
0
 private void menu_AutoXInput_Click(object sender, RoutedEventArgs e)
 {
     menu_AutoXInput.IsChecked     = !menu_AutoXInput.IsChecked;
     UserPrefs.Instance.autoXInput = menu_AutoXInput.IsChecked;
     UserPrefs.SavePrefs();
     if (menu_AutoXInput.IsChecked)
     {
         Refresh();
     }
 }
Exemplo n.º 6
0
 private void SettingsMenu_Closing(object sender, RoutedEventArgs e)
 {
     UserPrefs.AutoStart = menu_AutoStart.IsChecked;
     UserPrefs.Instance.startMinimized   = menu_StartMinimized.IsChecked;
     UserPrefs.Instance.autoRefresh      = menu_AutoRefresh.IsChecked;
     UserPrefs.Instance.autoRefreshCount = menu_AutoRefreshCount.Value;
     UserPrefs.Instance.greedyMode       = menu_NoSharing.IsChecked;
     UserPrefs.Instance.toshibaMode      = !menu_MsBluetooth.IsChecked;
     UserPrefs.SavePrefs();
 }
Exemplo n.º 7
0
 private void menu_NoSharing_Click(object sender, RoutedEventArgs e)
 {
     menu_NoSharing.IsChecked      = !menu_NoSharing.IsChecked;
     UserPrefs.Instance.greedyMode = menu_NoSharing.IsChecked;
     UserPrefs.SavePrefs();
     WinBtStream.OverrideSharingMode = UserPrefs.Instance.greedyMode;
     if (UserPrefs.Instance.greedyMode)
     {
         WinBtStream.OverridenFileShare = FileShare.None;
     }
 }
Exemplo n.º 8
0
 //this is executed WHENEVER the application is closing and not just when clicking the title_Close button as expected
 //this means the following function WILL get executed even when calling Application.Current.Shutdown() directly
 void title_Close_click(object sender, CancelEventArgs e)
 {
     //cancels the window close command
     if (UserPrefs.Instance.minimizeOnExit)
     {
         HideWindow();
         e.Cancel = true;
     }
     //saves UserPrefs before closing unless UserPrefs are flagged to beg reset
     else if (_reset_prefs != true)
     {
         if (WindowState == WindowState.Normal)
         {
             UserPrefs.Instance.WindowTop  = this.Top;
             UserPrefs.Instance.WindowLeft = this.Left;
             //can use Properties.Settings.Default.Save() command to write/save into executable instead of UserPres
         }
         UserPrefs.SavePrefs();
     }
 }
Exemplo n.º 9
0
 private void menu_StartMinimized_Click(object sender, RoutedEventArgs e)
 {
     menu_StartMinimized.IsChecked     = !menu_StartMinimized.IsChecked;
     UserPrefs.Instance.startMinimized = menu_StartMinimized.IsChecked;
     UserPrefs.SavePrefs();
 }
Exemplo n.º 10
0
 private void menu_AutoStart_Click(object sender, RoutedEventArgs e)
 {
     menu_AutoStart.IsChecked = !menu_AutoStart.IsChecked;
     UserPrefs.AutoStart      = menu_AutoStart.IsChecked;
     UserPrefs.SavePrefs();
 }
Exemplo n.º 11
0
 private void menu_MinimizeOnExit_Click(object sender, RoutedEventArgs e)
 {
     menu_MinimizeOnExit.IsChecked     = !menu_MinimizeOnExit.IsChecked;
     UserPrefs.Instance.minimizeOnExit = menu_MinimizeOnExit.IsChecked;
     UserPrefs.SavePrefs();
 }