/// <summary> /// Clear the sequence alignment /// </summary> public virtual void Clear() { Consensus = null; Score = 0; Offsets.Clear(); Sequences.Clear(); }
/// <summary> /// Modified. /// Clears the SequenceAlignment /// Throws exception if SequenceAlignment is read only. /// </summary> public new void Clear() { Sequences.Clear(); Consensus = null; _score = 0; ProfilesMatrix.Clear(); }
void LoadSequences() { Sequences.Clear(); var soundSequences = SoundServiceSingleton.Instance.GetAllSoundSequences(); soundSequences.ForEach(x => Sequences.Add(x)); }
private async void OnUpdateSequenceYamlItem() { if (SelectedSequenceFile == null) { Log("Sequence File Doesn't exist", Category.Warn); return; } Log("Updating sequences."); try { //Clear sequences and convert the attract configs values to sequence item view models await Dispatcher.CurrentDispatcher.InvokeAsync(() => { Sequences?.Clear(); _skeletonGameAttract.GetAvailableSequences(SelectedSequenceFile.SequenceYaml); foreach (var sequence in SelectedSequenceFile.SequenceYaml.Sequences) { Sequences.Add(new SequenceItemViewModel(sequence)); } }); } catch (Exception ex) { Log(ex.Message, Category.Exception); throw; } }
public void Clear() { IsEnabled = false; Name = string.Empty; Color = string.Empty; Sequences.Clear(); }
/// <summary> /// Clears the sequences. /// </summary> public void ClearSequences() { Sequences.Clear(); if (OnSequencesUpdated != null) { OnSequencesUpdated.Invoke(this, new SequencesUpdatedArgs(UpdateOperation.Clear)); } }
public void UnloadSequences() { if (Sequences == null) { return; } Sequences.Clear(); }
public override void Clear() { Tables.Clear(); Views.Clear(); MaterializedViews.Clear(); Indexes.Clear(); Sequences.Clear(); Synonyms.Clear(); Triggers.Clear(); StoredProcedures.Clear(); }
internal void Clear() { foreach (var sequence in Sequences) { sequence.Clear(); } Sequences.Clear(); LoadedCatalogItem?.DisposeImages(); Initialize(); }
public void Clear() { Sequences.Clear(); }
public void Load(ConfigNode node) { try { LoadSounds(); if (node == null) { throw new NullReferenceException("Node not exist"); } if (node.HasValue("soundEnabled")) { IsSoundEnabled = bool.Parse(node.GetValue("soundEnabled")); } if (node.HasValue("engineControl")) { EngineControl = bool.Parse(node.GetValue("engineControl")); } if (node.HasValue("abort")) { AbortExecuted = bool.Parse(node.GetValue("abort")); } if (node.HasValue("scale")) { Scale = float.Parse(node.GetValue("scale")); } if (node.HasValue("soundSet")) { SoundSet = node.GetValue("soundSet"); } if (node.HasValue("position")) { WindowPosition = _wrapper.ToRect(node.GetValue("position")); Debug.LogWarning("Position is" + WindowPosition); } if (node.HasNode("sequence")) { var sequences = node.GetNodes("sequence"); Sequences.Clear(); foreach (var sequence in sequences) { Sequences.Add(new Guid(sequence.GetValue("id")), sequence.GetValue("stages").Split(',').Select(int.Parse).ToArray()); } } else { if (FlightGlobals.ActiveVessel != null && !ConfigInfo.Instance.Sequences.ContainsKey(FlightGlobals.ActiveVessel.id)) { Sequences.Add(FlightGlobals.ActiveVessel.id, Enumerable.Repeat(-1, 10).ToArray()); } } IsLoaded = true; } catch (Exception ex) { Debug.LogError("Cannot load config"); Debug.LogException(ex); IsLoaded = false; } }
public void Load() { try { var node = ConfigNode.Load(_configPath); if (node == null) { throw new NullReferenceException("Node not exist"); } if (node.HasValue("isDebug")) { IsDebug = bool.Parse(node.GetValue("isDebug")); } if (node.HasValue("soundEnabled")) { IsSoundEnabled = bool.Parse(node.GetValue("soundEnabled")); } if (node.HasValue("engineControl")) { EngineControl = bool.Parse(node.GetValue("engineControl")); } if (node.HasValue("abort")) { AbortExecuted = bool.Parse(node.GetValue("abort")); } if (node.HasValue("scale")) { Scale = float.Parse(node.GetValue("scale")); } if (node.HasValue("soundSet")) { SoundSet = node.GetValue("soundSet"); } if (node.HasValue("position")) { WindowPosition = _wrapper.ToRect(node.GetValue("position")); Debug.LogWarning("Position is" + WindowPosition); } if (node.HasNode("sequence")) { var sequences = node.GetNodes("sequence"); Sequences.Clear(); foreach (var sequence in sequences) { Sequences.Add(new Guid(sequence.GetValue("id")), sequence.GetValue("stages").Split(',')); } } IsLoaded = true; } catch (Exception ex) { Debug.LogError("Cannot load config"); Debug.LogException(ex); IsLoaded = false; } }
public ConfigNode Load() { LoadSounds(); Log.Info("ConfigInfo.Load"); ConfigNode settingsFile = ConfigNode.Load(PLUGINDATA); ConfigNode node = null; if (settingsFile != null) { node = settingsFile.GetNode(SETTINGSNAME); if (node != null) { if (node.HasValue("soundEnabled")) { IsSoundEnabled = bool.Parse(node.GetValue("soundEnabled")); } if (node.HasValue("abort")) { AbortExecuted = bool.Parse(node.GetValue("abort")); } if (node.HasValue("scale")) { Scale = float.Parse(node.GetValue("scale")); } if (node.HasValue("soundSet")) { SoundSet = node.GetValue("soundSet"); } if (node.HasValue("position")) { WindowPosition = _wrapper.ToRect(node.GetValue("position")); Debug.LogWarning("Position is" + WindowPosition); } if (node.HasNode("sequence")) { var sequences = node.GetNodes("sequence"); Sequences.Clear(); VesselOptions.Clear(); foreach (var sequence in sequences) { PerVesselOptions pvo = new PerVesselOptions(); if (sequence.HasValue("LaunchSequenceControl")) { pvo.LaunchSequenceControl = bool.Parse(sequence.GetValue("LaunchSequenceControl")); } if (sequence.HasValue("enableSAS")) { pvo.enableSAS = bool.Parse(sequence.GetValue("enableSAS")); } if (sequence.HasValue("defaultInitialThrottle")) { pvo.defaultInitialThrottle = float.Parse(sequence.GetValue("defaultInitialThrottle")); } if (sequence.HasValue("defaultThrottle")) { pvo.defaultThrottle = float.Parse(sequence.GetValue("defaultThrottle")); } if (sequence.HasValue("useGravityTurn")) { pvo.useGravityTurn = bool.Parse(sequence.GetValue("useGravityTurn")); } VesselOptions.Add(sequence.GetValue("id"), pvo); int[] ar = Enumerable.Repeat(-1, 10).ToArray(); var d = sequence.GetValue("stages").Split(',').Select(int.Parse).ToArray(); for (int i = 0; i < d.Length; i++) { //Log.Info("Load, i: " + i + ", " + d[i]); ar[i] = d[i]; } Sequences.Add(sequence.GetValue("id"), ar); } } else { Sequences.Clear(); VesselOptions.Clear(); if (FlightGlobals.ActiveVessel != null && !ConfigInfo.Instance.Sequences.ContainsKey(ModuleNASACountdown.CraftName(FlightGlobals.ActiveVessel))) { Sequences.Add(ModuleNASACountdown.CraftName(FlightGlobals.ActiveVessel), Enumerable.Repeat(-1, 10).ToArray()); VesselOptions.Add(ModuleNASACountdown.CraftName(FlightGlobals.ActiveVessel), new PerVesselOptions()); } } IsLoaded = true; } } else { Sequences.Clear(); VesselOptions.Clear(); } return(node); }