void Handle(Input.InsTrgr Action) { var p = this.Parent as TTsPage; if (!string.IsNullOrWhiteSpace(Ad)) { Msj = TT.InsertRec(p.PPId, Ad, Info, Email, Tel); if (!string.IsNullOrEmpty(Msj)) { Action.Cancelled = true; return; } } Opened = false; p.Data = null; Session.RunTaskForAll((s, sId) => { var cp = (s.Store[nameof(MasterPage)] as MasterPage).CurrentPage; if (cp is HHsPage) { (s.Store[nameof(MasterPage)] as MasterPage).CurrentPage.Data = null; s.CalculatePatchAndPushOnWebSocket(); } }); }
private void btnPrice_Click(object sender, EventArgs e) { //((((cosT+wm+(0.5 * wd ))/SH+aft)*2)+8)/32 if (!string.IsNullOrEmpty(tbCost.Text)) { //int Cost = tbCost.Text; Double Cost = Int32.Parse(tbCost.Text); Double WD = Int32.Parse(tbWD.Text); Double WM = Int32.Parse(tbWM.Text); Double SH = Int32.Parse(tbSh.Text); Double AFT = Int32.Parse(tbAft.Text); Double TT; if (WD >= 50) { TT = Math.Round(((((Cost + WM + (0.3 * WD)) / ((100 - SH) / 100) + AFT) * 2) + 8) / 32, 3); } else { TT = Math.Round(((((Cost + WM + (0.5 * WD)) / ((100 - SH) / 100) + AFT) * 2) + 8) / 32, 3); } tb_PRICE.Text = TT.ToString(); } else { tb_PRICE.DataBindings.Clear(); tb_PRICE.DataBindings.Add("Text", bs, "PRICE"); } }
public Token(long value, byte column, int line) { Type = TT.Integer; IntegerValue = value; Column = column; Line = line; }
public void ConnectdButtonHandler(bool initializing = false) { bool connectingRequired = string.IsNullOrEmpty(connectedRepositoryId) || connectedRepositoryId != CT.SelectedRepository.Id; connectedRepositoryId = null; if (connectingRequired) { if (callHandler(CT.Connect, "Couldn't load data")) { CMISSettings.ConnectPossible = true; TabNamesReset(); DataLoaded = true; if (!initializing) { FT.Reset(); TT.Reset(); } } } if (callHandler(callFTActivateTab, "Couldn't load folders")) { SelectedTab = 1; connectedRepositoryId = CT.SelectedRepository.Id; } }
private void TbSpeed_ValueChanged(object sender, EventArgs e) { TT.SetToolTip(TbSpeed, $"{Strings.SpeedSliderToolTip} {TbSpeed.Value}"); LblSpeed.Text = String.Format("F{0}", TbSpeed.Value); Settings.SetObject("Jog Speed", TbSpeed.Value); Core.JogSpeed = TbSpeed.Value; }
private void TbStep_ValueChanged(object sender, EventArgs e) { TT.SetToolTip(TbStep, $"{Strings.StepSliderToolTip} {TbStep.Value}"); LblStep.Text = TbStep.Value.ToString(); Settings.SetObject("Jog Step", TbStep.Value); Core.JogStep = TbStep.Value; }
public Token(TT token_type, string value = "") { ch = Lexer.ch; line = Lexer.line; type = token_type; content = value; }
public void DeselectThumbs() { foreach (ThumbTile TT in m_Thumbs) { TT.DeClicked(); } }
private void TbSpeed_ValueChanged(object sender, EventArgs e) { TT.SetToolTip(TbSpeed, string.Format("Speed: {0}", TbSpeed.Value)); Settings.SetObject("Jog Speed", TbSpeed.Value); Core.JogSpeed = TbSpeed.Value; needsave = true; }
private void TbFileName_MouseEnter(object sender, EventArgs e) { if (mLoadedFileName != null) { TT.Show(mLoadedFileName, TbFileName, 5000); } }
public void T15_Sequence_Nested_BER_Stream_IO() { using (var stream = new MemoryStream()) { var x = new X690.Sequence(); var s = new X690.Sequence(); var leaves = new X690.Node[] { new X690.Null(), new X690.Boolean(false), new X690.Boolean(true), new X690.Integer(-1), new X690.Integer(0), new X690.Integer(1), new X690.Text("WOOF!") { IsDefiniteLength = false }, new X690.Text("GRR.."), new X690.Text("WOOF!") { IsDefiniteLength = false }, new X690.Sequence() }; foreach (var leaf in leaves) { s.Nodes.Add(leaf); } x.Nodes.Add(s); x.Write(stream); stream.Position = 0; TT.Peek(x, stream); var y = X690.Read(stream); Assert.Equal(x, y); } }
/// <summary> /// 从列表尾部获取一个闲置的单元,如果不存在则创建一个新的 /// </summary> /// <returns>闲置单元</returns> public TT GetIdleUnit <TT>() where TT : T { TT unit = null; if (idleList.Count > 0) { while (idleList.Count > 0 && idleList[idleList.Count - 1] == null) { idleList.RemoveAt(idleList.Count - 1); } if (idleList.Count > 0) { unit = (TT)idleList[idleList.Count - 1]; idleList.RemoveAt(idleList.Count - 1); } } if (unit == null) { unit = CreateNewUnit <TT>(); unit.SetParentList(this); m_createdNum++; } workList.Add(unit); unit.unitStatu = PoolUnitStatuType.Work; OnUnitChangePool(unit); return(unit); }
public static string Thanhtien(string Soluong, string Dongia, string Giamgia) { Double SL, DG, GG, TT; if (Soluong == "") { SL = 0; } else { SL = Convert.ToDouble(Soluong); } if (Dongia == "") { DG = 0; } else { DG = Convert.ToDouble(Dongia); } if (Giamgia == "") { GG = 0; } else { GG = Convert.ToDouble(Giamgia); } TT = DG * SL - DG * SL * GG / 100; return(TT.ToString()); }
public void ActivateTab(string tabName) { if (Tabnames[tabName]) { return; } IsRunning = true; try { switch (tabName) { case "connectionTabItem": { Tabnames[tabName] = CT.ActivateTab(); break; } case "tableTabItem": { Tabnames[tabName] = TT.ActivateTab(); break; } case "documentTabItem": { Tabnames[tabName] = DT.ActivateTab(Settings.CreateSchema()); break; } } } catch (Exception e) { SIEEMessageBox.Show(e.Message, "Error in " + tabName, MessageBoxImage.Error); DataLoaded = false; SelectedTab = 0; TabNamesReset(); } finally { IsRunning = false; } }
private void Delete_Click(object sender, EventArgs e) { Base.Rows.Clear(); Base.Refresh(); AT.ReadOnly = false; Process.Clear(); AT.Clear(); BT.Clear(); WT.Clear(); TT.Clear(); panel2.BackColor = Color.Transparent; panel3.BackColor = Color.Transparent; panel4.BackColor = Color.Transparent; panel5.BackColor = Color.Transparent; panel6.BackColor = Color.Transparent; panel7.BackColor = Color.Transparent; label21.ForeColor = Color.WhiteSmoke; s1.ForeColor = Color.WhiteSmoke; s2.ForeColor = Color.WhiteSmoke; s3.ForeColor = Color.WhiteSmoke; s4.ForeColor = Color.WhiteSmoke; s5.ForeColor = Color.WhiteSmoke; s6.ForeColor = Color.WhiteSmoke; bs1.ForeColor = Color.WhiteSmoke; bs2.ForeColor = Color.WhiteSmoke; bs3.ForeColor = Color.WhiteSmoke; bs4.ForeColor = Color.WhiteSmoke; bs5.ForeColor = Color.WhiteSmoke; p1.ForeColor = Color.WhiteSmoke; p2.ForeColor = Color.WhiteSmoke; p3.ForeColor = Color.WhiteSmoke; p4.ForeColor = Color.WhiteSmoke; p5.ForeColor = Color.WhiteSmoke; }
private void TbStep_ValueChanged(object sender, EventArgs e) { TT.SetToolTip(TbStep, string.Format("Step: {0}", TbStep.Value)); Settings.SetObject("Jog Step", TbStep.Value); Core.JogStep = TbStep.Value; needsave = true; }
static double[] AB2B3, AE, A3, A4; //输出 static void Main(string[] args) { #region 参数值输入 try { Console.WriteLine("请按格式输入值,否则都按默认值计算!!!"); Console.Write("请输入w1(弧度制,例如3派请输入 3PI):"); string temp = Console.ReadLine().Replace("PI", ""); W1 = Convert.ToDouble(temp) * Math.PI; Console.Write("请输入θ1(角度制,且小于360°,列如90°请输入 90):"); TT = Convert.ToDouble(Console.ReadLine()); //角度 T1 = Angle2Radian(TT); //弧度 Console.Write("请输入l1:"); L1 = Convert.ToDouble(Console.ReadLine()); Console.Write("请输入l3:"); L3 = Convert.ToDouble(Console.ReadLine()); Console.Write("请输入l4:"); L4 = Convert.ToDouble(Console.ReadLine()); Console.Write("请输入l6:"); L6 = Convert.ToDouble(Console.ReadLine()); Console.Write("请输入l6':"); _L6 = Convert.ToDouble(Console.ReadLine()); } catch { Console.Write("输入格式不对,默认值进行计算"); } #endregion #region 循环次数计算 int n = (int)(360 - T1); n = n / 10 + 1; Console.WriteLine("循环{0}次", n.ToString()); S3 = new double[n]; SE = new double[n]; T3 = new double[n]; T4 = new double[n]; VB2B3 = new double[n]; VE = new double[n]; W3 = new double[n]; W4 = new double[n]; AB2B3 = new double[n]; AE = new double[n]; A3 = new double[n]; A4 = new double[n]; #endregion int i = 0; //for (int j = 0; j < n; j++) //{ // Console.Write("{0}\t", j); //} Console.WriteLine("角度\tS3\tSE\tθ3\tθ4\tVB2B3\tVE\tW3\tW4\tAB2B3\tAE\tε3\tε4"); for (; TT <= 360.0; TT += 10.0) { T1 = Angle2Radian(TT); AnalysisPosition(out S3[i], out SE[i], out T3[i], out T4[i]); AnalysisSpeed(S3[i], T3[i], T4[i], out VB2B3[i], out VE[i], out W3[i], out W4[i]); AnalysisAcceleration(S3[i], T3[i], T4[i], W3[i], W4[i], VB2B3[i], out AB2B3[i], out AE[i], out A3[i], out A4[i]); Console.WriteLine(TT.ToString() + "°\t{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}\t{11}", Math.Round(S3[i], 3), Math.Round(SE[i], 3), Math.Round(T3[i], 3), Math.Round(T4[i], 3), Math.Round(VB2B3[i], 3), Math.Round(VE[i], 3), Math.Round(W3[i], 3), Math.Round(W4[i], 3), Math.Round(AB2B3[i], 3), Math.Round(AE[i], 3), Math.Round(A3[i], 3), Math.Round(A4[i], 3)); i++; } Console.ReadLine(); }
public override void Initialize(UserControl control) { CT.Initialize(control); TT.Initialize(control); DT.Initialize(control); initializeTabnames(control); ActivateTab(SelectedTab); }
public MoveElementTool(TD parent, IList elements, List <TT> dataControls, TT dataControl, bool up) { this.parent = parent; this.elements = elements; this.dataControls = dataControls; this.dataControl = dataControl; this.times = up ? -1 : 1; }
private void button2_Click(object sender, EventArgs e) { CSC.ResetText(); CSM.ResetText(); DNTT.ResetText(); TT.ResetText(); TTCV.ResetText(); }
public AddRemoveElementTool(TD parent, IList elements, List <TT> dataControls, TT dataControl, bool isRemove) { this.parent = parent; this.elements = elements; this.dataControls = dataControls; this.dataControl = dataControl; this.isRemove = isRemove; }
public TemplateComposerWorker(T i, TT col) { //Discarded unreachable code: IL_0002, IL_0006 //IL_0003: Incompatible stack heights: 0 vs 1 //IL_0007: Incompatible stack heights: 0 vs 1 SingletonReader.PushGlobal(); workerTest = i; _AdvisorTest = col; }
private void IsToken(TT tokenType) { if (!EndTokens && Current.TokenType == tokenType) { _index++; return; } throw new Exception($"Encountered unexpected token {Current.TokenType}, but expected {tokenType}"); }
private bool TryToken(TT tokenType) { if (!EndTokens && Current.TokenType == tokenType) { _index++; return(true); } return(false); }
public override void Initialize(UserControl control) { CT.Initialize(control); FT.Initialize(control); DT.Initialize(control); TT.Initialize(control); ST.Initialize(control); initializeTabnames(control); }
private TT GetOwnerAs <TT>() where TT : DependencyObject { TT owner = Owner as TT; if (owner == null) { owner = (Owner != null ? Owner.ChildOfType <TT>() : null); } return(owner); }
private void button3_Click(object sender, EventArgs e) { var a1 = new { tyn = (UInt16)12, jj = "test111" }; var a2 = new { rnh = (UInt16)12, rttr = button1 }; TT t = new TT(); t.St = new List<string>() { "iii", "hyiy" }; t.Anon1 = new List<object>() { a1, a2 }; t.Anon2 = new List<object>() { a2, a1 }; t.TA = new DataTable("patients_tName", "tabNsp"); t.TA.Columns.Add("name"); t.TA.Columns.Add("id", typeof(Button)); t.TA.Rows.Add("sam", button1); t.TA.Rows.Add("mark", button2); t.TA.Rows.Add("mareek", button2); t.DS = new DataSet("uuu"); t.DS.Tables.Add(t.TA); // var wtw = (Button)t.TA.Rows[1][1]; TB b = new TB(); b.ttest = "1"; TB B = new TB(); B.ttest = "2"; t.TB1 = b; t.TB2 = Tuple.Create(11, b); t.TB3 = new List<Tuple<int, TB>>() { t.TB2 }; // t.Save(); t.D_str_TB = new SortedList<string, TB>(); t.DDS = new List<DataSet>() { t.DS }; string tt = t.D_str_TB.GetType().FullName; t.D_str_TB.Add("ku", b); Dictionary<string, TB> D_s_TB = new Dictionary<string, TB>(); D_s_TB.Add("oo", B); t.AR = new Dictionary<string, TB>[2] { D_s_TB, D_s_TB }; t.AAR = new List<Dictionary<string, TB>[]> { t.AR }; t.DD = new Dictionary<SortedList<string, TB>, TB>(); t.DD.Add(t.D_str_TB, b); t.L = new List<Dictionary<string, TB>>(); // t.L.Add(t.D_str_TB); t.L.Add(D_s_TB); t.l1 = t.L; t.l2 = t.L; t.ll = new List<List<Dictionary<string, TB>>>(); t.ll.Add(t.L); t.GetCache().Init();//Save(); var ww = t.GetCache(); string ert = t.GetCache().ToSerializableString(); t.Save(); t.LoadData(); TT t2 = new TT(); // t2.GetCache().FromSerializableString(ert); t2.LoadData(); Debug_.Debug.InitF(2, 1); Debug_.Debug.Print(t2.GetCache().ToString(), 1); Debug_.Debug.Print(t.GetCache().ToString(), 0); }
public void T03_Null_Stream_IO() { using (var stream = new MemoryStream()) { var x = new X690.Null(); x.Write(stream); TT.Peek(x, stream); stream.Position = 0; var y = X690.Read(stream); Assert.Equal(x, y); } }
void Handle(Input.UpdTrgr Action) { TT.UpdateRec(Id, Ad, Info, Email, Tel); Session.RunTaskForAll((s, id) => { s.CalculatePatchAndPushOnWebSocket(); }); Opened = false; }
private void Delete_Click(object sender, EventArgs e) { Base.Rows.Clear(); Base.Refresh(); AT.ReadOnly = false; Process.Clear(); AT.Clear(); BT.Clear(); WT.Clear(); TT.Clear(); }
private void RiseChanged() { string tooltip = Value.ToString(); if (tooltip != TT.GetToolTip(this)) { TT.SetToolTip(this, tooltip); } ValueChanged?.Invoke(this, new EventArgs()); }
public static FStr GetTT(TT tt) { if (tt == TT.Error) return "Error"; if (tt == TT.FatalError) return "FatalError"; if (tt == TT.Log) return "Log"; if (tt == TT.None) return "None"; if (tt == TT.Warning) return "Warning"; return "None"; }