public static void LoadLayout(LayoutData layout, bool isNewLayoutAlreadyActive) { Log.InfoFormat("LoadLayout: layout={0}, isNewLayoutAlreadyActive={1}", layout == null ? "NULL" : layout.Name, isNewLayoutAlreadyActive); LayoutChangedEventArgs args = new LayoutChangedEventArgs { New = layout, Old = CurrentLayout, IsNewLayoutAlreadyActive = isNewLayoutAlreadyActive }; try { IsLayoutChanging = true; if (LayoutChanging != null) { LayoutChanging(typeof(SuperPuTTY), args); } } finally { IsLayoutChanging = false; } if (LayoutChanged != null) { CurrentLayout = layout; LayoutChanged(typeof(SuperPuTTY), args); } }
private void ConfigurationPanel_OnLayoutChanged(object sender, LayoutChangedEventArgs e) { if (e.IsInitialization) { InvalidateScrollInfo(); } IsLayoutDirty = true; }
private void ConfigurationPanel_OnLayoutChanged(object sender, LayoutChangedEventArgs e) { if (e.IsInitialization) { ScrollView.InvalidateScrollInfo(); ScrollView.ScrollToTop(); } _needResizeWindow = true; }
private void Layout_LayoutChanged(object sender, LayoutChangedEventArgs e) { HasChanged = true; if (!IsUndoing) { if (CurrentActionIndex < ModificationList.Count - 1) { ModificationList.RemoveRange(CurrentActionIndex + 1, ModificationList.Count - CurrentActionIndex - 1); } CurrentActionIndex++; ModificationList.Add(e.Change); } LayoutChanged?.Invoke(this, EventArgs.Empty); }
private void LayoutOnLayoutChanged(object sender, LayoutChangedEventArgs layoutChangedEventArgs) { var layout = sender as Layout; if (layout == null) { return; } try { GetLayoutInternal(layout).Wait(); } catch (Exception ex) { } }
void OnLayoutChanged(object sender, LayoutChangedEventArgs args) { if (Handler is LabelHandler labelHandler) { var platformView = labelHandler.PlatformView; var virtualView = labelHandler.VirtualView as Label; if (platformView == null || virtualView == null) { return; } SpannableString spannableString = null; if (virtualView.FormattedText != null) { spannableString = virtualView.ToSpannableString(); } platformView.RecalculateSpanPositions(virtualView, spannableString, new SizeRequest(new Size(args.Right - args.Left, args.Bottom - args.Top))); } }
/// <summary> /// base the layout of the parameter list on our layout /// </summary> /// <param name="e"></param> protected override void OnLayoutChanged(LayoutChangedEventArgs e) { base.OnLayoutChanged(e); ScriptLayout layout = e.Layout; switch (layout) { case ScriptLayout.None: break; case ScriptLayout.NotAlreadyEstablished: break; case ScriptLayout.Default: break; case ScriptLayout.Inline: ListLayout = ScriptLayout.Inline; break; case ScriptLayout.InlineBlock: ListLayout = ScriptLayout.Block; break; case ScriptLayout.Block: ListLayout = ScriptLayout.Block; break; default: break; } }
/// <summary> /// Make the block layout default to the same as the functions layout /// </summary> /// <param name="e"></param> protected override void OnLayoutChanged(LayoutChangedEventArgs e) { base.OnLayoutChanged(e); ScriptLayout layout = e.Layout; BlockLayout = layout; //switch (format) //{ // case ScriptFormat.None: // BlockFormat = ScriptFormat.None; // break; // case ScriptFormat.MultiLine: // BlockFormat = ScriptFormat.InlineBlock; // break; // case ScriptFormat.StartOnNewLine: // BlockFormat = ScriptFormat.Block; // break; // case ScriptFormat.Inline: // BlockFormat = ScriptFormat.Inline; // break; // case ScriptFormat.InlineBlock: // BlockFormat = ScriptFormat.InlineBlock; // break; // case ScriptFormat.Block: // BlockFormat = ScriptFormat.Block; // break; // default: // break; //} }