private void ShowVersionWindow()
 {
     if (_windowVersion == null)
     {
         _windowVersion = new VersionWindow();
         CUtilWin.ShowDialogOnCenter(_windowVersion, this);
         _windowVersion = null;
     }
 }
Exemplo n.º 2
0
        public void ShowVersionsDialog()
        {
            VersionWindow window = new VersionWindow();

            window.Owner             = GetActiveWindow();
            window.ViewModel.Modules = new ObservableCollection <ModuleInfo>(
                Enumerable.Repeat(typeof(Dialogs).Assembly, 1).Concat(MainWindowViewModel.GetServicesFromMef().Select(s => s.GetType().Assembly).Distinct()).Select(s => new ModuleInfo()
            {
                Name = s.ManifestModule.ScopeName, Version = FileVersionInfo.GetVersionInfo(s.Location).FileVersion
            }));
            window.ShowDialog();
        }
    public static void Init()
    {
        bundleVersion = PlayerSettings.bundleVersion;
        try{
            bundleVersionCode = PlayerSettings.Android.bundleVersionCode.ToString();
        }catch (Exception e) {
            bundleVersionCode = "";
        }
        int           screenWidth  = Screen.currentResolution.width;
        int           screenHeight = Screen.currentResolution.height;
        VersionWindow window       = (VersionWindow)EditorWindow.GetWindow(typeof(VersionWindow));

        window.position = new Rect((screenWidth - WIDTH) >> 1, (screenHeight - HEIGHT) >> 1, WIDTH, HEIGHT);
        window.ShowPopup();
    }
Exemplo n.º 4
0
        /// <summary>
        /// バージョンを表示します。
        /// </summary>
        /// <remarks>
        /// Parameterにアセンブリ名を指定してください。
        /// nullの場合はEntryAssemblyのバージョンを表示します。
        /// </remarks>
        private static void ExecuteShowVersion(object sender,
                                               ExecutedRoutedEventArgs e)
        {
            try
            {
                var assemblyName = e.Parameter as string;
                var dialog       = new VersionWindow(assemblyName);

                dialog.ShowDialog();
            }
            catch (Exception ex)
            {
                DialogUtil.ShowError(ex,
                                     "ダイアログの表示に失敗しました(ToT)");
            }
        }
 public void OnGUI()
 {
     GUILayout.Label("Bundle Version", EditorStyles.boldLabel);
     bundleVersion = GUILayout.TextField(bundleVersion, EditorStyles.textField);
     GUILayout.Label("Bundle Version Code", EditorStyles.boldLabel);
     bundleVersionCode = GUILayout.TextField(bundleVersionCode, EditorStyles.textField);
     if (GUILayout.Button("OK", EditorStyles.miniButtonMid))
     {
         byte success = 0;
         if (string.IsNullOrEmpty(bundleVersion))
         {
             EditorUtility.DisplayDialog("Error", "Bundle Version is Null!", "OK");
         }
         else
         {
             PlayerSettings.bundleVersion = bundleVersion;
             success++;
         }
         if (string.IsNullOrEmpty(bundleVersionCode))
         {
             EditorUtility.DisplayDialog("Error", "Bundle Version Code is Null!", "OK");
         }
         else
         {
             try{
                 PlayerSettings.Android.bundleVersionCode = int.Parse(bundleVersionCode);
                 success++;
             }catch (Exception e) {
                 EditorUtility.DisplayDialog("Error", "Bundle Version Code is Error!", "OK");
             }
         }
         if (success >= 2)
         {
             VersionWindow window = (VersionWindow)EditorWindow.GetWindow(typeof(VersionWindow));
             window.Close();
         }
     }
 }
