コード例 #1
0
ファイル: Entrance.cs プロジェクト: FreakLign/Carron
        /// <summary>
        /// Read loading assembly(Style & Form)
        /// </summary>
        private static void ReadLoadingAssembly()
        {
            Assembly fluentWPFAssembly = LoadingFunctions.CheckAssemblyFile(Environment.CurrentDirectory + @"\FluentWPF.dll");

            if (fluentWPFAssembly != null && !RunningParamaters.RunningAssemblies.Contains(fluentWPFAssembly))
            {
                Logger.WriteLog(new NoticeResult("Loading Styles..."));
                RunningParamaters.RunningAssemblies.Add(fluentWPFAssembly);
            }
            Assembly loadingAssembly = LoadingFunctions.CheckAssemblyFile(Environment.CurrentDirectory + @"\LoadingFormDll.dll");

            if (loadingAssembly != null && !RunningParamaters.RunningAssemblies.Contains(loadingAssembly))
            {
                Logger.WriteLog(new NoticeResult("Initializing GUI..."));
                RunningParamaters.RunningAssemblies.Add(loadingAssembly);
            }
        }
コード例 #2
0
ファイル: Entrance.cs プロジェクト: FreakLign/Carron
        /// <summary>
        /// Load *.dll assemblies into program.
        /// </summary>
        private static void ReadDllAsAssembly()
        {
            ThreadPool.QueueUserWorkItem((e) =>
            {
                Thread.Sleep(3000);
                foreach (string fileName in Directory.GetFiles(Environment.CurrentDirectory))
                {
                    if (Path.GetExtension(fileName).ToLower() == ".dll")
                    {
                        Assembly assembly = LoadingFunctions.CheckAssemblyFile(fileName);
                        if (assembly != null && !RunningParamaters.RunningAssemblies.Contains(assembly))
                        {
                            UpdateLoadingText($"Loading {assembly.GetName().Name}...");
                            RunningParamaters.RunningAssemblies.Add(assembly);
                        }
                    }
                }
                _app.Dispatcher.Invoke(() =>
                {
                    Window tempWindow = _app.MainWindow;
                    Assembly MaterialDesignColorAssembly = LoadingFunctions.CheckAssemblyFile(Environment.CurrentDirectory + @"\MaterialDesignColors.dll");
                    if (MaterialDesignColorAssembly != null && !RunningParamaters.RunningAssemblies.Contains(MaterialDesignColorAssembly))
                    {
                        Logger.WriteLog(new NoticeResult("Loading Styles..."));
                        RunningParamaters.RunningAssemblies.Add(MaterialDesignColorAssembly);
                    }
                    Assembly MaterialDesignThemeAssembly = LoadingFunctions.CheckAssemblyFile(Environment.CurrentDirectory + @"\MaterialDesignThemes.Wpf.dll");
                    if (MaterialDesignThemeAssembly != null && !RunningParamaters.RunningAssemblies.Contains(MaterialDesignThemeAssembly))
                    {
                        Logger.WriteLog(new NoticeResult("Loading Styles..."));
                        RunningParamaters.RunningAssemblies.Add(MaterialDesignThemeAssembly);
                    }

                    _app.MainWindow = RunningParamaters.GetParamaters <Window>("EditorForm");
                    _app.MainWindow.Show();
                    tempWindow.Close();
                });
            });
        }
コード例 #3
0
 public void LoadLevel(string inLevelName, Stream inFileStream)
 {
     NextSceneToLoad   = inLevelName;
     NextSceneSaveData = inFileStream;
     LoadingFunctions.LoadScene(LoadingConstants.LoadingScreenSceneName);
 }