예제 #1
0
        public MainWindow()
        {
            InitializeComponent();
            Uri uri = new Uri("pack://application:,,,/B_32x32.ico", UriKind.RelativeOrAbsolute);

            this.Icon = BitmapFrame.Create(uri);
            try
            {
                _settings = ProgramSettings.Load("Settings.xml");
            }
            catch (Exception)
            {
                _settings = new ProgramSettings();
            }
            // Show map and status dialog by default.
            if (_mapDlg == null)
            {
                _mapDlg      = new Map();
                _mapDlg.Top  = 6;
                _mapDlg.Left = 6;
            }
            _mapDlg.Show();
            if (_statusDlg == null)
            {
                _statusDlg      = new Status();
                _statusDlg.Top  = 420;
                _statusDlg.Left = 6;
            }
            _statusDlg.Show();
            if (_equipmentDlg == null)
            {
                _equipmentDlg      = new Equipment();
                _equipmentDlg.Top  = 6;
                _equipmentDlg.Left = 924;
                if (_settings.ShowEquipment)
                {
                    _equipmentDlg.Show();
                }
            }
            if (_settings.ShowHotKeys)
            {
                _hotkeysDlg      = new Hotkeys(this, _settings);
                _hotkeysDlg.Left = 326;
                _hotkeysDlg.Top  = 716;
                _hotkeysDlg.Show();
            }
            if (_settings.ShowGroup)
            {
                _groupDlg      = new Group();
                _groupDlg.Top  = 606;
                _groupDlg.Left = 924;
                _groupDlg.Show();
            }
            this.Top  = 6;
            this.Left = 326;
        }
예제 #2
0
 private void Hotkeys_Click(object sender, RoutedEventArgs e)
 {
     if (_hotkeysDlg == null)
     {
         _hotkeysDlg      = new Hotkeys(this, _settings);
         _hotkeysDlg.Left = 326;
         _hotkeysDlg.Top  = 716;
     }
     _hotkeysDlg.Show();
 }
예제 #3
0
 public MainWindow()
 {
     InitializeComponent();
     Uri uri = new Uri("pack://application:,,,/B_32x32.ico", UriKind.RelativeOrAbsolute);
     this.Icon = BitmapFrame.Create(uri);
     try
     {
         _settings = ProgramSettings.Load("Settings.xml");
     }
     catch (Exception)
     {
         _settings = new ProgramSettings();
     }
     // Show map and status dialog by default.
     if (_mapDlg == null)
     {
         _mapDlg = new Map();
         _mapDlg.Top = 6;
         _mapDlg.Left = 6;
     }
     _mapDlg.Show();
     if (_statusDlg == null)
     {
         _statusDlg = new Status();
         _statusDlg.Top = 420;
         _statusDlg.Left = 6;
     }
     _statusDlg.Show();
     if (_equipmentDlg == null)
     {
         _equipmentDlg = new Equipment();
         _equipmentDlg.Top = 6;
         _equipmentDlg.Left = 924;
         if (_settings.ShowEquipment)
         {
             _equipmentDlg.Show();
         }
     }
     if (_settings.ShowHotKeys)
     {
         _hotkeysDlg = new Hotkeys(this, _settings);
         _hotkeysDlg.Left = 326;
         _hotkeysDlg.Top = 716;
         _hotkeysDlg.Show();
     }
     if (_settings.ShowGroup)
     {
         _groupDlg = new Group();
         _groupDlg.Top = 606;
         _groupDlg.Left = 924;
         _groupDlg.Show();
     }
     this.Top = 6;
     this.Left = 326;
 }