Exemplo n.º 6
0
        public void OnLoad()
        {
            var xml = XDocument.Load(Config.Instance.DataDir + @"\plugins.xml");

            // Query the data and write out a subset of contacts

            /*var query = from c in xml.Root.Descendants("ArrayOfPluginSettings")
             *          where c.Element("FileName").Value.ToString() == "Plugins/MetaStats/MetaStats.dll"
             *          select c.Element("IsEnabled");*/

            var allPlugins = xml.Root.Descendants("PluginSettings").Where(x => x.Element("IsEnabled").Value == "true");

            //MetaLog.Info("Testing XML: " + allPlugins);

            foreach (var enabledPluging in allPlugins)
            {
                if (enabledPluging.Element("Name").Value.Trim() == "Meta Stats")
                {
                    VersionWindow _ver = new VersionWindow();
                    _ver.Show();
                    //throw new Exception("MetaStats Plugin already Enabled. Please Disable that first.");
                }
            }

            try
            {
                _MainWindow = new OpDeckWindow();

                _MetaDetectorMenuItem = new PluginMenu(_MainWindow);

                _MetaDetector = new MetaDetector(_MainWindow);

                _MainWindow.updateVersion(Version);

                GameEvents.OnGameStart.Add(_MetaDetector.GameStart);
                GameEvents.OnGameEnd.Add(_MetaDetector.GameEnd);

                GameEvents.OnTurnStart.Add(_MetaDetector.TurnStart);

                GameEvents.OnOpponentPlay.Add(_MetaDetector.OpponentPlay);
                GameEvents.OnOpponentDraw.Add(_MetaDetector.OpponentDraw);

                GameEvents.OnOpponentCreateInPlay.Add(_MetaDetector.OpponentCreateInPlay);
                GameEvents.OnOpponentCreateInDeck.Add(_MetaDetector.OpponentCreateInDeck);
                GameEvents.OnOpponentHeroPower.Add(_MetaDetector.OpponentHeroPower);
                GameEvents.OnOpponentSecretTriggered.Add(_MetaDetector.OpponentSecretTriggered);
                GameEvents.OnOpponentPlayToGraveyard.Add(_MetaDetector.OpponentPlayToGraveyard);
                GameEvents.OnOpponentMulligan.Add(_MetaDetector.OpponentMulligan);

                GameEvents.OnPlayerDraw.Add(_MetaDetector.PlayerDraw);
                GameEvents.OnPlayerPlay.Add(_MetaDetector.PlayerPlay);
                GameEvents.OnPlayerCreateInPlay.Add(_MetaDetector.PlayerCreateInPlay);
                GameEvents.OnPlayerCreateInDeck.Add(_MetaDetector.PlayerCreateInDeck);
                GameEvents.OnPlayerHeroPower.Add(_MetaDetector.PlayerHeroPower);
                GameEvents.OnPlayerMulligan.Add(_MetaDetector.PlayerMulligan);

                CheckForUpdate();

                //_MainWindow.Show();
                //_MainWindow.Visibility = System.Windows.Visibility.Hidden;
                MetaLog.Info("Plugin Load Successful");
            }
            catch (Exception ex)
            {
                MetaLog.Error(ex);
                MetaLog.Info("Plugin Load Unsuccessful");
            }
        }
Exemplo n.º 7
0
        public static void ShowVersionInfo()
        {
            var VersionInformation = new VersionWindow();

            VersionInformation.Show();
        }
Exemplo n.º 8
0
        /// <summary>
        /// バージョンを表示します。
        /// </summary>
        /// <remarks>
        /// Parameterにアセンブリ名を指定してください。
        /// nullの場合はEntryAssemblyのバージョンを表示します。
        /// </remarks>
        private static void ExecuteShowVersion(object sender,
                                               ExecutedRoutedEventArgs e)
        {
            try
            {
                var assemblyName = e.Parameter as string;
                var dialog = new VersionWindow(assemblyName);

                dialog.ShowDialog();
            }
            catch (Exception ex)
            {
                DialogUtil.ShowError(ex,
                    "ダイアログの表示に失敗しました(ToT)");
            }
        }