| | |
| | | scene.delay = obj; |
| | | btnSceneDelayInfo.Text = scene.GetDelayText(); |
| | | }; |
| | | Dictionary<string, string> items = new Dictionary<string, string>(); |
| | | items.Add("30", "30s"); |
| | | items.Add("60", "1min"); |
| | | items.Add("120", "2min"); |
| | | items.Add("300", "5min"); |
| | | new PublicAssmebly().SetSceneDelayDialog( action ,scene.delay); |
| | | |
| | | |
| | |
| | | }; |
| | | row.AddChidren(btnFunctionDelayInfo); |
| | | |
| | | if (Convert.ToInt32(scenefunction.delay) > 0) |
| | | try |
| | | { |
| | | btnFunctionDelayInfo.Text = Language.StringByID(StringId.Delay) + " " + new Scene() { delay = scenefunction.delay }.GetDelayText(); |
| | | int delayTime = 0; |
| | | int.TryParse(scenefunction.delay, out delayTime); |
| | | |
| | | if (!string.IsNullOrEmpty(scenefunction.delay) && delayTime > 0) |
| | | { |
| | | btnFunctionDelayInfo.Text = Language.StringByID(StringId.Delay) + " " + new Scene() { delay = scenefunction.delay }.GetDelayText(); |
| | | } |
| | | else |
| | | { |
| | | btnFunctionDelayInfo.Text = Language.StringByID(StringId.NoDelay); |
| | | } |
| | | } |
| | | else |
| | | catch (Exception ex) |
| | | { |
| | | btnFunctionDelayInfo.Text = Language.StringByID(StringId.NoDelay); |
| | | MainPage.Log("Error", $"场景编辑,转译数据异常:{ex.StackTrace}"); |
| | | } |
| | | |
| | | var btnFunctionFloorAndRoom = new Button() |