コード例 #1
0
 public UpdaterPage()
 {
     InitializeComponent();
     if (ThisApp.IsUwpApp())
     {
         appUpdater1.Visible = false;
     }
 }
コード例 #2
0
        public General()
        {
            InitializeComponent();

            NetworkIntefaceModule netModule = new NetworkIntefaceModule();
            var adapters = netModule.GetNetworkInterface();

            foreach (String adapter in adapters)
            {
                ListAdapter.Items.Add(adapter);
            }

            //Set to default value
            cmbFormat.SelectedItem = "Auto";
            radioEnglish.Checked   = true;
            if (ListAdapter.Items != null)
            {
                ListAdapter.SelectedIndex = 0;
            }

            if (ThisApp.IsUwpApp())
            {
                ToggleAutoUpdate.Checked = false;
                ToggleAutoUpdate.Enabled = false;
                label6.Text += " (Disabled)";
            }

            #region LoadConfiguration

            //Get app configuration
            var configuration = registryManager.GetGeneralConfiguration();

            //set configuration
            ToggleMonitor.Checked    = (configuration.Monitoring) ? true : false;
            ToggleAutoUpdate.Checked = (configuration.AutoUpdate) ? true : false;

            if (configuration.Format != null)
            {
                cmbFormat.SelectedItem = configuration.Format;
            }

            if (configuration.Language == Language.English)
            {
                radioEnglish.Checked = true;
            }
            else
            {
                radioIndonesia.Checked = true;
            }

            if (configuration.MonitoredAdapter != null && ListAdapter.Items.Contains(configuration.MonitoredAdapter))
            {
                ListAdapter.SelectedItem = configuration.MonitoredAdapter;
            }

            #endregion LoadConfiguration
        }
コード例 #3
0
        public Main()
        {
            InitializeComponent();
            CleaningOnStartup();

            main  = this;
            State = this.WindowState;
            if (ThisApp.IsUwpApp())
            {
                Text += " (UWP)";
            }
        }
コード例 #4
0
        public Main()
        {
            InitializeComponent();
            registryManager = new RegistryManager();
            integration     = new Integration();

            CleaningOnStartup();

            main  = this;
            State = this.WindowState;
            if (ThisApp.IsUwpApp())
            {
                Text += " (UWP)";
            }
        }