Exemplo n.º 1
0
 private void cancelButton_Click(object sender, RoutedEventArgs e)
 {
     OverlaySettings.loadSettings(false);
     refresh();
     deploy();
     Hide();
 }
Exemplo n.º 2
0
 private void defaultsButton_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show("Are you sure you want to reset to defaults?", "GW2Stuff Overlay", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         OverlaySettings.loadSettings(true);
         refresh();
         deploy();
     }
 }
Exemplo n.º 3
0
        public MainWindow()
        {
            SetBrowserFeatureControl();



            InitializeComponent();
            // Create the interop host control.

            AppIcon = System.Drawing.Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetEntryAssembly().ManifestModule.Name);

            updater = new SharpUpdater(this);
            this.tbSystemMessages.Text = this.tbSystemMessages.Text + " [A" + this.ApplicationAssembly.GetName().Version.ToString() + "]";
            string refrate = (ConfigurationManager.AppSettings["DefaultRefresh"] == null || ConfigurationManager.AppSettings["DefaultRefresh"] == "") ? refreshrate.ToString() : ConfigurationManager.AppSettings["DefaultRefresh"];

            refreshrate = int.Parse(refrate);

            mwApiConn = new MWA.Integration.MWApiIntegrationConnector("MWApi");

            buildApiConn = new WebApiIntegrationConnector();

            ((INotifyPropertyChanged)mwApiConn).PropertyChanged +=
                new PropertyChangedEventHandler(mwApiConn_PropertyChanged);

            lwConn = new ExeIntegrationConnector("Logwarrior.exe");
            //lwConn = new LWConn("MatchCompletedPublishingTestForm.exe");

            //MatchLogger.MatchCompletedPublisher.OnMatchCompleted+= HandleMatch;



            OverlaySettings.loadSettings();
            btnLWConn.BorderBrush      = System.Windows.Media.Brushes.Transparent;
            btnLWConn.BorderThickness  = new Thickness(0, 0, 0, 0);
            btnLWConn.Background       = System.Windows.Media.Brushes.Transparent;
            btnApiConn.BorderBrush     = System.Windows.Media.Brushes.Transparent;
            btnApiConn.BorderThickness = new Thickness(0, 0, 0, 0);
            btnApiConn.Background      = System.Windows.Media.Brushes.Transparent;

            if (Properties.Settings.Default.dailyCompletionList == null)
            {
                Properties.Settings.Default.dailyCompletionList = new System.Collections.Specialized.StringCollection();
            }

            btnBuildConn_Click("", new RoutedEventArgs());


            menuItem_filters_Association.IsChecked = Properties.Settings.Default.filterAssociation;
            menuItem_filters_ShowBuilds.IsChecked  = Properties.Settings.Default.filterShowBuilds;


            if (Properties.Settings.Default.positionWidth > 0)
            {
                Width  = Properties.Settings.Default.positionWidth;
                Height = Properties.Settings.Default.positionHeight;
                Left   = Properties.Settings.Default.positionLeft;
                Top    = Properties.Settings.Default.positionTop;
            }

            getStartupInformation();


            if (tbPilotName.Text == "Pilot Name" ||
                (string.IsNullOrEmpty(Properties.Settings.Default.UserName) ||
                 Properties.Settings.Default.UserName == "Pilot Name"))
            {
                ForcePilotNameEntry();
            }
            else
            {
                InitIntegrationConnectors();
                tcMWApi.SelectedItem = TabHome;
            }
        }