/// <summary> /// コンストラクター /// </summary> /// <remarks> /// ノードのバウンディング ボックスは書き換えません。 /// </remarks> /// <param name="width">表示領域の横幅(ピクセル数)</param> /// <param name="height">表示領域の縦幅(ピクセル数)</param> public LineReader(int width, int height) { this.lines = new List<Line> (); this.index = 0; this.width = width; this.height = height; this.charSize = 24; this.color = new Color (255, 255, 255, 255); this.feedMode = FeedMode.Manual; this.feedParams = new FeedParameters (0, 0); this.tick = null; this.tack = null; this.tackWait = null; }
public void CreateFeed(Address owner, string name, FeedMode mode) { var pow = Runtime.Transaction.Hash.GetDifficulty(); Runtime.Expect(pow >= (int)ProofOfWork.Minimal, "expected proof of work"); Runtime.Expect(!string.IsNullOrEmpty(name), "name required"); Runtime.Expect(IsWitness(owner), "invalid witness"); Runtime.Expect(owner.IsUser, "owner address must be user address"); Runtime.Expect(Runtime.Nexus.CreateFeed(owner, name, mode), "feed creation failed"); Runtime.Notify(EventKind.FeedCreate, owner, name); }
public void CreateFeed(Address owner, string name, FeedMode mode) { var Runtime = this; Runtime.Expect(Runtime.IsRootChain(), "must be root chain"); var pow = Runtime.Transaction.Hash.GetDifficulty(); Runtime.Expect(pow >= (int)ProofOfWork.Minimal, "expected proof of work"); Runtime.Expect(!string.IsNullOrEmpty(name), "name required"); Runtime.Expect(owner.IsUser, "owner address must be user address"); Runtime.Expect(Runtime.IsStakeMaster(owner), "needs to be master"); Runtime.Expect(Runtime.IsWitness(owner), "invalid witness"); Runtime.Expect(Nexus.CreateFeed(RootStorage, owner, name, mode), "feed creation failed"); Runtime.Notify(EventKind.FeedCreate, owner, name); }
public void UnserializeData(BinaryReader reader) { Name = reader.ReadVarString(); Address = reader.ReadAddress(); Mode = (FeedMode)reader.ReadByte(); }
public OracleFeed(string name, Address address, FeedMode mode) { Name = name; Address = address; Mode = mode; }
public bool CreateFeed(Address owner, string name, FeedMode mode) { return(Nexus.CreateFeed(this.RootStorage, owner, name, mode)); }
/// <summary> /// フィード モードの変更 /// </summary> /// <remarks> /// フィード(自動送り)機能を自動送りに変更します。 /// </remarks> /// <note> /// フィード パラメーターを変更すると内部の時計がリセットされ、 /// 自動送り中の文字列が最初から表示し直します。仕様です。 /// </note> /// <param name="mode">フィード モード</param> public void SetFeedMode(FeedMode mode) { this.feedMode = mode; }