protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Action", true, out subEle); subEle.Value = Action.ToString(); ele.TryPathTo("Location", true, out subEle); subEle.Value = Location.ToString(); ele.TryPathTo("Target", true, out subEle); subEle.Value = Target.ToString(); ele.TryPathTo("Flags", true, out subEle); subEle.Value = Flags.ToString(); ele.TryPathTo("TimeMultiplier/Player", true, out subEle); subEle.Value = TimeMultiplierPlayer.ToString("G15"); ele.TryPathTo("TimeMultiplier/Target", true, out subEle); subEle.Value = TimeMultiplierTarget.ToString("G15"); ele.TryPathTo("TimeMultiplier/Global", true, out subEle); subEle.Value = TimeMultiplierGlobal.ToString("G15"); ele.TryPathTo("Time/Max", true, out subEle); subEle.Value = TimeMax.ToString("G15"); ele.TryPathTo("Time/Min", true, out subEle); subEle.Value = TimeMin.ToString("G15"); ele.TryPathTo("TargetPercentBetweenActors", true, out subEle); subEle.Value = TargetPercentBetweenActors.ToString("G15"); }
void ClearTimesStringSetup(float thatClearTime, Text ClearTime) { float TimeMin; float TimeSec; TimeSec = thatClearTime % 60; TimeMin = thatClearTime - TimeSec; TimeMin = (TimeMin / 60); string timeString = (TimeMin.ToString() + "min " + TimeSec.ToString() + "sec"); ClearTime.text = timeString; }
/// <summary> /// Fills in or modifies the given display info for the item</summary> /// <param name="item">Item</param> /// <param name="info">Display info to update</param> public void GetInfo(object item, ItemInfo info) { info.Label = Function; info.Properties = new[] { NumCalls.ToString(), TimeTotal.ToString(), TimeAverage.ToString(), TimeMin.ToString(), TimeMax.ToString(), TimeTotalInner.ToString(), TimeAverageInner.ToString(), TimeMinInner.ToString(), TimeMaxInner.ToString() }; info.IsLeaf = !CanBeLookedUp; info.ImageIndex = info.GetImageIndex(Atf.Resources.DataImage); }
//倒數計時 void timer_Tick(object sender, EventArgs e) { if (TimeSec > -1) { MinCount.Text = TimeMin.ToString("00"); SecCount.Text = TimeSec.ToString("00"); if (TimeSec > -1) { TimeSec--; if (TimeSec == 0) { TimeMin--; TimeSec = 60; } } } else if (SecCount.Text == "0") { Timer.Stop(); System.Windows.Forms.MessageBox.Show("Time Up !!!"); ClickCount = 0; } }