Exemplo n.º 1
0
        private static void CueckUpdates(string serverData)
        {
            Dictionary <string, PluginDesc> serverDescriptors = ParseDescriptions(serverData);
            List <PluginDesc> localDescriptors = GetLocalDescriptors();

            List <PluginDesc> remoteForLocals = new List <PluginDesc>();

            pluginsToUpdate = new List <PluginDesc>();

            foreach (var localDesc in localDescriptors)
            {
                PluginDesc remoteDesc;

                if (serverDescriptors.TryGetValue(localDesc.Id, out remoteDesc))
                {
                    remoteForLocals.Add(remoteDesc);

                    if (remoteDesc.Version > localDesc.Version)
                    {
                        // localDesc plugin needs update
                        pluginsToUpdate.Add(remoteDesc);
                    }
                }
            }

            CheckRate(remoteForLocals);

            UpdatesWindow.ShowWindow();
        }
Exemplo n.º 2
0
        public static void ShowWindow()
        {
            RegisterEvent("windowOpened");
            UpdatesWindow window = (UpdatesWindow)EditorWindow.GetWindow(typeof(UpdatesWindow), true, WindowTitle, true);

            window.minSize = new Vector2(WindowWidth, WindowHeight);
            window.maxSize = new Vector2(WindowWidth, WindowHeight);
            window.Show();
        }