private void OnDisplayModeChanged(EDisplayMode displayMode) { switch (displayMode) { case EDisplayMode.ByteDisplay: txtCUnit.Text = ""; txtMUnit.Text = ""; txtYUnit.Text = ""; txtKUnit.Text = ""; c = color => sModel.CComponent(color, KGreedieness).ToString(CyanFormat); m = color => sModel.MComponent(color, KGreedieness).ToString(MagentaFormat); y = color => sModel.YComponent(color, KGreedieness).ToString(YellowFormat); k = color => sModel.KComponent(color, KGreedieness).ToString(BlackFormat); break; case EDisplayMode.PercentNoDecimal: txtCUnit.Text = "%"; txtMUnit.Text = "%"; txtYUnit.Text = "%"; txtKUnit.Text = "%"; c = color => sModel.CComponent(color, KGreedieness).PercentageOf(255).ToString(CyanFormat); m = color => sModel.MComponent(color, KGreedieness).PercentageOf(255).ToString(MagentaFormat); y = color => sModel.YComponent(color, KGreedieness).PercentageOf(255).ToString(YellowFormat); k = color => sModel.KComponent(color, KGreedieness).PercentageOf(255).ToString(BlackFormat); break; } }
private void OnDisplayModeChanged(EDisplayMode displayMode) { switch (displayMode) { case EDisplayMode.ByteDisplay: txtCUnit.Text = ""; txtMUnit.Text = ""; txtYUnit.Text = ""; txtKUnit.Text = ""; c = color => sModel.CComponent(color).ToString(); m = color => sModel.MComponent(color).ToString(); y = color => sModel.YComponent(color).ToString(); k = color => sModel.KComponent(color).ToString(); break; case EDisplayMode.PercentNoDecimal: txtCUnit.Text = "%"; txtMUnit.Text = "%"; txtYUnit.Text = "%"; txtKUnit.Text = "%"; c = color => sModel.CComponent(color).ToString(); m = color => sModel.MComponent(color).ToString(); y = color => sModel.YComponent(color).ToString(); k = color => sModel.KComponent(color).ToString(); break; } }
public void ResizeToJustIcon() { HelperUI.ModifyMethod(this, () => { isMin = EDisplayMode.JUST_ICON; RefreshMode(); }); }
private void ShowAllLogs() { for (var i = 0; i < _itemsViews.Count; i++) { _itemsViews[i].gameObject.SetActive(true); } _displayMode = EDisplayMode.All; StartCoroutine(RefreshFullView()); }
public void ResizeToJustIcon() { #if NETCOREAPP3_0 HelperUI.ModifyMethod(this, () => { isMin = EDisplayMode.JUST_ICON; RefreshMode(); }); #endif }
private void BttDown_Click_1(object sender, EventArgs e) { if (isMin == EDisplayMode.JUST_ICON) { isMin = EDisplayMode.EXPANDED; } else if (isMin == EDisplayMode.RESUME) { isMin = EDisplayMode.JUST_ICON; } else { isMin = EDisplayMode.RESUME; } RefreshMode(); }
private void OnDisplayModeChanged(EDisplayMode displayMode) { switch (displayMode) { case EDisplayMode.ByteDisplay: txtRUnit.Text = ""; txtGUnit.Text = ""; txtBUnit.Text = ""; r = c => c.R.ToString(CultureInfo.InvariantCulture); g = c => c.G.ToString(CultureInfo.InvariantCulture); b = c => c.B.ToString(CultureInfo.InvariantCulture); setR = (c, newR) => c.WithR(newR); setG = (c, newG) => c.WithG(newG); setB = (c, newB) => c.WithB(newB); break; case EDisplayMode.PercentNoDecimal: txtRUnit.Text = "%"; txtGUnit.Text = "%"; txtBUnit.Text = "%"; r = c => c.R.AsPercent().ToString(CultureInfo.InvariantCulture); g = c => c.G.AsPercent().ToString(CultureInfo.InvariantCulture); b = c => c.B.AsPercent().ToString(CultureInfo.InvariantCulture); setR = (c, newR) => c.WithR(FromPercent(newR)); setG = (c, newG) => c.WithG(FromPercent(newG)); setB = (c, newB) => c.WithB(FromPercent(newB)); break; } processEvents = false; txtR.Text = r(Color); txtG.Text = g(Color); txtB.Text = b(Color); processEvents = true; }
private void OnDisplayModeChanged(EDisplayMode displayMode) { switch (displayMode) { case EDisplayMode.ByteDisplay: txtCUnit.Text = ""; txtMUnit.Text = ""; txtYUnit.Text = ""; c = color => sCyan.Value(color).ToString(); m = color => sMagenta.Value(color).ToString(); y = color => sYellow.Value(color).ToString(); break; case EDisplayMode.PercentNoDecimal: txtCUnit.Text = "%"; txtMUnit.Text = "%"; txtYUnit.Text = "%"; c = color => sModel.CComponent(color).PercentageOf(255).ToString(CyanFormat); m = color => sModel.MComponent(color).PercentageOf(255).ToString(MagentaFormat); y = color => sModel.YComponent(color).PercentageOf(255).ToString(YellowFormat); break; } }
private void OnDisplayModeChanged(EDisplayMode displayMode) { switch (displayMode) { case EDisplayMode.ByteDisplay: txtRUnit.Text = ""; txtGUnit.Text = ""; txtBUnit.Text = ""; r = c => c.R.ToString(); g = c => c.G.ToString(); b = c => c.B.ToString(); setR = (c, newR) => c.WithR(newR); setG = (c, newG) => c.WithG(newG); setB = (c, newB) => c.WithB(newB); break; case EDisplayMode.PercentNoDecimal: txtRUnit.Text = "%"; txtGUnit.Text = "%"; txtBUnit.Text = "%"; r = c => c.R.AsPercent().ToString(); g = c => c.G.AsPercent().ToString(); b = c => c.B.AsPercent().ToString(); setR = (c, newR) => c.WithR(FromPercent(newR)); setG = (c, newG) => c.WithG(FromPercent(newG)); setB = (c, newB) => c.WithB(FromPercent(newB)); break; } processEvents = false; txtR.Text = r(Color); txtG.Text = g(Color); txtB.Text = b(Color); processEvents = true; }
/// <summary> /// Zeigt ein Fenster an und speichert ggf die gewählte Einstellung /// </summary> /// <param name="owner">Das übergeordnete Fenster</param> /// <returns><c>true</c>, falls der Dialog mit OK beendet wurde; /// <c>false</c> sonst.</returns> public static bool showDialog(Form owner) { //Fenster erzeugen foAnsicht fo = new foAnsicht(); //Voreinstellung EDisplayMode mode = TSegmentBase.Mode; if (mode == EDisplayMode.Ring) { fo.rbRinge.Checked = true; } else if (mode == EDisplayMode.Trapez) { fo.rbTrapeze.Checked = true; } //Fenster anzeigen fo.ShowDialog(owner); if (fo.DialogResult == DialogResult.OK) //Das Fenster wurde mit OK beendet { //Wahl speichern if (fo.rbRinge.Checked) { TSegmentBase.Mode = EDisplayMode.Ring; } else if (fo.rbTrapeze.Checked) { TSegmentBase.Mode = EDisplayMode.Trapez; } return(true); } return(false); }
private void ShowLogType(EConsoleType type) { for (var i = 0; i < _itemsViews.Count; i++) { if (_itemsViews[i].item.Type != type) { _itemsViews[i].gameObject.SetActive(false); } } switch (type) { case EConsoleType.Log: _displayMode = EDisplayMode.Logs; break; case EConsoleType.Warning: _displayMode = EDisplayMode.Warnings; break; case EConsoleType.Error: _displayMode = EDisplayMode.Errors; break; } }
public static DisplayType From(EDisplayMode DisplayMode) => new DisplayType(DisplayMode);
/// <summary> /// Statischer Konstruktor /// </summary> static TSegmentBase() { Mode = EDisplayMode.Ring; _MyBrush = new SolidBrush(Color.Black); _MyPen = new Pen(Color.Black); }
public static EOuterDisplayType Get_Outer(EDisplayMode DisplayMode) => new DisplayType(DisplayMode).Outer;
public static EInnerDisplayType Get_Inner(EDisplayMode DisplayMode) => new DisplayType(DisplayMode).Inner;
public DisplayType(EDisplayMode DisplayMode) { switch (DisplayMode) { case EDisplayMode.NONE: Outer = EOuterDisplayType.None; Inner = EInnerDisplayType.None; break; case EDisplayMode.BLOCK: Outer = EOuterDisplayType.Block; Inner = EInnerDisplayType.Flow_Root; break; case EDisplayMode.FLOW_ROOT: Outer = EOuterDisplayType.Block; Inner = EInnerDisplayType.Flow_Root; break; case EDisplayMode.INLINE: Outer = EOuterDisplayType.Inline; Inner = EInnerDisplayType.Flow; break; case EDisplayMode.INLINE_BLOCK: Outer = EOuterDisplayType.Inline; Inner = EInnerDisplayType.Flow_Root; break; case EDisplayMode.RUN_IN: Outer = EOuterDisplayType.Run_In; Inner = EInnerDisplayType.Flow; break; case EDisplayMode.LIST_ITEM: Outer = EOuterDisplayType.Block; Inner = EInnerDisplayType.Flow_Root; break; case EDisplayMode.FLEX: Outer = EOuterDisplayType.Block; Inner = EInnerDisplayType.Flex; break; case EDisplayMode.INLINE_FLEX: Outer = EOuterDisplayType.Inline; Inner = EInnerDisplayType.Flex; break; case EDisplayMode.GRID: Outer = EOuterDisplayType.Block; Inner = EInnerDisplayType.Grid; break; case EDisplayMode.INLINE_GRID: Outer = EOuterDisplayType.Inline; Inner = EInnerDisplayType.Grid; break; case EDisplayMode.TABLE: Outer = EOuterDisplayType.Block; Inner = EInnerDisplayType.Table; break; case EDisplayMode.INLINE_TABLE: Outer = EOuterDisplayType.Inline; Inner = EInnerDisplayType.Table; break; default: throw new NotImplementedException($"Display type \"{Lookup.Keyword(DisplayMode)}\" has not been implemented yet"); } }