private void Minimize(object sender, RoutedEventArgs e) { if (sender as TextBlock != null) { TextBlock tb = sender as TextBlock; if (tb.Text.Equals("[-] Hide Replies")) { tb.Text = "[+] Show Replies"; } else { tb.Text = "[-] Hide Replies"; } } StackPanel sp = (StackPanel)((FrameworkElement)sender).Parent; ListView lv = (ListView)((StackPanel)sp.Parent).Children.Last(); Visibility v = lv.Visibility; if (v.Equals(Visibility.Visible)) { lv.Visibility = Visibility.Collapsed; } else { lv.Visibility = Visibility.Visible; } }
public void RemoveEmptyHeaders(Visibility visibility, int celIndx, IXLWorksheet worksheet) { if (!visibility.Equals(Visibility.Visible)) { worksheet.Columns(celIndx, celIndx).Delete(); } }
void UpdateChildVisibilities(Visibility v) { foreach (var item in InstantiatedItems) { item.SetActive(v.Equals(Visibility.Collapsed) ? false : true); } }
public void ShortestPathCanCreateVisibilityGraphTest() { // Create visibility graph used to calculate the shortest path visibilityGraph = PathFinding.CreateVisibilityGraph(new List <Polygon> { boundary }, new List <Polygon> { internalPolygon }); // Check if the visibility graph is created properly Assert.IsTrue(!visibilityGraph.Equals(null)); }
public int SetXlsHeader(Visibility visibility, string header, int celIndx, IXLWorksheet worksheet) { var indx = celIndx; if (visibility.Equals(Visibility.Visible)) { worksheet.Row(1).Cell(celIndx).Value = header; } indx++; return(indx); }
public void ChangeVisibility() { if (Visibility.Equals("Visible")) { Visibility = "Hidden"; } else { SelectedItem = new InspectionViewModel(); Visibility = "Visible"; } }
//关于 private void About(object sender, EventArgs e) { double t = Top + Height / 2.00; double l = Left + Width / 2.00; if (Visibility.Equals(Visibility.Hidden)) { t = 0; l = 0; } winAbout.showWinAbout(t, l); }
public object ConvertBack(object value, Type targetType, object parameter, string language) { Visibility visibility = (Visibility)value; bool result = true; if (visibility.Equals(Visibility.Collapsed)) { result = false; } return(result); }
public void Generate(FormattedStringBuilder stringBuilder, string className, Visibility visibility, IMemberGenerationTemplate propertyGenerationTemplate, IList <MemberDetails> memberDetails) { string modifier = visibility.Equals(Visibility.Private) ? "private" : "public"; stringBuilder.AppendLine($"{modifier} class {className}"); stringBuilder.AppendLine("{"); stringBuilder.LevelDown(); GenerateMembers(stringBuilder, propertyGenerationTemplate, memberDetails); stringBuilder.LevelUp(); stringBuilder.AppendLine("}"); }
internal override void OnVisibilityChanged() { if (this.chart != null && this.chart.AnnotationManager != null) { this.IsVisbilityChanged = true; if (Visibility.Equals(Visibility.Collapsed)) { this.chart.AnnotationManager.AddOrRemoveAnnotations(this, true); } else { this.chart.AnnotationManager.AddOrRemoveAnnotations(this, false); } } }
protected override object ConvertBack(object value, Type targetType, object parameter) { if (value == null) { return(null); } if (parameter != null) { throw new ArgumentException($"This converter does not use any parameters. You should remove \"{parameter}\" passed as parameter."); } bool inverse = this.VisibilityIfTrue == VisibilityIfTrue.Collapsed; Visibility visibilityOnTrue = (!inverse) ? Visibility.Visible : Visibility.Collapsed; var visibility = (Visibility)value; return(visibilityOnTrue.Equals(visibility)); }
protected override void ExecuteCore() { bool internalMembers; if (Visibility.Equals("Public", StringComparison.OrdinalIgnoreCase)) { internalMembers = false; } else if (Visibility.Equals("Internal", StringComparison.OrdinalIgnoreCase)) { internalMembers = true; } else { throw new BuildErrorException("Visibility must be either Public or Internal"); } try { if (Language.Equals("C#", StringComparison.OrdinalIgnoreCase)) { WriteCSharpCodeBehind(RestextFile, CodeBehindFile.GetMetadata("FullPath"), internalMembers); } else if (Language.Equals("VB", StringComparison.OrdinalIgnoreCase)) { WriteVisualBasicCodeBehind(RestextFile, CodeBehindFile.GetMetadata("FullPath"), internalMembers); } else { throw new BuildErrorException($"Unrecognized language '{Language}'"); } } catch (InvalidDataException e) { throw new BuildErrorException($"Error parsing file '{RestextFile.ItemSpec}': {e.Message}", e); } Compile = CodeBehindFile; }
/// <summary> /// Affichage d'un niveau /// </summary> /// <param name="visible">l'état de visibilité des caractères (et l'inverse pour les rectangle)</param> /// <param name="niveau">le niveau à afficher</param> private void AfficherNiveau(Visibility visible, int niveau) { var visibleReverse = (visible.Equals(Visibility.Visible)) ? Visibility.Collapsed : Visibility.Visible; ReinitVisible(); switch (niveau) { case 1: Text00.Visibility = visible; Text02.Visibility = visible; Text20.Visibility = visible; Text22.Visibility = visible; Rect00.Visibility = visibleReverse; Rect02.Visibility = visibleReverse; Rect20.Visibility = visibleReverse; Rect22.Visibility = visibleReverse; break; case 2: Text00.Visibility = visible; Text02.Visibility = visible; Text20.Visibility = visible; Text22.Visibility = visible; Text11.Visibility = visible; Rect00.Visibility = visibleReverse; Rect02.Visibility = visibleReverse; Rect20.Visibility = visibleReverse; Rect22.Visibility = visibleReverse; Rect11.Visibility = visibleReverse; break; case 3: Text20.Visibility = visible; Text21.Visibility = visible; Text11.Visibility = visible; Text22.Visibility = visible; Text12.Visibility = visible; Text02.Visibility = visible; Rect20.Visibility = visibleReverse; Rect21.Visibility = visibleReverse; Rect11.Visibility = visibleReverse; Rect22.Visibility = visibleReverse; Rect12.Visibility = visibleReverse; Rect02.Visibility = visibleReverse; break; case 4: Text20.Visibility = visible; Text21.Visibility = visible; Text11.Visibility = visible; Text01.Visibility = visible; Text12.Visibility = visible; Text02.Visibility = visible; Text10.Visibility = visible; Rect20.Visibility = visibleReverse; Rect21.Visibility = visibleReverse; Rect11.Visibility = visibleReverse; Rect01.Visibility = visibleReverse; Rect12.Visibility = visibleReverse; Rect02.Visibility = visibleReverse; Rect10.Visibility = visibleReverse; break; case 5: Text00.Visibility = visible; Text10.Visibility = visible; Text20.Visibility = visible; Text30.Visibility = visible; Text01.Visibility = visible; Text11.Visibility = visible; Text21.Visibility = visible; Text31.Visibility = visible; Rect00.Visibility = visibleReverse; Rect10.Visibility = visibleReverse; Rect20.Visibility = visibleReverse; Rect30.Visibility = visibleReverse; Rect01.Visibility = visibleReverse; Rect11.Visibility = visibleReverse; Rect21.Visibility = visibleReverse; Rect31.Visibility = visibleReverse; break; case 6: Text00.Visibility = visible; Text10.Visibility = visible; Text20.Visibility = visible; Text01.Visibility = visible; Text11.Visibility = visible; Text21.Visibility = visible; Text02.Visibility = visible; Text12.Visibility = visible; Text22.Visibility = visible; Rect00.Visibility = visibleReverse; Rect10.Visibility = visibleReverse; Rect20.Visibility = visibleReverse; Rect01.Visibility = visibleReverse; Rect11.Visibility = visibleReverse; Rect21.Visibility = visibleReverse; Rect02.Visibility = visibleReverse; Rect12.Visibility = visibleReverse; Rect22.Visibility = visibleReverse; break; } }
public bool Equals(DestinySocketTypeDefinition input) { if (input == null) { return(false); } return (( DisplayProperties == input.DisplayProperties || (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties)) ) && ( InsertAction == input.InsertAction || (InsertAction != null && InsertAction.Equals(input.InsertAction)) ) && ( PlugWhitelist == input.PlugWhitelist || (PlugWhitelist != null && PlugWhitelist.SequenceEqual(input.PlugWhitelist)) ) && ( SocketCategoryHash == input.SocketCategoryHash || (SocketCategoryHash.Equals(input.SocketCategoryHash)) ) && ( Visibility == input.Visibility || (Visibility != null && Visibility.Equals(input.Visibility)) ) && ( AlwaysRandomizeSockets == input.AlwaysRandomizeSockets || (AlwaysRandomizeSockets != null && AlwaysRandomizeSockets.Equals(input.AlwaysRandomizeSockets)) ) && ( IsPreviewEnabled == input.IsPreviewEnabled || (IsPreviewEnabled != null && IsPreviewEnabled.Equals(input.IsPreviewEnabled)) ) && ( HideDuplicateReusablePlugs == input.HideDuplicateReusablePlugs || (HideDuplicateReusablePlugs != null && HideDuplicateReusablePlugs.Equals(input.HideDuplicateReusablePlugs)) ) && ( OverridesUiAppearance == input.OverridesUiAppearance || (OverridesUiAppearance != null && OverridesUiAppearance.Equals(input.OverridesUiAppearance)) ) && ( AvoidDuplicatesOnInitialization == input.AvoidDuplicatesOnInitialization || (AvoidDuplicatesOnInitialization != null && AvoidDuplicatesOnInitialization.Equals(input.AvoidDuplicatesOnInitialization)) ) && ( CurrencyScalars == input.CurrencyScalars || (CurrencyScalars != null && CurrencyScalars.SequenceEqual(input.CurrencyScalars)) ) && ( Hash == input.Hash || (Hash.Equals(input.Hash)) ) && ( Index == input.Index || (Index.Equals(input.Index)) ) && ( Redacted == input.Redacted || (Redacted != null && Redacted.Equals(input.Redacted)) )); }
/// <summary> /// Returns true if WidgetDTO instances are equal /// </summary> /// <param name="input">Instance of WidgetDTO to be compared</param> /// <returns>Boolean</returns> public bool Equals(WidgetDTO input) { if (input == null) { return(false); } return (( WidgetId == input.WidgetId || (WidgetId != null && WidgetId.Equals(input.WidgetId)) ) && ( Type == input.Type || (Type != null && Type.Equals(input.Type)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( Visibility == input.Visibility || (Visibility != null && Visibility.Equals(input.Visibility)) ) && ( Label == input.Label || (Label != null && Label.Equals(input.Label)) ) && ( Icon == input.Icon || (Icon != null && Icon.Equals(input.Icon)) ) && ( Labelcolor == input.Labelcolor || (Labelcolor != null && Labelcolor.Equals(input.Labelcolor)) ) && ( Valuecolor == input.Valuecolor || (Valuecolor != null && Valuecolor.Equals(input.Valuecolor)) ) && ( Mappings == input.Mappings || Mappings != null && Mappings.SequenceEqual(input.Mappings) ) && ( SwitchSupport == input.SwitchSupport || (SwitchSupport != null && SwitchSupport.Equals(input.SwitchSupport)) ) && ( SendFrequency == input.SendFrequency || (SendFrequency != null && SendFrequency.Equals(input.SendFrequency)) ) && ( Separator == input.Separator || (Separator != null && Separator.Equals(input.Separator)) ) && ( Refresh == input.Refresh || (Refresh != null && Refresh.Equals(input.Refresh)) ) && ( Height == input.Height || (Height != null && Height.Equals(input.Height)) ) && ( MinValue == input.MinValue || (MinValue != null && MinValue.Equals(input.MinValue)) ) && ( MaxValue == input.MaxValue || (MaxValue != null && MaxValue.Equals(input.MaxValue)) ) && ( Step == input.Step || (Step != null && Step.Equals(input.Step)) ) && ( Url == input.Url || (Url != null && Url.Equals(input.Url)) ) && ( Encoding == input.Encoding || (Encoding != null && Encoding.Equals(input.Encoding)) ) && ( Service == input.Service || (Service != null && Service.Equals(input.Service)) ) && ( Period == input.Period || (Period != null && Period.Equals(input.Period)) ) && ( Legend == input.Legend || (Legend != null && Legend.Equals(input.Legend)) ) && ( State == input.State || (State != null && State.Equals(input.State)) ) && ( Item == input.Item || (Item != null && Item.Equals(input.Item)) ) && ( LinkedPage == input.LinkedPage || (LinkedPage != null && LinkedPage.Equals(input.LinkedPage)) ) && ( Widgets == input.Widgets || Widgets != null && Widgets.SequenceEqual(input.Widgets) )); }