コード例 #1
0
        void AppStartingUp(object sender, StartupEventArgs e)
        {
            //Retrieve the theme we want to use for this application from settings
            Dictionary <string, ResourceDictionary> themes = new Dictionary <string, ResourceDictionary>();

            themes.Add("Vista", new Resources_Vista());

            string currentTheme = SettingsSystem.Storage.Theme;

            if (!themes.ContainsKey(currentTheme))
            {
                currentTheme = "Vista";
            }

            Application.Current.Resources = themes[currentTheme];
            Window startWindow = new PickerWindow();

            //Set the default BinPath for MS Build to the Framework path
            if (SettingsSystem.Storage.BinPath.Length == 0)
            {
                SettingsSystem.Storage.BinPath = SettingsSystem.FindFrameworkPath();
            }

            startWindow.Show();
        }
コード例 #2
0
 private void WindowClosing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (Application.Current.Windows.Count == 1)
     {
         PickerWindow pickerDialog = new PickerWindow();
         pickerDialog.Show();
     }
 }
コード例 #3
0
        private void WindowClosing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            bool rtn = CheckProject();

            if (rtn)
            {
                PickerWindow pickerDialog = new PickerWindow();
                pickerDialog.Show();
            }
            else
            {
                e.Cancel = true;
            }
        }