private void RunSolidWorks()
        {
            if (Mode==LaunchMode.ProjectSetting)
            {
                RegistryEntryList regList = new RegistryEntryList();
                if (editedSetting.RegSettings != null && File.Exists(AppDomain.CurrentDomain.BaseDirectory + editedSetting.RegSettings) && regList.DeserializeRegEntries(AppDomain.CurrentDomain.BaseDirectory + editedSetting.RegSettings))
                {
                    RegistryTool.GetInstance().WriteSWRegistrySettings(SelectedVersion, regList.RegEntries);
                }

                RegistryTool.GetInstance().OverrideSWSettings(SelectedVersion, EditedSetting);
            }

            solidWorks = new SolidWorks(SelectedVersion);
            solidWorks.ProcessStarted += ProcessLaunchStarted;
            solidWorks.InstanceStarted += InstanceObtained;
            solidWorks.ProcessEnded += ProcessExited;

            solidWorks.StartRunningProcess();
        }
        private void RunSolidWorks()
        {
            RegistryEntryList regList = new RegistryEntryList();

            if (SelectedSetting.RegSettings != null &&
                File.Exists(AppDomain.CurrentDomain.BaseDirectory + SelectedSetting.RegSettings) &&
                regList.DeserializeRegEntries(AppDomain.CurrentDomain.BaseDirectory + SelectedSetting.RegSettings))
            {
                ProgressMessage = "Wczytuję ustawienia";
                RegistryTool.GetInstance().WriteSWRegistrySettings(SelectedVersion, regList.RegEntries);
                ProgressMessage = "Wczytano ustawienia";
                LaunchProgress = 20;
            }

            RegistryTool.GetInstance().OverrideSWSettings(SelectedVersion, SelectedSetting);
            ProgressMessage = "Nadpisano ustawienia szablonów";
            LaunchProgress = 30;

            User userSettings = SWDataManager.Instance.GetUsers().Find(i => i.Name == Environment.UserName);

            if (userSettings!=null &&
                !String.IsNullOrEmpty(userSettings.SettingPath) &&
                File.Exists(AppDomain.CurrentDomain.BaseDirectory + userSettings.SettingPath) &&
                regList.DeserializeRegEntries(AppDomain.CurrentDomain.BaseDirectory + userSettings.SettingPath))
            {
                RegistryTool.GetInstance().WriteSWRegistrySettings(SelectedVersion, regList.RegEntries);
                ProgressMessage = "Wczytano ustawienia użytkownika";
                LaunchProgress = 40;
            }

            solidWorks = new SolidWorks(SelectedVersion);
            solidWorks.ProcessStarted += ProcessLaunchStarted;
            solidWorks.InstanceStarted += InstanceObtained;
            solidWorks.ProcessEnded += ProcessExited;
            solidWorks.SWIdle += SWReadyIdle;

            solidWorks.StartRunningProcess();
        }