-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
118 additions
and
8 deletions.
There are no files selected for viewing
Submodule Library
updated
88 files
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using DYMO.Label.Framework; | ||
using System.ComponentModel; | ||
using System.Reflection; | ||
using System.Text.RegularExpressions; | ||
|
||
namespace StuffDatabase.Components | ||
{ | ||
public class Opamp : BaseComponent, ILabelConvertable | ||
{ | ||
[Category("Specifics")] | ||
public double UnityGainBandwidth { get { return GetPar<double>(0); } set { SetPar<double>(value); } } | ||
|
||
[Category("Specifics")] | ||
public double Slewrate { get { return GetPar<double>(0); } set { SetPar<double>(value); } } | ||
|
||
[Category("Specifics")] | ||
public double IOut { get { return GetPar<double>(0); } set { SetPar<double>(value); } } | ||
|
||
|
||
|
||
|
||
|
||
string Spacing(double var, int space = 8) | ||
{ | ||
string hrd = Ext.ToHumanReadable(var, 0); | ||
int i = space - Regex.Match(hrd, @"[\d\.]+").Value.Length; | ||
return new string(' ', i) + hrd; | ||
} | ||
|
||
public void PopulateLabel(ILabel label) | ||
{ | ||
foreach (DYMO.Label.Framework.ILabelObject labelObj in label.Objects) | ||
{ | ||
string name = labelObj.Name; | ||
Match m = Regex.Match(name, @"([^_ \r\n]+)"); | ||
|
||
if (m.Success) | ||
{ | ||
switch (m.Groups[1].Value) | ||
{ | ||
default: | ||
PropertyInfo propInfo = this.GetType().GetProperty(m.Groups[1].Value); | ||
if (propInfo != null) | ||
{ | ||
string txt = propInfo.GetValue(this).ToString(); | ||
label.FillLabelObject(name, txt); | ||
} | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters